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.



15908
15909
15910
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15908

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15906
15907
15908
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15906

def value
  @value
end

Class Method Details

.ALLObject



15928
15929
15930
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15928

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



15913
15914
15915
15916
15917
15918
15919
15920
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15913

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



15923
15924
15925
15926
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15923

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

.invalidObject



15936
15937
15938
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15936

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

.unable_to_validateObject



15940
15941
15942
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15940

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

.validObject



15932
15933
15934
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15932

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

Instance Method Details

#to_hashObject



15944
15945
15946
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15944

def to_hash
  value
end