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.



59361
59362
59363
59364
59365
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59361

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.



59359
59360
59361
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59359

def tier_id
  @tier_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



59371
59372
59373
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59371

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

#to_hashObject



59375
59376
59377
59378
59379
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59375

def to_hash
  {
    :tier_id => tier_id
  }
end

#to_jsonObject



59367
59368
59369
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59367

def to_json
  JSON.dump(to_hash)
end