Class: Io::Flow::V0::Models::PaymentProcessor
- Inherits:
-
ExpandablePaymentProcessor
- Object
- ExpandablePaymentProcessor
- Io::Flow::V0::Models::PaymentProcessor
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Information about which payment processor performed the transaction and how it can be tracked in their system
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#operation_identifier ⇒ Object
readonly
Returns the value of attribute operation_identifier.
-
#processor ⇒ Object
readonly
Returns the value of attribute processor.
Attributes inherited from ExpandablePaymentProcessor
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentProcessor
constructor
A new instance of PaymentProcessor.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExpandablePaymentProcessor
Constructor Details
#initialize(incoming = {}) ⇒ PaymentProcessor
Returns a new instance of PaymentProcessor.
51567 51568 51569 51570 51571 51572 51573 51574 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51567 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 |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
51565 51566 51567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51565 def account @account end |
#operation_identifier ⇒ Object (readonly)
Returns the value of attribute operation_identifier.
51565 51566 51567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51565 def operation_identifier @operation_identifier end |
#processor ⇒ Object (readonly)
Returns the value of attribute processor.
51565 51566 51567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51565 def processor @processor end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51580 51581 51582 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51580 def copy(incoming={}) PaymentProcessor.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
51584 51585 51586 51587 51588 51589 51590 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51584 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 ⇒ Object
51576 51577 51578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51576 def to_json JSON.dump(to_hash) end |