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.



14519
14520
14521
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14519

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14517
14518
14519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14517

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



14524
14525
14526
14527
14528
14529
14530
14531
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14524

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



14567
14568
14569
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14567

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

.center_inbound_carton_feeObject



14571
14572
14573
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14571

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

.center_outbound_carton_feeObject



14575
14576
14577
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14575

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



14534
14535
14536
14537
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14534

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

.ratecard_base_costObject



14543
14544
14545
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14543

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

.ratecard_ddp_feeObject



14547
14548
14549
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14547

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

.ratecard_emergency_situation_surcharge_feeObject



14563
14564
14565
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14563

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

.ratecard_fuel_surchargeObject



14551
14552
14553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14551

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

.ratecard_oversized_shipment_feeObject



14555
14556
14557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14555

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

.ratecard_rural_shipment_feeObject



14559
14560
14561
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14559

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

Instance Method Details

#to_hashObject



14579
14580
14581
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14579

def to_hash
  value
end