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.



18651
18652
18653
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18651

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18649
18650
18651
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18649

def value
  @value
end

Class Method Details

.ALLObject



18671
18672
18673
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18671

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



18656
18657
18658
18659
18660
18661
18662
18663
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18656

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



18683
18684
18685
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18683

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



18666
18667
18668
18669
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18666

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

.not_verifiedObject



18679
18680
18681
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18679

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

.verifiedObject



18675
18676
18677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18675

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

Instance Method Details

#to_hashObject



18687
18688
18689
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18687

def to_hash
  value
end