Class: Io::Flow::V0::Models::Incoterm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::Incoterm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of Incoterm for this value, creating a new instance for an unknown value.
-
.cfr ⇒ Object
Cost and Freight (named port of destination).
-
.cif ⇒ Object
Cost, Insurance & Freight (named port of destination).
-
.cip ⇒ Object
Carriage and Insurance Paid to (named place of destination).
-
.cpt ⇒ Object
Carriage Paid To (named place of destination).
-
.daf ⇒ Object
Delivered at Frontier (named place of delivery).
-
.dap ⇒ Object
Delivered At Place (named place of destination).
-
.dat ⇒ Object
Delivered At Terminal (named terminal at port or place of destination).
-
.ddp ⇒ Object
Delivered Duty Paid (named place of destination).
-
.ddu ⇒ Object
Delivered Duty Unpaid (named place of destination).
-
.deq ⇒ Object
Delivered Ex Quay (named port of delivery).
-
.des ⇒ Object
Delivered Ex Ship.
-
.exw ⇒ Object
Ex Works (named place of delivery).
-
.fas ⇒ Object
Free Alongside Ship (named port of shipment).
-
.fca ⇒ Object
Free Carrier (named place of delivery).
-
.fob ⇒ Object
Free on Board (named port of shipment).
-
.from_string(value) ⇒ Object
Returns the instance of Incoterm for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ Incoterm
constructor
A new instance of Incoterm.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ Incoterm
Returns a new instance of Incoterm.
21426 21427 21428 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21426 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21424 21425 21426 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21424 def value @value end |
Class Method Details
.ALL ⇒ Object
21446 21447 21448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21446 def Incoterm.ALL @@all ||= [Incoterm.exw, Incoterm.fca, Incoterm.cpt, Incoterm.cip, Incoterm.dat, Incoterm.dap, Incoterm.ddp, Incoterm.fas, Incoterm.fob, Incoterm.cfr, Incoterm.cif, Incoterm.daf, Incoterm.des, Incoterm.deq, Incoterm.ddu] end |
.apply(value) ⇒ Object
Returns the instance of Incoterm for this value, creating a new instance for an unknown value
21431 21432 21433 21434 21435 21436 21437 21438 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21431 def Incoterm.apply(value) if value.instance_of?(Incoterm) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || Incoterm.new(value)) end end |
.cfr ⇒ Object
Cost and Freight (named port of destination)
21496 21497 21498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21496 def Incoterm.cfr @@_cfr ||= Incoterm.new('CFR') end |
.cif ⇒ Object
Cost, Insurance & Freight (named port of destination)
21501 21502 21503 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21501 def Incoterm.cif @@_cif ||= Incoterm.new('CIF') end |
.cip ⇒ Object
Carriage and Insurance Paid to (named place of destination)
21466 21467 21468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21466 def Incoterm.cip @@_cip ||= Incoterm.new('CIP') end |
.cpt ⇒ Object
Carriage Paid To (named place of destination)
21461 21462 21463 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21461 def Incoterm.cpt @@_cpt ||= Incoterm.new('CPT') end |
.daf ⇒ Object
Delivered at Frontier (named place of delivery)
21506 21507 21508 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21506 def Incoterm.daf @@_daf ||= Incoterm.new('DAF') end |
.dap ⇒ Object
Delivered At Place (named place of destination)
21476 21477 21478 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21476 def Incoterm.dap @@_dap ||= Incoterm.new('DAP') end |
.dat ⇒ Object
Delivered At Terminal (named terminal at port or place of destination)
21471 21472 21473 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21471 def Incoterm.dat @@_dat ||= Incoterm.new('DAT') end |
.ddp ⇒ Object
Delivered Duty Paid (named place of destination)
21481 21482 21483 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21481 def Incoterm.ddp @@_ddp ||= Incoterm.new('DDP') end |
.ddu ⇒ Object
Delivered Duty Unpaid (named place of destination)
21521 21522 21523 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21521 def Incoterm.ddu @@_ddu ||= Incoterm.new('DDU') end |
.deq ⇒ Object
Delivered Ex Quay (named port of delivery)
21516 21517 21518 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21516 def Incoterm.deq @@_deq ||= Incoterm.new('DEQ') end |
.des ⇒ Object
Delivered Ex Ship
21511 21512 21513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21511 def Incoterm.des @@_des ||= Incoterm.new('DES') end |
.exw ⇒ Object
Ex Works (named place of delivery)
21451 21452 21453 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21451 def Incoterm.exw @@_exw ||= Incoterm.new('EXW') end |
.fas ⇒ Object
Free Alongside Ship (named port of shipment)
21486 21487 21488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21486 def Incoterm.fas @@_fas ||= Incoterm.new('FAS') end |
.fca ⇒ Object
Free Carrier (named place of delivery)
21456 21457 21458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21456 def Incoterm.fca @@_fca ||= Incoterm.new('FCA') end |
.fob ⇒ Object
Free on Board (named port of shipment)
21491 21492 21493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21491 def Incoterm.fob @@_fob ||= Incoterm.new('FOB') end |
.from_string(value) ⇒ Object
Returns the instance of Incoterm for this value, or nil if not found
21441 21442 21443 21444 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21441 def Incoterm.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) Incoterm.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
21525 21526 21527 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21525 def to_hash value end |