diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 196b871..c952a1f 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 79fa0df9-852a-493c-b998-1d82654b5f18 management: - docChecksum: 8134778d948a05652350ab91383aff9c - docVersion: 3.1.0 - speakeasyVersion: 1.331.0 - generationVersion: 2.365.0 - releaseVersion: 0.17.1 - configChecksum: 7ca902bf9ecf9be66f9391dea83d3b34 + docChecksum: 1c6f0a40f6a34b5758d83681c80c8538 + docVersion: 3.1.1 + speakeasyVersion: 1.337.1 + generationVersion: 2.373.2 + releaseVersion: 0.18.0 + configChecksum: 53969aeb13fadf716b60f94bca566c60 repoURL: https://github.com/BoltApp/Bolt-Typescript-SDK.git repoSubDirectory: . installationURL: https://github.com/BoltApp/Bolt-Typescript-SDK @@ -14,7 +14,8 @@ management: features: typescript: additionalDependencies: 0.1.0 - core: 3.11.6 + core: 3.11.7 + defaultEnabledRetries: 0.1.0 errorUnions: 0.1.0 flattening: 2.81.1 globalSecurity: 2.82.9 @@ -26,6 +27,7 @@ features: methodSecurity: 2.82.4 nameOverrides: 2.81.2 responseFormat: 0.2.3 + retries: 2.83.0 sdkHooks: 0.1.0 unions: 2.85.5 generatedFiles: @@ -294,6 +296,7 @@ generatedFiles: - docs/models/errors/testingaccountphonegetresponsebody.md - docs/models/errors/testingcreditcardgetresponsebody.md - docs/sdks/bolttypescriptsdk/README.md + - docs/lib/utils/retryconfig.md - docs/sdks/account/README.md - docs/sdks/payments/README.md - docs/sdks/guest/README.md @@ -306,3 +309,4 @@ generatedFiles: - src/hooks/hooks.ts - src/hooks/types.ts - src/hooks/index.ts + - CONTRIBUTING.md diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f2bc77b..ada3680 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.331.0 +speakeasyVersion: 1.337.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:06c8068d722d2be028f7bcfa60ad1adc4cfd6f8691e44e0da3ea6fccfce548e1 - sourceBlobDigest: sha256:5ec4dc0eec5c87e6fe98d45c90baebdecf3c088ee12729fd2c45cd4185367c4a + sourceRevisionDigest: sha256:a29c38c34ea084412a21ec783cc9e0ecc2ad18bb42fd6caa7a45132d75063024 + sourceBlobDigest: sha256:a17e5df430bc16f512ae76c093dd0dcd353e4994a539061a27c0575f157717d5 tags: - latest - main @@ -11,8 +11,8 @@ targets: bolt-typescript: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:06c8068d722d2be028f7bcfa60ad1adc4cfd6f8691e44e0da3ea6fccfce548e1 - sourceBlobDigest: sha256:5ec4dc0eec5c87e6fe98d45c90baebdecf3c088ee12729fd2c45cd4185367c4a + sourceRevisionDigest: sha256:a29c38c34ea084412a21ec783cc9e0ecc2ad18bb42fd6caa7a45132d75063024 + sourceBlobDigest: sha256:a17e5df430bc16f512ae76c093dd0dcd353e4994a539061a27c0575f157717d5 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/README.md b/README.md index 56847f3..21feb89 100644 --- a/README.md +++ b/README.md @@ -70,21 +70,21 @@ run(); * [addAddress](docs/sdks/account/README.md#addaddress) - Add an address * [updateAddress](docs/sdks/account/README.md#updateaddress) - Edit an existing address * [deleteAddress](docs/sdks/account/README.md#deleteaddress) - Delete an existing address -* [addPaymentMethod](docs/sdks/account/README.md#addpaymentmethod) - Add a payment method to a shopper's Bolt account Wallet. +* [addPaymentMethod](docs/sdks/account/README.md#addpaymentmethod) - Add a payment method * [deletePaymentMethod](docs/sdks/account/README.md#deletepaymentmethod) - Delete an existing payment method ### [payments.guest](docs/sdks/guest/README.md) * [initialize](docs/sdks/guest/README.md#initialize) - Initialize a Bolt payment for guest shoppers -* [update](docs/sdks/guest/README.md#update) - Update an existing guest payment -* [performAction](docs/sdks/guest/README.md#performaction) - Perform an irreversible action (e.g. finalize) on a pending guest payment +* [update](docs/sdks/guest/README.md#update) - Update a pending guest payment +* [performAction](docs/sdks/guest/README.md#performaction) - Finalize a pending guest payment ### [payments.loggedIn](docs/sdks/loggedin/README.md) * [initialize](docs/sdks/loggedin/README.md#initialize) - Initialize a Bolt payment for logged in shoppers -* [update](docs/sdks/loggedin/README.md#update) - Update an existing payment -* [performAction](docs/sdks/loggedin/README.md#performaction) - Perform an irreversible action (e.g. finalize) on a pending payment +* [update](docs/sdks/loggedin/README.md#update) - Update a pending payment +* [performAction](docs/sdks/loggedin/README.md#performaction) - Finalize a pending payment ### [oAuth](docs/sdks/oauth/README.md) @@ -92,13 +92,13 @@ run(); ### [orders](docs/sdks/orders/README.md) -* [ordersCreate](docs/sdks/orders/README.md#orderscreate) - Create an order that was placed outside the Bolt ecosystem. +* [ordersCreate](docs/sdks/orders/README.md#orderscreate) - Create an order that was prepared outside the Bolt ecosystem. ### [testing](docs/sdks/testing/README.md) * [createAccount](docs/sdks/testing/README.md#createaccount) - Create a test account * [testingAccountPhoneGet](docs/sdks/testing/README.md#testingaccountphoneget) - Get a random phone number -* [getCreditCard](docs/sdks/testing/README.md#getcreditcard) - Retrieve a test credit card, including its token +* [getCreditCard](docs/sdks/testing/README.md#getcreditcard) - Retrieve a tokenized test credit card @@ -408,6 +408,75 @@ run(); For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: +```typescript +import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk"; + +const boltTypescriptSDK = new BoltTypescriptSDK({ + security: { + oauth: "", + }, +}); + +async function run() { + const result = await boltTypescriptSDK.account.getDetails("", "", { + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```typescript +import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk"; + +const boltTypescriptSDK = new BoltTypescriptSDK({ + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + security: { + oauth: "", + }, +}); + +async function run() { + const result = await boltTypescriptSDK.account.getDetails("", ""); + + // Handle the result + console.log(result); +} + +run(); + +``` + + # Development diff --git a/RELEASES.md b/RELEASES.md index 7488052..ba62e15 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -528,4 +528,14 @@ Based on: ### Generated - [typescript v0.17.1] . ### Releases -- [NPM v0.17.1] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.17.1 - . \ No newline at end of file +- [NPM v0.17.1] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.17.1 - . + +## 2024-07-17 00:18:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.337.1 (2.373.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.18.0] . +### Releases +- [NPM v0.18.0] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.18.0 - . \ No newline at end of file diff --git a/docs/lib/utils/retryconfig.md b/docs/lib/utils/retryconfig.md new file mode 100644 index 0000000..08f95f4 --- /dev/null +++ b/docs/lib/utils/retryconfig.md @@ -0,0 +1,24 @@ +# RetryConfig + +Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | +| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | +| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | ------------ | ----------------------------------------- | -------- | +| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | +| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | +| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/docs/models/components/account.md b/docs/models/components/account.md index a68f4d3..054588d 100644 --- a/docs/models/components/account.md +++ b/docs/models/components/account.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `addresses` | [components.AddressListing](../../models/components/addresslisting.md)[] | :heavy_check_mark: | A list of addresses associated with this account. | | `paymentMethods` | *components.PaymentMethod*[] | :heavy_check_mark: | A list of payment methods associated with this account. | -| `profile` | [components.Profile](../../models/components/profile.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `profile` | [components.Profile](../../models/components/profile.md) | :heavy_minus_sign: | An account's identifying information. | \ No newline at end of file diff --git a/docs/models/components/authorizationcoderequest.md b/docs/models/components/authorizationcoderequest.md index b9aff07..bfdcac8 100644 --- a/docs/models/components/authorizationcoderequest.md +++ b/docs/models/components/authorizationcoderequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `grantType` | [components.GrantType](../../models/components/granttype.md) | :heavy_check_mark: | The type of OAuth 2.0 grant being utilized. | authorization_code | -| `code` | *string* | :heavy_check_mark: | Fetched value using OTP value from the Authorization Modal. | 7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms | -| `clientId` | *string* | :heavy_check_mark: | The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved
in the Merchant Dashboard.
| 8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4 | -| `clientSecret` | *string* | :heavy_check_mark: | The OAuth client secret, which corresponds the merchant API key, which can be retrieved in the
Merchant Dashboard.
| 23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8 | -| `scope` | [components.Scope](../../models/components/scope.md)[] | :heavy_check_mark: | The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes.


[OAuth Developer Reference](https://help.bolt.com/developers/references/bolt-oauth/#scopes) | | -| `state` | *string* | :heavy_minus_sign: | A randomly generated string sent along with an authorization code. This must be included, if provided,
in order to prevent CSRF attacks. used to prevent CSRF attacks.
| xyzABC123 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `grantType` | [components.GrantType](../../models/components/granttype.md) | :heavy_check_mark: | The type of OAuth 2.0 grant being utilized. | authorization_code | +| `code` | *string* | :heavy_check_mark: | Fetched value using OTP value from the Authorization Modal. | 7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms | +| `clientId` | *string* | :heavy_check_mark: | The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard. | 8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4 | +| `clientSecret` | *string* | :heavy_check_mark: | The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard. | 23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8 | +| `scope` | [components.Scope](../../models/components/scope.md)[] | :heavy_check_mark: | The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes.

[OAuth Developer Reference](https://help.bolt.com/developers/references/bolt-oauth/#scopes) | | +| `state` | *string* | :heavy_minus_sign: | A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks. | xyzABC123 | \ No newline at end of file diff --git a/docs/models/components/getaccesstokenresponse.md b/docs/models/components/getaccesstokenresponse.md index 8ae3aa6..7da3eea 100644 --- a/docs/models/components/getaccesstokenresponse.md +++ b/docs/models/components/getaccesstokenresponse.md @@ -5,10 +5,10 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `idToken` | *string* | :heavy_minus_sign: | A JWT token issued when the request includes the scope open_id. | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsaWNlQGV4YW1wbGUuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV4cCI6MTcwNTY1MTczMSwiZmlyc3RfbmFtZSI6IkFsaWNlIiwiaXNzIjoiaHR0cDovL2FwaS5ib2x0LmNvbSIsImxhc3RfbmFtZSI6IkJha2VyIiwicGhvbmVfbnVtYmVyIjoiKzE0MTU1NTUwMTk5IiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJpYXQiOjE3MDU2NDg0MjF9.Ir0aKx40zfNCZol1DnqchFx9ciHlyZY9y10mndEjOBHhpHif8-7aZl2UoJVs_0Hj-5ArEouUD6n-y1SJD0Wns-gDMoA0Etoc5dT_0zt0Kw5T8FvJWbyKyyGSDEwPFVADIRxDPMpVoHx0C0nwr_GudnIX7YG6p2HCsoGm2C04ZxKpifSixB3-xNB6k9u1ESWh0KjMCYzBQ2x9wbQ_S6kFtio075PFYcZ3iRQz8oD15NsZDd2czzZkRnGTGlpG0sAvScLXMvDDOWBIu-4wvOEOT7avunJQ_rOCYUlyJe7JGh0QllpeJNau8kx-4YGMeFTkeGM_hPIKsRF1e6o_rWp5CMJnmJDPme-zlJxWodyaHNed5XW-4DR7blv_PFOJNrRvymRoTOd74LIpS21GRCNYrphj7N6-TsSfO9hMQ9ehxrgNAryWbVtTM_3VvWyzX-SRa7BcRkS97sokxc04s3cbXra3x6brE3uL1yoOWNf8GDZNkv1uUAnrOZcTuLacrPjkQgOPb-chMiWS1L0Zd1wX3rqpeCyEswsGKxRRkpgwoBaVVQmLB9m51B6SXEvURTcy2Hx8KzgfXQ_-uC-KrniQxWzYms8A1lypKXkEcyMD2E4Q7EB4UeD2qZAk4tZo611uHegaHaEM7EQyFN3nxvibaqFpXzdxVmOCX0_wQr1nDNA | -| `accessToken` | *string* | :heavy_minus_sign: | An access token you can use to make requests on behalf of a Bolt Account. | KCqordmSK6_lpkaXaXfGD8LwnKMGGOYy4Ju2IaBXpJI.CzOF7QOmGGQEgIzBjxOEh1FbRdDpzf9zbm9eHrCZ6zw | +| `idToken` | *string* | :heavy_minus_sign: | A JSON Web Token (JWT) issued when the request includes the scope open_id. | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsaWNlQGV4YW1wbGUuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV4cCI6MTcwNTY1MTczMSwiZmlyc3RfbmFtZSI6IkFsaWNlIiwiaXNzIjoiaHR0cDovL2FwaS5ib2x0LmNvbSIsImxhc3RfbmFtZSI6IkJha2VyIiwicGhvbmVfbnVtYmVyIjoiKzE0MTU1NTUwMTk5IiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJpYXQiOjE3MDU2NDg0MjF9.Ir0aKx40zfNCZol1DnqchFx9ciHlyZY9y10mndEjOBHhpHif8-7aZl2UoJVs_0Hj-5ArEouUD6n-y1SJD0Wns-gDMoA0Etoc5dT_0zt0Kw5T8FvJWbyKyyGSDEwPFVADIRxDPMpVoHx0C0nwr_GudnIX7YG6p2HCsoGm2C04ZxKpifSixB3-xNB6k9u1ESWh0KjMCYzBQ2x9wbQ_S6kFtio075PFYcZ3iRQz8oD15NsZDd2czzZkRnGTGlpG0sAvScLXMvDDOWBIu-4wvOEOT7avunJQ_rOCYUlyJe7JGh0QllpeJNau8kx-4YGMeFTkeGM_hPIKsRF1e6o_rWp5CMJnmJDPme-zlJxWodyaHNed5XW-4DR7blv_PFOJNrRvymRoTOd74LIpS21GRCNYrphj7N6-TsSfO9hMQ9ehxrgNAryWbVtTM_3VvWyzX-SRa7BcRkS97sokxc04s3cbXra3x6brE3uL1yoOWNf8GDZNkv1uUAnrOZcTuLacrPjkQgOPb-chMiWS1L0Zd1wX3rqpeCyEswsGKxRRkpgwoBaVVQmLB9m51B6SXEvURTcy2Hx8KzgfXQ_-uC-KrniQxWzYms8A1lypKXkEcyMD2E4Q7EB4UeD2qZAk4tZo611uHegaHaEM7EQyFN3nxvibaqFpXzdxVmOCX0_wQr1nDNA | +| `accessToken` | *string* | :heavy_minus_sign: | An access token you can use to make requests on behalf of a Bolt shopper. | KCqordmSK6_lpkaXaXfGD8LwnKMGGOYy4Ju2IaBXpJI.CzOF7QOmGGQEgIzBjxOEh1FbRdDpzf9zbm9eHrCZ6zw | | `expiresIn` | *number* | :heavy_minus_sign: | The access token's expiration, in seconds. | 3600 | | `refreshToken` | *string* | :heavy_minus_sign: | A refresh token you can use to issue a brand new access token without obtaining a new authorization code. | 4hJYNO4GHvALZoocXoLenfNeFy1RR5ZT6G5JYrFbvkI.Q_PqV0lIszCNoN-85EwD-2nYZOVEepVgJSolx-Jbzrs | | `refreshTokenScope` | *string* | :heavy_minus_sign: | The scope granted to the refresh token. Currently, refreshed token will only grant view permissions. | bolt.account.view | -| `scope` | *string* | :heavy_minus_sign: | The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter.
Options include `bolt.account.manage`, `bolt.account.view`, `openid`. Multiple values can be returned as space-separated strings.
| bolt.account.manage openid | +| `scope` | *string* | :heavy_minus_sign: | The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter. Options include `bolt.account.manage`, `bolt.account.view`, `openid`. Multiple values can be returned as space-separated strings. | bolt.account.manage openid | | `tokenType` | *string* | :heavy_minus_sign: | The token_type will always be bearer. | bearer | \ No newline at end of file diff --git a/docs/models/components/order.md b/docs/models/components/order.md index 028b4b0..c47c726 100644 --- a/docs/models/components/order.md +++ b/docs/models/components/order.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `profile` | [components.Profile](../../models/components/profile.md) | :heavy_check_mark: | N/A | +| `profile` | [components.Profile](../../models/components/profile.md) | :heavy_check_mark: | An account's identifying information. | | `cart` | [components.Cart](../../models/components/cart.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/profile.md b/docs/models/components/profile.md index 074a093..2312b46 100644 --- a/docs/models/components/profile.md +++ b/docs/models/components/profile.md @@ -1,5 +1,7 @@ # Profile +An account's identifying information. + ## Fields diff --git a/docs/models/components/profilecreationdata.md b/docs/models/components/profilecreationdata.md index 77787f9..5b53c87 100644 --- a/docs/models/components/profilecreationdata.md +++ b/docs/models/components/profilecreationdata.md @@ -1,5 +1,7 @@ # ProfileCreationData +An account's identifying information. + ## Fields diff --git a/docs/models/components/refreshtokenrequest.md b/docs/models/components/refreshtokenrequest.md index 4a7a89d..467036e 100644 --- a/docs/models/components/refreshtokenrequest.md +++ b/docs/models/components/refreshtokenrequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `grantType` | [components.RefreshTokenRequestGrantType](../../models/components/refreshtokenrequestgranttype.md) | :heavy_check_mark: | The type of OAuth 2.0 grant being utilized. | refresh_token | -| `refreshToken` | *string* | :heavy_check_mark: | The value of the refresh token issued to you in the originating OAuth token request. | 4hJYNO4GHvALZoocXoLenfNeFy1RR5ZT6G5JYrFbvkI.Q_PqV0lIszCNoN-85EwD-2nYZOVEepVgJSolx-Jbzrs | -| `clientId` | *string* | :heavy_check_mark: | The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved
in the Merchant Dashboard.
| 8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4 | -| `clientSecret` | *string* | :heavy_check_mark: | The OAuth client secret, which corresponds the merchant API key, which can be retrieved in the
Merchant Dashboard.
| 23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8 | -| `scope` | [components.RefreshTokenRequestScope](../../models/components/refreshtokenrequestscope.md)[] | :heavy_check_mark: | The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes.


[OAuth Developer Reference](https://help.bolt.com/developers/references/bolt-oauth/#scopes) | | -| `state` | *string* | :heavy_minus_sign: | A randomly generated string sent along with an authorization code. This must be included, if provided,
in order to prevent CSRF attacks. used to prevent CSRF attacks.
| xyzABC123 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `grantType` | [components.RefreshTokenRequestGrantType](../../models/components/refreshtokenrequestgranttype.md) | :heavy_check_mark: | The type of OAuth 2.0 grant being utilized. | refresh_token | +| `refreshToken` | *string* | :heavy_check_mark: | The value of the refresh token issued to you in the originating OAuth token request. | 4hJYNO4GHvALZoocXoLenfNeFy1RR5ZT6G5JYrFbvkI.Q_PqV0lIszCNoN-85EwD-2nYZOVEepVgJSolx-Jbzrs | +| `clientId` | *string* | :heavy_check_mark: | The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard. | 8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4 | +| `clientSecret` | *string* | :heavy_check_mark: | The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard. | 23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8 | +| `scope` | [components.RefreshTokenRequestScope](../../models/components/refreshtokenrequestscope.md)[] | :heavy_check_mark: | The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes.

[OAuth Developer Reference](https://help.bolt.com/developers/references/bolt-oauth/#scopes) | | +| `state` | *string* | :heavy_minus_sign: | A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks. | xyzABC123 | \ No newline at end of file diff --git a/docs/models/errors/carterror.md b/docs/models/errors/carterror.md index 21d3a44..1bbd223 100644 --- a/docs/models/errors/carterror.md +++ b/docs/models/errors/carterror.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `dotTag` | [errors.SchemasCartErrorTag](../../models/errors/schemascarterrortag.md) | :heavy_check_mark: | The type of error returned | payment_already_exists | -| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to
the request that was made.
| A payment for this order already exists | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `dotTag` | [errors.SchemasCartErrorTag](../../models/errors/schemascarterrortag.md) | :heavy_check_mark: | The type of error returned | payment_already_exists | +| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to the request that was made. | A payment for this order already exists | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/creditcarderror.md b/docs/models/errors/creditcarderror.md index 46766d4..9eb0c4a 100644 --- a/docs/models/errors/creditcarderror.md +++ b/docs/models/errors/creditcarderror.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `dotTag` | [errors.SchemasCreditCardErrorTag](../../models/errors/schemascreditcarderrortag.md) | :heavy_check_mark: | The type of error returned | declined_invalid_cvv | -| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to
the request that was made.
| The payment was declined because the CVV is not valid | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `dotTag` | [errors.SchemasCreditCardErrorTag](../../models/errors/schemascreditcarderrortag.md) | :heavy_check_mark: | The type of error returned | declined_invalid_cvv | +| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to the request that was made. | The payment was declined because the CVV is not valid | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/errort.md b/docs/models/errors/errort.md index 3bb0e17..4efb764 100644 --- a/docs/models/errors/errort.md +++ b/docs/models/errors/errort.md @@ -3,24 +3,24 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `dotTag` | [errors.DotTag](../../models/errors/dottag.md) | :heavy_check_mark: | The type of error returned | unprocessable_request | -| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to
the request that was made.
| We were unable to process your request. | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse3` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse4` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse5` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse6` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse7` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse8` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse9` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse10` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse11` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse12` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse13` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse14` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse15` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse16` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `dotTag` | [errors.DotTag](../../models/errors/dottag.md) | :heavy_check_mark: | The type of error returned | unprocessable_request | +| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to the request that was made. | We were unable to process your request. | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse3` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse4` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse5` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse6` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse7` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse8` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse9` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse10` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse11` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse12` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse13` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse14` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse15` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse16` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/fielderror.md b/docs/models/errors/fielderror.md index 7cfe89c..7988e7c 100644 --- a/docs/models/errors/fielderror.md +++ b/docs/models/errors/fielderror.md @@ -5,25 +5,25 @@ An error that pertains to validation of a specific field in the request. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `dotTag` | [errors.SchemasTag](../../models/errors/schemastag.md) | :heavy_check_mark: | The type of error returned | invalid_input_parameter | -| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to
the request that was made.
| We were unable to process your request. | -| `field` | *string* | :heavy_check_mark: | The field (in its hierarchical form) that is failing validation. | address.phone | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse3` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse4` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse5` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse6` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse7` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse8` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse9` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse10` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse11` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse12` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse13` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse14` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse15` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | -| `rawResponse16` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `dotTag` | [errors.SchemasTag](../../models/errors/schemastag.md) | :heavy_check_mark: | The type of error returned | invalid_input_parameter | +| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to the request that was made. | We were unable to process your request. | +| `field` | *string* | :heavy_check_mark: | The field (in its hierarchical form) that is failing validation. | address.phone | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse1` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse2` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse3` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse4` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse5` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse6` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse7` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse8` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse9` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse10` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse11` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse12` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse13` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse14` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse15` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | +| `rawResponse16` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/operations/accountaddpaymentmethodrequest.md b/docs/models/operations/accountaddpaymentmethodrequest.md index fc6ae02..d9e587e 100644 --- a/docs/models/operations/accountaddpaymentmethodrequest.md +++ b/docs/models/operations/accountaddpaymentmethodrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `paymentMethod` | *components.PaymentMethodInput* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/accountaddresscreaterequest.md b/docs/models/operations/accountaddresscreaterequest.md index 037bb4b..99bc02a 100644 --- a/docs/models/operations/accountaddresscreaterequest.md +++ b/docs/models/operations/accountaddresscreaterequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `addressListing` | [components.AddressListingInput](../../models/components/addresslistinginput.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/accountaddressdeleterequest.md b/docs/models/operations/accountaddressdeleterequest.md index 85b739c..ef74d85 100644 --- a/docs/models/operations/accountaddressdeleterequest.md +++ b/docs/models/operations/accountaddressdeleterequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the address to delete | D4g3h5tBuVYK9 | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | \ No newline at end of file diff --git a/docs/models/operations/accountaddresseditrequest.md b/docs/models/operations/accountaddresseditrequest.md index eab2179..b87fcc3 100644 --- a/docs/models/operations/accountaddresseditrequest.md +++ b/docs/models/operations/accountaddresseditrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the address to edit | D4g3h5tBuVYK9 | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `addressListing` | [components.AddressListingInput](../../models/components/addresslistinginput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/accountgetrequest.md b/docs/models/operations/accountgetrequest.md index dd4b654..c99c520 100644 --- a/docs/models/operations/accountgetrequest.md +++ b/docs/models/operations/accountgetrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | \ No newline at end of file diff --git a/docs/models/operations/accountpaymentmethoddeleterequest.md b/docs/models/operations/accountpaymentmethoddeleterequest.md index 9796211..27d9ab3 100644 --- a/docs/models/operations/accountpaymentmethoddeleterequest.md +++ b/docs/models/operations/accountpaymentmethoddeleterequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment method to delete | D4g3h5tBuVYK9 | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | \ No newline at end of file diff --git a/docs/models/operations/guestpaymentsactionrequest.md b/docs/models/operations/guestpaymentsactionrequest.md index 836ad5a..6fb8660 100644 --- a/docs/models/operations/guestpaymentsactionrequest.md +++ b/docs/models/operations/guestpaymentsactionrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the guest payment to operate on | iKv7t5bgt1gg | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentActionRequest` | [components.PaymentActionRequest](../../models/components/paymentactionrequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/guestpaymentsinitializerequest.md b/docs/models/operations/guestpaymentsinitializerequest.md index 1c3b310..2a74250 100644 --- a/docs/models/operations/guestpaymentsinitializerequest.md +++ b/docs/models/operations/guestpaymentsinitializerequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `guestPaymentInitializeRequest` | [components.GuestPaymentInitializeRequest](../../models/components/guestpaymentinitializerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/guestpaymentsupdaterequest.md b/docs/models/operations/guestpaymentsupdaterequest.md index 06b9cab..a3958c0 100644 --- a/docs/models/operations/guestpaymentsupdaterequest.md +++ b/docs/models/operations/guestpaymentsupdaterequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the guest payment to update | iKv7t5bgt1gg | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentUpdateRequest` | [components.PaymentUpdateRequest](../../models/components/paymentupdaterequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/orderscreaterequest.md b/docs/models/operations/orderscreaterequest.md index 6a04d2f..831d831 100644 --- a/docs/models/operations/orderscreaterequest.md +++ b/docs/models/operations/orderscreaterequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `order` | [components.Order](../../models/components/order.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/paymentsactionrequest.md b/docs/models/operations/paymentsactionrequest.md index 178634c..4c83c1b 100644 --- a/docs/models/operations/paymentsactionrequest.md +++ b/docs/models/operations/paymentsactionrequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment to operate on | iKv7t5bgt1gg | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentActionRequest` | [components.PaymentActionRequest](../../models/components/paymentactionrequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/paymentsinitializerequest.md b/docs/models/operations/paymentsinitializerequest.md index e2161c1..8af2025 100644 --- a/docs/models/operations/paymentsinitializerequest.md +++ b/docs/models/operations/paymentsinitializerequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `paymentInitializeRequest` | [components.PaymentInitializeRequest](../../models/components/paymentinitializerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/paymentsupdaterequest.md b/docs/models/operations/paymentsupdaterequest.md index 8787ff4..cb6e810 100644 --- a/docs/models/operations/paymentsupdaterequest.md +++ b/docs/models/operations/paymentsupdaterequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment to update | iKv7t5bgt1gg | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentUpdateRequest` | [components.PaymentUpdateRequest](../../models/components/paymentupdaterequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/testingaccountcreaterequest.md b/docs/models/operations/testingaccountcreaterequest.md index 0666583..fa13c2c 100644 --- a/docs/models/operations/testingaccountcreaterequest.md +++ b/docs/models/operations/testingaccountcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `accountTestCreationData` | [components.AccountTestCreationData](../../models/components/accounttestcreationdata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/testingaccountphonegetrequest.md b/docs/models/operations/testingaccountphonegetrequest.md index ca618b2..241ba08 100644 --- a/docs/models/operations/testingaccountphonegetrequest.md +++ b/docs/models/operations/testingaccountphonegetrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | \ No newline at end of file diff --git a/docs/sdks/account/README.md b/docs/sdks/account/README.md index 193963d..f33764a 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -3,9 +3,7 @@ ## Overview -Account endpoints allow you to view and manage shoppers' accounts. For example, -you can add or remove addresses and payment information. - +Use the Accounts API to access shoppers' accounts to empower your checkout and facilitate shoppers' choices. ### Available Operations @@ -13,7 +11,7 @@ you can add or remove addresses and payment information. * [addAddress](#addaddress) - Add an address * [updateAddress](#updateaddress) - Edit an existing address * [deleteAddress](#deleteaddress) - Delete an existing address -* [addPaymentMethod](#addpaymentmethod) - Add a payment method to a shopper's Bolt account Wallet. +* [addPaymentMethod](#addpaymentmethod) - Add a payment method * [deletePaymentMethod](#deletepaymentmethod) - Delete an existing payment method ## getDetails @@ -45,10 +43,11 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -103,11 +102,12 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `addressListing` | [components.AddressListingInput](../../models/components/addresslistinginput.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -122,10 +122,7 @@ run(); ## updateAddress -Edit an existing address on the shopper's account. This does not edit addresses -that are already associated with other resources, such as transactions or -shipments. - +Edit an existing address on the shopper's account. This does not edit addresses that are already associated with other resources, such as transactions or shipments. ### Example Usage @@ -166,11 +163,12 @@ run(); | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the address to edit | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `addressListing` | [components.AddressListingInput](../../models/components/addresslistinginput.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response @@ -185,9 +183,7 @@ run(); ## deleteAddress -Delete an existing address. Deleting an address does not invalidate transactions or -shipments that are associated with it. - +Delete an existing address. Deleting an address does not invalidate or remove the address from transactions or shipments that are associated with it. ### Example Usage @@ -215,10 +211,11 @@ run(); | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the address to delete | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response @@ -233,11 +230,7 @@ run(); ## addPaymentMethod -Add a payment method to a shopper's Bolt account Wallet. For security purposes, this request must come from -your backend because authentication requires the use of your private key.
-**Note**: Before using this API, the credit card details must be tokenized using Bolt's JavaScript library function, -which is documented in [Install the Bolt Tokenizer](https://help.bolt.com/developers/references/bolt-tokenizer). - +Add a payment method to a shopper's Bolt Account Wallet. For security purposes, this request must come from your backend.
**Note**: Before using this API, the credit card details must be tokenized by Bolt's credit card tokenization service. Please review our [Bolt Payment Field Component](https://help.bolt.com/products/ignite/api-implementation/#enhance-payments) or [Install the Bolt Tokenizer](https://help.bolt.com/developers/references/bolt-tokenizer) documentation. ### Example Usage @@ -276,11 +269,12 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `paymentMethod` | *components.PaymentMethodInput* | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -295,9 +289,7 @@ run(); ## deletePaymentMethod -Delete an existing payment method. Deleting a payment method does not invalidate transactions or -orders that are associated with it. - +Delete an existing payment method. Deleting a payment method does not invalidate or remove it from transactions or orders that are associated with it. ### Example Usage @@ -325,10 +317,11 @@ run(); | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment method to delete | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response diff --git a/docs/sdks/bolttypescriptsdk/README.md b/docs/sdks/bolttypescriptsdk/README.md index a266ca3..c388cd2 100644 --- a/docs/sdks/bolttypescriptsdk/README.md +++ b/docs/sdks/bolttypescriptsdk/README.md @@ -3,7 +3,7 @@ ## Overview -Bolt API Reference: A comprehensive Bolt API reference for interacting with Transactions, Orders, Product Catalog, Configuration, Testing, and much more. +Bolt API Reference: A comprehensive Bolt API reference for interacting with Accounts, Payments, Orders and more. ### Available Operations diff --git a/docs/sdks/guest/README.md b/docs/sdks/guest/README.md index 35df701..4bb326c 100644 --- a/docs/sdks/guest/README.md +++ b/docs/sdks/guest/README.md @@ -4,14 +4,12 @@ ### Available Operations * [initialize](#initialize) - Initialize a Bolt payment for guest shoppers -* [update](#update) - Update an existing guest payment -* [performAction](#performaction) - Perform an irreversible action (e.g. finalize) on a pending guest payment +* [update](#update) - Update a pending guest payment +* [performAction](#performaction) - Finalize a pending guest payment ## initialize -Initialize a Bolt payment token that will be used to reference this payment to -Bolt when it is updated or finalized for guest shoppers. - +Initialize a Bolt guest shopper's intent to pay for a cart, using the specified payment method. Payments must be finalized before indicating the payment result to the shopper. Some payment methods will finalize automatically after initialization. For these payments, they will transition directly to "finalized" and the response from Initialize Payment will contain a finalized payment. ### Example Usage @@ -106,11 +104,12 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `security` | [operations.GuestPaymentsInitializeSecurity](../../models/operations/guestpaymentsinitializesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `guestPaymentInitializeRequest` | [components.GuestPaymentInitializeRequest](../../models/components/guestpaymentinitializerequest.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -125,8 +124,7 @@ run(); ## update -Update a pending guest payment - +Update a guest payment that is still in the pending state, with new information about the payment. ### Example Usage @@ -213,11 +211,12 @@ run(); | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `security` | [operations.GuestPaymentsUpdateSecurity](../../models/operations/guestpaymentsupdatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | | | `id` | *string* | :heavy_check_mark: | The ID of the guest payment to update | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentUpdateRequest` | [components.PaymentUpdateRequest](../../models/components/paymentupdaterequest.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response @@ -232,8 +231,7 @@ run(); ## performAction -Perform an irreversible action on a pending guest payment, such as finalizing it. - +Finalize a pending payment being made by a Bolt guest shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper. ### Example Usage @@ -262,11 +260,12 @@ run(); | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `security` | [operations.GuestPaymentsActionSecurity](../../models/operations/guestpaymentsactionsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | | | `id` | *string* | :heavy_check_mark: | The ID of the guest payment to operate on | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentActionRequest` | [components.PaymentActionRequest](../../models/components/paymentactionrequest.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response diff --git a/docs/sdks/loggedin/README.md b/docs/sdks/loggedin/README.md index 56473c1..85a5b24 100644 --- a/docs/sdks/loggedin/README.md +++ b/docs/sdks/loggedin/README.md @@ -4,13 +4,12 @@ ### Available Operations * [initialize](#initialize) - Initialize a Bolt payment for logged in shoppers -* [update](#update) - Update an existing payment -* [performAction](#performaction) - Perform an irreversible action (e.g. finalize) on a pending payment +* [update](#update) - Update a pending payment +* [performAction](#performaction) - Finalize a pending payment ## initialize -Initialize a Bolt payment token that will be used to reference this payment to -Bolt when it is updated or finalized for logged in shoppers. +Initialize a Bolt logged-in shopper's intent to pay for a cart, using the specified payment method. Payments must be finalized before indicating the payment result to the shopper. Some payment methods will finalize automatically after initialization. For these payments, they will transition directly to "finalized" and the response from Initialize Payment will contain a finalized payment. ### Example Usage @@ -94,11 +93,12 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `paymentInitializeRequest` | [components.PaymentInitializeRequest](../../models/components/paymentinitializerequest.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -113,8 +113,7 @@ run(); ## update -Update a pending payment - +Update a payment that is still in the pending state, with new information about the payment. ### Example Usage @@ -204,11 +203,12 @@ run(); | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment to update | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentUpdateRequest` | [components.PaymentUpdateRequest](../../models/components/paymentupdaterequest.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response @@ -223,8 +223,7 @@ run(); ## performAction -Perform an irreversible action on a pending payment, such as finalizing it. - +Finalize a pending payment being made by a Bolt logged-in shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper. ### Example Usage @@ -256,11 +255,12 @@ run(); | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | The ID of the payment to operate on | [object Object] | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | | `paymentActionRequest` | [components.PaymentActionRequest](../../models/components/paymentactionrequest.md) | :heavy_check_mark: | N/A | | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | ### Response diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md index 4a7f533..0ecaaf2 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -3,9 +3,7 @@ ## Overview -Use this endpoint to retrieve an OAuth token. Use the token to allow your ecommerce server to make calls to the Account -endpoint and create a one-click checkout experience for shoppers. - +Use the OAuth API to enable your ecommerce server to make API calls on behalf of a Bolt logged-in shopper. ### Available Operations @@ -53,6 +51,7 @@ run(); | `tokenRequest` | *components.TokenRequest* | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/orders/README.md b/docs/sdks/orders/README.md index 7cca898..53e0a5e 100644 --- a/docs/sdks/orders/README.md +++ b/docs/sdks/orders/README.md @@ -5,15 +5,13 @@ Use the Orders API to create and manage orders, including orders that have been placed outside the Bolt ecosystem. - ### Available Operations -* [ordersCreate](#orderscreate) - Create an order that was placed outside the Bolt ecosystem. +* [ordersCreate](#orderscreate) - Create an order that was prepared outside the Bolt ecosystem. ## ordersCreate -Create an order that was placed outside the Bolt ecosystem. - +Create an order that was prepared outside the Bolt ecosystem. Some Bolt-powered flows automatically manage order creation - in those flows the order ID will be provided separately and not through this API. ### Example Usage @@ -95,11 +93,12 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `security` | [operations.OrdersCreateSecurity](../../models/operations/orderscreatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `xMerchantClientId` | *string* | :heavy_check_mark: | A unique identifier for a shopper's device, generated by Bolt. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics. | | `order` | [components.Order](../../models/components/order.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/testing/README.md b/docs/sdks/testing/README.md index 0dd98e3..c6818b6 100644 --- a/docs/sdks/testing/README.md +++ b/docs/sdks/testing/README.md @@ -3,21 +3,18 @@ ## Overview -Endpoints that allow you to generate and retrieve test data to verify certain -flows in non-production environments. - +Use the Testing API to generate and retrieve test data to verify a subset of flows in non-production environments. ### Available Operations * [createAccount](#createaccount) - Create a test account * [testingAccountPhoneGet](#testingaccountphoneget) - Get a random phone number -* [getCreditCard](#getcreditcard) - Retrieve a test credit card, including its token +* [getCreditCard](#getcreditcard) - Retrieve a tokenized test credit card ## createAccount Create a Bolt shopper account for testing purposes. - ### Example Usage ```typescript @@ -47,10 +44,11 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `security` | [operations.TestingAccountCreateSecurity](../../models/operations/testingaccountcreatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `accountTestCreationData` | [components.AccountTestCreationData](../../models/components/accounttestcreationdata.md) | :heavy_check_mark: | N/A | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -65,8 +63,7 @@ run(); ## testingAccountPhoneGet -Get a random, fictitious phone number that is not assigned to any existing account. - +Get a random, fictitious phone number that is not assigned to any existing Bolt account. ### Example Usage @@ -90,9 +87,10 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `security` | [operations.TestingAccountPhoneGetSecurity](../../models/operations/testingaccountphonegetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | -| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly viewable identifier used to identify a merchant division. | +| `xPublishableKey` | *string* | :heavy_check_mark: | The publicly shareable identifier used to identify your Bolt merchant division. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -107,8 +105,7 @@ run(); ## getCreditCard -Retrieve test credit card information. This includes its token, which can be used to process payments. - +Retrieve a test credit card that can be used to process payments in your Bolt testing environment. The response includes the card's Bolt credit card token. ### Example Usage @@ -138,6 +135,7 @@ run(); | `security` | [operations.TestingCreditCardGetSecurity](../../models/operations/testingcreditcardgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/gen.yaml b/gen.yaml index 67bfc78..5d3b688 100644 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.17.1 + version: 0.18.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/jsr.json b/jsr.json index 80ac147..94d52ab 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@boltpay/bolt-typescript-sdk", - "version": "0.17.1", + "version": "0.18.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index c66142a..25732dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@boltpay/bolt-typescript-sdk", - "version": "0.17.1", + "version": "0.18.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@boltpay/bolt-typescript-sdk", - "version": "0.17.1", + "version": "0.18.0", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 05951b9..d7f7147 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@boltpay/bolt-typescript-sdk", - "version": "0.17.1", + "version": "0.18.0", "author": "BoltPublicAPI", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index 9a6805b..80ac411 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -3,6 +3,7 @@ */ import * as components from "../models/components/index.js"; +import { ClosedEnum } from "../types/enums.js"; import { HTTPClient } from "./http.js"; import { RetryConfig } from "./retries.js"; import { Params, pathToFunc } from "./url.js"; @@ -12,10 +13,11 @@ import { Params, pathToFunc } from "./url.js"; */ export const ServerList = ["https://{environment}.bolt.com/v3"] as const; -export enum ServerEnvironment { - Api = "api", - ApiSandbox = "api-sandbox", -} +export const ServerEnvironment = { + Api: "api", + ApiSandbox: "api-sandbox", +} as const; +export type ServerEnvironment = ClosedEnum; export type SDKOptions = { /** @@ -40,6 +42,7 @@ export type SDKOptions = { * Allows overriding the default retry config used by the SDK */ retryConfig?: RetryConfig; + timeoutMs?: number; }; export function serverURLFromOptions(options: SDKOptions): URL | null { @@ -67,8 +70,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", - openapiDocVersion: "3.1.0", - sdkVersion: "0.17.1", - genVersion: "2.365.0", - userAgent: "speakeasy-sdk/typescript 0.17.1 2.365.0 3.1.0 @boltpay/bolt-typescript-sdk", + openapiDocVersion: "3.1.1", + sdkVersion: "0.18.0", + genVersion: "2.373.2", + userAgent: "speakeasy-sdk/typescript 0.18.0 2.373.2 3.1.1 @boltpay/bolt-typescript-sdk", } as const; diff --git a/src/lib/http.ts b/src/lib/http.ts index b52fca0..0bbdb4b 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -284,6 +284,7 @@ type ResponsePredicateMatch = { key: string | undefined; err: boolean; fail: boolean; + sseSentinel?: string | undefined; }; type ResponsePredicateOptions = { @@ -291,6 +292,8 @@ type ResponsePredicateOptions = { ctype?: string; /** Pass HTTP headers to deserializer. */ hdrs?: boolean; + /** A value for an SSE event's data field that indicates a stream should be terminated. */ + sseSentinel?: string; } & ( | { /** The result key to store the deserialized value into. */ @@ -326,6 +329,7 @@ export class ResponseMatcher { const key = opts?.key; const err = !!opts?.err; const fail = !!opts?.fail; + const sseSentinel = opts?.sseSentinel; this.predicates.push({ method, codes, @@ -335,6 +339,7 @@ export class ResponseMatcher { key, err, fail, + sseSentinel, }); return this; } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 740bb06..6e43e8e 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -4,6 +4,7 @@ import { ResponseMatcher, HTTPClient, matchStatusCode } from "./http.js"; import { SecurityState, resolveSecurity, resolveGlobalSecurity } from "./security.js"; +import { retry, RetryConfig } from "./retries.js"; import { pathToFunc } from "./url.js"; import { encodeForm } from "./encodings.js"; import { stringToBase64 } from "./base64.js"; @@ -12,6 +13,24 @@ import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; export type RequestOptions = { + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ fetchOptions?: Omit; }; @@ -24,6 +43,7 @@ type RequestConfig = { headers?: HeadersInit; security?: SecurityState | null; uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; @@ -119,10 +139,20 @@ export class ClientSDK { headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); } + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } + const input = this.hooks$.beforeCreateRequest(context, { url: reqURL, options: { - ...options?.fetchOptions, + ...fetchOptions, body: conf.body ?? null, headers, method, @@ -133,27 +163,40 @@ export class ClientSDK { } protected async do$( - req: Request, + request: Request, options: { context: HookContext; errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; } ): Promise { const { context, errorCodes } = options; - - let response = await this.client.request(await this.hooks$.beforeRequest(context, req)); - - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - return response; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = request.clone(); + + let response = await this.client.request( + await this.hooks$.beforeRequest(context, req) + ); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); + } + + return response; + }, + { config: retryConfig, statusCodes: retryCodes } + ); } protected matcher(): ResponseMatcher { diff --git a/src/models/components/account.ts b/src/models/components/account.ts index 7ab07c7..bc031f6 100644 --- a/src/models/components/account.ts +++ b/src/models/components/account.ts @@ -32,6 +32,9 @@ export type Account = { * A list of payment methods associated with this account. */ paymentMethods: Array; + /** + * An account's identifying information. + */ profile?: Profile | undefined; }; diff --git a/src/models/components/authorizationcoderequest.ts b/src/models/components/authorizationcoderequest.ts index 354ff73..8861f9f 100644 --- a/src/models/components/authorizationcoderequest.ts +++ b/src/models/components/authorizationcoderequest.ts @@ -28,34 +28,19 @@ export type AuthorizationCodeRequest = { */ code: string; /** - * The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved - * - * @remarks - * in the Merchant Dashboard. - * + * The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard. */ clientId: string; /** - * The OAuth client secret, which corresponds the merchant API key, which can be retrieved in the - * - * @remarks - * Merchant Dashboard. - * + * The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard. */ clientSecret: string; /** * The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes. - * - * @remarks - * */ scope: Array; /** - * A randomly generated string sent along with an authorization code. This must be included, if provided, - * - * @remarks - * in order to prevent CSRF attacks. used to prevent CSRF attacks. - * + * A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks. */ state?: string | undefined; }; diff --git a/src/models/components/getaccesstokenresponse.ts b/src/models/components/getaccesstokenresponse.ts index 0645633..6d64505 100644 --- a/src/models/components/getaccesstokenresponse.ts +++ b/src/models/components/getaccesstokenresponse.ts @@ -7,11 +7,11 @@ import * as z from "zod"; export type GetAccessTokenResponse = { /** - * A JWT token issued when the request includes the scope open_id. + * A JSON Web Token (JWT) issued when the request includes the scope open_id. */ idToken?: string | undefined; /** - * An access token you can use to make requests on behalf of a Bolt Account. + * An access token you can use to make requests on behalf of a Bolt shopper. */ accessToken?: string | undefined; /** @@ -27,11 +27,7 @@ export type GetAccessTokenResponse = { */ refreshTokenScope?: string | undefined; /** - * The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter. - * - * @remarks - * Options include `bolt.account.manage`, `bolt.account.view`, `openid`. Multiple values can be returned as space-separated strings. - * + * The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter. Options include `bolt.account.manage`, `bolt.account.view`, `openid`. Multiple values can be returned as space-separated strings. */ scope?: string | undefined; /** diff --git a/src/models/components/order.ts b/src/models/components/order.ts index 2822a6e..7286995 100644 --- a/src/models/components/order.ts +++ b/src/models/components/order.ts @@ -12,6 +12,9 @@ import { import * as z from "zod"; export type Order = { + /** + * An account's identifying information. + */ profile: Profile; cart: Cart; }; diff --git a/src/models/components/profile.ts b/src/models/components/profile.ts index 7958b9f..abb8b2c 100644 --- a/src/models/components/profile.ts +++ b/src/models/components/profile.ts @@ -5,6 +5,9 @@ import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +/** + * An account's identifying information. + */ export type Profile = { /** * The given name of the person associated with this profile. diff --git a/src/models/components/profilecreationdata.ts b/src/models/components/profilecreationdata.ts index 3f343ab..ad93098 100644 --- a/src/models/components/profilecreationdata.ts +++ b/src/models/components/profilecreationdata.ts @@ -5,6 +5,9 @@ import { remap as remap$ } from "../../lib/primitives.js"; import * as z from "zod"; +/** + * An account's identifying information. + */ export type ProfileCreationData = { /** * Whether or not an account should be created. diff --git a/src/models/components/refreshtokenrequest.ts b/src/models/components/refreshtokenrequest.ts index 0b08cdc..de03ded 100644 --- a/src/models/components/refreshtokenrequest.ts +++ b/src/models/components/refreshtokenrequest.ts @@ -28,34 +28,19 @@ export type RefreshTokenRequest = { */ refreshToken: string; /** - * The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved - * - * @remarks - * in the Merchant Dashboard. - * + * The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard. */ clientId: string; /** - * The OAuth client secret, which corresponds the merchant API key, which can be retrieved in the - * - * @remarks - * Merchant Dashboard. - * + * The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard. */ clientSecret: string; /** * The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes. - * - * @remarks - * */ scope: Array; /** - * A randomly generated string sent along with an authorization code. This must be included, if provided, - * - * @remarks - * in order to prevent CSRF attacks. used to prevent CSRF attacks. - * + * A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks. */ state?: string | undefined; }; diff --git a/src/models/errors/carterror.ts b/src/models/errors/carterror.ts index fe57649..418dd90 100644 --- a/src/models/errors/carterror.ts +++ b/src/models/errors/carterror.ts @@ -19,11 +19,7 @@ export type CartErrorData = { */ dotTag: SchemasCartErrorTag; /** - * A human-readable error message, which might include information specific to - * - * @remarks - * the request that was made. - * + * A human-readable error message, which might include information specific to the request that was made. */ message: string; /** diff --git a/src/models/errors/creditcarderror.ts b/src/models/errors/creditcarderror.ts index ffafe75..61d77ee 100644 --- a/src/models/errors/creditcarderror.ts +++ b/src/models/errors/creditcarderror.ts @@ -25,11 +25,7 @@ export type CreditCardErrorData = { */ dotTag: SchemasCreditCardErrorTag; /** - * A human-readable error message, which might include information specific to - * - * @remarks - * the request that was made. - * + * A human-readable error message, which might include information specific to the request that was made. */ message: string; /** diff --git a/src/models/errors/error.ts b/src/models/errors/error.ts index 4d6cc91..be815fe 100644 --- a/src/models/errors/error.ts +++ b/src/models/errors/error.ts @@ -21,11 +21,7 @@ export type ErrorTData = { */ dotTag: DotTag; /** - * A human-readable error message, which might include information specific to - * - * @remarks - * the request that was made. - * + * A human-readable error message, which might include information specific to the request that was made. */ message: string; /** diff --git a/src/models/errors/fielderror.ts b/src/models/errors/fielderror.ts index 1d5a91e..79c5024 100644 --- a/src/models/errors/fielderror.ts +++ b/src/models/errors/fielderror.ts @@ -21,11 +21,7 @@ export type FieldErrorData = { */ dotTag: SchemasTag; /** - * A human-readable error message, which might include information specific to - * - * @remarks - * the request that was made. - * + * A human-readable error message, which might include information specific to the request that was made. */ message: string; /** diff --git a/src/models/operations/accountaddpaymentmethod.ts b/src/models/operations/accountaddpaymentmethod.ts index a740904..8ffa4a6 100644 --- a/src/models/operations/accountaddpaymentmethod.ts +++ b/src/models/operations/accountaddpaymentmethod.ts @@ -8,7 +8,7 @@ import * as z from "zod"; export type AccountAddPaymentMethodRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/accountaddresscreate.ts b/src/models/operations/accountaddresscreate.ts index a68ede9..add0292 100644 --- a/src/models/operations/accountaddresscreate.ts +++ b/src/models/operations/accountaddresscreate.ts @@ -8,7 +8,7 @@ import * as z from "zod"; export type AccountAddressCreateRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/accountaddressdelete.ts b/src/models/operations/accountaddressdelete.ts index 9aee46c..de9b610 100644 --- a/src/models/operations/accountaddressdelete.ts +++ b/src/models/operations/accountaddressdelete.ts @@ -11,7 +11,7 @@ export type AccountAddressDeleteRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/accountaddressedit.ts b/src/models/operations/accountaddressedit.ts index cd6f420..048bb61 100644 --- a/src/models/operations/accountaddressedit.ts +++ b/src/models/operations/accountaddressedit.ts @@ -12,7 +12,7 @@ export type AccountAddressEditRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/accountget.ts b/src/models/operations/accountget.ts index d12f168..cf8cde8 100644 --- a/src/models/operations/accountget.ts +++ b/src/models/operations/accountget.ts @@ -8,7 +8,7 @@ import * as z from "zod"; export type AccountGetRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/accountpaymentmethoddelete.ts b/src/models/operations/accountpaymentmethoddelete.ts index 5c73828..4fa8c19 100644 --- a/src/models/operations/accountpaymentmethoddelete.ts +++ b/src/models/operations/accountpaymentmethoddelete.ts @@ -11,7 +11,7 @@ export type AccountPaymentMethodDeleteRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/guestpaymentsaction.ts b/src/models/operations/guestpaymentsaction.ts index c8edce1..6ca3a85 100644 --- a/src/models/operations/guestpaymentsaction.ts +++ b/src/models/operations/guestpaymentsaction.ts @@ -16,7 +16,7 @@ export type GuestPaymentsActionRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/guestpaymentsinitialize.ts b/src/models/operations/guestpaymentsinitialize.ts index c6a4fcd..b8726d0 100644 --- a/src/models/operations/guestpaymentsinitialize.ts +++ b/src/models/operations/guestpaymentsinitialize.ts @@ -12,7 +12,7 @@ export type GuestPaymentsInitializeSecurity = { export type GuestPaymentsInitializeRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/guestpaymentsupdate.ts b/src/models/operations/guestpaymentsupdate.ts index f5df272..3de4137 100644 --- a/src/models/operations/guestpaymentsupdate.ts +++ b/src/models/operations/guestpaymentsupdate.ts @@ -16,7 +16,7 @@ export type GuestPaymentsUpdateRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/orderscreate.ts b/src/models/operations/orderscreate.ts index bbf768f..4ba2fdc 100644 --- a/src/models/operations/orderscreate.ts +++ b/src/models/operations/orderscreate.ts @@ -12,7 +12,7 @@ export type OrdersCreateSecurity = { export type OrdersCreateRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/paymentsaction.ts b/src/models/operations/paymentsaction.ts index ba8e888..5121a60 100644 --- a/src/models/operations/paymentsaction.ts +++ b/src/models/operations/paymentsaction.ts @@ -12,7 +12,7 @@ export type PaymentsActionRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/paymentsinitialize.ts b/src/models/operations/paymentsinitialize.ts index fd21831..64bc2b4 100644 --- a/src/models/operations/paymentsinitialize.ts +++ b/src/models/operations/paymentsinitialize.ts @@ -8,7 +8,7 @@ import * as z from "zod"; export type PaymentsInitializeRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/paymentsupdate.ts b/src/models/operations/paymentsupdate.ts index 9d9c171..c3d3d3d 100644 --- a/src/models/operations/paymentsupdate.ts +++ b/src/models/operations/paymentsupdate.ts @@ -12,7 +12,7 @@ export type PaymentsUpdateRequest = { */ id: string; /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; /** diff --git a/src/models/operations/testingaccountcreate.ts b/src/models/operations/testingaccountcreate.ts index 3cbc3eb..e9bf3e5 100644 --- a/src/models/operations/testingaccountcreate.ts +++ b/src/models/operations/testingaccountcreate.ts @@ -12,7 +12,7 @@ export type TestingAccountCreateSecurity = { export type TestingAccountCreateRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; accountTestCreationData: components.AccountTestCreationData; diff --git a/src/models/operations/testingaccountphoneget.ts b/src/models/operations/testingaccountphoneget.ts index cadc45c..c4a3742 100644 --- a/src/models/operations/testingaccountphoneget.ts +++ b/src/models/operations/testingaccountphoneget.ts @@ -12,7 +12,7 @@ export type TestingAccountPhoneGetSecurity = { export type TestingAccountPhoneGetRequest = { /** - * The publicly viewable identifier used to identify a merchant division. + * The publicly shareable identifier used to identify your Bolt merchant division. */ xPublishableKey: string; }; diff --git a/src/sdk/account.ts b/src/sdk/account.ts index 645e52c..18d19e4 100644 --- a/src/sdk/account.ts +++ b/src/sdk/account.ts @@ -100,11 +100,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -187,11 +193,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -216,10 +228,7 @@ export class Account extends ClientSDK { * Edit an existing address * * @remarks - * Edit an existing address on the shopper's account. This does not edit addresses - * that are already associated with other resources, such as transactions or - * shipments. - * + * Edit an existing address on the shopper's account. This does not edit addresses that are already associated with other resources, such as transactions or shipments. */ async updateAddress( id: string, @@ -284,11 +293,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -313,9 +328,7 @@ export class Account extends ClientSDK { * Delete an existing address * * @remarks - * Delete an existing address. Deleting an address does not invalidate transactions or - * shipments that are associated with it. - * + * Delete an existing address. Deleting an address does not invalidate or remove the address from transactions or shipments that are associated with it. */ async deleteAddress( id: string, @@ -377,11 +390,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -400,14 +419,10 @@ export class Account extends ClientSDK { } /** - * Add a payment method to a shopper's Bolt account Wallet. + * Add a payment method * * @remarks - * Add a payment method to a shopper's Bolt account Wallet. For security purposes, this request must come from - * your backend because authentication requires the use of your private key.
- * **Note**: Before using this API, the credit card details must be tokenized using Bolt's JavaScript library function, - * which is documented in [Install the Bolt Tokenizer](https://help.bolt.com/developers/references/bolt-tokenizer). - * + * Add a payment method to a shopper's Bolt Account Wallet. For security purposes, this request must come from your backend.
**Note**: Before using this API, the credit card details must be tokenized by Bolt's credit card tokenization service. Please review our [Bolt Payment Field Component](https://help.bolt.com/products/ignite/api-implementation/#enhance-payments) or [Install the Bolt Tokenizer](https://help.bolt.com/developers/references/bolt-tokenizer) documentation. */ async addPaymentMethod( xPublishableKey: string, @@ -467,11 +482,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -496,9 +517,7 @@ export class Account extends ClientSDK { * Delete an existing payment method * * @remarks - * Delete an existing payment method. Deleting a payment method does not invalidate transactions or - * orders that are associated with it. - * + * Delete an existing payment method. Deleting a payment method does not invalidate or remove it from transactions or orders that are associated with it. */ async deletePaymentMethod( id: string, @@ -560,11 +579,17 @@ export class Account extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/guest.ts b/src/sdk/guest.ts index e6ad327..4020ed3 100644 --- a/src/sdk/guest.ts +++ b/src/sdk/guest.ts @@ -44,9 +44,7 @@ export class Guest extends ClientSDK { * Initialize a Bolt payment for guest shoppers * * @remarks - * Initialize a Bolt payment token that will be used to reference this payment to - * Bolt when it is updated or finalized for guest shoppers. - * + * Initialize a Bolt guest shopper's intent to pay for a cart, using the specified payment method. Payments must be finalized before indicating the payment result to the shopper. Some payment methods will finalize automatically after initialization. For these payments, they will transition directly to "finalized" and the response from Initialize Payment will contain a finalized payment. */ async initialize( security: operations.GuestPaymentsInitializeSecurity, @@ -113,11 +111,17 @@ export class Guest extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -139,11 +143,10 @@ export class Guest extends ClientSDK { } /** - * Update an existing guest payment - * - * @remarks * Update a pending guest payment * + * @remarks + * Update a guest payment that is still in the pending state, with new information about the payment. */ async update( security: operations.GuestPaymentsUpdateSecurity, @@ -213,11 +216,17 @@ export class Guest extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -239,11 +248,10 @@ export class Guest extends ClientSDK { } /** - * Perform an irreversible action (e.g. finalize) on a pending guest payment + * Finalize a pending guest payment * * @remarks - * Perform an irreversible action on a pending guest payment, such as finalizing it. - * + * Finalize a pending payment being made by a Bolt guest shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper. */ async performAction( security: operations.GuestPaymentsActionSecurity, @@ -313,11 +321,17 @@ export class Guest extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/loggedin.ts b/src/sdk/loggedin.ts index ec28fa2..51f8c0e 100644 --- a/src/sdk/loggedin.ts +++ b/src/sdk/loggedin.ts @@ -43,8 +43,7 @@ export class LoggedIn extends ClientSDK { * Initialize a Bolt payment for logged in shoppers * * @remarks - * Initialize a Bolt payment token that will be used to reference this payment to - * Bolt when it is updated or finalized for logged in shoppers. + * Initialize a Bolt logged-in shopper's intent to pay for a cart, using the specified payment method. Payments must be finalized before indicating the payment result to the shopper. Some payment methods will finalize automatically after initialization. For these payments, they will transition directly to "finalized" and the response from Initialize Payment will contain a finalized payment. * */ async initialize( @@ -107,11 +106,17 @@ export class LoggedIn extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -133,11 +138,10 @@ export class LoggedIn extends ClientSDK { } /** - * Update an existing payment - * - * @remarks * Update a pending payment * + * @remarks + * Update a payment that is still in the pending state, with new information about the payment. */ async update( id: string, @@ -202,11 +206,17 @@ export class LoggedIn extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -226,11 +236,10 @@ export class LoggedIn extends ClientSDK { } /** - * Perform an irreversible action (e.g. finalize) on a pending payment + * Finalize a pending payment * * @remarks - * Perform an irreversible action on a pending payment, such as finalizing it. - * + * Finalize a pending payment being made by a Bolt logged-in shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper. */ async performAction( id: string, @@ -295,11 +304,17 @@ export class LoggedIn extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/oauth.ts b/src/sdk/oauth.ts index a97dff4..2730113 100644 --- a/src/sdk/oauth.ts +++ b/src/sdk/oauth.ts @@ -87,11 +87,23 @@ export class OAuth extends ClientSDK { const request$ = this.createRequest$( context, - { method: "POST", path: path$, headers: headers$, query: query$, body: body$ }, + { + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, + }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/orders.ts b/src/sdk/orders.ts index 4d61b27..7cf3eb3 100644 --- a/src/sdk/orders.ts +++ b/src/sdk/orders.ts @@ -41,11 +41,10 @@ export class Orders extends ClientSDK { } /** - * Create an order that was placed outside the Bolt ecosystem. + * Create an order that was prepared outside the Bolt ecosystem. * * @remarks - * Create an order that was placed outside the Bolt ecosystem. - * + * Create an order that was prepared outside the Bolt ecosystem. Some Bolt-powered flows automatically manage order creation - in those flows the order ID will be provided separately and not through this API. */ async ordersCreate( security: operations.OrdersCreateSecurity, @@ -110,11 +109,17 @@ export class Orders extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", diff --git a/src/sdk/testing.ts b/src/sdk/testing.ts index 024f9ea..03dc888 100644 --- a/src/sdk/testing.ts +++ b/src/sdk/testing.ts @@ -45,7 +45,6 @@ export class Testing extends ClientSDK { * * @remarks * Create a Bolt shopper account for testing purposes. - * */ async createAccount( security: operations.TestingAccountCreateSecurity, @@ -105,11 +104,17 @@ export class Testing extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -134,8 +139,7 @@ export class Testing extends ClientSDK { * Get a random phone number * * @remarks - * Get a random, fictitious phone number that is not assigned to any existing account. - * + * Get a random, fictitious phone number that is not assigned to any existing Bolt account. */ async testingAccountPhoneGet( security: operations.TestingAccountPhoneGetSecurity, @@ -190,11 +194,17 @@ export class Testing extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream", @@ -216,11 +226,10 @@ export class Testing extends ClientSDK { } /** - * Retrieve a test credit card, including its token + * Retrieve a tokenized test credit card * * @remarks - * Retrieve test credit card information. This includes its token, which can be used to process payments. - * + * Retrieve a test credit card that can be used to process payments in your Bolt testing environment. The response includes the card's Bolt credit card token. */ async getCreditCard( request: operations.TestingCreditCardGetRequestBody, @@ -270,11 +279,17 @@ export class Testing extends ClientSDK { headers: headers$, query: query$, body: body$, + timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1, }, options ); - const response = await this.do$(request$, { context, errorCodes: ["4XX", "5XX"] }); + const response = await this.do$(request$, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: options?.retries || this.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); const responseFields$ = { ContentType: response.headers.get("content-type") ?? "application/octet-stream",