class Io::Flow::V0::Models::AvsCode

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17315
def AvsCode.ALL
  @@all ||= [AvsCode.match, AvsCode.partial, AvsCode.unsupported, AvsCode.no_match]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17300
def AvsCode.apply(value)
  if value.instance_of?(AvsCode)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AvsCode.new(value))
  end
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17310
def AvsCode.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  AvsCode.ALL.find { |v| v.value == value }
end
match() click to toggle source

Full match

# File lib/flow_commerce/flow_api_v0_client.rb, line 17320
def AvsCode.match
  @@_match ||= AvsCode.new('match')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17295
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
no_match() click to toggle source

Address does not match expected card values

# File lib/flow_commerce/flow_api_v0_client.rb, line 17336
def AvsCode.no_match
  @@_no_match ||= AvsCode.new('no_match')
end
partial() click to toggle source

Partial match; see details in ‘avs’ model to understand which components matched

# File lib/flow_commerce/flow_api_v0_client.rb, line 17326
def AvsCode.partial
  @@_partial ||= AvsCode.new('partial')
end
unsupported() click to toggle source

Issuer does not support address verification

# File lib/flow_commerce/flow_api_v0_client.rb, line 17331
def AvsCode.unsupported
  @@_unsupported ||= AvsCode.new('unsupported')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17340
def to_hash
  value
end