generated/google-apis-mybusinessaccountmanagement_v1/lib/google/apis/mybusinessaccountmanagement_v1/service.rb
# Lists all of the accounts for the authenticated user. This includes all
# accounts that the user owns, as well as any accounts for which the user has
# management rights.
# @param [String] filter
#   Optional. A filter constraining the accounts to return. The response includes
#   only entries that match the filter. If `filter` is empty, then no constraints
#   are applied and all accounts (paginated) are retrieved for the requested
#   account. For example, a request with the filter `type=USER_GROUP` will only
#   return user groups. The `type` field is the only supported filter.
# @param [Fixnum] page_size
#   Optional. How many accounts to fetch per page. The minimum supported page_size
#   is 2. The default and maximum is 20.
# @param [String] page_token
#   Optional. If specified, the next page of accounts is retrieved. The `pageToken`
#   is returned when a call to `accounts.list` returns more results than can fit
#   into the requested page size.
# @param [String] parent_account
#   Optional. The resource name of the account for which the list of directly
#   accessible accounts is to be retrieved. This only makes sense for
#   Organizations and User Groups. If empty, will return `ListAccounts` for the
#   authenticated user. `accounts/`account_id``.
# @param [String] fields
#   Selector specifying which fields to include in a partial response.
# @param [String] quota_user
#   Available to use for quota purposes for server-side applications. Can be any
#   arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
#   Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
Lists all of the accounts for the authenticated user. This includes all
accounts that the user owns, as well as any accounts for which the user has
management rights.
Lists all of the accounts for the authenticated user . This includes all accounts that the user owns as well as any accounts for which the user has management rights .
def list_accounts(filter: nil, page_size: nil, page_token: nil, parent_account: nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:get, 'v1/accounts', options)
          command.response_representation = Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse::Representation
          command.response_class = Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse
          command.query['filter'] = filter unless filter.nil?
          command.query['pageSize'] = page_size unless page_size.nil?
          command.query['pageToken'] = page_token unless page_token.nil?
          command.query['parentAccount'] = parent_account unless parent_account.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          execute_or_queue_command(command, &block)
        end
def list_accounts ( filter : nil , page_size : nil , page_token : nil , parent_account : nil , fields : nil , quota_user : nil , options : nil , & block ) command = make_simple_command ( :get , 'v1/accounts' , options ) command . response_representation = Google :: Apis :: MybusinessaccountmanagementV1 :: ListAccountsResponse :: Representation command . response_class = Google :: Apis :: MybusinessaccountmanagementV1 :: ListAccountsResponse command . query [ 'filter' ] = filter unless filter . nil? command . query [ 'pageSize' ] = page_size unless page_size . nil? command . query [ 'pageToken' ] = page_token unless page_token . nil? command . query [ 'parentAccount' ] = parent_account unless parent_account . nil? command . query [ 'fields' ] = fields unless fields . nil? command . query [ 'quotaUser' ] = quota_user unless quota_user . nil? execute_or_queue_command ( command , & block ) end
Lists all of the accounts for the authenticated user.
Lists all of the accounts for the authenticated user .
None
Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse
[Google::Apis::ServerError] An error occurred on the server and the request can be retried
[ Google :: Apis :: ServerError ] An error occurred on the server and the request can be retried
[Google::Apis::ClientError] The request is invalid and should not be retried without modification
[ Google :: Apis :: ClientError ] The request is invalid and should not be retried without modification
[Google::Apis::AuthorizationError] Authorization is required
[ Google :: Apis :: AuthorizationError ] Authorization is required
filter
page_size
page_token
parent_account
fields
quota_user
options
block
options Request-specific options
options Request - specific options
]
Result & error if block supplied
Result & error if block supplied
result
parsed result object
parsed result object
err
error object if request failed
error object if request failed