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.
30196 30197 30198 30199 30200 30201 30202 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30196 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.
30194 30195 30196 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30194 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
30194 30195 30196 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30194 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
30194 30195 30196 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30194 def version @version end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30208 30209 30210 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30208 def copy(incoming={}) EcommercePlatform.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
30212 30213 30214 30215 30216 30217 30218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30212 def to_hash { :id => id, :type => type.value, :version => version } end |
#to_json ⇒ Object
30204 30205 30206 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30204 def to_json JSON.dump(to_hash) end |