Class: Io::Flow::V0::Models::DeliveryOptionCostDetailComponentKey

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ DeliveryOptionCostDetailComponentKey

Returns a new instance of DeliveryOptionCostDetailComponentKey.



17269
17270
17271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17269

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



17267
17268
17269
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17267

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

Returns the instance of DeliveryOptionCostDetailComponentKey for this value, creating a new instance for an unknown value



17274
17275
17276
17277
17278
17279
17280
17281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17274

def DeliveryOptionCostDetailComponentKey.apply(value)
  if value.instance_of?(DeliveryOptionCostDetailComponentKey)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || DeliveryOptionCostDetailComponentKey.new(value))
  end
end

.center_commercial_invoice_feeObject



17325
17326
17327
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17325

def DeliveryOptionCostDetailComponentKey.center_commercial_invoice_fee
  @@_center_commercial_invoice_fee ||= DeliveryOptionCostDetailComponentKey.new('center_commercial_invoice_fee')
end

.center_inbound_carton_feeObject



17329
17330
17331
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17329

def DeliveryOptionCostDetailComponentKey.center_inbound_carton_fee
  @@_center_inbound_carton_fee ||= DeliveryOptionCostDetailComponentKey.new('center_inbound_carton_fee')
end

.center_outbound_carton_feeObject



17333
17334
17335
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17333

def DeliveryOptionCostDetailComponentKey.center_outbound_carton_fee
  @@_center_outbound_carton_fee ||= DeliveryOptionCostDetailComponentKey.new('center_outbound_carton_fee')
end

.from_string(value) ⇒ Object

Returns the instance of DeliveryOptionCostDetailComponentKey for this value, or nil if not found



17284
17285
17286
17287
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17284

def DeliveryOptionCostDetailComponentKey.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  DeliveryOptionCostDetailComponentKey.ALL.find { |v| v.value == value }
end

.ratecard_base_costObject



17293
17294
17295
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17293

def DeliveryOptionCostDetailComponentKey.ratecard_base_cost
  @@_ratecard_base_cost ||= DeliveryOptionCostDetailComponentKey.new('ratecard_base_cost')
end

.ratecard_ddp_feeObject



17297
17298
17299
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17297

def DeliveryOptionCostDetailComponentKey.ratecard_ddp_fee
  @@_ratecard_ddp_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_ddp_fee')
end

.ratecard_duties_taxes_paid_surcharge_feeObject



17321
17322
17323
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17321

def DeliveryOptionCostDetailComponentKey.ratecard_duties_taxes_paid_surcharge_fee
  @@_ratecard_duties_taxes_paid_surcharge_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_duties_taxes_paid_surcharge_fee')
end

.ratecard_emergency_situation_surcharge_feeObject



17313
17314
17315
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17313

def DeliveryOptionCostDetailComponentKey.ratecard_emergency_situation_surcharge_fee
  @@_ratecard_emergency_situation_surcharge_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_emergency_situation_surcharge_fee')
end

.ratecard_fuel_surchargeObject



17301
17302
17303
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17301

def DeliveryOptionCostDetailComponentKey.ratecard_fuel_surcharge
  @@_ratecard_fuel_surcharge ||= DeliveryOptionCostDetailComponentKey.new('ratecard_fuel_surcharge')
end

.ratecard_oversized_shipment_feeObject



17305
17306
17307
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17305

def DeliveryOptionCostDetailComponentKey.ratecard_oversized_shipment_fee
  @@_ratecard_oversized_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_oversized_shipment_fee')
end

.ratecard_peak_surcharge_feeObject



17317
17318
17319
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17317

def DeliveryOptionCostDetailComponentKey.ratecard_peak_surcharge_fee
  @@_ratecard_peak_surcharge_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_peak_surcharge_fee')
end

.ratecard_rural_shipment_feeObject



17309
17310
17311
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17309

def DeliveryOptionCostDetailComponentKey.ratecard_rural_shipment_fee
  @@_ratecard_rural_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_rural_shipment_fee')
end

Instance Method Details

#to_hashObject



17337
17338
17339
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17337

def to_hash
  value
end