Class: Io::Flow::V0::Models::TradeAgreementName
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TradeAgreementName
- 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 TradeAgreementName for this value, creating a new instance for an unknown value.
-
.cusma ⇒ Object
Canada-United States-Mexico Agreement.
-
.from_string(value) ⇒ Object
Returns the instance of TradeAgreementName for this value, or nil if not found.
-
.t_mec ⇒ Object
Tratado entre México y Estados Unidos y Canadá.
-
.tca ⇒ Object
EU–UK Trade and Cooperation Agreement.
-
.usmca ⇒ Object
United States–Mexico–Canada Agreement.
Instance Method Summary collapse
-
#initialize(value) ⇒ TradeAgreementName
constructor
A new instance of TradeAgreementName.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TradeAgreementName
Returns a new instance of TradeAgreementName.
27884 27885 27886 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27884 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27882 27883 27884 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27882 def value @value end |
Class Method Details
.ALL ⇒ Object
27904 27905 27906 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27904 def TradeAgreementName.ALL @@all ||= [TradeAgreementName.usmca, TradeAgreementName.t_mec, TradeAgreementName.cusma, TradeAgreementName.tca] end |
.apply(value) ⇒ Object
Returns the instance of TradeAgreementName for this value, creating a new instance for an unknown value
27889 27890 27891 27892 27893 27894 27895 27896 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27889 def TradeAgreementName.apply(value) if value.instance_of?(TradeAgreementName) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TradeAgreementName.new(value)) end end |
.cusma ⇒ Object
Canada-United States-Mexico Agreement
27919 27920 27921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27919 def TradeAgreementName.cusma @@_cusma ||= TradeAgreementName.new('CUSMA') end |
.from_string(value) ⇒ Object
Returns the instance of TradeAgreementName for this value, or nil if not found
27899 27900 27901 27902 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27899 def TradeAgreementName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TradeAgreementName.ALL.find { |v| v.value == value } end |
.t_mec ⇒ Object
Tratado entre México y Estados Unidos y Canadá
27914 27915 27916 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27914 def TradeAgreementName.t_mec @@_t_mec ||= TradeAgreementName.new('T-MEC') end |
.tca ⇒ Object
EU–UK Trade and Cooperation Agreement
27924 27925 27926 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27924 def TradeAgreementName.tca @@_tca ||= TradeAgreementName.new('TCA') end |
.usmca ⇒ Object
United States–Mexico–Canada Agreement
27909 27910 27911 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27909 def TradeAgreementName.usmca @@_usmca ||= TradeAgreementName.new('USMCA') end |
Instance Method Details
#to_hash ⇒ Object
27928 27929 27930 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27928 def to_hash value end |