Package com.stripe.net
Class ApiResource
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
- All Implemented Interfaces:
StripeActiveObject,StripeObjectInterface
- Direct Known Subclasses:
Account,Account,AccountInferredBalance,AccountLink,AccountNotice,AccountSession,ActiveEntitlement,Alert,ApplePayDomain,ApplicationFee,Association,Authorization,Balance,BalanceSettings,BalanceTransaction,BankAccount,BlocklistEntry,Calculation,Capability,Card,Card,Cardholder,CashBalance,Charge,Configuration,Configuration,ConfirmationToken,ConnectionToken,CountrySpec,Coupon,CreditBalanceSummary,CreditBalanceTransaction,CreditGrant,CreditNote,CreditReversal,CreditUnderwritingRecord,Customer,CustomerBalanceTransaction,CustomerSession,DebitReversal,Dispute,Dispute,DisputeSettlementDetail,EarlyFraudWarning,EphemeralKey,Event,ExchangeRate,Feature,FeeRefund,File,FileLink,FinancialAccount,FinancingOffer,FinancingSummary,FinancingTransaction,Form,FraudLiabilityDebit,FxQuote,InboundTransfer,Institution,Invoice,InvoiceItem,InvoiceLineItem,InvoicePayment,InvoiceRenderingTemplate,Location,LoginLink,Mandate,Margin,Meter,MeterEvent,MeterEventAdjustment,MeterEventSummary,MeterUsage,OnboardingLink,Order,Order,OutboundPayment,OutboundTransfer,PagingIterator,PaymentAttemptRecord,PaymentIntent,PaymentIntentAmountDetailsLineItem,PaymentLink,PaymentMethod,PaymentMethodConfiguration,PaymentMethodDomain,PaymentRecord,Payout,Person,PersonalizationDesign,PhysicalBundle,Plan,Price,Product,Product,ProductFeature,PromotionCode,Quote,QuotePreviewInvoice,QuotePreviewSubscriptionSchedule,Reader,ReaderCollectedData,ReceivedCredit,ReceivedDebit,RedactionJob,RedactionJobValidationError,Refund,Registration,ReportRun,ReportType,Request,RequestedSession,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,ValueList,ValueListItem,VerificationReport,VerificationSession,WebhookEndpoint
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Charsetstatic final com.google.gson.Gsonstatic final com.google.gson.GsonFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckNullTypedParams(String url, ApiRequestParams params) Invalidate null typed parameters.static StripeResponseGetterprotected StripeResponseGetterstatic <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.static voidvoidMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.static StringURL-encodes a string.static StringurlEncodeId(String id) URL-encode a string ID in url path formatting.Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Field Details
-
CHARSET
-
INTERNAL_GSON
public static final com.google.gson.Gson INTERNAL_GSON -
GSON
public static final com.google.gson.Gson GSON
-
-
Constructor Details
-
ApiResource
public ApiResource()
-
-
Method Details
-
setGlobalResponseGetter
-
getGlobalResponseGetter
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Parameters:
srg- theStripeResponseGetterinstance to use for making further requests.
-
getResponseGetter
-
urlEncode
URL-encodes a string. -
urlEncodeId
URL-encode a string ID in url path formatting.- Throws:
InvalidRequestException
-
checkNullTypedParams
Invalidate null typed parameters.- 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.
-