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.



16489
16490
16491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16489

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16487
16488
16489
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16487

def value
  @value
end

Class Method Details

.ALLObject



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

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



16494
16495
16496
16497
16498
16499
16500
16501
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16494

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



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

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



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

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

.not_verifiedObject



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

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

.verifiedObject



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

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

Instance Method Details

#to_hashObject



16525
16526
16527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16525

def to_hash
  value
end