Class: Io::Flow::V0::Models::DeliveryOptionCostDetailComponentKey
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::DeliveryOptionCostDetailComponentKey
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of DeliveryOptionCostDetailComponentKey for this value, creating a new instance for an unknown value.
- .center_commercial_invoice_fee ⇒ Object
- .center_inbound_carton_fee ⇒ Object
- .center_outbound_carton_fee ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of DeliveryOptionCostDetailComponentKey for this value, or nil if not found.
- .ratecard_base_cost ⇒ Object
- .ratecard_ddp_fee ⇒ Object
- .ratecard_fuel_surcharge ⇒ Object
- .ratecard_oversized_shipment_fee ⇒ Object
- .ratecard_rural_shipment_fee ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ DeliveryOptionCostDetailComponentKey
constructor
A new instance of DeliveryOptionCostDetailComponentKey.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ DeliveryOptionCostDetailComponentKey
Returns a new instance of DeliveryOptionCostDetailComponentKey.
13082 13083 13084 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13082 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13080 13081 13082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13080 def value @value end |
Class Method Details
.ALL ⇒ Object
13102 13103 13104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13102 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.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
13087 13088 13089 13090 13091 13092 13093 13094 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13087 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_fee ⇒ Object
13126 13127 13128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13126 def DeliveryOptionCostDetailComponentKey.center_commercial_invoice_fee @@_center_commercial_invoice_fee ||= DeliveryOptionCostDetailComponentKey.new('center_commercial_invoice_fee') end |
.center_inbound_carton_fee ⇒ Object
13130 13131 13132 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13130 def DeliveryOptionCostDetailComponentKey.center_inbound_carton_fee @@_center_inbound_carton_fee ||= DeliveryOptionCostDetailComponentKey.new('center_inbound_carton_fee') end |
.center_outbound_carton_fee ⇒ Object
13134 13135 13136 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13134 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
13097 13098 13099 13100 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13097 def DeliveryOptionCostDetailComponentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) DeliveryOptionCostDetailComponentKey.ALL.find { |v| v.value == value } end |
.ratecard_base_cost ⇒ Object
13106 13107 13108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13106 def DeliveryOptionCostDetailComponentKey.ratecard_base_cost @@_ratecard_base_cost ||= DeliveryOptionCostDetailComponentKey.new('ratecard_base_cost') end |
.ratecard_ddp_fee ⇒ Object
13110 13111 13112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13110 def DeliveryOptionCostDetailComponentKey.ratecard_ddp_fee @@_ratecard_ddp_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_ddp_fee') end |
.ratecard_fuel_surcharge ⇒ Object
13114 13115 13116 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13114 def DeliveryOptionCostDetailComponentKey.ratecard_fuel_surcharge @@_ratecard_fuel_surcharge ||= DeliveryOptionCostDetailComponentKey.new('ratecard_fuel_surcharge') end |
.ratecard_oversized_shipment_fee ⇒ Object
13118 13119 13120 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13118 def DeliveryOptionCostDetailComponentKey.ratecard_oversized_shipment_fee @@_ratecard_oversized_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_oversized_shipment_fee') end |
.ratecard_rural_shipment_fee ⇒ Object
13122 13123 13124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13122 def DeliveryOptionCostDetailComponentKey.ratecard_rural_shipment_fee @@_ratecard_rural_shipment_fee ||= DeliveryOptionCostDetailComponentKey.new('ratecard_rural_shipment_fee') end |
Instance Method Details
#to_hash ⇒ Object
13138 13139 13140 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13138 def to_hash value end |