Class: Pin::Customer
Instance Attribute Summary collapse
-
#card ⇒ Object
Returns the value of attribute card.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
-
.create(email, card_or_token) ⇒ Object
email should be a string card_or_token can be a Pin::Card object or a card_token (as a string).
Methods inherited from Base
all, find, first, #initialize, last
Constructor Details
This class inherits a constructor from Pin::Base
Instance Attribute Details
#card ⇒ Object
Returns the value of attribute card.
3 4 5 |
# File 'lib/pin-payments/customer.rb', line 3 def card @card end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/pin-payments/customer.rb', line 3 def created_at @created_at end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/pin-payments/customer.rb', line 3 def email @email end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/pin-payments/customer.rb', line 3 def token @token end |
Class Method Details
.create(email, card_or_token) ⇒ Object
email should be a string card_or_token can be a Pin::Card object or a card_token (as a string)
9 10 11 12 13 14 15 16 17 |
# File 'lib/pin-payments/customer.rb', line 9 def create(email, card_or_token) = if card_or_token.respond_to?(:to_hash) # card {card: card_or_token.to_hash} else # token {card_token: card_or_token} end.merge(email: email) super() end |