Class: Lithic::Resources::FinancialAccounts::CreditConfiguration
- Inherits:
-
Object
- Object
- Lithic::Resources::FinancialAccounts::CreditConfiguration
- Defined in:
- lib/lithic/resources/financial_accounts/credit_configuration.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ CreditConfiguration
constructor
private
A new instance of CreditConfiguration.
-
#retrieve(financial_account_token, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountCreditConfig
Get an Account’s credit configuration.
-
#update(financial_account_token, auto_collection_configuration: nil, credit_limit: nil, credit_product_token: nil, external_bank_account_token: nil, tier: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountCreditConfig
Update an account’s credit configuration.
Constructor Details
#initialize(client:) ⇒ CreditConfiguration
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 CreditConfiguration.
62 63 64 |
# File 'lib/lithic/resources/financial_accounts/credit_configuration.rb', line 62 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(financial_account_token, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountCreditConfig
Get an Account’s credit configuration
18 19 20 21 22 23 24 25 |
# File 'lib/lithic/resources/financial_accounts/credit_configuration.rb', line 18 def retrieve(financial_account_token, params = {}) @client.request( method: :get, path: ["v1/financial_accounts/%1$s/credit_configuration", financial_account_token], model: Lithic::FinancialAccounts::FinancialAccountCreditConfig, options: params[:request_options] ) end |
#update(financial_account_token, auto_collection_configuration: nil, credit_limit: nil, credit_product_token: nil, external_bank_account_token: nil, tier: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountCreditConfig
Update an account’s credit configuration
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/lithic/resources/financial_accounts/credit_configuration.rb', line 48 def update(financial_account_token, params = {}) parsed, = Lithic::FinancialAccounts::CreditConfigurationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v1/financial_accounts/%1$s/credit_configuration", financial_account_token], body: parsed, model: Lithic::FinancialAccounts::FinancialAccountCreditConfig, options: ) end |