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.



50173
50174
50175
50176
50177
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50173

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.



50171
50172
50173
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50171

def tier_id
  @tier_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50183
50184
50185
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50183

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

#to_hashObject



50187
50188
50189
50190
50191
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50187

def to_hash
  {
    :tier_id => tier_id
  }
end

#to_jsonObject



50179
50180
50181
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50179

def to_json
  JSON.dump(to_hash)
end