Class: Io::Flow::V0::Models::ShopifyLocationFlowCenterMapping
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShopifyLocationFlowCenterMapping
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#flow_center ⇒ Object
readonly
Returns the value of attribute flow_center.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#shopify_location ⇒ Object
readonly
Returns the value of attribute shopify_location.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyLocationFlowCenterMapping
constructor
A new instance of ShopifyLocationFlowCenterMapping.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyLocationFlowCenterMapping
Returns a new instance of ShopifyLocationFlowCenterMapping.
45866 45867 45868 45869 45870 45871 45872 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45866 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 |
Instance Attribute Details
#flow_center ⇒ Object (readonly)
Returns the value of attribute flow_center.
45864 45865 45866 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45864 def flow_center @flow_center end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
45864 45865 45866 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45864 def id @id end |
#shopify_location ⇒ Object (readonly)
Returns the value of attribute shopify_location.
45864 45865 45866 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45864 def shopify_location @shopify_location end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
45878 45879 45880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45878 def copy(incoming={}) ShopifyLocationFlowCenterMapping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
45882 45883 45884 45885 45886 45887 45888 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45882 def to_hash { :id => id, :shopify_location => shopify_location.to_hash, :flow_center => flow_center.to_hash } end |
#to_json ⇒ Object
45874 45875 45876 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45874 def to_json JSON.dump(to_hash) end |