Class: MethodRuby::Resources::ManagedAccounts::Transactions

Inherits:
Object
  • Object
show all
Defined in:
lib/method_ruby/resources/managed_accounts/transactions.rb

Overview

Method-managed accounts

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • macc_id (String)

    Path param: Unique identifier for the managed account.

  • method_version (Symbol, MethodRuby::Models::ManagedAccounts::TransactionListParams::MethodVersion)

    Header param: API version to use for this request. This spec targets ‘2025-12-01

  • from_date (Date)

    Query param: Filter results from this date (inclusive, YYYY-MM-DD format).

  • page (Integer)

    Query param: Page number for pagination (1-indexed).

  • page_cursor (String)

    Query param: Cursor for cursor-based pagination. Use the value from ‘Pagination-

  • page_limit (Integer)

    Query param: Number of items per page.

  • to_date (Date)

    Query param: Filter results to this date (inclusive, YYYY-MM-DD format).

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

Returns:

See Also:



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, options = 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: options
  )
end