Class: Io::Flow::V0::Models::ShopifyLocalizationSetting
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShopifyLocalizationSetting
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#datetime_range ⇒ Object
readonly
Returns the value of attribute datetime_range.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyLocalizationSetting
constructor
A new instance of ShopifyLocalizationSetting.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyLocalizationSetting
Returns a new instance of ShopifyLocalizationSetting.
51674 51675 51676 51677 51678 51679 51680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51674 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :method, :datetime_range], 'ShopifyLocalizationSetting') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @method = (x = opts.delete(:method); x.is_a?(::Io::Flow::V0::Models::ShopifyLocalizationMethod) ? x : ::Io::Flow::V0::Models::ShopifyLocalizationMethod.apply(x)) @datetime_range = (x = opts.delete(:datetime_range); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)) end |
Instance Attribute Details
#datetime_range ⇒ Object (readonly)
Returns the value of attribute datetime_range.
51672 51673 51674 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51672 def datetime_range @datetime_range end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
51672 51673 51674 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51672 def id @id end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
51672 51673 51674 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51672 def method @method end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51686 51687 51688 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51686 def copy(incoming={}) ShopifyLocalizationSetting.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51690 51691 51692 51693 51694 51695 51696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51690 def to_hash { :id => id, :method => method.value, :datetime_range => datetime_range.to_hash } end |
#to_json ⇒ Object
51682 51683 51684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51682 def to_json JSON.dump(to_hash) end |