|
StripeKit 0.1.1
Stripe integration toolkit for C++
|
Turns Stripe's responses into StripeKit models. More...
#include <StripeApiClient.h>
Public Member Functions | |
| virtual | ~StripeResponseParser ()=default |
| Destroys the parser instance. | |
| virtual Customer | parse_customer (const HttpResponse &response) const =0 |
| Reads a customer out of a successful response. | |
| virtual CheckoutSession | parse_checkout_session (const HttpResponse &response) const =0 |
| Reads a Checkout session out of a successful response. | |
| virtual Subscription | parse_subscription (const HttpResponse &response) const =0 |
| Reads a subscription out of a successful response. | |
| virtual BillingPortalSession | parse_billing_portal_session (const HttpResponse &response) const =0 |
| Reads a billing portal session out of a successful response. | |
| virtual StripeErrorPayload | parse_error (const HttpResponse &response) const =0 |
| Reads the error details out of a failed response. | |
Turns Stripe's responses into StripeKit models.
StripeKit decodes Stripe's JSON with JsonStripeResponseParser by default. Implement this only when the application needs different decoding, such as to reuse a JSON library it already links.
Definition at line 34 of file StripeApiClient.h.
|
virtualdefault |
Destroys the parser instance.
|
pure virtual |
Reads a customer out of a successful response.
| response | The response body and status from Stripe. |
| ConfigurationException | The body was not a valid customer object. |
Implemented in stripekit::JsonStripeResponseParser.
|
pure virtual |
Reads a Checkout session out of a successful response.
| response | The response body and status from Stripe. |
| ConfigurationException | The body was not a valid session object. |
Implemented in stripekit::JsonStripeResponseParser.
|
pure virtual |
Reads a subscription out of a successful response.
| response | The response body and status from Stripe. |
| ConfigurationException | The body was not a valid subscription object. |
Implemented in stripekit::JsonStripeResponseParser.
|
pure virtual |
Reads a billing portal session out of a successful response.
| response | The response body and status from Stripe. |
| ConfigurationException | The body was not a valid session object. |
Implemented in stripekit::JsonStripeResponseParser.
|
pure virtual |
Reads the error details out of a failed response.
Must not throw: it is already handling a failure. Fall back to a StripeErrorType::Unknown payload when the body cannot be parsed.
| response | The response body and status from Stripe. |
Implemented in stripekit::JsonStripeResponseParser.