Class: Io::Flow::V0::Models::PaymentProcessorAccount
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentProcessorAccount
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Information about an account with a payment processor
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#parent_account ⇒ Object
readonly
Returns the value of attribute parent_account.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentProcessorAccount
constructor
A new instance of PaymentProcessorAccount.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentProcessorAccount
Returns a new instance of PaymentProcessorAccount.
51599 51600 51601 51602 51603 51604 51605 51606 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51599 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 |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
51597 51598 51599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51597 def identifier @identifier end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
51597 51598 51599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51597 def key @key end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
51597 51598 51599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51597 def organization @organization end |
#parent_account ⇒ Object (readonly)
Returns the value of attribute parent_account.
51597 51598 51599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51597 def parent_account @parent_account end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51612 51613 51614 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51612 def copy(incoming={}) PaymentProcessorAccount.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51616 51617 51618 51619 51620 51621 51622 51623 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51616 def to_hash { :organization => organization, :key => key, :identifier => identifier.to_hash, :parent_account => parent_account.nil? ? nil : parent_account.to_hash } end |
#to_json ⇒ Object
51608 51609 51610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51608 def to_json JSON.dump(to_hash) end |