Class: Io::Flow::V0::Models::TaxVerificationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ TaxVerificationResult

Returns a new instance of TaxVerificationResult.



15816
15817
15818
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15816

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15814
15815
15816
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15814

def value
  @value
end

Class Method Details

.ALLObject



15836
15837
15838
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15836

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



15821
15822
15823
15824
15825
15826
15827
15828
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15821

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



15831
15832
15833
15834
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15831

def TaxVerificationResult.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  TaxVerificationResult.ALL.find { |v| v.value == value }
end

.invalidObject



15844
15845
15846
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15844

def TaxVerificationResult.invalid
  @@_invalid ||= TaxVerificationResult.new('invalid')
end

.unable_to_validateObject



15848
15849
15850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15848

def TaxVerificationResult.unable_to_validate
  @@_unable_to_validate ||= TaxVerificationResult.new('unable_to_validate')
end

.validObject



15840
15841
15842
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15840

def TaxVerificationResult.valid
  @@_valid ||= TaxVerificationResult.new('valid')
end

Instance Method Details

#to_hashObject



15852
15853
15854
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15852

def to_hash
  value
end