Class: Io::Flow::V0::Models::ShippingLaneDefaultTierForm

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

Returns a new instance of ShippingLaneDefaultTierForm.



47591
47592
47593
47594
47595
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47591

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:tier_id], 'ShippingLaneDefaultTierForm')
  @tier_id = HttpClient::Preconditions.assert_class('tier_id', opts.delete(:tier_id), String)
end

Instance Attribute Details

#tier_idObject (readonly)

Returns the value of attribute tier_id.



47589
47590
47591
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47589

def tier_id
  @tier_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47601
47602
47603
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47601

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

#to_hashObject



47605
47606
47607
47608
47609
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47605

def to_hash
  {
    :tier_id => tier_id
  }
end

#to_jsonObject



47597
47598
47599
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47597

def to_json
  JSON.dump(to_hash)
end