Class: Io::Flow::V0::Models::PaymentMethodDataPaymentOption
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentMethodDataPaymentOption
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodDataPaymentOption
constructor
A new instance of PaymentMethodDataPaymentOption.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodDataPaymentOption
Returns a new instance of PaymentMethodDataPaymentOption.
57630 57631 57632 57633 57634 57635 57636 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57630 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :name], 'PaymentMethodDataPaymentOption') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @logo = (x = opts.delete(:logo); x.nil? ? nil : HttpClient::Preconditions.assert_class('logo', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodDataOptionLogo) ? x : ::Io::Flow::V0::Models::PaymentMethodDataOptionLogo.from_json(x)) }) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
57628 57629 57630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57628 def id @id end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
57628 57629 57630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57628 def logo @logo end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
57628 57629 57630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57628 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57642 57643 57644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57642 def copy(incoming={}) PaymentMethodDataPaymentOption.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
57646 57647 57648 57649 57650 57651 57652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57646 def to_hash { :id => id, :name => name, :logo => logo.nil? ? nil : logo.map { |o| o.to_hash } } end |
#to_json ⇒ Object
57638 57639 57640 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57638 def to_json JSON.dump(to_hash) end |