Class: Io::Flow::V0::Models::ExperienceLogisticsTierSummaryPrices

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

Returns a new instance of ExperienceLogisticsTierSummaryPrices.



29615
29616
29617
29618
29619
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29615

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:minimum], 'ExperienceLogisticsTierSummaryPrices')
  @minimum = (x = opts.delete(:minimum); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
end

Instance Attribute Details

#minimumObject (readonly)

Returns the value of attribute minimum.



29613
29614
29615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29613

def minimum
  @minimum
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29625
29626
29627
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29625

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

#to_hashObject



29629
29630
29631
29632
29633
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29629

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

#to_jsonObject



29621
29622
29623
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29621

def to_json
  JSON.dump(to_hash)
end