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.
19894 19895 19896 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19894 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19892 19893 19894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19892 def value @value end |
Class Method Details
.ALL ⇒ Object
19914 19915 19916 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19914 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
19899 19900 19901 19902 19903 19904 19905 19906 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19899 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)
19964 19965 19966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19964 def Incoterm.cfr @@_cfr ||= Incoterm.new('CFR') end |
.cif ⇒ Object
Cost, Insurance & Freight (named port of destination)
19969 19970 19971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19969 def Incoterm.cif @@_cif ||= Incoterm.new('CIF') end |
.cip ⇒ Object
Carriage and Insurance Paid to (named place of destination)
19934 19935 19936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19934 def Incoterm.cip @@_cip ||= Incoterm.new('CIP') end |
.cpt ⇒ Object
Carriage Paid To (named place of destination)
19929 19930 19931 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19929 def Incoterm.cpt @@_cpt ||= Incoterm.new('CPT') end |
.daf ⇒ Object
Delivered at Frontier (named place of delivery)
19974 19975 19976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19974 def Incoterm.daf @@_daf ||= Incoterm.new('DAF') end |
.dap ⇒ Object
Delivered At Place (named place of destination)
19944 19945 19946 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19944 def Incoterm.dap @@_dap ||= Incoterm.new('DAP') end |
.dat ⇒ Object
Delivered At Terminal (named terminal at port or place of destination)
19939 19940 19941 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19939 def Incoterm.dat @@_dat ||= Incoterm.new('DAT') end |
.ddp ⇒ Object
Delivered Duty Paid (named place of destination)
19949 19950 19951 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19949 def Incoterm.ddp @@_ddp ||= Incoterm.new('DDP') end |
.ddu ⇒ Object
Delivered Duty Unpaid (named place of destination)
19989 19990 19991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19989 def Incoterm.ddu @@_ddu ||= Incoterm.new('DDU') end |
.deq ⇒ Object
Delivered Ex Quay (named port of delivery)
19984 19985 19986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19984 def Incoterm.deq @@_deq ||= Incoterm.new('DEQ') end |
.des ⇒ Object
Delivered Ex Ship
19979 19980 19981 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19979 def Incoterm.des @@_des ||= Incoterm.new('DES') end |
.exw ⇒ Object
Ex Works (named place of delivery)
19919 19920 19921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19919 def Incoterm.exw @@_exw ||= Incoterm.new('EXW') end |
.fas ⇒ Object
Free Alongside Ship (named port of shipment)
19954 19955 19956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19954 def Incoterm.fas @@_fas ||= Incoterm.new('FAS') end |
.fca ⇒ Object
Free Carrier (named place of delivery)
19924 19925 19926 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19924 def Incoterm.fca @@_fca ||= Incoterm.new('FCA') end |
.fob ⇒ Object
Free on Board (named port of shipment)
19959 19960 19961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19959 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
19909 19910 19911 19912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19909 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
19993 19994 19995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19993 def to_hash value end |