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.
17096 17097 17098 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17096 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17094 17095 17096 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17094 def value @value end |
Class Method Details
.ALL ⇒ Object
17116 17117 17118 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17116 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
17101 17102 17103 17104 17105 17106 17107 17108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17101 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)
17166 17167 17168 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17166 def Incoterm.cfr @@_cfr ||= Incoterm.new('CFR') end |
.cif ⇒ Object
Cost, Insurance & Freight (named port of destination)
17171 17172 17173 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17171 def Incoterm.cif @@_cif ||= Incoterm.new('CIF') end |
.cip ⇒ Object
Carriage and Insurance Paid to (named place of destination)
17136 17137 17138 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17136 def Incoterm.cip @@_cip ||= Incoterm.new('CIP') end |
.cpt ⇒ Object
Carriage Paid To (named place of destination)
17131 17132 17133 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17131 def Incoterm.cpt @@_cpt ||= Incoterm.new('CPT') end |
.daf ⇒ Object
Delivered at Frontier (named place of delivery)
17176 17177 17178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17176 def Incoterm.daf @@_daf ||= Incoterm.new('DAF') end |
.dap ⇒ Object
Delivered At Place (named place of destination)
17146 17147 17148 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17146 def Incoterm.dap @@_dap ||= Incoterm.new('DAP') end |
.dat ⇒ Object
Delivered At Terminal (named terminal at port or place of destination)
17141 17142 17143 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17141 def Incoterm.dat @@_dat ||= Incoterm.new('DAT') end |
.ddp ⇒ Object
Delivered Duty Paid (named place of destination)
17151 17152 17153 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17151 def Incoterm.ddp @@_ddp ||= Incoterm.new('DDP') end |
.ddu ⇒ Object
Delivered Duty Unpaid (named place of destination)
17191 17192 17193 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17191 def Incoterm.ddu @@_ddu ||= Incoterm.new('DDU') end |
.deq ⇒ Object
Delivered Ex Quay (named port of delivery)
17186 17187 17188 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17186 def Incoterm.deq @@_deq ||= Incoterm.new('DEQ') end |
.des ⇒ Object
Delivered Ex Ship
17181 17182 17183 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17181 def Incoterm.des @@_des ||= Incoterm.new('DES') end |
.exw ⇒ Object
Ex Works (named place of delivery)
17121 17122 17123 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17121 def Incoterm.exw @@_exw ||= Incoterm.new('EXW') end |
.fas ⇒ Object
Free Alongside Ship (named port of shipment)
17156 17157 17158 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17156 def Incoterm.fas @@_fas ||= Incoterm.new('FAS') end |
.fca ⇒ Object
Free Carrier (named place of delivery)
17126 17127 17128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17126 def Incoterm.fca @@_fca ||= Incoterm.new('FCA') end |
.fob ⇒ Object
Free on Board (named port of shipment)
17161 17162 17163 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17161 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
17111 17112 17113 17114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17111 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
17195 17196 17197 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17195 def to_hash value end |