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.
19956 19957 19958 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19956 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19954 19955 19956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19954 def value @value end |
Class Method Details
.ALL ⇒ Object
19976 19977 19978 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19976 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
19961 19962 19963 19964 19965 19966 19967 19968 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19961 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
19971 19972 19973 19974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19971 def TaxVerificationResult.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TaxVerificationResult.ALL.find { |v| v.value == value } end |
.invalid ⇒ Object
19984 19985 19986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19984 def TaxVerificationResult.invalid @@_invalid ||= TaxVerificationResult.new('invalid') end |
.unable_to_validate ⇒ Object
19988 19989 19990 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19988 def TaxVerificationResult.unable_to_validate @@_unable_to_validate ||= TaxVerificationResult.new('unable_to_validate') end |
.valid ⇒ Object
19980 19981 19982 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19980 def TaxVerificationResult.valid @@_valid ||= TaxVerificationResult.new('valid') end |
Instance Method Details
#to_hash ⇒ Object
19992 19993 19994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19992 def to_hash value end |