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.



25395
25396
25397
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25395

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



25393
25394
25395
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25393

def value
  @value
end

Class Method Details

.ALLObject



25415
25416
25417
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25415

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



25400
25401
25402
25403
25404
25405
25406
25407
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25400

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



25427
25428
25429
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25427

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



25410
25411
25412
25413
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25410

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

.not_verifiedObject



25423
25424
25425
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25423

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

.verifiedObject



25419
25420
25421
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25419

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

Instance Method Details

#to_hashObject



25431
25432
25433
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25431

def to_hash
  value
end