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.



18608
18609
18610
18611
18612
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18608

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.



18606
18607
18608
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18606

def delivered_duty
  @delivered_duty
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



18618
18619
18620
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18618

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

#to_hashObject



18622
18623
18624
18625
18626
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18622

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

#to_jsonObject



18614
18615
18616
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18614

def to_json
  JSON.dump(to_hash)
end