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.
-
.voec ⇒ Object
The VAT on Electronic Commerce (VOEC) 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.
17113 17114 17115 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17113 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17111 17112 17113 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17111 def value @value end |
Class Method Details
.ALL ⇒ Object
17133 17134 17135 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17133 def EntityIdentifierType.ALL @@all ||= [EntityIdentifierType.ioss, EntityIdentifierType.voec] end |
.apply(value) ⇒ Object
Returns the instance of EntityIdentifierType for this value, creating a new instance for an unknown value
17118 17119 17120 17121 17122 17123 17124 17125 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17118 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
17128 17129 17130 17131 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17128 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
17139 17140 17141 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17139 def EntityIdentifierType.ioss @@_ioss ||= EntityIdentifierType.new('ioss') end |
.voec ⇒ Object
The VAT on Electronic Commerce (VOEC) to comply with VAT on imported goods. see: www.skatteetaten.no/globalassets/bedrift-og-organisasjon/voec/voec-guidelines-20200807.pdf
17146 17147 17148 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17146 def EntityIdentifierType.voec @@_voec ||= EntityIdentifierType.new('voec') end |
Instance Method Details
#to_hash ⇒ Object
17150 17151 17152 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17150 def to_hash value end |