class Io::Flow::V0::Clients::ChannelDefaultBankAccounts

Public Class Methods

new(client) click to toggle source
# 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

Public Instance Methods

delete(channel) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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