public class

StripeBalanceClient

extends Object
java.lang.Object
   ↳ com.wsl.modules.stripe.client.StripeBalanceClient

Class Overview

Encapsulates Balance-related Stripe API calls.

Summary

Public Constructors
StripeBalanceClient()
Public Methods
BalanceTransactionCollection listAllBalanceHistory(String availableOnTimestamp, TimeRange availableOn, String createdTimestamp, TimeRange created, String currency, String endingBefore, int limit, String sourceId, String startingAfter, String transfer, String type)
List all Balance History
Balance retrieveBalance()
Retrieve the balance
BalanceTransaction retrieveBalanceTransaction(String id)
Retrieve a Balance Transaction
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StripeBalanceClient ()

Public Methods

public BalanceTransactionCollection listAllBalanceHistory (String availableOnTimestamp, TimeRange availableOn, String createdTimestamp, TimeRange created, String currency, String endingBefore, int limit, String sourceId, String startingAfter, String transfer, String type)

List all Balance History

Parameters
availableOnTimestamp A filter on the list based on the object available_on field. The value can be a string with an integer Unix timestamp,
availableOn ... or it can be a dictionary with the following options: gt, gte, lt, lte
createdTimestamp A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp,
created ... or it can be a dictionary with the following options: gt, gte, lt, lte
currency The Currency Code
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.
sourceId Only returns transactions that are related to the specified Stripe object ID (e.g. filtering by a charge ID will return all charge and refund transactions).
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.
transfer For automatic Stripe transfers only, only returns transactions that were transferred out on the specified transfer ID.
type Only returns transactions of the given type. One of: charge, refund, adjustment, application_fee, application_fee_refund, transfer, or transfer_failure
Returns
  • Returns a balance object for the API key used.
Throws
StripeConnectorException when there is a problem with the Connector

public Balance retrieveBalance ()

Retrieve the balance

Returns
  • Returns a balance object for the API key used.
Throws
StripeConnectorException when there is a problem with the Connector

public BalanceTransaction retrieveBalanceTransaction (String id)

Retrieve a Balance Transaction

Parameters
id The id of the transaction
Returns
  • Returns a balance transaction if a valid balance transaction ID was provided. Throws an error otherwise.
Throws
StripeConnectorException when there is a problem with the Connector