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.
56974 56975 56976 56977 56978 56979 56980 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56974 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.
56972 56973 56974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56972 def id @id end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
56972 56973 56974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56972 def images @images end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
56972 56973 56974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56972 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56986 56987 56988 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56986 def copy(incoming={}) PaymentMethodBrand.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56990 56991 56992 56993 56994 56995 56996 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56990 def to_hash { :id => id, :name => name, :images => images.to_hash } end |
#to_json ⇒ Object
56982 56983 56984 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56982 def to_json JSON.dump(to_hash) end |