class TresDelta::Customer

Attributes

name[R]

Public Class Methods

create(params = {}) click to toggle source
# File lib/tres_delta/customer.rb, line 15
def create(params = {})
  Customer.new(params).tap do |customer|
   unless Vault.create_customer(customer).success?
      raise InvalidCustomer
    end
  end
end
new(params = {}) click to toggle source
# File lib/tres_delta/customer.rb, line 5
def initialize(params = {})
  @vault_key = params[:vault_key] || nil
  @name      = params[:name] || nil
end

Public Instance Methods

vault_key() click to toggle source
# File lib/tres_delta/customer.rb, line 10
def vault_key
  @vault_key ||= SecureRandom.hex(12)
end