Class: Io::Flow::V0::Models::PaymentSourceConfirmationActionType

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) ⇒ PaymentSourceConfirmationActionType

Returns a new instance of PaymentSourceConfirmationActionType.



16788
16789
16790
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16788

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16786
16787
16788
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16786

def value
  @value
end

Class Method Details

.ALLObject



16808
16809
16810
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16808

def PaymentSourceConfirmationActionType.ALL
  @@all ||= [PaymentSourceConfirmationActionType.cvv, PaymentSourceConfirmationActionType.billing_address, PaymentSourceConfirmationActionType.number]
end

.apply(value) ⇒ Object

Returns the instance of PaymentSourceConfirmationActionType for this value, creating a new instance for an unknown value



16793
16794
16795
16796
16797
16798
16799
16800
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16793

def PaymentSourceConfirmationActionType.apply(value)
  if value.instance_of?(PaymentSourceConfirmationActionType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PaymentSourceConfirmationActionType.new(value))
  end
end

.billing_addressObject



16816
16817
16818
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16816

def PaymentSourceConfirmationActionType.billing_address
  @@_billing_address ||= PaymentSourceConfirmationActionType.new('billing_address')
end

.cvvObject



16812
16813
16814
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16812

def PaymentSourceConfirmationActionType.cvv
  @@_cvv ||= PaymentSourceConfirmationActionType.new('cvv')
end

.from_string(value) ⇒ Object

Returns the instance of PaymentSourceConfirmationActionType for this value, or nil if not found



16803
16804
16805
16806
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16803

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

.numberObject



16820
16821
16822
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16820

def PaymentSourceConfirmationActionType.number
  @@_number ||= PaymentSourceConfirmationActionType.new('number')
end

Instance Method Details

#to_hashObject



16824
16825
16826
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16824

def to_hash
  value
end