class Io::Flow::V0::Models::EcommercePlatform

The Ecommerce Platform defines what the organization is using for their ecommerce systems.

Attributes

id[R]
type[R]
version[R]

Public Class Methods

new(incoming={}) click to toggle source
# 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

Public Instance Methods

copy(incoming={}) click to toggle source
# 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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40612
def to_hash
  {
    :id => id,
    :type => type.value,
    :version => version
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40604
def to_json
  JSON.dump(to_hash)
end