Class: Lithic::Resources::FinancialAccounts::OpenToBuy

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/financial_accounts/open_to_buy.rb,
sig/lithic/resources/financial_accounts/open_to_buy.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ OpenToBuy

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

Parameters:



42
43
44
# File 'lib/lithic/resources/financial_accounts/open_to_buy.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(financial_account_token, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsOpenToBuy

Get the funds available for card spend backed by a given Security Account, along with the balances that amount is derived from.

Open to buy is the amount Lithic authorizes card spend against. It is not a stored balance, so it is recalculated on every request from the Security Account, the funds held against spend Lithic has already paid out to the networks on your behalf, and the spend that has not yet been collected. The accounts that feed the calculation depend on your program setup, so summary.settled_funds is null outside Commercial Charge.

Supported for Commercial Charge, Dynamic Reserve, and Secured Charge programs. Returns 404 if financial_account_token is not a Security Account you own, or if your program setup does not use an open to buy calculation.

Parameters:

  • financial_account_token (String) —

    Globally unique identifier for the Security Account to price

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

Returns:

See Also:



30
31
32
33
34
35
36
37
# File 'lib/lithic/resources/financial_accounts/open_to_buy.rb', line 30

def retrieve(, params = {})
  @client.request(
    method: :get,
    path: ["v1/financial_accounts/%1$s/open_to_buy", ],
    model: Lithic::FinancialAccounts::FinancialAccountsOpenToBuy,
    options: params[:request_options]
  )
end