Class ApiResource

All Implemented Interfaces:
StripeActiveObject, StripeObjectInterface
Direct Known Subclasses:
Account, Account, AccountLink, AccountSession, ActiveEntitlement, ApplePayDomain, ApplicationFee, Authorization, Balance, BalanceTransaction, BankAccount, Calculation, Capability, Card, Card, Cardholder, CashBalance, Charge, Configuration, Configuration, ConfirmationToken, ConnectionToken, CountrySpec, Coupon, CreditNote, CreditReversal, Customer, CustomerBalanceTransaction, CustomerSession, DebitReversal, Dispute, Dispute, EarlyFraudWarning, EphemeralKey, Event, ExchangeRate, Feature, FeeRefund, File, FileLink, FinancialAccount, InboundTransfer, Invoice, InvoiceItem, InvoiceLineItem, Location, LoginLink, Mandate, Meter, MeterEvent, MeterEventAdjustment, MeterEventSummary, Order, OutboundPayment, OutboundTransfer, PagingIterator, PaymentIntent, PaymentLink, PaymentMethod, PaymentMethodConfiguration, PaymentMethodDomain, Payout, Person, PersonalizationDesign, PhysicalBundle, Plan, Price, Product, Product, ProductFeature, PromotionCode, Quote, Reader, ReceivedCredit, ReceivedDebit, Refund, Registration, ReportRun, ReportType, Request, Review, ScheduledQueryRun, SearchPagingIterator, Secret, Session, Session, Session, Settings, SetupAttempt, SetupIntent, ShippingRate, Source, Subscription, SubscriptionItem, SubscriptionSchedule, Supplier, TaxCode, TaxId, TaxRate, TestClock, Token, Token, Topup, Transaction, Transaction, Transaction, Transaction, TransactionEntry, Transfer, TransferReversal, UsageRecord, ValueList, ValueListItem, VerificationReport, VerificationSession, WebhookEndpoint

public abstract class ApiResource extends StripeObject implements StripeActiveObject
  • Field Details


      public static final Charset CHARSET

      public static final INTERNAL_GSON
    • GSON

      public static final GSON
  • Constructor Details

    • ApiResource

      public ApiResource()
  • Method Details

    • setStripeResponseGetter

      public static void setStripeResponseGetter(StripeResponseGetter srg)
    • getGlobalResponseGetter

      protected static StripeResponseGetter getGlobalResponseGetter()
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter srg)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      srg - the StripeResponseGetter instance to use for making further requests.
    • getResponseGetter

      protected StripeResponseGetter getResponseGetter()
    • urlEncode

      public static String urlEncode(String str)
      URL-encodes a string.
    • urlEncodeId

      public static String urlEncodeId(String id) throws InvalidRequestException
      URL-encode a string ID in url path formatting.
    • checkNullTypedParams

      public static void checkNullTypedParams(String url, ApiRequestParams params)
      Invalidate null typed parameters.
      url - request url associated with the given parameters.
      params - typed parameters to check for null value.
    • setExpandableFieldId

      public static <T extends HasId> ExpandableField<T> setExpandableFieldId(String newId, ExpandableField<T> currentObject)
      When setting a String ID for an ExpandableField, we need to be careful about keeping the String ID and the expanded object in sync. If they specify a new String ID that is different from the ID within the expanded object, we don't keep the object.