Class: Io::Flow::V0::Models::TaxVerificationResult
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TaxVerificationResult
- 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 TaxVerificationResult for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of TaxVerificationResult for this value, or nil if not found.
- .invalid ⇒ Object
- .unable_to_validate ⇒ Object
- .valid ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ TaxVerificationResult
constructor
A new instance of TaxVerificationResult.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TaxVerificationResult
Returns a new instance of TaxVerificationResult.
20439 20440 20441 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20439 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20437 20438 20439 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20437 def value @value end |
Class Method Details
.ALL ⇒ Object
20459 20460 20461 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20459 def TaxVerificationResult.ALL @@all ||= [TaxVerificationResult.valid, TaxVerificationResult.invalid, TaxVerificationResult.unable_to_validate] end |
.apply(value) ⇒ Object
Returns the instance of TaxVerificationResult for this value, creating a new instance for an unknown value
20444 20445 20446 20447 20448 20449 20450 20451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20444 def TaxVerificationResult.apply(value) if value.instance_of?(TaxVerificationResult) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TaxVerificationResult.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of TaxVerificationResult for this value, or nil if not found
20454 20455 20456 20457 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20454 def TaxVerificationResult.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TaxVerificationResult.ALL.find { |v| v.value == value } end |
.invalid ⇒ Object
20467 20468 20469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20467 def TaxVerificationResult.invalid @@_invalid ||= TaxVerificationResult.new('invalid') end |
.unable_to_validate ⇒ Object
20471 20472 20473 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20471 def TaxVerificationResult.unable_to_validate @@_unable_to_validate ||= TaxVerificationResult.new('unable_to_validate') end |
.valid ⇒ Object
20463 20464 20465 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20463 def TaxVerificationResult.valid @@_valid ||= TaxVerificationResult.new('valid') end |
Instance Method Details
#to_hash ⇒ Object
20475 20476 20477 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20475 def to_hash value end |