java.lang.Object |
↳ |
com.wsl.modules.stripe.client.StripeCardClient |
Class Overview
Encapsulates Card-related Stripe API calls.
Summary
Public Methods |
Card
|
createCard(String ownerId, String sourceToken, Source source)
Create a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
|
DeletedCard
|
deleteCard(String ownerId, String id)
Delete a Card
|
PaymentSourceCollection
|
listAllCustomerCards(String ownerId, String endingBefore, int limit, String startingAfter)
List all Customer Cards
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
|
Card
|
retrieveCard(String ownerId, String id)
Retrieve a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
|
Card
|
updateCard(String ownerId, String id, String addressCity, String addressCountry, String addressLine1, String addressLine2, String addressState, String addressZip, String expMonth, String expYear, Map<String, Object> metadata, String cardName)
Update a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
StripeCardClient
()
Public Methods
public
Card
createCard
(String ownerId, String sourceToken, Source source)
Create a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
Stripe Connect is the recommended means for transferring funds.
Parameters
ownerId
| The ID for the Customer or Recipient |
sourceToken
| The source can either be a token, like the ones returned by Stripe.js, |
source
| Or a dictionary containing a user’s credit card details (with the options shown below). Whenever you create a new card for a customer, Stripe will automatically validate the card. |
Returns
- Returns the created Card.
public
DeletedCard
deleteCard
(String ownerId, String id)
Parameters
ownerId
| The ID of the owner of the card. |
id
| The ID of the card to be deleted. |
Returns
- Returns the deleted card object.
public
PaymentSourceCollection
listAllCustomerCards
(String ownerId, String endingBefore, int limit, String startingAfter)
List all Customer Cards
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
Stripe Connect is the recommended means for transferring funds.
Parameters
ownerId
| The ID of the customer whose cards will be retrieved |
endingBefore
| A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. |
limit
| A limit on the number of objects to be returned. Limit can range between 1 and 100 items. |
startingAfter
| A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. |
Returns
- Returns a list of the cards stored on the customer or recipient.
public
Card
retrieveCard
(String ownerId, String id)
Retrieve a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
Stripe Connect is the recommended means for transferring funds.
Parameters
ownerId
| The ID of the owner of the card. |
id
| The ID of the card to be retrieved. |
Returns
- Returns the retrieved Card.
public
Card
updateCard
(String ownerId, String id, String addressCity, String addressCountry, String addressLine1, String addressLine2, String addressState, String addressZip, String expMonth, String expYear, Map<String, Object> metadata, String cardName)
Update a Card
Note that this is only available for Customers at this time, as Recipients (of Transfers) have been deprecated by Stripe.
Stripe Connect is the recommended means for transferring funds.
Parameters
ownerId
| The ID of the owner of the card. |
id
| The ID of the card to be updated. |
addressCity
| The City component of the Card Address |
addressCountry
| The Country component of the Card Address |
addressLine1
| The Address, Line 1, component of the Card Address |
addressLine2
| The Address, Line 2, component of the Card Address |
addressState
| The State component of the Card Address |
addressZip
| The Zipcode component of the Card Address |
expMonth
| The Card's expiry month |
expYear
| The Card's expiry year |
metadata
| Arbitrary metadata to attach to the card |
cardName
| The name for the card |
Returns
- Returns the updated Card.