class Io::Flow::V0::Models::PaymentProcessorAccount

Information about an account with a payment processor

Attributes

identifier[R]
key[R]
organization[R]
parent_account[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58364
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization, :key, :identifier], 'PaymentProcessorAccount')
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
  @identifier = (x = opts.delete(:identifier); x.is_a?(::Io::Flow::V0::Models::PaymentProcessorIdentifier) ? x : ::Io::Flow::V0::Models::PaymentProcessorIdentifier.new(x))
  @parent_account = (x = opts.delete(:parent_account); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentProcessorAccountReference) ? x : ::Io::Flow::V0::Models::PaymentProcessorAccountReference.new(x)))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58377
def copy(incoming={})
  PaymentProcessorAccount.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58381
def to_hash
  {
    :organization => organization,
    :key => key,
    :identifier => identifier.to_hash,
    :parent_account => parent_account.nil? ? nil : parent_account.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58373
def to_json
  JSON.dump(to_hash)
end