Class: Io::Flow::V0::Models::ThreeDSecureCode

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

Returns a new instance of ThreeDSecureCode.



19708
19709
19710
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19708

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



19706
19707
19708
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19706

def value
  @value
end

Class Method Details

.ALLObject



19728
19729
19730
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19728

def ThreeDSecureCode.ALL
  @@all ||= [ThreeDSecureCode.verified, ThreeDSecureCode.not_verified, ThreeDSecureCode.failed]
end

.apply(value) ⇒ Object

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



19713
19714
19715
19716
19717
19718
19719
19720
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19713

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

.failedObject



19740
19741
19742
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19740

def ThreeDSecureCode.failed
  @@_failed ||= ThreeDSecureCode.new('failed')
end

.from_string(value) ⇒ Object

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



19723
19724
19725
19726
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19723

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

.not_verifiedObject



19736
19737
19738
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19736

def ThreeDSecureCode.not_verified
  @@_not_verified ||= ThreeDSecureCode.new('not_verified')
end

.verifiedObject



19732
19733
19734
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19732

def ThreeDSecureCode.verified
  @@_verified ||= ThreeDSecureCode.new('verified')
end

Instance Method Details

#to_hashObject



19744
19745
19746
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19744

def to_hash
  value
end