Class: Io::Flow::V0::Models::ShopifyLocationFlowCenterMappingForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ShopifyLocationFlowCenterMappingForm

Returns a new instance of ShopifyLocationFlowCenterMappingForm.



62940
62941
62942
62943
62944
62945
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62940

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:shopify_location_id, :flow_center_key], 'ShopifyLocationFlowCenterMappingForm')
  @shopify_location_id = HttpClient::Preconditions.assert_class('shopify_location_id', opts.delete(:shopify_location_id), Integer)
  @flow_center_key = HttpClient::Preconditions.assert_class('flow_center_key', opts.delete(:flow_center_key), String)
end

Instance Attribute Details

#flow_center_keyObject (readonly)

Returns the value of attribute flow_center_key.



62938
62939
62940
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62938

def flow_center_key
  @flow_center_key
end

#shopify_location_idObject (readonly)

Returns the value of attribute shopify_location_id.



62938
62939
62940
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62938

def shopify_location_id
  @shopify_location_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



62951
62952
62953
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62951

def copy(incoming={})
  ShopifyLocationFlowCenterMappingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



62955
62956
62957
62958
62959
62960
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62955

def to_hash
  {
    :shopify_location_id => shopify_location_id,
    :flow_center_key => flow_center_key
  }
end

#to_jsonObject



62947
62948
62949
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62947

def to_json
  JSON.dump(to_hash)
end