Skip to content

Commit

Permalink
v6.8.13 (IntegrationCode) #41
Browse files Browse the repository at this point in the history
v6.8.13 (IntegrationCode)
  • Loading branch information
JefersonCAugusto authored Oct 10, 2024
2 parents 655bd64 + c36bcea commit 3f68f3a
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 25 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ npm install

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/client.md)

The following parameters are configurable for the API Client:

Expand All @@ -81,7 +81,7 @@ The following parameters are configurable for the API Client:
| `timeout` | `number` | Timeout for API calls.<br>*Default*: `0` |
| `httpClientOptions` | `Partial<HttpClientOptions>` | Stable configurable http client options. |
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/auth/basic-authentication.md) | The credential object for basicAuth |
| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/auth/basic-authentication.md) | The credential object for basicAuth |

### HttpClientOptions

Expand Down Expand Up @@ -121,38 +121,38 @@ const client = new Client({

This API uses the following authentication schemes.

* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/auth/basic-authentication.md)
* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/auth/basic-authentication.md)

## API Errors

Here is the list of errors that the API might throw.

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 400 | Invalid request | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 401 | Invalid API key | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 404 | An informed resource was not found | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 412 | Business validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 422 | Contract validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 500 | Internal server error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/models/custom-error.md) |
| 400 | Invalid request | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |
| 401 | Invalid API key | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |
| 404 | An informed resource was not found | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |
| 412 | Business validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |
| 422 | Contract validation error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |
| 500 | Internal server error | [`CustomError`](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/models/custom-error.md) |

## List of APIs

* [Subscriptions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/controllers/balance-operations.md)
* [Subscriptions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/controllers/balance-operations.md)

## Classes Documentation

* [ApiResponse](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/api-response.md)
* [ApiError](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.12/doc/api-error.md)
* [ApiResponse](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/api-response.md)
* [ApiError](https://www.github.com/pagarme/pagarme-nodejs-sdk/tree/6.8.13/doc/api-error.md)

21 changes: 21 additions & 0 deletions doc/models/get-integration-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Get Integration Response

## Structure

`GetIntegrationResponse`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `code` | `string \| undefined` | Optional | - |

## Example (as JSON)

```json
{
"code": "code2"
}
```

1 change: 1 addition & 0 deletions doc/models/get-order-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Response object for getting an Order
| `sessionId` | `string \| null \| undefined` | Optional | Session id |
| `location` | [`GetLocationResponse \| null \| undefined`](../../doc/models/get-location-response.md) | Optional | Location |
| `device` | [`GetDeviceResponse \| null \| undefined`](../../doc/models/get-device-response.md) | Optional | Device's informations |
| `integration` | [`GetIntegrationResponse \| null \| undefined`](../../doc/models/get-integration-response.md) | Optional | - |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.8.12",
"version": "6.8.13",
"license": "MIT",
"sideEffects": false,
"main": "dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Client implements ClientInterface {
},
};

this._userAgent = updateUserAgent('PagarmeApiSDK - TypeScript 6.8.12');
this._userAgent = updateUserAgent('PagarmeApiSDK - TypeScript 6.8.13');
this._requestBuilderFactory = createRequestHandlerFactory(
(server) => getBaseUri(server, this._config),
createAuthProviderFromConfig(clonedConfig),
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export type { GetGatewayErrorResponse } from './models/getGatewayErrorResponse';
export type { GetGatewayRecipientResponse } from './models/getGatewayRecipientResponse';
export type { GetGatewayResponseResponse } from './models/getGatewayResponseResponse';
export type { GetIncrementResponse } from './models/getIncrementResponse';
export type { GetIntegrationResponse } from './models/getIntegrationResponse';
export type { GetInterestResponse } from './models/getInterestResponse';
export type { GetInvoiceItemResponse } from './models/getInvoiceItemResponse';
export type { GetInvoiceResponse } from './models/getInvoiceResponse';
Expand Down
15 changes: 15 additions & 0 deletions src/models/getIntegrationResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* PagarmeApiSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/

import { object, optional, Schema, string } from '../schema';

export interface GetIntegrationResponse {
code?: string;
}

export const getIntegrationResponseSchema: Schema<GetIntegrationResponse> = object(
{ code: ['code', optional(string())] }
);
9 changes: 9 additions & 0 deletions src/models/getOrderResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import {
GetDeviceResponse,
getDeviceResponseSchema,
} from './getDeviceResponse';
import {
GetIntegrationResponse,
getIntegrationResponseSchema,
} from './getIntegrationResponse';
import {
GetLocationResponse,
getLocationResponseSchema,
Expand Down Expand Up @@ -73,6 +77,7 @@ export interface GetOrderResponse {
location?: GetLocationResponse | null;
/** Device's informations */
device?: GetDeviceResponse | null;
integration?: GetIntegrationResponse | null;
}

export const getOrderResponseSchema: Schema<GetOrderResponse> = object({
Expand Down Expand Up @@ -114,4 +119,8 @@ export const getOrderResponseSchema: Schema<GetOrderResponse> = object({
optional(nullable(lazy(() => getLocationResponseSchema))),
],
device: ['device', optional(nullable(lazy(() => getDeviceResponseSchema)))],
integration: [
'integration',
optional(nullable(lazy(() => getIntegrationResponseSchema))),
],
});

0 comments on commit 3f68f3a

Please sign in to comment.