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.
51912 51913 51914 51915 51916 51917 51918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51912 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.
51910 51911 51912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51910 def flow_center @flow_center end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
51910 51911 51912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51910 def id @id end |
#shopify_location ⇒ Object (readonly)
Returns the value of attribute shopify_location.
51910 51911 51912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51910 def shopify_location @shopify_location end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51924 51925 51926 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51924 def copy(incoming={}) ShopifyLocationFlowCenterMapping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51928 51929 51930 51931 51932 51933 51934 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51928 def to_hash { :id => id, :shopify_location => shopify_location.to_hash, :flow_center => flow_center.to_hash } end |
#to_json ⇒ Object
51920 51921 51922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51920 def to_json JSON.dump(to_hash) end |