Class: ChartMogul::Account

Inherits:
APIResource show all
Includes:
ChartMogul::API::Actions::Custom
Defined in:
lib/chartmogul/account.rb

Constant Summary

Constants inherited from APIResource

ChartMogul::APIResource::BACKOFF_FACTOR, ChartMogul::APIResource::INTERVAL, ChartMogul::APIResource::INTERVAL_RANDOMNESS, ChartMogul::APIResource::MAX_INTERVAL, ChartMogul::APIResource::RETRY_EXCEPTIONS, ChartMogul::APIResource::RETRY_STATUSES, ChartMogul::APIResource::THREAD_CONNECTION_KEY

Class Method Summary collapse

Methods included from ChartMogul::API::Actions::Custom

#custom!, #custom_without_assign!, included

Methods inherited from APIResource

build_connection, build_query_path, connection, #custom_with_query_params!, custom_with_query_params!, extract_query_params, #extract_query_params, handle_other_error, handle_request_error, handling_errors, immutable_keys, json_patch, json_post, json_put, #path_with_query_params, query_params, set_immutable_keys, set_resource_name, set_resource_path, set_resource_root_key, writeable_query_param

Methods inherited from Object

#allowed_for_write?, #assign_all_attributes, #assign_writeable_attributes, attributes, define_private_writer, define_reader, define_writer, #initialize, #instance_attributes, new_from_json, readonly_attr, #serialize_for_write, #serialized_value_for_attr, writeable_attr, writeable_attributes

Constructor Details

This class inherits a constructor from ChartMogul::Object

Class Method Details

.retrieve(include: nil) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/chartmogul/account.rb', line 23

def self.retrieve(include: nil)
  path = '/v1/account'
  if include
    fields = Array(include).map { |f| CGI.escape(f) }.join(',')
    path += "?include=#{fields}"
  end
  custom!(:get, path)
end