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



10826
10827
10828
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10826

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



10824
10825
10826
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10824

def value
  @value
end

Class Method Details

.ALLObject



10846
10847
10848
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10846

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



10831
10832
10833
10834
10835
10836
10837
10838
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10831

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



10870
10871
10872
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10870

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

.center_inbound_carton_feeObject



10874
10875
10876
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10874

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

.center_outbound_carton_feeObject



10878
10879
10880
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10878

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



10841
10842
10843
10844
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10841

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

.ratecard_base_costObject



10850
10851
10852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10850

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

.ratecard_ddp_feeObject



10854
10855
10856
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10854

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

.ratecard_fuel_surchargeObject



10858
10859
10860
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10858

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

.ratecard_oversized_shipment_feeObject



10862
10863
10864
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10862

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

.ratecard_rural_shipment_feeObject



10866
10867
10868
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10866

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

Instance Method Details

#to_hashObject



10882
10883
10884
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10882

def to_hash
  value
end