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.



20569
20570
20571
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20569

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20567
20568
20569
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20567

def value
  @value
end

Class Method Details

.ALLObject



20589
20590
20591
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20589

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



20574
20575
20576
20577
20578
20579
20580
20581
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20574

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



20601
20602
20603
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20601

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



20584
20585
20586
20587
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20584

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

.not_verifiedObject



20597
20598
20599
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20597

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

.verifiedObject



20593
20594
20595
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20593

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

Instance Method Details

#to_hashObject



20605
20606
20607
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20605

def to_hash
  value
end