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.
53305 53306 53307 53308 53309 53310 53311 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53305 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.
53303 53304 53305 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53303 def id @id end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
53303 53304 53305 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53303 def logo @logo end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
53303 53304 53305 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53303 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53317 53318 53319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53317 def copy(incoming={}) PaymentMethodDataPaymentOption.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53321 53322 53323 53324 53325 53326 53327 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53321 def to_hash { :id => id, :name => name, :logo => logo.nil? ? nil : logo.map { |o| o.to_hash } } end |
#to_json ⇒ Object
53313 53314 53315 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53313 def to_json JSON.dump(to_hash) end |