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.
24469 24470 24471 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24469 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
24467 24468 24469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24467 def value @value end |
Class Method Details
.ALL ⇒ Object
24489 24490 24491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24489 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
24474 24475 24476 24477 24478 24479 24480 24481 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24474 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
24504 24505 24506 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24504 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
24484 24485 24486 24487 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24484 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á
24499 24500 24501 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24499 def TradeAgreementName.t_mec @@_t_mec ||= TradeAgreementName.new('T-MEC') end |
.tca ⇒ Object
EU–UK Trade and Cooperation Agreement
24509 24510 24511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24509 def TradeAgreementName.tca @@_tca ||= TradeAgreementName.new('TCA') end |
.usmca ⇒ Object
United States–Mexico–Canada Agreement
24494 24495 24496 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24494 def TradeAgreementName.usmca @@_usmca ||= TradeAgreementName.new('USMCA') end |
Instance Method Details
#to_hash ⇒ Object
24513 24514 24515 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24513 def to_hash value end |