class Io::Flow::V0::Models::PaymentType

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24834
def PaymentType.ALL
  @@all ||= [PaymentType.card, PaymentType.klarna, PaymentType.googlepay, PaymentType.paypal, PaymentType.applepay, PaymentType.ideal, PaymentType.sofort, PaymentType.afterpay, PaymentType.bancontact]
end
afterpay() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24866
def PaymentType.afterpay
  @@_afterpay ||= PaymentType.new('afterpay')
end
applepay() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24854
def PaymentType.applepay
  @@_applepay ||= PaymentType.new('applepay')
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 24819
def PaymentType.apply(value)
  if value.instance_of?(PaymentType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PaymentType.new(value))
  end
end
bancontact() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24870
def PaymentType.bancontact
  @@_bancontact ||= PaymentType.new('bancontact')
end
card() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24838
def PaymentType.card
  @@_card ||= PaymentType.new('card')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 24829
def PaymentType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PaymentType.ALL.find { |v| v.value == value }
end
googlepay() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24846
def PaymentType.googlepay
  @@_googlepay ||= PaymentType.new('googlepay')
end
ideal() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24858
def PaymentType.ideal
  @@_ideal ||= PaymentType.new('ideal')
end
klarna() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24842
def PaymentType.klarna
  @@_klarna ||= PaymentType.new('klarna')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24814
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
paypal() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24850
def PaymentType.paypal
  @@_paypal ||= PaymentType.new('paypal')
end
sofort() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24862
def PaymentType.sofort
  @@_sofort ||= PaymentType.new('sofort')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24874
def to_hash
  value
end