Class: Amocrm::Resources::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/amocrm/resources/account.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Account

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Account.

Parameters:



32
33
34
# File 'lib/amocrm/resources/account.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#get(with: nil, request_options: {}) ⇒ Amocrm::Models::AccountGetResponse::AccountInfo, Amocrm::Models::AccountGetResponse::Problem

Get account info.

Parameters:

  • with (String)

    Additional data to include (comma-separated).

  • request_options (Amocrm::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/amocrm/resources/account.rb', line 17

def get(params = {})
  parsed, options = Amocrm::AccountGetParams.dump_request(params)
  query = Amocrm::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "api/v4/account",
    query: query,
    model: Amocrm::Models::AccountGetResponse,
    options: options
  )
end