Class: PaypalServerSdk::TokenType

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/token_type.rb

Overview

The tokenization method that generated the ID.

Constant Summary collapse

TOKEN_TYPE =
[
  # The PayPal billing agreement ID. References an approved recurring
  # payment for goods or services.
  BILLING_AGREEMENT = 'BILLING_AGREEMENT'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = BILLING_AGREEMENT) ⇒ Object



21
22
23
24
25
# File 'lib/paypal_server_sdk/models/token_type.rb', line 21

def self.from_value(value, default_value = BILLING_AGREEMENT)
  return default_value if value.nil?

  default_value
end

.validate(value) ⇒ Object



15
16
17
18
19
# File 'lib/paypal_server_sdk/models/token_type.rb', line 15

def self.validate(value)
  return false if value.nil?

  true
end