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.



13643
13644
13645
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13643

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



13641
13642
13643
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13641

def value
  @value
end

Class Method Details

.ALLObject



13663
13664
13665
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13663

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



13648
13649
13650
13651
13652
13653
13654
13655
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13648

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



13687
13688
13689
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13687

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

.center_inbound_carton_feeObject



13691
13692
13693
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13691

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

.center_outbound_carton_feeObject



13695
13696
13697
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13695

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



13658
13659
13660
13661
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13658

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

.ratecard_base_costObject



13667
13668
13669
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13667

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

.ratecard_ddp_feeObject



13671
13672
13673
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13671

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

.ratecard_fuel_surchargeObject



13675
13676
13677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13675

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

.ratecard_oversized_shipment_feeObject



13679
13680
13681
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13679

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

.ratecard_rural_shipment_feeObject



13683
13684
13685
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13683

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

Instance Method Details

#to_hashObject



13699
13700
13701
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13699

def to_hash
  value
end