Class: Io::Flow::V0::Models::AddressVerificationResultFieldCode

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) ⇒ AddressVerificationResultFieldCode

Returns a new instance of AddressVerificationResultFieldCode.



16479
16480
16481
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16479

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16477
16478
16479
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16477

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

Returns the instance of AddressVerificationResultFieldCode for this value, creating a new instance for an unknown value



16484
16485
16486
16487
16488
16489
16490
16491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16484

def AddressVerificationResultFieldCode.apply(value)
  if value.instance_of?(AddressVerificationResultFieldCode)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AddressVerificationResultFieldCode.new(value))
  end
end

.from_string(value) ⇒ Object

Returns the instance of AddressVerificationResultFieldCode for this value, or nil if not found



16494
16495
16496
16497
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16494

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

.matchedObject



16503
16504
16505
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16503

def AddressVerificationResultFieldCode.matched
  @@_matched ||= AddressVerificationResultFieldCode.new('matched')
end

.not_availableObject

Issuer does not support address verification or a technical issue occurred



16508
16509
16510
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16508

def AddressVerificationResultFieldCode.not_available
  @@_not_available ||= AddressVerificationResultFieldCode.new('not_available')
end

.not_checkedObject

Issuer did not perform address verification



16513
16514
16515
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16513

def AddressVerificationResultFieldCode.not_checked
  @@_not_checked ||= AddressVerificationResultFieldCode.new('not_checked')
end

.not_matchedObject



16517
16518
16519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16517

def AddressVerificationResultFieldCode.not_matched
  @@_not_matched ||= AddressVerificationResultFieldCode.new('not_matched')
end

Instance Method Details

#to_hashObject



16521
16522
16523
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16521

def to_hash
  value
end