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.



14420
14421
14422
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14420

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14418
14419
14420
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14418

def value
  @value
end

Class Method Details

.ALLObject



14440
14441
14442
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14440

def DeliveryOptionCostDetailComponentKey.ALL
  @@all ||= [DeliveryOptionCostDetailComponentKey.ratecard_base_cost, DeliveryOptionCostDetailComponentKey.ratecard_ddp_fee, DeliveryOptionCostDetailComponentKey.ratecard_fuel_surcharge, DeliveryOptionCostDetailComponentKey.ratecard_oversized_shipment_fee, DeliveryOptionCostDetailComponentKey.ratecard_rural_shipment_fee, DeliveryOptionCostDetailComponentKey.ratecard_emergency_situation_surcharge_fee, DeliveryOptionCostDetailComponentKey.center_commercial_invoice_fee, DeliveryOptionCostDetailComponentKey.center_inbound_carton_fee, DeliveryOptionCostDetailComponentKey.center_outbound_carton_fee]
end

.apply(value) ⇒ Object

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



14425
14426
14427
14428
14429
14430
14431
14432
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14425

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



14468
14469
14470
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14468

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

.center_inbound_carton_feeObject



14472
14473
14474
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14472

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

.center_outbound_carton_feeObject



14476
14477
14478
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14476

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



14435
14436
14437
14438
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14435

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

.ratecard_base_costObject



14444
14445
14446
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14444

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

.ratecard_ddp_feeObject



14448
14449
14450
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14448

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

.ratecard_emergency_situation_surcharge_feeObject



14464
14465
14466
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14464

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

.ratecard_fuel_surchargeObject



14452
14453
14454
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14452

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

.ratecard_oversized_shipment_feeObject



14456
14457
14458
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14456

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

.ratecard_rural_shipment_feeObject



14460
14461
14462
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14460

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

Instance Method Details

#to_hashObject



14480
14481
14482
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14480

def to_hash
  value
end