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.
40596 40597 40598 40599 40600 40601 40602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40596 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.
40594 40595 40596 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40594 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
40594 40595 40596 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40594 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
40594 40595 40596 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40594 def version @version end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40608 40609 40610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40608 def copy(incoming={}) EcommercePlatform.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
40612 40613 40614 40615 40616 40617 40618 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40612 def to_hash { :id => id, :type => type.value, :version => version } end |
#to_json ⇒ Object
40604 40605 40606 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40604 def to_json JSON.dump(to_hash) end |