class Io::Flow::V0::Models::PaymentProcessor
Information about which payment processor performed the transaction and how it can be tracked in their system
Attributes
account[R]
operation_identifier[R]
processor[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::ExpandablePaymentProcessor::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 58332 def initialize(incoming={}) super(:discriminator => ExpandablePaymentProcessor::Types::PAYMENT_PROCESSOR) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:processor], 'PaymentProcessor') @processor = HttpClient::Preconditions.assert_class('processor', opts.delete(:processor), String) @operation_identifier = (x = opts.delete(:operation_identifier); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentProcessorIdentifier) ? x : ::Io::Flow::V0::Models::PaymentProcessorIdentifier.new(x))) @account = (x = opts.delete(:account); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentProcessorAccount) ? x : ::Io::Flow::V0::Models::PaymentProcessorAccount.new(x))) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58345 def copy(incoming={}) PaymentProcessor.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58349 def subtype_to_hash { :processor => processor, :operation_identifier => operation_identifier.nil? ? nil : operation_identifier.to_hash, :account => account.nil? ? nil : account.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58341 def to_json JSON.dump(to_hash) end