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



9460
9461
9462
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9460

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



9458
9459
9460
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9458

def value
  @value
end

Class Method Details

.ALLObject



9480
9481
9482
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9480

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



9465
9466
9467
9468
9469
9470
9471
9472
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9465

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



9504
9505
9506
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9504

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

.center_inbound_carton_feeObject



9508
9509
9510
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9508

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

.center_outbound_carton_feeObject



9512
9513
9514
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9512

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



9475
9476
9477
9478
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9475

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

.ratecard_base_costObject



9484
9485
9486
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9484

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

.ratecard_ddp_feeObject



9488
9489
9490
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9488

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

.ratecard_fuel_surchargeObject



9492
9493
9494
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9492

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

.ratecard_oversized_shipment_feeObject



9496
9497
9498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9496

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

.ratecard_rural_shipment_feeObject



9500
9501
9502
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9500

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

Instance Method Details

#to_hashObject



9516
9517
9518
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9516

def to_hash
  value
end