All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.model.Balance Maven / Gradle / Ivy

// File generated from our OpenAPI spec
package com.stripe.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.BalanceRetrieveParams;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * This is an object representing your Stripe balance. You can retrieve it to see the balance
 * currently on your Stripe account.
 *
 * 

You can also retrieve the balance history, which contains a list of transactions that * contributed to the balance (charges, payouts, and so forth). * *

The available and pending amounts for each currency are broken down further by payment source * types. * *

Related guide: Understanding * Connect account balances */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public class Balance extends ApiResource { /** * Funds that are available to be transferred or paid out, whether automatically by Stripe or * explicitly via the Transfers API or Payouts API. The available balance for each * currency and payment type can be found in the {@code source_types} property. */ @SerializedName("available") List available; /** * Funds held due to negative balances on connected Custom accounts. The connect reserve balance * for each currency and payment type can be found in the {@code source_types} property. */ @SerializedName("connect_reserved") List connectReserved; /** Funds that can be paid out using Instant Payouts. */ @SerializedName("instant_available") List instantAvailable; @SerializedName("issuing") Issuing issuing; /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. */ @SerializedName("livemode") Boolean livemode; /** * String representing the object's type. Objects of the same type share the same value. * *

Equal to {@code balance}. */ @SerializedName("object") String object; /** * Funds that are not yet available in the balance. The pending balance for each currency, and for * each payment type, can be found in the {@code source_types} property. */ @SerializedName("pending") List pending; /** * Retrieves the current account balance, based on the authentication that was used to make the * request. For a sample request, see Accounting * for negative balances. */ public static Balance retrieve() throws StripeException { return retrieve((Map) null, (RequestOptions) null); } /** * Retrieves the current account balance, based on the authentication that was used to make the * request. For a sample request, see Accounting * for negative balances. */ public static Balance retrieve(RequestOptions options) throws StripeException { return retrieve((Map) null, options); } /** * Retrieves the current account balance, based on the authentication that was used to make the * request. For a sample request, see Accounting * for negative balances. */ public static Balance retrieve(Map params, RequestOptions options) throws StripeException { String url = ApiResource.fullUrl(Stripe.getApiBase(), options, "/v1/balance"); return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); } /** * Retrieves the current account balance, based on the authentication that was used to make the * request. For a sample request, see Accounting * for negative balances. */ public static Balance retrieve(BalanceRetrieveParams params, RequestOptions options) throws StripeException { String url = ApiResource.fullUrl(Stripe.getApiBase(), options, "/v1/balance"); return ApiResource.request(ApiResource.RequestMethod.GET, url, params, Balance.class, options); } @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class Available extends StripeObject { /** Balance amount. */ @SerializedName("amount") Long amount; /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { /** Amount for bank account. */ @SerializedName("bank_account") Long bankAccount; /** Amount for card. */ @SerializedName("card") Long card; /** Amount for FPX. */ @SerializedName("fpx") Long fpx; } } @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class ConnectReserved extends StripeObject { /** Balance amount. */ @SerializedName("amount") Long amount; /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { /** Amount for bank account. */ @SerializedName("bank_account") Long bankAccount; /** Amount for card. */ @SerializedName("card") Long card; /** Amount for FPX. */ @SerializedName("fpx") Long fpx; } } @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class InstantAvailable extends StripeObject { /** Balance amount. */ @SerializedName("amount") Long amount; /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { /** Amount for bank account. */ @SerializedName("bank_account") Long bankAccount; /** Amount for card. */ @SerializedName("card") Long card; /** Amount for FPX. */ @SerializedName("fpx") Long fpx; } } @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class Issuing extends StripeObject { /** Funds that are available for use. */ @SerializedName("available") List available; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class Available extends StripeObject { /** Balance amount. */ @SerializedName("amount") Long amount; /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { /** Amount for bank account. */ @SerializedName("bank_account") Long bankAccount; /** Amount for card. */ @SerializedName("card") Long card; /** Amount for FPX. */ @SerializedName("fpx") Long fpx; } } } @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class Pending extends StripeObject { /** Balance amount. */ @SerializedName("amount") Long amount; /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { /** Amount for bank account. */ @SerializedName("bank_account") Long bankAccount; /** Amount for card. */ @SerializedName("card") Long card; /** Amount for FPX. */ @SerializedName("fpx") Long fpx; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy