class Io::Flow::V0::Models::ShopifyLocationFlowCenterMapping

Attributes

flow_center[R]
id[R]
shopify_location[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 67816
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :shopify_location, :flow_center], 'ShopifyLocationFlowCenterMapping')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @shopify_location = (x = opts.delete(:shopify_location); x.is_a?(::Io::Flow::V0::Models::ShopifyLocationReference) ? x : ::Io::Flow::V0::Models::ShopifyLocationReference.new(x))
  @flow_center = (x = opts.delete(:flow_center); x.is_a?(::Io::Flow::V0::Models::FlowCenterReference) ? x : ::Io::Flow::V0::Models::FlowCenterReference.new(x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 67828
def copy(incoming={})
  ShopifyLocationFlowCenterMapping.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 67832
def to_hash
  {
    :id => id,
    :shopify_location => shopify_location.to_hash,
    :flow_center => flow_center.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 67824
def to_json
  JSON.dump(to_hash)
end