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.



10473
10474
10475
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10473

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



10471
10472
10473
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10471

def value
  @value
end

Class Method Details

.ALLObject



10493
10494
10495
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10493

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



10478
10479
10480
10481
10482
10483
10484
10485
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10478

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



10517
10518
10519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10517

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

.center_inbound_carton_feeObject



10521
10522
10523
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10521

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

.center_outbound_carton_feeObject



10525
10526
10527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10525

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



10488
10489
10490
10491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10488

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

.ratecard_base_costObject



10497
10498
10499
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10497

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

.ratecard_ddp_feeObject



10501
10502
10503
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10501

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

.ratecard_fuel_surchargeObject



10505
10506
10507
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10505

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

.ratecard_oversized_shipment_feeObject



10509
10510
10511
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10509

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

.ratecard_rural_shipment_feeObject



10513
10514
10515
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10513

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

Instance Method Details

#to_hashObject



10529
10530
10531
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10529

def to_hash
  value
end