Skip to content

Commit de42a54

Browse files
wickerpopstarPayPalServerSDKsPatrick Powers
authored
1.1.0 Release (#44)
* Automated commit message * Added changelog --------- Co-authored-by: PayPalServerSDKs <[email protected]> Co-authored-by: Patrick Powers <[email protected]>
1 parent a85c024 commit de42a54

File tree

215 files changed

+1826
-1367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+1826
-1367
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## 1.1.0
2+
- Added new models to support Apple Pay, Google Pay
3+
- Expanded models to support additional optional fields
4+
- Bug fixes
5+
- Documentation updates
6+
7+
## 1.0.0
8+
- GA Release for Orders, Payments, and Vault APIs

README.md

Lines changed: 34 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,63 +6,39 @@
66
### Important Notes
77

88
- **Available Features:** This SDK currently contains only 3 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
9-
- **API Changes:** Expect potential changes in APIs and features as we finalize the product.
109

1110
### Information
1211

1312
The PayPal Server SDK provides integration access to the PayPal REST APIs. The API endpoints are divided into distinct controllers:
1413

15-
- Orders Controller: <a href="https://developer.paypal.com/docs/api/orders/v2/">Orders API v2</a>
16-
- Payments Controller: <a href="https://developer.paypal.com/docs/api/payments/v2/">Payments API v2</a>
17-
- Vault Controller: <a href="https://developer.paypal.com/docs/api/payment-tokens/v3/">Payment Method Tokens API v3</a> *Available in the US only.*
18-
19-
Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://developer.paypal.com/docs/api/orders/v2/)
14+
- Orders Controller: [Orders API v2](https://developer.paypal.com/docs/api/orders/v2/)
15+
- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2
16+
- Vault Controller: [Payment Method Tokens API v3](https://developer.paypal.com/docs/api/payment-tokens/v3/) *Available in the US only.*
2017

2118
## Install the Package
2219

2320
Run the following command from your project directory to install the package from npm:
2421

2522
```bash
26-
npm install @paypal/paypal-server-sdk@1.0.0
23+
npm install @paypal/paypal-server-sdk@1.1.0
2724
```
2825

29-
For additional package details, see the [Npm page for the @paypal/paypal-server-sdk@1.0.0 npm](https://www.npmjs.com/package/@paypal/paypal-server-sdk/v/1.0.0).
26+
For additional package details, see the [Npm page for the @paypal/paypal-server-sdk@1.1.0 npm](https://www.npmjs.com/package/@paypal/paypal-server-sdk/v/1.1.0).
3027

3128
## Initialize the API Client
3229

33-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/client.md)
30+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/client.md)
3431

3532
The following parameters are configurable for the API Client:
3633

3734
| Parameter | Type | Description |
3835
| --- | --- | --- |
39-
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.Sandbox`** |
40-
| `timeout` | `number` | Timeout for API calls.<br>*Default*: `0` |
41-
| `httpClientOptions` | `Partial<HttpClientOptions>` | Stable configurable http client options. |
42-
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
43-
| `logging` | [`PartialLoggingOptions`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/partial-logging-options.md) | Logging Configuration to enable logging |
44-
| `clientCredentialsAuthCredentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for clientCredentialsAuth |
45-
46-
### HttpClientOptions
47-
48-
| Parameter | Type | Description |
49-
| --- | --- | --- |
50-
| `timeout` | `number` | Timeout in milliseconds. |
51-
| `httpAgent` | `any` | Custom http agent to be used when performing http requests. |
52-
| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. |
53-
| `retryConfig` | `Partial<RetryConfiguration>` | Configurations to retry requests. |
54-
55-
### RetryConfiguration
56-
57-
| Parameter | Type | Description |
58-
| --- | --- | --- |
59-
| `maxNumberOfRetries` | `number` | Maximum number of retries. <br> *Default*: `0` |
60-
| `retryOnTimeout` | `boolean` | Whether to retry on request timeout. <br> *Default*: `true` |
61-
| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure. <br> *Default*: `1` |
62-
| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried. <br> *Default*: `0` |
63-
| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure. <br> *Default*: `2` |
64-
| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against. <br> *Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` |
65-
| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against. <br> *Default*: `['GET', 'PUT']` |
36+
| environment | `Environment` | The API environment. <br> **Default: `Environment.Sandbox`** |
37+
| timeout | `number` | Timeout for API calls.<br>*Default*: `0` |
38+
| httpClientOptions | [`Partial<HttpClientOptions>`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/http-client-options.md) | Stable configurable http client options. |
39+
| unstableHttpClientOptions | `any` | Unstable configurable http client options. |
40+
| logging | [`PartialLoggingOptions`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/partial-logging-options.md) | Logging Configuration to enable logging |
41+
| clientCredentialsAuthCredentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for clientCredentialsAuth |
6642

6743
The API client can be initialized as follows:
6844

@@ -101,21 +77,31 @@ The SDK can be configured to use a different environment for making API calls. A
10177

10278
This API uses the following authentication schemes.
10379

104-
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/auth/oauth-2-client-credentials-grant.md)
80+
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md)
10581

10682
## List of APIs
10783

108-
* [Orders](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/controllers/orders.md)
109-
* [Payments](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/controllers/payments.md)
110-
* [Vault](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/controllers/vault.md)
84+
* [Orders](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/controllers/orders.md)
85+
* [Payments](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/controllers/payments.md)
86+
* [Vault](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/controllers/vault.md)
87+
88+
## SDK Infrastructure
89+
90+
### Configuration
91+
92+
* [HttpClientOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/http-client-options.md)
93+
* [RetryConfiguration](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/retry-configuration.md)
94+
* [PartialLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/partial-logging-options.md)
95+
* [PartialRequestLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/partial-request-logging-options.md)
96+
* [PartialResponseLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/partial-response-logging-options.md)
97+
* [LoggerInterface](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/logger-interface.md)
98+
99+
### HTTP
100+
101+
* [HttpRequest](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/http-request.md)
111102

112-
## Classes Documentation
103+
### Utilities
113104

114-
* [ApiResponse](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/api-response.md)
115-
* [HttpRequest](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/http-request.md)
116-
* [ApiError](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/api-error.md)
117-
* [PartialLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/partial-logging-options.md)
118-
* [PartialRequestLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/partial-request-logging-options.md)
119-
* [PartialResponseLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/partial-response-logging-options.md)
120-
* [LoggerInterface](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.0.0/doc/logger-interface.md)
105+
* [ApiResponse](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/api-response.md)
106+
* [ApiError](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/1.1.0/doc/api-error.md)
121107

doc/api-error.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The ApiError extends the ApiResponse interface, so all ApiResponse properties ar
99

1010
| Name | Type | Description |
1111
| --- | --- | --- |
12-
| request | HttpRequest | Original request that resulted in this response. |
13-
| statusCode | number | Response status code. |
14-
| headers | Record<string, string> | Response headers. |
15-
| result | T | Response data. |
16-
| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |
12+
| request | [`HttpRequest`](../doc/http-request.md) | Original request that resulted in this response. |
13+
| statusCode | `number` | Response status code. |
14+
| headers | `Record<string, string>` | Response headers. |
15+
| result | `T` | Response data. |
16+
| body | `string \| Blob \| NodeJS.ReadableStream` | Original body from the response. |
1717

doc/api-response.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Represents the result of an API call, including response metadata and the return
77

88
| Name | Type | Description |
99
| --- | --- | --- |
10-
| request | [`HttpRequest`](http-request.md) | Original request that resulted in this response. |
10+
| request | [`HttpRequest`](../doc/http-request.md) | Original request that resulted in this response. |
1111
| statusCode | `number` | Response status codee. |
1212
| headers | `Record<string, string>` | Response headers. |
1313
| result | `T` | Response data. |
1414
| body | `string \| Blob \| NodeJS.ReadableStream` | Original body from the response. |
1515

16-
## Example Usage
16+
## Usage Example
1717

1818
```ts
1919
try {

doc/client.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,12 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.Sandbox`** |
9-
| `timeout` | `number` | Timeout for API calls.<br>*Default*: `0` |
10-
| `httpClientOptions` | `Partial<HttpClientOptions>` | Stable configurable http client options. |
11-
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
12-
| `logging` | [`PartialLoggingOptions`](partial-logging-options.md) | Logging Configuration to enable logging |
13-
| `clientCredentialsAuthCredentials` | [`ClientCredentialsAuthCredentials`](auth/oauth-2-client-credentials-grant.md) | The credential object for clientCredentialsAuth |
14-
15-
## HttpClientOptions
16-
17-
| Parameter | Type | Description |
18-
| --- | --- | --- |
19-
| `timeout` | `number` | Timeout in milliseconds. |
20-
| `httpAgent` | `any` | Custom http agent to be used when performing http requests. |
21-
| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. |
22-
| `retryConfig` | `Partial<RetryConfiguration>` | Configurations to retry requests. |
23-
24-
## RetryConfiguration
25-
26-
| Parameter | Type | Description |
27-
| --- | --- | --- |
28-
| `maxNumberOfRetries` | `number` | Maximum number of retries. <br> *Default*: `0` |
29-
| `retryOnTimeout` | `boolean` | Whether to retry on request timeout. <br> *Default*: `true` |
30-
| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure. <br> *Default*: `1` |
31-
| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried. <br> *Default*: `0` |
32-
| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure. <br> *Default*: `2` |
33-
| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against. <br> *Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` |
34-
| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against. <br> *Default*: `['GET', 'PUT']` |
8+
| environment | `Environment` | The API environment. <br> **Default: `Environment.Sandbox`** |
9+
| timeout | `number` | Timeout for API calls.<br>*Default*: `0` |
10+
| httpClientOptions | [`Partial<HttpClientOptions>`](../doc/http-client-options.md) | Stable configurable http client options. |
11+
| unstableHttpClientOptions | `any` | Unstable configurable http client options. |
12+
| logging | [`PartialLoggingOptions`](../doc/partial-logging-options.md) | Logging Configuration to enable logging |
13+
| clientCredentialsAuthCredentials | [`ClientCredentialsAuthCredentials`](auth/oauth-2-client-credentials-grant.md) | The credential object for clientCredentialsAuth |
3514

3615
The API client can be initialized as follows:
3716

0 commit comments

Comments
 (0)