Class: Io::Flow::V0::Models::PaymentMethodBrand
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentMethodBrand
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodBrand
constructor
A new instance of PaymentMethodBrand.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodBrand
Returns a new instance of PaymentMethodBrand.
50601 50602 50603 50604 50605 50606 50607 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50601 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :name, :images], 'PaymentMethodBrand') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @images = (x = opts.delete(:images); x.is_a?(::Io::Flow::V0::Models::PaymentMethodImages) ? x : ::Io::Flow::V0::Models::PaymentMethodImages.new(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
50599 50600 50601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50599 def id @id end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
50599 50600 50601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50599 def images @images end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
50599 50600 50601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50599 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50613 50614 50615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50613 def copy(incoming={}) PaymentMethodBrand.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50617 50618 50619 50620 50621 50622 50623 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50617 def to_hash { :id => id, :name => name, :images => images.to_hash } end |
#to_json ⇒ Object
50609 50610 50611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50609 def to_json JSON.dump(to_hash) end |