Class: Io::Flow::V0::Models::ExperienceSettings
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceSettings
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#checkout_settings ⇒ Object
readonly
Returns the value of attribute checkout_settings.
-
#delivered_duty ⇒ Object
readonly
Returns the value of attribute delivered_duty.
-
#logistics_settings ⇒ Object
readonly
Returns the value of attribute logistics_settings.
-
#pricing_settings ⇒ Object
readonly
Returns the value of attribute pricing_settings.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperienceSettings
constructor
A new instance of ExperienceSettings.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperienceSettings
Returns a new instance of ExperienceSettings.
30917 30918 30919 30920 30921 30922 30923 30924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30917 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:delivered_duty], 'ExperienceSettings') @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDutySetting) ? x : ::Io::Flow::V0::Models::DeliveredDutySetting.new(x)) @pricing_settings = (x = opts.delete(:pricing_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PricingSettings) ? x : ::Io::Flow::V0::Models::PricingSettings.new(x))) @logistics_settings = (x = opts.delete(:logistics_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogisticsSettings) ? x : ::Io::Flow::V0::Models::LogisticsSettings.new(x))) @checkout_settings = (x = opts.delete(:checkout_settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CheckoutSettings) ? x : ::Io::Flow::V0::Models::CheckoutSettings.new(x))) end |
Instance Attribute Details
#checkout_settings ⇒ Object (readonly)
Returns the value of attribute checkout_settings.
30915 30916 30917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30915 def checkout_settings @checkout_settings end |
#delivered_duty ⇒ Object (readonly)
Returns the value of attribute delivered_duty.
30915 30916 30917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30915 def delivered_duty @delivered_duty end |
#logistics_settings ⇒ Object (readonly)
Returns the value of attribute logistics_settings.
30915 30916 30917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30915 def logistics_settings @logistics_settings end |
#pricing_settings ⇒ Object (readonly)
Returns the value of attribute pricing_settings.
30915 30916 30917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30915 def pricing_settings @pricing_settings end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30930 30931 30932 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30930 def copy(incoming={}) ExperienceSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
30934 30935 30936 30937 30938 30939 30940 30941 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30934 def to_hash { :delivered_duty => delivered_duty.to_hash, :pricing_settings => pricing_settings.nil? ? nil : pricing_settings.to_hash, :logistics_settings => logistics_settings.nil? ? nil : logistics_settings.to_hash, :checkout_settings => checkout_settings.nil? ? nil : checkout_settings.to_hash } end |
#to_json ⇒ Object
30926 30927 30928 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30926 def to_json JSON.dump(to_hash) end |