Class: Lithic::Resources::FinancialAccounts::OpenToBuy
- Inherits:
-
Object
- Object
- Lithic::Resources::FinancialAccounts::OpenToBuy
- Defined in:
- lib/lithic/resources/financial_accounts/open_to_buy.rb,
sig/lithic/resources/financial_accounts/open_to_buy.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ OpenToBuy
constructor
private
A new instance of OpenToBuy.
-
#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.
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.
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.
30 31 32 33 34 35 36 37 |
# File 'lib/lithic/resources/financial_accounts/open_to_buy.rb', line 30 def retrieve(financial_account_token, params = {}) @client.request( method: :get, path: ["v1/financial_accounts/%1$s/open_to_buy", financial_account_token], model: Lithic::FinancialAccounts::FinancialAccountsOpenToBuy, options: params[:request_options] ) end |