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.



27353
27354
27355
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27353

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



27351
27352
27353
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27351

def value
  @value
end

Class Method Details

.ALLObject



27373
27374
27375
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27373

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



27358
27359
27360
27361
27362
27363
27364
27365
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27358

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



27368
27369
27370
27371
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27368

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

.invalidObject



27381
27382
27383
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27381

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

.unable_to_validateObject



27385
27386
27387
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27385

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

.validObject



27377
27378
27379
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27377

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

Instance Method Details

#to_hashObject



27389
27390
27391
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27389

def to_hash
  value
end