Class: MethodRuby::Resources::ManagedAccounts::Transactions
- Inherits:
-
Object
- Object
- MethodRuby::Resources::ManagedAccounts::Transactions
- Defined in:
- lib/method_ruby/resources/managed_accounts/transactions.rb
Overview
Method-managed accounts
Instance Method Summary collapse
-
#initialize(client:) ⇒ Transactions
constructor
private
A new instance of Transactions.
-
#list(macc_id, method_version:, from_date: nil, page: nil, page_cursor: nil, page_limit: nil, to_date: nil, request_options: {}) ⇒ MethodRuby::Models::ManagedAccounts::TransactionListResponse
Some parameter documentations has been truncated, see Models::ManagedAccounts::TransactionListParams for more details.
Constructor Details
#initialize(client:) ⇒ Transactions
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 Transactions.
52 53 54 |
# File 'lib/method_ruby/resources/managed_accounts/transactions.rb', line 52 def initialize(client:) @client = client end |
Instance Method Details
#list(macc_id, method_version:, from_date: nil, page: nil, page_cursor: nil, page_limit: nil, to_date: nil, request_options: {}) ⇒ MethodRuby::Models::ManagedAccounts::TransactionListResponse
Some parameter documentations has been truncated, see Models::ManagedAccounts::TransactionListParams for more details.
Returns a paginated list of transactions for a specific managed account.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/method_ruby/resources/managed_accounts/transactions.rb', line 34 def list(macc_id, params) query_params = [:from_date, :page, :page_cursor, :page_limit, :to_date] parsed, = MethodRuby::ManagedAccounts::TransactionListParams.dump_request(params) query = MethodRuby::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["managed_accounts/%1$s/transactions", macc_id], query: query, headers: parsed.except(*query_params).transform_keys(method_version: "method-version"), model: MethodRuby::Models::ManagedAccounts::TransactionListResponse, security: {secret_key: true}, options: ) end |