Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.1, Speakeasy CLI 1.125.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 9, 2023
1 parent f748fea commit 274f02f
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 82 deletions.
86 changes: 51 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ yarn add @boltpay/bolt-typescript-sdk
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -53,7 +53,9 @@ import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/oper
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```
<!-- End SDK Example Usage [usage] -->
Expand Down Expand Up @@ -110,29 +112,35 @@ Example
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
oauth: "",
},
});
const xPublishableKey: string = "string";


let res;
try {
res = await sdk.account.getDetails(xPublishableKey);
} catch (e) {
if (e instanceof errors.ErrorT) {
console.error(e) // handle exception

}
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
oauth: "",
},
});
const xPublishableKey: string = "string";

let res;
try {
res = await sdk.account.getDetails(xPublishableKey);
} catch (err) {
if (err instanceof errors.ErrorT) {
console.error(err); // handle exception
throw err;
} else if (err instanceof errors.SDKError) {
console.error(err); // handle exception
throw err;
}
}

if (res.statusCode == 200) {
// handle response
}
}

run();

if (res.statusCode == 200) {
// handle response
}
})();
```
<!-- End Error Handling [errors] -->

Expand All @@ -153,7 +161,7 @@ You can override the default server globally by passing a server index to the `s
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK({
serverIdx: 0,
security: {
Expand All @@ -168,7 +176,9 @@ import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/oper
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```

Expand All @@ -184,7 +194,7 @@ The default server can also be overridden globally by passing a URL to the `serv
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK({
serverURL: "https://{environment}.bolt.com/v3",
security: {
Expand All @@ -199,21 +209,23 @@ import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/oper
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```
<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.
The Typescript SDK makes API calls using the [axios](https://axios-http.com/docs/intro) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object.

For example, you could specify a header for every request that your sdk makes as follows:

```typescript
from @boltpay/bolt-typescript-sdk import BoltTypescriptSDK;
import axios;
import { @boltpay/bolt-typescript-sdk } from "BoltTypescriptSDK";
import axios from "axios";

const httpClient = axios.create({
headers: {'x-custom-header': 'someValue'}
Expand All @@ -240,7 +252,7 @@ You can set the security parameters through the `security` optional parameter wh
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -254,7 +266,9 @@ import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/oper
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```

Expand All @@ -278,7 +292,7 @@ import {
GuestPaymentsInitializeSecurity,
} from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK();
const xPublishableKey: string = "string";
const guestPaymentInitializeRequest: GuestPaymentInitializeRequest = {
Expand Down Expand Up @@ -349,7 +363,9 @@ import {
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```
<!-- End Authentication [security] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ Based on:
### Generated
- [typescript v0.2.3] .
### Releases
- [NPM v0.2.3] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.2.3 - .
- [NPM v0.2.3] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.2.3 - .

## 2023-12-09 00:57:41
### Changes
Based on:
- OpenAPI Doc 3.0.1
- Speakeasy CLI 1.125.2 (2.210.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.2.4] .
### Releases
- [NPM v0.2.4] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.2.4 - .
6 changes: 4 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async () => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -17,7 +17,9 @@ import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/oper
if (res.statusCode == 200) {
// handle response
}
})();
}

run();

```
<!-- End SDK Example Usage [usage] -->
1 change: 1 addition & 0 deletions docs/models/errors/dottag.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The type of error returned

| Name | Value |
| ----------------------- | ----------------------- |
| `UnprocessableRequest` | unprocessable_request |
| `MissingInputParameter` | missing_input_parameter |
| `InvalidInputParameter` | invalid_input_parameter |
| `NotFound` | not_found |
4 changes: 2 additions & 2 deletions docs/models/errors/errort.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ An error has occurred, and further details are contained in the response

| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `dotTag` | [errors.DotTag](../../models/errors/dottag.md) | :heavy_check_mark: | The type of error returned | not_found |
| `message` | *string* | :heavy_check_mark: | A human-readable error message, which might include information specific to<br/>the request that was made.<br/> | The resource does not exist |
| `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<br/>the request that was made.<br/> | We were unable to process your request. |
42 changes: 28 additions & 14 deletions docs/sdks/account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Retrieve a shopper's account details, such as addresses and payment information
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountGetRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -41,7 +41,9 @@ const xPublishableKey: string = "string";
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -73,7 +75,7 @@ import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AddressListingInput, CountryCode } from "@boltpay/bolt-typescript-sdk/dist/models/components";
import { AccountAddressCreateRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand Down Expand Up @@ -101,7 +103,9 @@ const addressListing: AddressListingInput = {
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -134,7 +138,7 @@ shipments that are associated with it.
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountAddressDeleteRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -149,7 +153,9 @@ const xPublishableKey: string = "string";
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -185,7 +191,7 @@ import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AddressListingInput, CountryCode } from "@boltpay/bolt-typescript-sdk/dist/models/components";
import { AccountAddressEditRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand Down Expand Up @@ -214,7 +220,9 @@ const addressListing: AddressListingInput = {
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -247,7 +255,7 @@ import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { Identifier, IdentifierType } from "@boltpay/bolt-typescript-sdk/dist/models/components";
import { AccountExistsRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -265,7 +273,9 @@ const xPublishableKey: string = "string";
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -301,7 +311,7 @@ which is documented in [Install the Bolt Tokenizer](https://help.bolt.com/develo
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountAddPaymentMethodRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -316,7 +326,9 @@ const requestBody: any = "string";
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down Expand Up @@ -349,7 +361,7 @@ orders that are associated with it.
import { BoltTypescriptSDK } from "@boltpay/bolt-typescript-sdk";
import { AccountPaymentMethodDeleteRequest } from "@boltpay/bolt-typescript-sdk/dist/models/operations";

(async() => {
async function run() {
const sdk = new BoltTypescriptSDK({
security: {
apiKey: "",
Expand All @@ -364,7 +376,9 @@ const xPublishableKey: string = "string";
if (res.statusCode == 200) {
// handle response
}
})();
}

run();
```

### Parameters
Expand Down
Loading

0 comments on commit 274f02f

Please sign in to comment.