Class: AdvancedBilling::ApplePayVault

Inherits:
Object
  • Object
show all
Defined in:
lib/advanced_billing/models/apple_pay_vault.rb

Overview

The vault that stores the payment profile with the provided vault_token.

Constant Summary collapse

APPLE_PAY_VAULT =
[
  # TODO: Write general description for BRAINTREE_BLUE
  BRAINTREE_BLUE = 'braintree_blue'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = BRAINTREE_BLUE) ⇒ Object



20
21
22
23
24
# File 'lib/advanced_billing/models/apple_pay_vault.rb', line 20

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

  default_value
end

.validate(value) ⇒ Object



14
15
16
17
18
# File 'lib/advanced_billing/models/apple_pay_vault.rb', line 14

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

  APPLE_PAY_VAULT.include?(value)
end