Class: Io::Flow::V0::Clients::ChannelDefaultBankAccounts
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::ChannelDefaultBankAccounts
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #delete(channel) ⇒ Object
- #get(channel) ⇒ Object
-
#initialize(client) ⇒ ChannelDefaultBankAccounts
constructor
A new instance of ChannelDefaultBankAccounts.
- #put(channel, default_bank_account_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ ChannelDefaultBankAccounts
Returns a new instance of ChannelDefaultBankAccounts.
5913 5914 5915 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5913 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#delete(channel) ⇒ Object
5930 5931 5932 5933 5934 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5930 def delete(channel) HttpClient::Preconditions.assert_class('channel', channel, String) r = @client.request("/channel/#{CGI.escape(channel)}/default/bank/accounts").delete nil end |
#get(channel) ⇒ Object
5917 5918 5919 5920 5921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5917 def get(channel) HttpClient::Preconditions.assert_class('channel', channel, String) r = @client.request("/channel/#{CGI.escape(channel)}/default/bank/accounts").get ::Io::Flow::V0::Models::ChannelDefaultBankAccount.new(r) end |
#put(channel, default_bank_account_form) ⇒ Object
5923 5924 5925 5926 5927 5928 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5923 def put(channel, default_bank_account_form) HttpClient::Preconditions.assert_class('channel', channel, 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("/channel/#{CGI.escape(channel)}/default/bank/accounts").with_json(default_bank_account_form.to_json).put ::Io::Flow::V0::Models::ChannelDefaultBankAccount.new(r) end |