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.



15390
15391
15392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15390

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15388
15389
15390
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15388

def value
  @value
end

Class Method Details

.ALLObject



15410
15411
15412
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15410

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



15395
15396
15397
15398
15399
15400
15401
15402
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15395

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



15422
15423
15424
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15422

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



15405
15406
15407
15408
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15405

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

.not_verifiedObject



15418
15419
15420
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15418

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

.verifiedObject



15414
15415
15416
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15414

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

Instance Method Details

#to_hashObject



15426
15427
15428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15426

def to_hash
  value
end