Package com.stripe.net
Class ContextScopedStripeResponseGetter
java.lang.Object
com.stripe.net.ContextScopedStripeResponseGetter
- All Implemented Interfaces:
StripeResponseGetter
Applies a default context and suppresses inherited account scoping without replacing the
underlying requestor. Explicit request options retain their usual precedence.
For internal SDK use.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the scoped default context, including null when the context is cleared.rawRequest(RawApiRequest request) <T extends StripeObject>
Trequest(ApiRequest request, Type typeToken) <T extends StripeObject>
Trequest(BaseAddress baseAddress, ApiResource.RequestMethod method, String path, Map<String, Object> params, Type typeToken, RequestOptions options, ApiMode apiMode) requestStream(ApiRequest request) requestStream(BaseAddress baseAddress, ApiResource.RequestMethod method, String path, Map<String, Object> params, RequestOptions options, ApiMode apiMode) voidvalidateRequestOptions(RequestOptions options) This method should e.g.withStripeContext(StripeResponseGetter delegate, String stripeContext) Creates a getter with replacement context/account defaults, retaining the original requestor.
-
Method Details
-
withStripeContext
public static ContextScopedStripeResponseGetter withStripeContext(StripeResponseGetter delegate, String stripeContext) Creates a getter with replacement context/account defaults, retaining the original requestor. -
getStripeContext
Returns the scoped default context, including null when the context is cleared. -
request
public <T extends StripeObject> T request(ApiRequest request, Type typeToken) throws StripeException - Specified by:
requestin interfaceStripeResponseGetter- Throws:
StripeException
-
requestStream
- Specified by:
requestStreamin interfaceStripeResponseGetter- Throws:
StripeException
-
rawRequest
- Specified by:
rawRequestin interfaceStripeResponseGetter- Throws:
StripeException
-
request
public <T extends StripeObject> T request(BaseAddress baseAddress, ApiResource.RequestMethod method, String path, Map<String, Object> params, Type typeToken, RequestOptions options, ApiMode apiMode) throws StripeException- Specified by:
requestin interfaceStripeResponseGetter- Throws:
StripeException
-
requestStream
public InputStream requestStream(BaseAddress baseAddress, ApiResource.RequestMethod method, String path, Map<String, Object> params, RequestOptions options, ApiMode apiMode) throws StripeException- Specified by:
requestStreamin interfaceStripeResponseGetter- Throws:
StripeException
-
validateRequestOptions
Description copied from interface:StripeResponseGetterThis method should e.g. throws an ApiKeyMissingError if a proper API Key cannot be determined by the ResponseGetter or from the RequestOptions passed in.- Specified by:
validateRequestOptionsin interfaceStripeResponseGetter
-