Class: Io::Flow::V0::Models::ExperienceSettings

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 = {}) ⇒ ExperienceSettings

Returns a new instance of ExperienceSettings.



15622
15623
15624
15625
15626
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15622

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))
end

Instance Attribute Details

#delivered_dutyObject (readonly)

Returns the value of attribute delivered_duty.



15620
15621
15622
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15620

def delivered_duty
  @delivered_duty
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



15632
15633
15634
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15632

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

#to_hashObject



15636
15637
15638
15639
15640
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15636

def to_hash
  {
    :delivered_duty => delivered_duty.to_hash
  }
end

#to_jsonObject



15628
15629
15630
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15628

def to_json
  JSON.dump(to_hash)
end