Class: Io::Flow::V0::Models::EcommercePlatform
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::EcommercePlatform
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
The Ecommerce Platform defines what the organization is using for their ecommerce systems.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ EcommercePlatform
constructor
A new instance of EcommercePlatform.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ EcommercePlatform
Returns a new instance of EcommercePlatform.
37377 37378 37379 37380 37381 37382 37383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37377 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :type], 'EcommercePlatform') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::EcommercePlatformType) ? x : ::Io::Flow::V0::Models::EcommercePlatformType.apply(x)) @version = (x = opts.delete(:version); x.nil? ? nil : HttpClient::Preconditions.assert_class('version', x, String)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
37375 37376 37377 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37375 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
37375 37376 37377 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37375 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
37375 37376 37377 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37375 def version @version end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
37389 37390 37391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37389 def copy(incoming={}) EcommercePlatform.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
37393 37394 37395 37396 37397 37398 37399 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37393 def to_hash { :id => id, :type => type.value, :version => version } end |
#to_json ⇒ Object
37385 37386 37387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37385 def to_json JSON.dump(to_hash) end |