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.



16546
16547
16548
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16546

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16544
16545
16546
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16544

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



16551
16552
16553
16554
16555
16556
16557
16558
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16551

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



16602
16603
16604
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16602

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

.center_inbound_carton_feeObject



16606
16607
16608
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16606

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

.center_outbound_carton_feeObject



16610
16611
16612
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16610

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



16561
16562
16563
16564
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16561

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

.ratecard_base_costObject



16570
16571
16572
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16570

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

.ratecard_ddp_feeObject



16574
16575
16576
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16574

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

.ratecard_duties_taxes_paid_surcharge_feeObject



16598
16599
16600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16598

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



16590
16591
16592
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16590

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

.ratecard_fuel_surchargeObject



16578
16579
16580
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16578

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

.ratecard_oversized_shipment_feeObject



16582
16583
16584
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16582

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

.ratecard_peak_surcharge_feeObject



16594
16595
16596
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16594

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

.ratecard_rural_shipment_feeObject



16586
16587
16588
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16586

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

Instance Method Details

#to_hashObject



16614
16615
16616
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16614

def to_hash
  value
end