class Pin::Card
Attributes
address_city[RW]
address_country[RW]
address_line1[RW]
address_line2[RW]
address_postcode[RW]
address_state[RW]
cvc[RW]
display_number[RW]
expiry_month[RW]
expiry_year[RW]
name[RW]
number[RW]
scheme[RW]
token[RW]
Public Class Methods
create(options = {})
click to toggle source
options should be a hash with the following keys: :number, :expiry_month, :expiry_year, :cvc, :name, :address_line1, :address_city, :address_postcode, :address_state, :address_country
it can also have the following optional keys: :address_line2
Calls superclass method
Pin::Base::create
# File lib/pin-payments/card.rb, line 25 def create(options = {}) super(options) end
new(attributes = {})
click to toggle source
# File lib/pin-payments/card.rb, line 8 def initialize(attributes = {}) attributes.each {|name, value| send("#{name}=", value)} end
Public Instance Methods
to_hash()
click to toggle source
# File lib/pin-payments/card.rb, line 12 def to_hash hash = {} instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) } hash end