Class: Io::Flow::V0::Models::EntityIdentifierType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::EntityIdentifierType
- 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 EntityIdentifierType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of EntityIdentifierType for this value, or nil if not found.
-
.ioss ⇒ Object
The Import One-Stop Shop (IOSS) to comply with VAT on imported goods.
Instance Method Summary collapse
-
#initialize(value) ⇒ EntityIdentifierType
constructor
A new instance of EntityIdentifierType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ EntityIdentifierType
Returns a new instance of EntityIdentifierType.
15357 15358 15359 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15357 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15355 15356 15357 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15355 def value @value end |
Class Method Details
.ALL ⇒ Object
15377 15378 15379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15377 def EntityIdentifierType.ALL @@all ||= [EntityIdentifierType.ioss] end |
.apply(value) ⇒ Object
Returns the instance of EntityIdentifierType for this value, creating a new instance for an unknown value
15362 15363 15364 15365 15366 15367 15368 15369 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15362 def EntityIdentifierType.apply(value) if value.instance_of?(EntityIdentifierType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || EntityIdentifierType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of EntityIdentifierType for this value, or nil if not found
15372 15373 15374 15375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15372 def EntityIdentifierType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) EntityIdentifierType.ALL.find { |v| v.value == value } end |
.ioss ⇒ Object
The Import One-Stop Shop (IOSS) to comply with VAT on imported goods. see: ec.europa.eu/taxation_customs/business/vat/ioss_en
15383 15384 15385 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15383 def EntityIdentifierType.ioss @@_ioss ||= EntityIdentifierType.new('ioss') end |
Instance Method Details
#to_hash ⇒ Object
15387 15388 15389 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15387 def to_hash value end |