WebService::Braintree::CreditCard
This class creates, updates, deletes, and finds credit cards.
This takes a hashref of parameters and returns the credit card created.
This takes a nonce and returns the credit card (if it exists).
This takes a token and returns the credit card (if it exists).
This takes a token and a hashref of parameters. It will update the corresponding credit card (if found) and returns the updated credit card.
This takes a token. It will delete the corresponding credit card (if found).
This takes a token and an optional hashref of parameters and creates a credit transaction on the provided token.
This takes a token and an optional hashref of parameters and creates a sale transaction on the provided token.
This returns a list of all the expired credit cards.
NOTE: This method is called expired() in the Ruby and Python SDKs. It is renamed in this SDK because it clashes with the object attribute expired.
expired()
expired
This takes two DateTime objects and returns a list of all the credit cards expiring between them.
In addition to the methods provided by the keys returned from Braintree, this class provides the following methods:
This returns the credit card's billing address (if it exists). This will be an object of type "" in WebService::Braintree::Address.
This returns a masked credit card number suitable for display.
This returns the credit card's expiration in MM/YY format.
This returns true if this credit card is the default credit card.
This returns true if this credit card uses the Venmo SDK.
Most of the classes normally used in WebService::Braintree inherit from "" in WebService::Braintree::ResultObject. This class, however, inherits from "" in WebService::Braintree::PaymentMethod. The primary benefit of this is that these objects have a token() attribute.
token()
To install WebService::Braintree, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Braintree
CPAN shell
perl -MCPAN -e shell install WebService::Braintree
For more information on module installation, please visit the detailed CPAN module installation guide.