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

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

There is a newer version: 28.1.0-beta.3
Show newest version
// File generated from our OpenAPI spec
package com.stripe.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiMode;
import com.stripe.net.ApiRequest;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
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 { /** * Available funds that you can transfer or pay out automatically by Stripe or explicitly through * the Transfers API or Payouts API. You can find the available balance * for each currency and payment type in the {@code source_types} property. */ @SerializedName("available") List available; /** * Funds held due to negative balances on connected accounts where account.controller.requirement_collection * is {@code application}, which includes Custom accounts. You can find the connect reserve * balance for each currency and payment type in the {@code source_types} property. */ @SerializedName("connect_reserved") List connectReserved; /** Funds that you can pay 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 aren't available in the balance yet. You can find the pending balance for each * currency and each payment type 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 path = "/v1/balance"; ApiRequest request = new ApiRequest( BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options, ApiMode.V1); return getGlobalResponseGetter().request(request, Balance.class); } /** * 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 path = "/v1/balance"; ApiResource.checkNullTypedParams(path, params); ApiRequest request = new ApiRequest( BaseAddress.API, ApiResource.RequestMethod.GET, path, ApiRequestParams.paramsToMap(params), options, ApiMode.V1); return getGlobalResponseGetter().request(request, Balance.class); } @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; /** Breakdown of balance by destination. */ @SerializedName("net_available") List netAvailable; @SerializedName("source_types") SourceTypes sourceTypes; @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class NetAvailable extends StripeObject { /** Net balance amount, subtracting fees from platform-set pricing. */ @SerializedName("amount") Long amount; /** ID of the external account for this net balance (not expandable). */ @SerializedName("destination") String destination; @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 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; } } @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(issuing, responseGetter); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy