Class: Io::Flow::V0::Clients::OrganizationDefaultBankAccounts
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::OrganizationDefaultBankAccounts
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #delete(organization) ⇒ Object
- #get(organization) ⇒ Object
-
#initialize(client) ⇒ OrganizationDefaultBankAccounts
constructor
A new instance of OrganizationDefaultBankAccounts.
- #put(organization, default_bank_account_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ OrganizationDefaultBankAccounts
Returns a new instance of OrganizationDefaultBankAccounts.
7675 7676 7677 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7675 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#delete(organization) ⇒ Object
7692 7693 7694 7695 7696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7692 def delete(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/default/bank/accounts").delete nil end |
#get(organization) ⇒ Object
7679 7680 7681 7682 7683 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7679 def get(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/default/bank/accounts").get ::Io::Flow::V0::Models::OrganizationDefaultBankAccount.new(r) end |
#put(organization, default_bank_account_form) ⇒ Object
7685 7686 7687 7688 7689 7690 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7685 def put(organization, default_bank_account_form) HttpClient::Preconditions.assert_class('organization', organization, String) (x = default_bank_account_form; x.is_a?(::Io::Flow::V0::Models::DefaultBankAccountForm) ? x : ::Io::Flow::V0::Models::DefaultBankAccountForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/default/bank/accounts").with_json(default_bank_account_form.to_json).put ::Io::Flow::V0::Models::OrganizationDefaultBankAccount.new(r) end |