Class: Straddle::Resources::AccountSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/straddle/resources/account_settings.rb,
sig/straddle/resources/account_settings.rbs

Overview

Account settings define payment limits, capabilities, statement details, and policy controls for an account.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountSettings

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 AccountSettings.

Parameters:



38
39
40
# File 'lib/straddle/resources/account_settings.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(account_id, correlation_id: nil, request_id: nil, request_options: {}) ⇒ Straddle::Models::AccountSettingsResponse

Returns all effective settings for the account, including values inherited from its organization, platform, and system defaults.

Parameters:

  • account_id (String) —

    The ID of the account.

  • correlation_id (String) —

    Optional client-generated identifier for tracing a series of related requests.

  • request_id (String) —

    Optional client-generated identifier for tracing one request.

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

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/straddle/resources/account_settings.rb', line 24

def retrieve(, params = {})
  parsed, options = Straddle::AccountSettingRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/account_settings/%1$s", ],
    headers: parsed.transform_keys(correlation_id: "correlation-id", request_id: "request-id"),
    model: Straddle::AccountSettingsResponse,
    options: options
  )
end