diff --git a/.rubocop.yml b/.rubocop.yml
index 08c50fe..b563c46 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -51,6 +51,9 @@ Style/MultilineTernaryOperator:
Layout/MultilineMethodCallIndentation:
Enabled: false
+Style/OptionalBooleanParameter:
+ Enabled: false
+
Style/KeywordParametersOrder:
Enabled: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 176ecf9..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## 1.1.0
-- Added new models to support Apple Pay, Google Pay
-- Expanded models to support additional optional fields
-- Bug fixes
-- Documentation updates
-
-## 1.0.0
-- GA Release for Orders, Payments, and Vault APIs
\ No newline at end of file
diff --git a/README.md b/README.md
index 0f4ea5b..6745309 100644
--- a/README.md
+++ b/README.md
@@ -5,35 +5,37 @@
### Important Notes
-- **Available Features:** This SDK currently contains only 3 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
+- **Available Features:** This SDK currently contains only 5 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
### Information
The PayPal Server SDK provides integration access to the PayPal REST APIs. The API endpoints are divided into distinct controllers:
- Orders Controller: [Orders API v2](https://developer.paypal.com/docs/api/orders/v2/)
-- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2
+- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2)
- Vault Controller: [Payment Method Tokens API v3](https://developer.paypal.com/docs/api/payment-tokens/v3/) *Available in the US only.*
+- Transaction Search Controller: [Transaction Search API v1](https://developer.paypal.com/docs/api/transaction-search/v1/)
+- Subscriptions Controller: [Subscriptions API v1](https://developer.paypal.com/docs/api/subscriptions/v1/)
## Install the Package
Install the gem from the command line:
```bash
-gem install paypal-server-sdk -v 1.1.0
+gem install paypal-server-sdk -v 2.0.0
```
Or add the gem to your Gemfile and run `bundle`:
```ruby
-gem 'paypal-server-sdk', '1.1.0'
+gem 'paypal-server-sdk', '2.0.0'
```
-For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/1.1.0).
+For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/2.0.0).
## Initialize the API Client
-**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/client.md)
+**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/client.md)
The following parameters are configurable for the API Client:
@@ -49,13 +51,17 @@ The following parameters are configurable for the API Client:
| retry_statuses | `Array` | A list of HTTP statuses to retry. **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| retry_methods | `Array` | A list of HTTP methods to retry. **Default: %i[get put]** |
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
-| logging_configuration | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
-| client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
+| proxy_settings | [`ProxySettings`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
+| logging_configuration | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
+| client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
The API client can be initialized as follows:
```ruby
-client = PaypalServerSdk::Client.new(
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
+client = Client.new(
client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
o_auth_client_id: 'OAuthClientId',
o_auth_client_secret: 'OAuthClientSecret'
@@ -88,31 +94,34 @@ The SDK can be configured to use a different environment for making API calls. A
This API uses the following authentication schemes.
-* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md)
+* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md)
## List of APIs
-* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/orders.md)
-* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/payments.md)
-* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/vault.md)
+* [Transactionsearch](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/controllers/transactionsearch.md)
+* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/controllers/orders.md)
+* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/controllers/payments.md)
+* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/controllers/vault.md)
+* [Subscriptions](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/controllers/subscriptions.md)
## SDK Infrastructure
### Configuration
-* [AbstractLogger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/abstract-logger.md)
-* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/logging-configuration.md)
-* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/request-logging-configuration.md)
-* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/response-logging-configuration.md)
+* [ProxySettings](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/proxy-settings.md)
+* [AbstractLogger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/abstract-logger.md)
+* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/logging-configuration.md)
+* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/request-logging-configuration.md)
+* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/response-logging-configuration.md)
### HTTP
-* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/http-response.md)
-* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/http-request.md)
+* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/http-response.md)
+* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/http-request.md)
### Utilities
-* [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/api-response.md)
-* [ApiHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/api-helper.md)
-* [DateTimeHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/date-time-helper.md)
+* [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/api-response.md)
+* [ApiHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/api-helper.md)
+* [DateTimeHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.0.0/doc/date-time-helper.md)
diff --git a/doc/abstract-logger.md b/doc/abstract-logger.md
index 0d9304e..4188e4f 100644
--- a/doc/abstract-logger.md
+++ b/doc/abstract-logger.md
@@ -38,7 +38,10 @@ end
Following is how the custom logger implementation can be injected in the SDK client.
```ruby
-client = PaypalServerSdk::Client.new(
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
+client = Client.new(
logging_configuration: LoggingConfiguration.new(
logger: CustomLogger.new
)
diff --git a/doc/auth/oauth-2-client-credentials-grant.md b/doc/auth/oauth-2-client-credentials-grant.md
index 6f247f7..13e5a35 100644
--- a/doc/auth/oauth-2-client-credentials-grant.md
+++ b/doc/auth/oauth-2-client-credentials-grant.md
@@ -27,7 +27,10 @@ Documentation for accessing and setting credentials for Oauth2.
You must initialize the client with *OAuth 2.0 Client Credentials Grant* credentials as shown in the following code snippet. This will fetch the OAuth token automatically when any of the endpoints, requiring *OAuth 2.0 Client Credentials Grant* authentication, are called.
```ruby
-client = PaypalServerSdk::Client.new(
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
+client = Client.new(
client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
o_auth_client_id: 'OAuthClientId',
o_auth_client_secret: 'OAuthClientSecret'
@@ -44,7 +47,10 @@ Your application can also manually provide an OAuthToken using the setter `in` o
Whenever the OAuth Token gets updated, the provided callback implementation will be executed. For instance, you may use it to store your access token whenever it gets updated.
```ruby
-client = PaypalServerSdk::Client.new(
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
+client = Client.new(
client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
o_auth_client_id: 'OAuthClientId',
o_auth_client_secret: 'OAuthClientSecret',
@@ -62,6 +68,9 @@ client = PaypalServerSdk::Client.new(
```ruby
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
def o_auth_token_provider(last_oauth_token, auth_manager)
# Add the callback handler to provide a new OAuth token
# It will be triggered whenever the last provided o_auth_token is null or expired
@@ -75,7 +84,7 @@ _o_auth_token_provider = proc do | last_oauth_token, auth_manager |
end
-client = PaypalServerSdk::Client.new(
+client = Client.new(
client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
o_auth_client_id: 'OAuthClientId',
o_auth_client_secret: 'OAuthClientSecret',
diff --git a/doc/client.md b/doc/client.md
index 7b3e171..93e1181 100644
--- a/doc/client.md
+++ b/doc/client.md
@@ -15,13 +15,17 @@ The following parameters are configurable for the API Client:
| retry_statuses | `Array` | A list of HTTP statuses to retry. **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| retry_methods | `Array` | A list of HTTP methods to retry. **Default: %i[get put]** |
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
+| proxy_settings | [`ProxySettings`](../doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
| logging_configuration | [`LoggingConfiguration`](../doc/logging-configuration.md) | The SDK logging configuration for API calls |
| client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
The API client can be initialized as follows:
```ruby
-client = PaypalServerSdk::Client.new(
+require 'paypal_server_sdk'
+include PaypalServerSdk
+
+client = Client.new(
client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(
o_auth_client_id: 'OAuthClientId',
o_auth_client_secret: 'OAuthClientSecret'
@@ -50,5 +54,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
| orders | Gets OrdersController |
| payments | Gets PaymentsController |
| vault | Gets VaultController |
+| transaction_search | Gets TransactionSearchController |
+| subscriptions | Gets SubscriptionsController |
| o_auth_authorization | Gets OAuthAuthorizationController |
diff --git a/doc/controllers/orders.md b/doc/controllers/orders.md
index 07719f6..a3a8976 100644
--- a/doc/controllers/orders.md
+++ b/doc/controllers/orders.md
@@ -12,50 +12,65 @@ orders_controller = client.orders
## Methods
-* [Patch Order](../../doc/controllers/orders.md#patch-order)
-* [Authorize Order](../../doc/controllers/orders.md#authorize-order)
-* [Update Order Tracking](../../doc/controllers/orders.md#update-order-tracking)
-* [Create Order Tracking](../../doc/controllers/orders.md#create-order-tracking)
* [Create Order](../../doc/controllers/orders.md#create-order)
-* [Capture Order](../../doc/controllers/orders.md#capture-order)
* [Get Order](../../doc/controllers/orders.md#get-order)
+* [Patch Order](../../doc/controllers/orders.md#patch-order)
* [Confirm Order](../../doc/controllers/orders.md#confirm-order)
+* [Authorize Order](../../doc/controllers/orders.md#authorize-order)
+* [Capture Order](../../doc/controllers/orders.md#capture-order)
+* [Create Order Tracking](../../doc/controllers/orders.md#create-order-tracking)
+* [Update Order Tracking](../../doc/controllers/orders.md#update-order-tracking)
-# Patch Order
+# Create Order
-Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.
To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:
Attribute
Op
Notes
intent
replace
payer
replace, add
Using replace op for payer will replace the whole payer object with the value sent in request.
+Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. Note: For error handling and troubleshooting, see Orders v2 errors.
```ruby
-def patch_order(options = {})
+def create_order(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order to update.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
+| `paypal_partner_attribution_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
## Example Usage
```ruby
collect = {
- 'id' => 'id0',
- 'body' => [
- Patch.new(
- op: PatchOp::ADD
- )
- ]
+ 'body' => OrderRequest.new(
+ intent: CheckoutPaymentIntent::CAPTURE,
+ purchase_units: [
+ PurchaseUnitRequest.new(
+ amount: AmountWithBreakdown.new(
+ currency_code: 'currency_code6',
+ value: 'value0'
+ )
+ )
+ ]
+ ),
+ 'prefer' => 'return=minimal'
}
-result = orders_controller.patch_order(collect)
+result = orders_controller.create_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -64,75 +79,72 @@ result = orders_controller.patch_order(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Authorize Order
+# Get Order
-Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response. Note: For error handling and troubleshooting, see Orders v2 errors.
+Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2 errors.
```ruby
-def authorize_order(options = {})
+def get_order(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order for which to authorize.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `id` | `String` | Template, Required | The ID of the order for which to show details.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
-| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
-| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
-| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `body` | [`OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - |
+| `fields` | `String` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.
**Constraints**: *Pattern*: `^[a-z_]*$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
## Example Usage
```ruby
collect = {
- 'id' => 'id0',
- 'prefer' => 'return=minimal'
+ 'id' => 'id0'
}
-result = orders_controller.authorize_order(collect)
+result = orders_controller.get_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Update Order Tracking
+# Patch Order
-Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects: Attribute Op Notes items replace Using replace op for items will replace the entire items object with the value sent in request. notify_payer replace, add status replace Only patching status to CANCELLED is currently supported.
+Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.
To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:
Attribute
Op
Notes
intent
replace
payer
replace, add
Using replace op for payer will replace the whole payer object with the value sent in request.
```ruby
-def update_order_tracking(options = {})
+def patch_order(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `id` | `String` | Template, Required | The ID of the order to update.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - |
+| `body` | [`Array[Patch]`](../../doc/models/patch.md) | Body, Optional | **Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` |
## Response Type
@@ -143,7 +155,6 @@ This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
```ruby
collect = {
'id' => 'id0',
- 'tracker_id' => 'tracker_id2',
'body' => [
Patch.new(
op: PatchOp::ADD
@@ -151,7 +162,13 @@ collect = {
]
}
-result = orders_controller.update_order_tracking(collect)
+result = orders_controller.patch_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -159,45 +176,49 @@ result = orders_controller.update_order_tracking(collect)
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Create Order Tracking
+# Confirm Order
-Adds tracking information for an Order.
+Payer confirms their intent to pay for the the Order with the given payment source.
```ruby
-def create_order_tracking(options = {})
+def confirm_order(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
-| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - |
+| `id` | `String` | Template, Required | The ID of the order for which the payer confirms their intent to pay.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=]*$` |
+| `body` | [`ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
## Example Usage
```ruby
collect = {
'id' => 'id0',
- 'body' => OrderTrackerRequest.new(
- capture_id: 'capture_id8',
- notify_payer: false
- )
+ 'prefer' => 'return=minimal'
}
-result = orders_controller.create_order_tracking(collect)
+result = orders_controller.confirm_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -206,55 +227,50 @@ result = orders_controller.create_order_tracking(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Create Order
+# Authorize Order
-Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. Note: For error handling and troubleshooting, see Orders v2 errors.
+Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response. Note: For error handling and troubleshooting, see Orders v2 errors.
```ruby
-def create_order(options = {})
+def authorize_order(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - |
+| `id` | `String` | Template, Required | The ID of the order for which to authorize.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
-| `paypal_partner_attribution_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
-| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
+| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
+| `body` | [`OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
## Example Usage
```ruby
collect = {
- 'body' => OrderRequest.new(
- intent: CheckoutPaymentIntent::CAPTURE,
- purchase_units: [
- PurchaseUnitRequest.new(
- amount: AmountWithBreakdown.new(
- currency_code: 'currency_code6',
- value: 'value0'
- )
- )
- ]
- ),
+ 'id' => 'id0',
'prefer' => 'return=minimal'
}
-result = orders_controller.create_order(collect)
+result = orders_controller.authorize_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -263,7 +279,10 @@ result = orders_controller.create_order(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
@@ -289,7 +308,7 @@ def capture_order(options = {})
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
## Example Usage
@@ -300,6 +319,12 @@ collect = {
}
result = orders_controller.capture_order(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -315,77 +340,99 @@ result = orders_controller.capture_order(collect)
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Order
+# Create Order Tracking
-Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2 errors.
+Adds tracking information for an Order.
```ruby
-def get_order(options = {})
+def create_order_tracking(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order for which to show details.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
-| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
+| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `fields` | `String` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.
**Constraints**: *Pattern*: `^[a-z_]*$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
## Example Usage
```ruby
collect = {
- 'id' => 'id0'
+ 'id' => 'id0',
+ 'body' => OrderTrackerRequest.new(
+ capture_id: 'capture_id8',
+ notify_payer: false
+ )
}
-result = orders_controller.get_order(collect)
+result = orders_controller.create_order_tracking(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Confirm Order
+# Update Order Tracking
-Payer confirms their intent to pay for the the Order with the given payment source.
+Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects: Attribute Op Notes items replace Using replace op for items will replace the entire items object with the value sent in request. notify_payer replace, add status replace Only patching status to CANCELLED is currently supported.
```ruby
-def confirm_order(options = {})
+def update_order_tracking(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | The ID of the order for which the payer confirms their intent to pay.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
-| `paypal_client_metadata_id` | `String` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=]*$` |
-| `body` | [`ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - |
+| `body` | [`Array[Patch]`](../../doc/models/patch.md) | Body, Optional | **Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
## Example Usage
```ruby
collect = {
'id' => 'id0',
- 'prefer' => 'return=minimal'
+ 'tracker_id' => 'tracker_id2',
+ 'body' => [
+ Patch.new(
+ op: PatchOp::ADD
+ )
+ ]
}
-result = orders_controller.confirm_order(collect)
+result = orders_controller.update_order_tracking(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -394,6 +441,7 @@ result = orders_controller.confirm_order(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
diff --git a/doc/controllers/payments.md b/doc/controllers/payments.md
index 4f005c5..3181836 100644
--- a/doc/controllers/payments.md
+++ b/doc/controllers/payments.md
@@ -12,109 +12,122 @@ payments_controller = client.payments
## Methods
+* [Get Authorized Payment](../../doc/controllers/payments.md#get-authorized-payment)
* [Capture Authorized Payment](../../doc/controllers/payments.md#capture-authorized-payment)
-* [Get Captured Payment](../../doc/controllers/payments.md#get-captured-payment)
* [Reauthorize Payment](../../doc/controllers/payments.md#reauthorize-payment)
* [Void Payment](../../doc/controllers/payments.md#void-payment)
+* [Get Captured Payment](../../doc/controllers/payments.md#get-captured-payment)
* [Refund Captured Payment](../../doc/controllers/payments.md#refund-captured-payment)
-* [Get Authorized Payment](../../doc/controllers/payments.md#get-authorized-payment)
* [Get Refund](../../doc/controllers/payments.md#get-refund)
-# Capture Authorized Payment
+# Get Authorized Payment
-Captures an authorized payment, by ID.
+Shows details for an authorized payment, by ID.
```ruby
-def capture_authorized_payment(options = {})
+def get_authorized_payment(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to capture. |
+| `authorization_id` | `String` | Template, Required | The ID of the authorized payment for which to show details. |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
-| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. |
-| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion). Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject. |
-| `body` | [`CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
## Example Usage
```ruby
collect = {
- 'authorization_id' => 'authorization_id8',
- 'prefer' => 'return=minimal',
- 'body' => CaptureRequest.new(
- final_capture: false
- )
+ 'authorization_id' => 'authorization_id8'
}
-result = payments_controller.capture_authorized_payment(collect)
+result = payments_controller.get_authorized_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 409 | The server has detected a conflict while processing this request. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 422 | The request failed because it is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | The request failed because an internal server error occurred. | `APIException` |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Captured Payment
+# Capture Authorized Payment
-Shows details for a captured payment, by ID.
+Captures an authorized payment, by ID.
```ruby
-def get_captured_payment(options = {})
+def capture_authorized_payment(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
+| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to capture. |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
+| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion). Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject. |
+| `body` | [`CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
## Example Usage
```ruby
collect = {
- 'capture_id' => 'capture_id2'
+ 'authorization_id' => 'authorization_id8',
+ 'prefer' => 'return=minimal',
+ 'body' => CaptureRequest.new(
+ final_capture: false
+ )
}
-result = payments_controller.get_captured_payment(collect)
+result = payments_controller.capture_authorized_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
+| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 409 | The server has detected a conflict while processing this request. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 422 | The request failed because it is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | The request failed because an internal server error occurred. | `APIException` |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
# Reauthorize Payment
-Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires. If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment. A reauthorized payment itself has a new honor period of three days. You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD. Supports only the `amount` request parameter. Note: This request is currently not supported for Partner use cases.
+Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires. If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment. A reauthorized payment itself has a new honor period of three days. You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD. Supports only the `amount` request parameter.
```ruby
def reauthorize_payment(options = {})
@@ -132,7 +145,7 @@ def reauthorize_payment(options = {})
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
## Example Usage
@@ -143,6 +156,12 @@ collect = {
}
result = payments_controller.reauthorize_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -151,6 +170,7 @@ result = payments_controller.reauthorize_payment(collect)
| --- | --- | --- |
| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | The request failed because an internal server error occurred. | `APIException` |
@@ -177,7 +197,7 @@ def void_payment(options = {})
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
## Example Usage
@@ -188,6 +208,12 @@ collect = {
}
result = payments_controller.void_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -203,90 +229,102 @@ result = payments_controller.void_payment(collect)
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Refund Captured Payment
+# Get Captured Payment
-Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
+Shows details for a captured payment, by ID.
```ruby
-def refund_captured_payment(options = {})
+def get_captured_payment(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment to refund. |
+| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
-| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. |
-| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
-| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion). Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject. |
-| `body` | [`RefundRequest`](../../doc/models/refund-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
## Example Usage
```ruby
collect = {
- 'capture_id' => 'capture_id2',
- 'prefer' => 'return=minimal'
+ 'capture_id' => 'capture_id2'
}
-result = payments_controller.refund_captured_payment(collect)
+result = payments_controller.get_captured_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | The request failed because an internal server error occurred. | `APIException` |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Authorized Payment
+# Refund Captured Payment
-Shows details for an authorized payment, by ID.
+Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
```ruby
-def get_authorized_payment(options = {})
+def refund_captured_payment(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `authorization_id` | `String` | Template, Required | The ID of the authorized payment for which to show details. |
+| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment to refund. |
| `paypal_mock_response` | `String` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
| `paypal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion). Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject. |
+| `body` | [`RefundRequest`](../../doc/models/refund-request.md) | Body, Optional | - |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
## Example Usage
```ruby
collect = {
- 'authorization_id' => 'authorization_id8'
+ 'capture_id' => 'capture_id2',
+ 'prefer' => 'return=minimal'
}
-result = payments_controller.get_authorized_payment(collect)
+result = payments_controller.refund_captured_payment(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
+| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | The request failed because an internal server error occurred. | `APIException` |
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
@@ -309,7 +347,7 @@ def get_refund(options = {})
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
## Example Usage
@@ -319,6 +357,12 @@ collect = {
}
result = payments_controller.get_refund(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md
new file mode 100644
index 0000000..186fe43
--- /dev/null
+++ b/doc/controllers/subscriptions.md
@@ -0,0 +1,893 @@
+# Subscriptions
+
+Use the `/subscriptions` resource to create, update, retrieve, and cancel subscriptions and their associated plans.
+
+```ruby
+subscriptions_controller = client.subscriptions
+```
+
+## Class Name
+
+`SubscriptionsController`
+
+## Methods
+
+* [Create Billing Plan](../../doc/controllers/subscriptions.md#create-billing-plan)
+* [List Billing Plans](../../doc/controllers/subscriptions.md#list-billing-plans)
+* [Get Billing Plan](../../doc/controllers/subscriptions.md#get-billing-plan)
+* [Patch Billing Plan](../../doc/controllers/subscriptions.md#patch-billing-plan)
+* [Activate Billing Plan](../../doc/controllers/subscriptions.md#activate-billing-plan)
+* [Deactivate Billing Plan](../../doc/controllers/subscriptions.md#deactivate-billing-plan)
+* [Update Billing Plan Pricing Schemes](../../doc/controllers/subscriptions.md#update-billing-plan-pricing-schemes)
+* [Create Subscription](../../doc/controllers/subscriptions.md#create-subscription)
+* [List Subscriptions](../../doc/controllers/subscriptions.md#list-subscriptions)
+* [Get Subscription](../../doc/controllers/subscriptions.md#get-subscription)
+* [Patch Subscription](../../doc/controllers/subscriptions.md#patch-subscription)
+* [Revise Subscription](../../doc/controllers/subscriptions.md#revise-subscription)
+* [Suspend Subscription](../../doc/controllers/subscriptions.md#suspend-subscription)
+* [Cancel Subscription](../../doc/controllers/subscriptions.md#cancel-subscription)
+* [Activate Subscription](../../doc/controllers/subscriptions.md#activate-subscription)
+* [Capture Subscription](../../doc/controllers/subscriptions.md#capture-subscription)
+* [List Subscription Transactions](../../doc/controllers/subscriptions.md#list-subscription-transactions)
+
+
+# Create Billing Plan
+
+Creates a plan that defines pricing and billing cycle details for subscriptions.
+
+```ruby
+def create_billing_plan(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 72 hours. |
+| `body` | [`PlanRequest`](../../doc/models/plan-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`BillingPlan`](../../doc/models/billing-plan.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'prefer' => 'return=minimal',
+ 'body' => PlanRequest.new(
+ product_id: 'product_id2',
+ name: 'name6',
+ billing_cycles: [
+ SubscriptionBillingCycle.new(
+ frequency: Frequency.new(
+ interval_unit: IntervalUnit::DAY,
+ interval_count: 1
+ ),
+ tenure_type: TenureType::REGULAR,
+ sequence: 8,
+ total_cycles: 1
+ )
+ ],
+ payment_preferences: PaymentPreferences.new(
+ auto_bill_outstanding: true,
+ setup_fee_failure_action: SetupFeeFailureAction::CANCEL,
+ payment_failure_threshold: 0
+ ),
+ status: PlanRequestStatus::ACTIVE,
+ quantity_supported: false
+ )
+}
+
+result = subscriptions_controller.create_billing_plan(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# List Billing Plans
+
+Lists billing plans.
+
+```ruby
+def list_billing_plans(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, name, description and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
+| `product_id` | `String` | Query, Optional | Filters the response by a Product ID.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `50` |
+| `page_size` | `Integer` | Query, Optional | The number of items to return in the response.
**Default**: `10`
**Constraints**: `>= 1`, `<= 20` |
+| `page` | `Integer` | Query, Optional | A non-zero integer which is the start index of the entire list of items to return in the response. The combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.
**Default**: `1`
**Constraints**: `>= 1`, `<= 100000` |
+| `total_required` | `TrueClass \| FalseClass` | Query, Optional | Indicates whether to show the total count in the response.
**Default**: `false` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PlanCollection`](../../doc/models/plan-collection.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'prefer' => 'return=minimal',
+ 'page_size' => 10,
+ 'page' => 1,
+ 'total_required' => false
+}
+
+result = subscriptions_controller.list_billing_plans(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Get Billing Plan
+
+Shows details for a plan, by ID.
+
+```ruby
+def get_billing_plan(id)
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the plan. |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`BillingPlan`](../../doc/models/billing-plan.md).
+
+## Example Usage
+
+```ruby
+id = 'id0'
+
+result = subscriptions_controller.get_billing_plan(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Patch Billing Plan
+
+Updates a plan with the `CREATED` or `ACTIVE` status. For an `INACTIVE` plan, you can make only status updates. You can patch these attributes and objects: Attribute or object Operations description replace payment_preferences.auto_bill_outstanding replace taxes.percentage replace payment_preferences.payment_failure_threshold replace payment_preferences.setup_fee replace payment_preferences.setup_fee_failure_action replace name replace
+
+```ruby
+def patch_billing_plan(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the plan. |
+| `body` | [`Array[Patch]`](../../doc/models/patch.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0',
+ 'body' => [
+ Patch.new(
+ op: PatchOp::ADD
+ )
+ ]
+}
+
+result = subscriptions_controller.patch_billing_plan(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Activate Billing Plan
+
+Activates a plan, by ID.
+
+```ruby
+def activate_billing_plan(id)
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the plan. |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+id = 'id0'
+
+result = subscriptions_controller.activate_billing_plan(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Deactivate Billing Plan
+
+Deactivates a plan, by ID.
+
+```ruby
+def deactivate_billing_plan(id)
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the plan. |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+id = 'id0'
+
+result = subscriptions_controller.deactivate_billing_plan(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Update Billing Plan Pricing Schemes
+
+Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month.
+
+```ruby
+def update_billing_plan_pricing_schemes(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID for the plan. |
+| `body` | [`UpdatePricingSchemesRequest`](../../doc/models/update-pricing-schemes-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0',
+ 'body' => UpdatePricingSchemesRequest.new(
+ pricing_schemes: [
+ UpdatePricingScheme.new(
+ billing_cycle_sequence: 34,
+ pricing_scheme: SubscriptionPricingScheme.new
+ )
+ ]
+ )
+}
+
+result = subscriptions_controller.update_billing_plan_pricing_schemes(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Create Subscription
+
+Creates a subscription.
+
+```ruby
+def create_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links. return=representation. The server returns a complete resource representation, including the current state of the resource.
**Default**: `'return=minimal'` |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 72 hours. |
+| `paypal_client_metadata_id` | `String` | Header, Optional | The PayPal Client Metadata Id(CMID) is used to provide device-specific information to PayPal's risk engine. This is crucial for transactions that require device-specific risk assessments. Merchants typically use the Paypal SDK that automatically submits the CMID or they use tools like Fraudnet JS for web or Magnes JS for mobile to generate the CMID on the frontend and then pass it to the API as part of the request headers.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `body` | [`CreateSubscriptionRequest`](../../doc/models/create-subscription-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Subscription`](../../doc/models/subscription.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'prefer' => 'return=minimal',
+ 'body' => CreateSubscriptionRequest.new(
+ plan_id: 'plan_id8',
+ auto_renewal: false
+ )
+}
+
+result = subscriptions_controller.create_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# List Subscriptions
+
+List all subscriptions for merchant account.
+
+```ruby
+def list_subscriptions(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `plan_ids` | `String` | Query, Optional | Filters the response by list of plan IDs. Filter supports upto 70 plan IDs. URLs should not exceed a length of 2000 characters. |
+| `statuses` | `String` | Query, Optional | Filters the response by list of subscription statuses.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `70`, *Pattern*: `^[A-Z_,]+$` |
+| `created_after` | `String` | Query, Optional | Filters the response by subscription creation start time for a range of subscriptions.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `created_before` | `String` | Query, Optional | Filters the response by subscription creation end time for a range of subscriptions.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `status_updated_before` | `String` | Query, Optional | Filters the response by status update start time for a range of subscriptions.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `status_updated_after` | `String` | Query, Optional | Filters the response by status update end time for a range of subscriptions.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `filter` | `String` | Query, Optional | Filter the response using complex expressions that could use comparison operators like ge, gt, le, lt and logical operators such as 'and' and 'or'.
**Constraints**: *Minimum Length*: `0`, *Maximum Length*: `100` |
+| `page_size` | `Integer` | Query, Optional | The number of items to return in the response.
**Default**: `10`
**Constraints**: `>= 1`, `<= 20` |
+| `page` | `Integer` | Query, Optional | A non-zero integer which is the start index of the entire list of items to return in the response. The combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10`, *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`SubscriptionCollection`](../../doc/models/subscription-collection.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'page_size' => 10,
+ 'page' => 1
+}
+
+result = subscriptions_controller.list_subscriptions(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Get Subscription
+
+Shows details for a subscription, by ID.
+
+```ruby
+def get_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `fields` | `String` | Query, Optional | List of fields that are to be returned in the response. Possible value for fields are last_failed_payment and plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`Subscription`](../../doc/models/subscription.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.get_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Patch Subscription
+
+Updates a subscription which could be in ACTIVE or SUSPENDED status. You can override plan level default attributes by providing customised values for plan path in the patch request. You cannot update attributes that have already completed (Example - trial cycles can’t be updated if completed). Once overridden, changes to plan resource will not impact subscription. Any price update will not impact billing cycles within next 10 days (Applicable only for subscriptions funded by PayPal account). Following are the fields eligible for patch. Attribute or object Operations billing_info.outstanding_balance replace custom_id add,replace plan.billing_cycles[@sequence==n]. pricing_scheme.fixed_price add,replace plan.billing_cycles[@sequence==n]. pricing_scheme.tiers replace plan.billing_cycles[@sequence==n]. total_cycles replace plan.payment_preferences. auto_bill_outstanding replace plan.payment_preferences. payment_failure_threshold replace plan.taxes.inclusive add,replace plan.taxes.percentage add,replace shipping_amount add,replace start_time replace subscriber.shipping_address add,replace subscriber.payment_source (for subscriptions funded by card payments) replace
+
+```ruby
+def patch_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID for the subscription. |
+| `body` | [`Array[Patch]`](../../doc/models/patch.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0',
+ 'body' => [
+ Patch.new(
+ op: PatchOp::ADD
+ )
+ ]
+}
+
+result = subscriptions_controller.patch_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Revise Subscription
+
+Updates the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount`, `shipping_address` values for the subscription. This type of update requires the buyer's consent.
+
+```ruby
+def revise_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `body` | [`ModifySubscriptionRequest`](../../doc/models/modify-subscription-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`ModifySubscriptionResponse`](../../doc/models/modify-subscription-response.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.revise_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Suspend Subscription
+
+Suspends the subscription.
+
+```ruby
+def suspend_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `body` | [`SuspendSubscription`](../../doc/models/suspend-subscription.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.suspend_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Cancel Subscription
+
+Cancels the subscription.
+
+```ruby
+def cancel_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `body` | [`CancelSubscriptionRequest`](../../doc/models/cancel-subscription-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.cancel_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Activate Subscription
+
+Activates the subscription.
+
+```ruby
+def activate_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `body` | [`ActivateSubscriptionRequest`](../../doc/models/activate-subscription-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.activate_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# Capture Subscription
+
+Captures an authorized payment from the subscriber on the subscription.
+
+```ruby
+def capture_subscription(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 72 hours. |
+| `body` | [`CaptureSubscriptionRequest`](../../doc/models/capture-subscription-request.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`SubscriptionTransactionDetails`](../../doc/models/subscription-transaction-details.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0'
+}
+
+result = subscriptions_controller.capture_subscription(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
+
+# List Subscription Transactions
+
+Lists transactions for a subscription.
+
+```ruby
+def list_subscription_transactions(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Template, Required | The ID of the subscription. |
+| `start_time` | `String` | Query, Required | The start time of the range of transactions to list.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `end_time` | `String` | Query, Required | The end time of the range of transactions to list.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`TransactionsList`](../../doc/models/transactions-list.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'id' => 'id0',
+ 'start_time' => 'start_time6',
+ 'end_time' => 'end_time2'
+}
+
+result = subscriptions_controller.list_subscription_transactions(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | Bad Request. Request is not well-formed, syntactically incorrect, or violates schema. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 404 | The specified resource does not exist. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| 500 | An internal server error has occurred. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+| Default | The error response. | [`SubscriptionErrorException`](../../doc/models/subscription-error-exception.md) |
+
diff --git a/doc/controllers/transactionsearch.md b/doc/controllers/transactionsearch.md
new file mode 100644
index 0000000..56c440a
--- /dev/null
+++ b/doc/controllers/transactionsearch.md
@@ -0,0 +1,117 @@
+# Transactionsearch
+
+```ruby
+transactionsearch_controller = client.transactionsearch
+```
+
+## Class Name
+
+`TransactionsearchController`
+
+## Methods
+
+* [Search Transactions](../../doc/controllers/transactionsearch.md#search-transactions)
+* [Search Balances](../../doc/controllers/transactionsearch.md#search-balances)
+
+
+# Search Transactions
+
+Lists transactions. Specify one or more query parameters to filter the transaction that appear in the response. Notes: If you specify one or more optional query parameters, the ending_balance response field is empty. It takes a maximum of three hours for executed transactions to appear in the list transactions call. This call lists transaction for the previous three years.
+
+```ruby
+def search_transactions(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `start_date` | `String` | Query, Required | Filters the transactions in the response by a start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `end_date` | `String` | Query, Required | Filters the transactions in the response by an end date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional. The maximum supported range is 31 days.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `transaction_id` | `String` | Query, Optional | Filters the transactions in the response by a PayPal transaction ID. A valid transaction ID is 17 characters long, except for an order ID, which is 19 characters long. Note: A transaction ID is not unique in the reporting system. The response can list two transactions with the same ID. One transaction can be balance affecting while the other is non-balance affecting.
**Constraints**: *Minimum Length*: `17`, *Maximum Length*: `19` |
+| `transaction_type` | `String` | Query, Optional | Filters the transactions in the response by a PayPal transaction event code. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/). |
+| `transaction_status` | `String` | Query, Optional | Filters the transactions in the response by a PayPal transaction status code. Value is: Status code Description D PayPal or merchant rules denied the transaction. P The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S. S The transaction successfully completed without a denial and after any pending statuses. V A successful transaction was reversed and funds were refunded to the original sender. |
+| `transaction_amount` | `String` | Query, Optional | Filters the transactions in the response by a gross transaction amount range. Specify the range as `TO`, where ` ` is the lower limit of the gross PayPal transaction amount and ` ` is the upper limit of the gross transaction amount. Specify the amounts in lower denominations. For example, to search for transactions from $5.00 to $10.05, specify `[500 TO 1005]`. Note:The values must be URL encoded. |
+| `transaction_currency` | `String` | Query, Optional | Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency. |
+| `payment_instrument_type` | `String` | Query, Optional | Filters the transactions in the response by a payment instrument type. Value is either: CREDITCARD. Returns a direct credit card transaction with a corresponding value. DEBITCARD. Returns a debit card transaction with a corresponding value. If you omit this parameter, the API does not apply this filter. |
+| `store_id` | `String` | Query, Optional | Filters the transactions in the response by a store ID. |
+| `terminal_id` | `String` | Query, Optional | Filters the transactions in the response by a terminal ID. |
+| `fields` | `String` | Query, Optional | Indicates which fields appear in the response. Value is a single field or a comma-separated list of fields. The transaction_info value returns only the transaction details in the response. To include all fields in the response, specify fields=all. Valid fields are: transaction_info. The transaction information. Includes the ID of the PayPal account of the payee, the PayPal-generated transaction ID, the PayPal-generated base ID, the PayPal reference ID type, the transaction event code, the date and time when the transaction was initiated and was last updated, the transaction amounts including the PayPal fee, any discounts, insurance, the transaction status, and other information about the transaction. payer_info. The payer information. Includes the PayPal customer account ID and the payer's email address, primary phone number, name, country code, address, and whether the payer is verified or unverified. shipping_info. The shipping information. Includes the recipient's name, the shipping method for this order, the shipping address for this order, and the secondary address associated with this order. auction_info. The auction information. Includes the name of the auction site, the auction site URL, the ID of the customer who makes the purchase in the auction, and the date and time when the auction closes. cart_info. The cart information. Includes an array of item details, whether the item amount or the shipping amount already includes tax, and the ID of the invoice for PayPal-generated invoices. incentive_info. An array of incentive detail objects. Each object includes the incentive, such as a special offer or coupon, the incentive amount, and the incentive program code that identifies a merchant loyalty or incentive program. store_info. The store information. Includes the ID of the merchant store and the terminal ID for the checkout stand in the merchant store.
**Default**: `'transaction_info'` |
+| `balance_affecting_records_only` | `String` | Query, Optional | Indicates whether the response includes only balance-impacting transactions or all transactions. Value is either: Y. The default. The response includes only balance transactions. N. The response includes all transactions.
**Default**: `'Y'` |
+| `page_size` | `Integer` | Query, Optional | The number of items to return in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.
**Default**: `100`
**Constraints**: `>= 1`, `<= 500` |
+| `page` | `Integer` | Query, Optional | The zero-relative start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items.
**Default**: `1`
**Constraints**: `>= 1`, `<= 2147483647` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`SearchResponse`](../../doc/models/search-response.md).
+
+## Example Usage
+
+```ruby
+collect = {
+ 'start_date' => 'start_date6',
+ 'end_date' => 'end_date0',
+ 'fields' => 'transaction_info',
+ 'balance_affecting_records_only' => 'Y',
+ 'page_size' => 100,
+ 'page' => 1
+}
+
+result = transaction_search_controller.search_transactions(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| Default | The error response. | [`SearchErrorException`](../../doc/models/search-error-exception.md) |
+
+
+# Search Balances
+
+List all balances. Specify date time to list balances for that time that appear in the response. Notes: It takes a maximum of three hours for balances to appear in the list balances call. This call lists balances upto the previous three years.
+
+```ruby
+def search_balances(options = {})
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `as_of_time` | `String` | Query, Optional | List balances in the response at the date time provided, will return the last refreshed balance in the system when not provided.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `currency_code` | `String` | Query, Optional | Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`BalancesResponse`](../../doc/models/balances-response.md).
+
+## Example Usage
+
+```ruby
+collect = {}
+
+result = transaction_search_controller.search_balances(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 400 | The request is not well-formed, is syntactically incorrect, or violates schema. | [`DefaultErrorException`](../../doc/models/default-error-exception.md) |
+| 403 | Authorization failed due to insufficient permissions. | [`DefaultErrorException`](../../doc/models/default-error-exception.md) |
+| 500 | An internal server error occurred. | [`DefaultErrorException`](../../doc/models/default-error-exception.md) |
+| Default | The error response. | [`DefaultErrorException`](../../doc/models/default-error-exception.md) |
+
diff --git a/doc/controllers/vault.md b/doc/controllers/vault.md
index c959656..5a211c1 100644
--- a/doc/controllers/vault.md
+++ b/doc/controllers/vault.md
@@ -12,38 +12,49 @@ vault_controller = client.vault
## Methods
-* [Delete Payment Token](../../doc/controllers/vault.md#delete-payment-token)
-* [Create Setup Token](../../doc/controllers/vault.md#create-setup-token)
-* [Get Setup Token](../../doc/controllers/vault.md#get-setup-token)
* [Create Payment Token](../../doc/controllers/vault.md#create-payment-token)
* [List Customer Payment Tokens](../../doc/controllers/vault.md#list-customer-payment-tokens)
* [Get Payment Token](../../doc/controllers/vault.md#get-payment-token)
+* [Delete Payment Token](../../doc/controllers/vault.md#delete-payment-token)
+* [Create Setup Token](../../doc/controllers/vault.md#create-setup-token)
+* [Get Setup Token](../../doc/controllers/vault.md#get-setup-token)
-# Delete Payment Token
+# Create Payment Token
-Delete the payment token associated with the payment token id.
+Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
```ruby
-def delete_payment_token(id)
+def create_payment_token(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | ID of the payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108`, *Pattern*: `^.*$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
## Example Usage
```ruby
-id = 'id0'
+collect = {
+ 'body' => PaymentTokenRequest.new(
+ payment_source: PaymentTokenRequestPaymentSource.new
+ )
+}
-result = vault_controller.delete_payment_token(id)
+result = vault_controller.create_payment_token(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -52,38 +63,49 @@ result = vault_controller.delete_payment_token(id)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Create Setup Token
+# List Customer Payment Tokens
-Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
+Returns all payment tokens for a customer.
```ruby
-def create_setup_token(options = {})
+def list_customer_payment_tokens(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. |
-| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` |
+| `customer_id` | `String` | Query, Required | A unique identifier representing a specific customer in merchant's/partner's system or records.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `page_size` | `Integer` | Query, Optional | A non-negative, non-zero integer indicating the maximum number of results to return at one time.
**Default**: `5`
**Constraints**: `>= 1`, `<= 5` |
+| `page` | `Integer` | Query, Optional | A non-negative, non-zero integer representing the page of the results.
**Default**: `1`
**Constraints**: `>= 1`, `<= 10` |
+| `total_required` | `TrueClass \| FalseClass` | Query, Optional | A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response.
**Default**: `false` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md).
## Example Usage
```ruby
collect = {
- 'body' => SetupTokenRequest.new(
- payment_source: SetupTokenRequestPaymentSource.new
- )
+ 'customer_id' => 'customer_id8',
+ 'page_size' => 5,
+ 'page' => 1,
+ 'total_required' => false
}
-result = vault_controller.create_setup_token(collect)
+result = vault_controller.list_customer_payment_tokens(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -92,34 +114,39 @@ result = vault_controller.create_setup_token(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Setup Token
+# Get Payment Token
-Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
+Returns a readable representation of vaulted payment source associated with the payment token id.
```ruby
-def get_setup_token(id)
+def get_payment_token(id)
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | ID of the setup token.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `id` | `String` | Template, Required | ID of the payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
## Example Usage
```ruby
id = 'id0'
-result = vault_controller.get_setup_token(id)
+result = vault_controller.get_payment_token(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -132,35 +159,36 @@ result = vault_controller.get_setup_token(id)
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Create Payment Token
+# Delete Payment Token
-Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
+Delete the payment token associated with the payment token id.
```ruby
-def create_payment_token(options = {})
+def delete_payment_token(id)
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. |
-| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` |
+| `id` | `String` | Template, Required | ID of the payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
## Example Usage
```ruby
-collect = {
- 'body' => PaymentTokenRequest.new(
- payment_source: PaymentTokenRequestPaymentSource.new
- )
-}
+id = 'id0'
-result = vault_controller.create_payment_token(collect)
+result = vault_controller.delete_payment_token(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -169,43 +197,44 @@ result = vault_controller.create_payment_token(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-# List Customer Payment Tokens
+# Create Setup Token
-Returns all payment tokens for a customer.
+Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
```ruby
-def list_customer_payment_tokens(options = {})
+def create_setup_token(options = {})
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `customer_id` | `String` | Query, Required | A unique identifier representing a specific customer in merchant's/partner's system or records.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
-| `page_size` | `Integer` | Query, Optional | A non-negative, non-zero integer indicating the maximum number of results to return at one time.
**Default**: `5`
**Constraints**: `>= 1`, `<= 5` |
-| `page` | `Integer` | Query, Optional | A non-negative, non-zero integer representing the page of the results.
**Default**: `1`
**Constraints**: `>= 1`, `<= 10` |
-| `total_required` | `TrueClass \| FalseClass` | Query, Optional | A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response.
**Default**: `false` |
+| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. |
+| `paypal_request_id` | `String` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108`, *Pattern*: `^.*$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
## Example Usage
```ruby
collect = {
- 'customer_id' => 'customer_id8',
- 'page_size' => 5,
- 'page' => 1,
- 'total_required' => false
+ 'body' => SetupTokenRequest.new(
+ payment_source: SetupTokenRequestPaymentSource.new
+ )
}
-result = vault_controller.list_customer_payment_tokens(collect)
+result = vault_controller.create_setup_token(collect)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
@@ -214,33 +243,40 @@ result = vault_controller.list_customer_payment_tokens(collect)
| --- | --- | --- |
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Payment Token
+# Get Setup Token
-Returns a readable representation of vaulted payment source associated with the payment token id.
+Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
```ruby
-def get_payment_token(id)
+def get_setup_token(id)
```
## Parameters
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Template, Required | ID of the payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `id` | `String` | Template, Required | ID of the setup token.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
## Response Type
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `data` property of this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
## Example Usage
```ruby
id = 'id0'
-result = vault_controller.get_payment_token(id)
+result = vault_controller.get_setup_token(id)
+
+if result.success?
+ puts result.data
+elsif result.error?
+ warn result.errors
+end
```
## Errors
diff --git a/doc/models/activate-subscription-request.md b/doc/models/activate-subscription-request.md
new file mode 100644
index 0000000..07277fa
--- /dev/null
+++ b/doc/models/activate-subscription-request.md
@@ -0,0 +1,23 @@
+
+# Activate Subscription Request
+
+The activate subscription request details.
+
+## Structure
+
+`ActivateSubscriptionRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `reason` | `String` | Optional | The reason for activation of a subscription. Required to reactivate the subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` |
+
+## Example (as JSON)
+
+```json
+{
+ "reason": "reason4"
+}
+```
+
diff --git a/doc/models/amount-breakdown.md b/doc/models/amount-breakdown.md
index 00d190f..ceae3b3 100644
--- a/doc/models/amount-breakdown.md
+++ b/doc/models/amount-breakdown.md
@@ -17,7 +17,7 @@ The breakdown of the amount. Breakdown provides details such as total item amoun
| `tax_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `insurance` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `shipping_discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
-| `discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `discount` | [`Money`](../../doc/models/money.md) | Optional | The discount amount and currency code. For list of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. |
## Example (as JSON)
diff --git a/doc/models/app-switch-context.md b/doc/models/app-switch-context.md
new file mode 100644
index 0000000..6d273d6
--- /dev/null
+++ b/doc/models/app-switch-context.md
@@ -0,0 +1,31 @@
+
+# App Switch Context
+
+Merchant provided details of the native app or mobile web browser to facilitate buyer's app switch to the PayPal consumer app.
+
+## Structure
+
+`AppSwitchContext`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `native_app` | [`NativeAppContext`](../../doc/models/native-app-context.md) | Optional | Merchant provided, buyer's native app preferences to app switch to the PayPal consumer app. |
+| `mobile_web` | [`MobileWebContext`](../../doc/models/mobile-web-context.md) | Optional | Buyer's mobile web browser context to app switch to the PayPal consumer app. |
+
+## Example (as JSON)
+
+```json
+{
+ "native_app": {
+ "os_type": "IOS",
+ "os_version": "os_version0"
+ },
+ "mobile_web": {
+ "return_flow": "AUTO",
+ "buyer_user_agent": "buyer_user_agent8"
+ }
+}
+```
+
diff --git a/doc/models/apple-pay-card-response.md b/doc/models/apple-pay-card-response.md
index 9fb0cf4..3f2cde5 100644
--- a/doc/models/apple-pay-card-response.md
+++ b/doc/models/apple-pay-card-response.md
@@ -14,7 +14,7 @@ The Card from Apple Pay Wallet used to fund the payment.
| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` |
| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` |
| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
-| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `available_networks` | [`Array[CardBrand]`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. |
| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. |
@@ -31,9 +31,9 @@ The Card from Apple Pay Wallet used to fund the payment.
{
"name": "name4",
"last_digits": "last_digits8",
- "brand": "HIPER",
+ "brand": "ACCEL",
"available_networks": [
- "RUPAY"
+ "STAR_ACCESS"
],
"type": "DEBIT"
}
diff --git a/doc/models/apple-pay-card.md b/doc/models/apple-pay-card.md
index 92899ff..20279f4 100644
--- a/doc/models/apple-pay-card.md
+++ b/doc/models/apple-pay-card.md
@@ -24,7 +24,7 @@ The payment card to be used to fund a payment. Can be a credit or debit card.
"name": "name4",
"last_digits": "last_digits8",
"type": "UNKNOWN",
- "brand": "AMEX",
+ "brand": "SWITCH",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/apple-pay-decrypted-token-data.md b/doc/models/apple-pay-decrypted-token-data.md
index d9aee26..154601c 100644
--- a/doc/models/apple-pay-decrypted-token-data.md
+++ b/doc/models/apple-pay-decrypted-token-data.md
@@ -29,7 +29,7 @@ Information about the Payment data obtained by decrypting Apple Pay token.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id2",
diff --git a/doc/models/apple-pay-payment-token.md b/doc/models/apple-pay-payment-token.md
index 29dde70..6acc8bc 100644
--- a/doc/models/apple-pay-payment-token.md
+++ b/doc/models/apple-pay-payment-token.md
@@ -21,7 +21,7 @@ A resource representing a response for Apple Pay.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/apple-pay-request-card.md b/doc/models/apple-pay-request-card.md
new file mode 100644
index 0000000..3c5b0fa
--- /dev/null
+++ b/doc/models/apple-pay-request-card.md
@@ -0,0 +1,34 @@
+
+# Apple Pay Request Card
+
+The payment card to be used to fund a payment. Can be a credit or debit card.
+
+## Structure
+
+`ApplePayRequestCard`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
+
+## Example (as JSON)
+
+```json
+{
+ "type": "PREPAID",
+ "brand": "PULSE",
+ "billing_address": {
+ "address_line_1": "address_line_12",
+ "address_line_2": "address_line_28",
+ "admin_area_2": "admin_area_28",
+ "admin_area_1": "admin_area_14",
+ "postal_code": "postal_code0",
+ "country_code": "country_code8"
+ }
+}
+```
+
diff --git a/doc/models/apple-pay-request.md b/doc/models/apple-pay-request.md
index 046124c..ea54d1a 100644
--- a/doc/models/apple-pay-request.md
+++ b/doc/models/apple-pay-request.md
@@ -40,7 +40,7 @@ Information needed to pay using ApplePay.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id6",
diff --git a/doc/models/apple-pay-tokenized-card.md b/doc/models/apple-pay-tokenized-card.md
index 651237d..3d1168a 100644
--- a/doc/models/apple-pay-tokenized-card.md
+++ b/doc/models/apple-pay-tokenized-card.md
@@ -14,7 +14,7 @@ The payment card to use to fund a payment. Can be a credit or debit card.
| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` |
| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` |
| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` |
-| `card_type` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `card_type` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card brand or network. Typically used in the response.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
diff --git a/doc/models/application-context-user-action.md b/doc/models/application-context-user-action.md
new file mode 100644
index 0000000..f6595f7
--- /dev/null
+++ b/doc/models/application-context-user-action.md
@@ -0,0 +1,16 @@
+
+# Application Context User Action
+
+Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience.
+
+## Enumeration
+
+`ApplicationContextUserAction`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `CONTINUE` | After you redirect the customer to the PayPal subscription consent page, a Continue button appears. Use this option when you want to control the activation of the subscription and do not want PayPal to activate the subscription. |
+| `SUBSCRIBE_NOW` | After you redirect the customer to the PayPal subscription consent page, a Subscribe Now button appears. Use this option when you want PayPal to activate the subscription. |
+
diff --git a/doc/models/auction-information.md b/doc/models/auction-information.md
new file mode 100644
index 0000000..3b9c239
--- /dev/null
+++ b/doc/models/auction-information.md
@@ -0,0 +1,29 @@
+
+# Auction Information
+
+The auction information.
+
+## Structure
+
+`AuctionInformation`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `auction_site` | `String` | Optional | The name of the auction site.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `auction_buyer_id` | `String` | Optional | The ID of the buyer who makes the purchase in the auction. This ID might be different from the payer ID provided for the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `auction_closing_date` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+
+## Example (as JSON)
+
+```json
+{
+ "auction_site": "auction_site6",
+ "auction_item_site": "auction_item_site8",
+ "auction_buyer_id": "auction_buyer_id0",
+ "auction_closing_date": "auction_closing_date0"
+}
+```
+
diff --git a/doc/models/authorization-with-additional-data.md b/doc/models/authorization-with-additional-data.md
index 593b800..e26ed35 100644
--- a/doc/models/authorization-with-additional-data.md
+++ b/doc/models/authorization-with-additional-data.md
@@ -17,10 +17,10 @@ The authorization with additional payment details, such as risk assessment and p
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
diff --git a/doc/models/authorization.md b/doc/models/authorization.md
index 9b68550..56b401a 100644
--- a/doc/models/authorization.md
+++ b/doc/models/authorization.md
@@ -17,10 +17,10 @@ The authorized payment transaction.
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
diff --git a/doc/models/balance-information.md b/doc/models/balance-information.md
new file mode 100644
index 0000000..26a1ffb
--- /dev/null
+++ b/doc/models/balance-information.md
@@ -0,0 +1,40 @@
+
+# Balance Information
+
+The Balance information.
+
+## Structure
+
+`BalanceInformation`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `currency` | `String` | Required | The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` |
+| `primary` | `TrueClass \| FalseClass` | Optional | Optional field representing if the currency is primary currency or not. |
+| `total_balance` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `available_balance` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `withheld_balance` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+
+## Example (as JSON)
+
+```json
+{
+ "currency": "currency4",
+ "primary": false,
+ "total_balance": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ },
+ "available_balance": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "withheld_balance": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ }
+}
+```
+
diff --git a/doc/models/balances-response.md b/doc/models/balances-response.md
new file mode 100644
index 0000000..c03b085
--- /dev/null
+++ b/doc/models/balances-response.md
@@ -0,0 +1,78 @@
+
+# Balances Response
+
+The balances response information.
+
+## Structure
+
+`BalancesResponse`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `balances` | [`Array[BalanceInformation]`](../../doc/models/balance-information.md) | Optional | An array of balance detail objects.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `200` |
+| `account_id` | `String` | Optional | The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` |
+| `as_of_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `last_refresh_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+
+## Example (as JSON)
+
+```json
+{
+ "balances": [
+ {
+ "currency": "currency0",
+ "primary": false,
+ "total_balance": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ },
+ "available_balance": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "withheld_balance": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ }
+ },
+ {
+ "currency": "currency0",
+ "primary": false,
+ "total_balance": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ },
+ "available_balance": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "withheld_balance": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ }
+ },
+ {
+ "currency": "currency0",
+ "primary": false,
+ "total_balance": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ },
+ "available_balance": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "withheld_balance": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ }
+ }
+ ],
+ "account_id": "account_id0",
+ "as_of_time": "as_of_time2",
+ "last_refresh_time": "last_refresh_time0"
+}
+```
+
diff --git a/doc/models/bank-request.md b/doc/models/bank-request.md
new file mode 100644
index 0000000..2b4e789
--- /dev/null
+++ b/doc/models/bank-request.md
@@ -0,0 +1,34 @@
+
+# Bank Request
+
+A Resource representing a request to vault a Bank used for ACH Debit.
+
+## Structure
+
+`BankRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `ach_debit` | `Object` | Optional | A Resource representing a request to vault a ACH Debit. |
+| `sepa_debit` | [`SepaDebitRequest`](../../doc/models/sepa-debit-request.md) | Optional | An API resource denoting a request to securely store a SEPA Debit. |
+
+## Example (as JSON)
+
+```json
+{
+ "ach_debit": {
+ "key1": "val1",
+ "key2": "val2"
+ },
+ "sepa_debit": {
+ "experience_context": {
+ "locale": "locale6",
+ "return_url": "return_url4",
+ "cancel_url": "cancel_url6"
+ }
+ }
+}
+```
+
diff --git a/doc/models/billing-cycle-override.md b/doc/models/billing-cycle-override.md
new file mode 100644
index 0000000..e863aa4
--- /dev/null
+++ b/doc/models/billing-cycle-override.md
@@ -0,0 +1,61 @@
+
+# Billing Cycle Override
+
+The billing cycle details to override at subscription level. The subscription billing cycle definition has to adhere to the plan billing cycle definition.
+
+## Structure
+
+`BillingCycleOverride`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `pricing_scheme` | [`SubscriptionPricingScheme`](../../doc/models/subscription-pricing-scheme.md) | Optional | The pricing scheme details. |
+| `sequence` | `Integer` | Required | The order in which this cycle is to run among other billing cycles. For example, a trial billing cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial cycle runs before the regular cycle.
**Constraints**: `>= 1`, `<= 99` |
+| `total_cycles` | `Integer` | Optional | The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
| `pricing_scheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | The pricing scheme details. |
-| `frequency` | `Object` | Optional | The frequency details for this billing cycle. |
| `total_cycles` | `Integer` | Optional | The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).
**Default**: `1`
**Constraints**: `>= 0`, `<= 999` |
| `sequence` | `Integer` | Optional | The order in which this cycle is to run among other billing cycles. For example, a trial billing cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial cycle runs before the regular cycle.
**Default**: `1`
**Constraints**: `>= 1`, `<= 3` |
| `start_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` |
@@ -36,10 +35,6 @@ The billing cycle providing details of the billing frequency, amount, duration a
"value": "value6"
}
},
- "frequency": {
- "key1": "val1",
- "key2": "val2"
- },
"start_date": "start_date0"
}
```
diff --git a/doc/models/billing-plan.md b/doc/models/billing-plan.md
new file mode 100644
index 0000000..9722a4f
--- /dev/null
+++ b/doc/models/billing-plan.md
@@ -0,0 +1,40 @@
+
+# Billing Plan
+
+The plan details.
+
+## Structure
+
+`BillingPlan`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` |
+| `product_id` | `String` | Optional | The ID for the product.
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` |
+| `name` | `String` | Optional | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `status` | [`SubscriptionPlanStatus`](../../doc/models/subscription-plan-status.md) | Optional | The plan status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `description` | `String` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `billing_cycles` | [`Array[SubscriptionBillingCycle]`](../../doc/models/subscription-billing-cycle.md) | Optional | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `12` |
+| `payment_preferences` | [`PaymentPreferences`](../../doc/models/payment-preferences.md) | Optional | The payment preferences for a subscription. |
+| `merchant_preferences` | [`MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. |
+| `taxes` | [`Taxes`](../../doc/models/taxes.md) | Optional | The tax details. |
+| `quantity_supported` | `TrueClass \| FalseClass` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Default**: `false` |
+| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
+
+## Example (as JSON)
+
+```json
+{
+ "quantity_supported": false,
+ "id": "id0",
+ "product_id": "product_id4",
+ "name": "name0",
+ "status": "CREATED",
+ "description": "description0"
+}
+```
+
diff --git a/doc/models/bin-details.md b/doc/models/bin-details.md
index 6e8c51d..d9aed22 100644
--- a/doc/models/bin-details.md
+++ b/doc/models/bin-details.md
@@ -14,7 +14,7 @@ Bank Identification Number (BIN) details used to fund a payment.
| `bin` | `String` | Optional | The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[0-9]+$` |
| `issuing_bank` | `String` | Optional | The issuer of the card instrument.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` |
| `bin_country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region. Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` |
-| `products` | `Array` | Optional | The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255` |
+| `products` | `Array[String]` | Optional | The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255` |
## Example (as JSON)
diff --git a/doc/models/blik-experience-context.md b/doc/models/blik-experience-context.md
index 209f7fd..203e873 100644
--- a/doc/models/blik-experience-context.md
+++ b/doc/models/blik-experience-context.md
@@ -13,7 +13,7 @@ Customizes the payer experience during the approval process for the BLIK payment
| --- | --- | --- | --- |
| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` |
-| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `shipping_preference` | [`ExperienceContextShippingPreference`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
| `return_url` | `String` | Optional | Describes the URL. |
| `cancel_url` | `String` | Optional | Describes the URL. |
| `consumer_ip` | `String` | Optional | An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `39`, *Pattern*: `^(([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])\.){3}([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])$\|^(([a-zA-Z]\|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]\|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$\|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}\|:))\|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}\|((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})\|:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})\|((:[0-9A-Fa-f]{1,4})?:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})\|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})\|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})\|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(:(((:[0-9A-Fa-f]{1,4}){1,7})\|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:)))(%.+)?\s*$` |
diff --git a/doc/models/callback-configuration.md b/doc/models/callback-configuration.md
index e1fe96f..47e9256 100644
--- a/doc/models/callback-configuration.md
+++ b/doc/models/callback-configuration.md
@@ -11,7 +11,7 @@ CallBack Configuration that the merchant can provide to PayPal/Venmo.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `callback_events` | [`Array`](../../doc/models/callback-events.md) | Required | An array of callback events merchant can subscribe to for the corresponding callback url.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `5`, *Unique Items Required*, *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^[0-9A-Z_]+$` |
+| `callback_events` | [`Array[CallbackEvents]`](../../doc/models/callback-events.md) | Required | An array of callback events merchant can subscribe to for the corresponding callback url.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `5`, *Unique Items Required*, *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^[0-9A-Z_]+$` |
| `callback_url` | `String` | Required | Merchant provided CallBack url.PayPal/Venmo will use this url to call the merchant back when the events occur .PayPal/Venmo expects a secured url usually in the https format.merchant can append the cart id or other params part of the url as query or path params.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `2040`, *Pattern*: `^.*$` |
## Example (as JSON)
diff --git a/doc/models/cancel-subscription-request.md b/doc/models/cancel-subscription-request.md
new file mode 100644
index 0000000..2f740b2
--- /dev/null
+++ b/doc/models/cancel-subscription-request.md
@@ -0,0 +1,23 @@
+
+# Cancel Subscription Request
+
+The cancel subscription request details.
+
+## Structure
+
+`CancelSubscriptionRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `reason` | `String` | Required | The reason for the cancellation of a subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` |
+
+## Example (as JSON)
+
+```json
+{
+ "reason": "reason8"
+}
+```
+
diff --git a/doc/models/capture-payment-instruction.md b/doc/models/capture-payment-instruction.md
index 7344a7f..ba6afd4 100644
--- a/doc/models/capture-payment-instruction.md
+++ b/doc/models/capture-payment-instruction.md
@@ -11,7 +11,7 @@ Any additional payment instructions to be consider during payment processing. Th
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` |
+| `platform_fees` | [`Array[PlatformFee]`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` |
| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` |
| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^.*$` |
diff --git a/doc/models/capture-request.md b/doc/models/capture-request.md
index e253c77..d88ef6c 100644
--- a/doc/models/capture-request.md
+++ b/doc/models/capture-request.md
@@ -1,6 +1,8 @@
# Capture Request
+Captures either a portion or the full authorized amount of an authorized payment.
+
## Structure
`CaptureRequest`
@@ -9,11 +11,11 @@
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.{1,127}$` |
-| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.{1,255}$` |
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Maximum Length*: `127` |
| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` |
| `payment_instruction` | [`CapturePaymentInstruction`](../../doc/models/capture-payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. |
+| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Maximum Length*: `255` |
| `soft_descriptor` | `String` | Optional | The payment descriptor on the payer's account statement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` |
+| `capture_type` | [`CaptureType`](../../doc/models/capture-type.md) | Required | The type of capture.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. |
+
+## Example (as JSON)
+
+```json
+{
+ "note": "note4",
+ "capture_type": "OUTSTANDING_BALANCE",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+}
+```
+
diff --git a/doc/models/capture-type.md b/doc/models/capture-type.md
new file mode 100644
index 0000000..4739ebd
--- /dev/null
+++ b/doc/models/capture-type.md
@@ -0,0 +1,15 @@
+
+# Capture Type
+
+The type of capture.
+
+## Enumeration
+
+`CaptureType`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `OUTSTANDING_BALANCE` | The outstanding balance that the subscriber must clear. |
+
diff --git a/doc/models/captured-payment.md b/doc/models/captured-payment.md
index 93ffd86..21dd580 100644
--- a/doc/models/captured-payment.md
+++ b/doc/models/captured-payment.md
@@ -17,13 +17,13 @@ A captured payment.
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` |
| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. |
| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
-| `processor_response` | [`PaymentsProcessorResponse`](../../doc/models/payments-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. |
diff --git a/doc/models/card-brand.md b/doc/models/card-brand.md
index 9c5600c..d02e168 100644
--- a/doc/models/card-brand.md
+++ b/doc/models/card-brand.md
@@ -35,5 +35,10 @@ The card network or brand. Applies to credit, debit, gift, and payment cards.
| `GE` | The GE Credit Union 3Point card payment network. |
| `SYNCHRONY` | The Synchrony Financial (SYF) payment network. |
| `EFTPOS` | The Electronic Fund Transfer At Point of Sale(EFTPOS) Debit card payment network. |
+| `CARTE_BANCAIRE` | The Carte Bancaire payment network. |
+| `STAR_ACCESS` | The Star Access payment network. |
+| `PULSE` | The Pulse payment network. |
+| `NYCE` | The NYCE payment network. |
+| `ACCEL` | The Accel payment network. |
| `UNKNOWN` | UNKNOWN payment network. |
diff --git a/doc/models/card-customer.md b/doc/models/card-customer.md
new file mode 100644
index 0000000..fbebde2
--- /dev/null
+++ b/doc/models/card-customer.md
@@ -0,0 +1,34 @@
+
+# Card Customer
+
+The details about a customer in PayPal's system of record.
+
+## Structure
+
+`CardCustomer`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `email_address` | `String` | Optional | The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: ``(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])`` |
+| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. |
+| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` |
+
+## Example (as JSON)
+
+```json
+{
+ "id": "id2",
+ "email_address": "email_address0",
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "merchant_customer_id": "merchant_customer_id4"
+}
+```
+
diff --git a/doc/models/card-response-with-billing-address.md b/doc/models/card-response-with-billing-address.md
new file mode 100644
index 0000000..fee9435
--- /dev/null
+++ b/doc/models/card-response-with-billing-address.md
@@ -0,0 +1,36 @@
+
+# Card Response With Billing Address
+
+The payment card used to fund the payment. Card can be a credit or debit card.
+
+## Structure
+
+`CardResponseWithBillingAddress`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` |
+| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
+| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` |
+| `currency_code` | `String` | Optional | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name0",
+ "billing_address": {
+ "address_line_1": "address_line_12",
+ "address_line_2": "address_line_28",
+ "admin_area_2": "admin_area_28",
+ "admin_area_1": "admin_area_14",
+ "postal_code": "postal_code0",
+ "country_code": "country_code8"
+ },
+ "expiry": "expiry8",
+ "currency_code": "currency_code4"
+}
+```
+
diff --git a/doc/models/card-response.md b/doc/models/card-response.md
index 0b7b561..10c74de 100644
--- a/doc/models/card-response.md
+++ b/doc/models/card-response.md
@@ -14,7 +14,7 @@ The payment card to use to fund a payment. Card can be a credit or debit card.
| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` |
| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` |
| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
-| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `available_networks` | [`Array[CardBrand]`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. |
| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. |
@@ -29,11 +29,11 @@ The payment card to use to fund a payment. Card can be a credit or debit card.
{
"name": "name0",
"last_digits": "last_digits4",
- "brand": "UNKNOWN",
+ "brand": "CARTE_BANCAIRE",
"available_networks": [
- "CONFIDIS",
- "CONFIGOGA",
- "CB_NATIONALE"
+ "ELO",
+ "DINERS",
+ "CHINA_UNION_PAY"
],
"type": "CREDIT"
}
diff --git a/doc/models/card-stored-credential.md b/doc/models/card-stored-credential.md
index af64b64..2613cff 100644
--- a/doc/models/card-stored-credential.md
+++ b/doc/models/card-stored-credential.md
@@ -14,7 +14,7 @@ Provides additional details to process a payment using a `card` that has been st
| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
| `payment_type` | [`StoredPaymentSourcePaymentType`](../../doc/models/stored-payment-source-payment-type.md) | Required | Indicates the type of the stored payment_source payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
-| `previous_network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `previous_network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
## Example (as JSON)
@@ -26,7 +26,7 @@ Provides additional details to process a payment using a `card` that has been st
"previous_network_transaction_reference": {
"id": "id6",
"date": "date2",
- "network": "DELTA",
+ "network": "CONFIDIS",
"acquirer_reference_number": "acquirer_reference_number8"
}
}
diff --git a/doc/models/card-vault-response.md b/doc/models/card-vault-response.md
index ad34b7a..d5bcfa4 100644
--- a/doc/models/card-vault-response.md
+++ b/doc/models/card-vault-response.md
@@ -13,7 +13,7 @@ The details about a saved Card payment source.
| --- | --- | --- | --- |
| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
| `customer` | [`CardCustomerInformation`](../../doc/models/card-customer-information.md) | Optional | The details about a customer in PayPal's system of record. |
## Example (as JSON)
diff --git a/doc/models/card-verification-details.md b/doc/models/card-verification-details.md
index 3c01150..d72ad24 100644
--- a/doc/models/card-verification-details.md
+++ b/doc/models/card-verification-details.md
@@ -13,8 +13,8 @@ Card Verification details including the authorization details and 3D SECURE deta
| --- | --- | --- | --- |
| `network_transaction_id` | `String` | Optional | DEPRECATED. This field is DEPRECATED. Please find the network transaction id data in the 'id' field under the 'network_transaction_reference' object instead of the 'verification' object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1024`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` |
| `date` | `String` | Optional | DEPRECATED. This field is DEPRECATED. Please find the date data in the 'date' field under the 'network_transaction_reference' object instead of the 'verification' object.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` |
-| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
-| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | DEPRECATED. This field is DEPRECATED. Please find the network data in the 'network' field under the 'network_transaction_reference' object instead of the 'verification' object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
+| `time` | `String` | Optional | DEPRECATED. This field is DEPRECATED. Please find the time data in the 'time' field under the 'network_transaction_reference' object instead of the 'verification' object.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `processor_response` | [`CardVerificationProcessorResponse`](../../doc/models/card-verification-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
| `three_d_secure` | `Object` | Optional | DEPRECATED. This field is DEPRECATED. Please find the 3D secure authentication data in the 'three_d_secure' object under the 'authentication_result' object instead of the 'verification' object. |
@@ -25,7 +25,7 @@ Card Verification details including the authorization details and 3D SECURE deta
{
"network_transaction_id": "network_transaction_id4",
"date": "date8",
- "network": "EFTPOS",
+ "network": "ACCEL",
"time": "time2",
"amount": {
"currency_code": "currency_code6",
diff --git a/doc/models/cart-information.md b/doc/models/cart-information.md
new file mode 100644
index 0000000..eacb824
--- /dev/null
+++ b/doc/models/cart-information.md
@@ -0,0 +1,35 @@
+
+# Cart Information
+
+The cart information.
+
+## Structure
+
+`CartInformation`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `item_details` | [`Array[ItemDetails]`](../../doc/models/item-details.md) | Optional | An array of item details.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` |
+| `tax_inclusive` | `TrueClass \| FalseClass` | Optional | Indicates whether the item amount or the shipping amount already includes tax.
**Default**: `false` |
+| `paypal_invoice_id` | `String` | Optional | The ID of the invoice. Appears for only PayPal-generated invoices.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `checkout_option_value` | `String` | Optional | The checkout option value. For example, the checkout option `color` might be `blue` or `red` while the checkout option `texture` might be `smooth` or `rippled`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+
+## Example (as JSON)
+
+```json
+{
+ "checkout_option_name": "checkout_option_name6",
+ "checkout_option_value": "checkout_option_value0"
+}
+```
+
diff --git a/doc/models/cobranded-card.md b/doc/models/cobranded-card.md
index 0f59313..406c555 100644
--- a/doc/models/cobranded-card.md
+++ b/doc/models/cobranded-card.md
@@ -11,7 +11,7 @@ Details about the merchant cobranded card used for order purchase.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `labels` | `Array` | Optional | Array of labels for the cobranded card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `25`, *Minimum Length*: `1`, *Maximum Length*: `256` |
+| `labels` | `Array[String]` | Optional | Array of labels for the cobranded card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `25`, *Minimum Length*: `1`, *Maximum Length*: `256` |
| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. |
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
diff --git a/doc/models/confirm-order-request.md b/doc/models/confirm-order-request.md
index 85f6f68..b728797 100644
--- a/doc/models/confirm-order-request.md
+++ b/doc/models/confirm-order-request.md
@@ -97,7 +97,7 @@ Payer confirms the intent to pay for the Order using the provided payment source
"previous_network_transaction_reference": {
"id": "id6",
"date": "date2",
- "network": "DELTA",
+ "network": "CONFIDIS",
"acquirer_reference_number": "acquirer_reference_number8"
}
}
diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md
new file mode 100644
index 0000000..8e14005
--- /dev/null
+++ b/doc/models/create-subscription-request.md
@@ -0,0 +1,82 @@
+
+# Create Subscription Request
+
+The create subscription request details.
+
+## Structure
+
+`CreateSubscriptionRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `plan_id` | `String` | Required | The ID of the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` |
+| `start_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `quantity` | `String` | Optional | The quantity of the product in the subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32`, *Pattern*: `^([0-9]+\|([0-9]+)?[.][0-9]+)$` |
+| `shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `subscriber` | [`SubscriberRequest`](../../doc/models/subscriber-request.md) | Optional | The subscriber request information . |
+| `auto_renewal` | `TrueClass \| FalseClass` | Optional | DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete.
**Default**: `false` |
+| `application_context` | [`SubscriptionApplicationContext`](../../doc/models/subscription-application-context.md) | Optional | DEPRECATED. The application context, which customizes the payer experience during the subscription approval process with PayPal. |
+| `custom_id` | `String` | Optional | The custom id for the subscription. Can be invoice id.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` |
## Example (as JSON)
@@ -48,7 +48,7 @@ Collection of payment tokens saved for a given customer.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"expiry": "expiry4",
"billing_address": {
"address_line_1": "address_line_12",
@@ -66,6 +66,7 @@ Collection of payment tokens saved for a given customer.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -90,6 +91,7 @@ Collection of payment tokens saved for a given customer.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -112,7 +114,7 @@ Collection of payment tokens saved for a given customer.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
@@ -147,7 +149,7 @@ Collection of payment tokens saved for a given customer.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"expiry": "expiry4",
"billing_address": {
"address_line_1": "address_line_12",
@@ -165,6 +167,7 @@ Collection of payment tokens saved for a given customer.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -189,6 +192,7 @@ Collection of payment tokens saved for a given customer.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -211,7 +215,7 @@ Collection of payment tokens saved for a given customer.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/cycle-execution.md b/doc/models/cycle-execution.md
new file mode 100644
index 0000000..e303a74
--- /dev/null
+++ b/doc/models/cycle-execution.md
@@ -0,0 +1,33 @@
+
+# Cycle Execution
+
+The regular and trial execution details for a billing cycle.
+
+## Structure
+
+`CycleExecution`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `tenure_type` | [`TenureType`](../../doc/models/tenure-type.md) | Required | The type of the billing cycle.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `sequence` | `Integer` | Required | The order in which to run this cycle among other billing cycles.
**Constraints**: `>= 0`, `<= 99` |
+| `cycles_completed` | `Integer` | Required | The number of billing cycles that have completed.
**Constraints**: `>= 0`, `<= 9999` |
+| `cycles_remaining` | `Integer` | Optional | For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite billing cycle, cycles_remaining is set as 0.
**Constraints**: `>= 0`, `<= 9999` |
+| `current_pricing_scheme_version` | `Integer` | Optional | The active pricing scheme version for the billing cycle.
**Constraints**: `>= 1`, `<= 99` |
+| `total_cycles` | `Integer` | Optional | The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).
**Constraints**: `>= 0`, `<= 999` |
+
+## Example (as JSON)
+
+```json
+{
+ "tenure_type": "REGULAR",
+ "sequence": 99,
+ "cycles_completed": 172,
+ "cycles_remaining": 208,
+ "current_pricing_scheme_version": 99,
+ "total_cycles": 60
+}
+```
+
diff --git a/doc/models/default-error-exception.md b/doc/models/default-error-exception.md
new file mode 100644
index 0000000..8af0dc8
--- /dev/null
+++ b/doc/models/default-error-exception.md
@@ -0,0 +1,47 @@
+
+# Default Error Exception
+
+The error details.
+
+## Structure
+
+`DefaultErrorException`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `name` | `String` | Required | The human-readable, unique name of the error. |
+| `message` | `String` | Required | The message that describes the error. |
+| `debug_id` | `String` | Required | The PayPal internal ID. Used for correlation purposes. |
+| `information_link` | `String` | Optional | The information link, or URI, that shows detailed information about this error for the developer. |
+| `details` | [`Array[TransactionSearchErrorDetails]`](../../doc/models/transaction-search-error-details.md) | Optional | An array of additional details about the error. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name2",
+ "message": "message2",
+ "debug_id": "debug_id8",
+ "information_link": "information_link4",
+ "details": [
+ {
+ "field": "field4",
+ "value": "value2",
+ "location": "location4",
+ "issue": "issue6",
+ "description": "description0"
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/error-details.md b/doc/models/error-details.md
index 249f002..e574388 100644
--- a/doc/models/error-details.md
+++ b/doc/models/error-details.md
@@ -15,7 +15,7 @@ The error details. Required for client-side `4XX` errors.
| `value` | `String` | Optional | The value of the field that caused the error. |
| `location` | `String` | Optional | The location of the field that caused the error. Value is `body`, `path`, or `query`.
**Default**: `'body'` |
| `issue` | `String` | Required | The unique, fine-grained application-level error code. |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` |
| `description` | `String` | Optional | The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value. |
## Example (as JSON)
diff --git a/doc/models/error-exception.md b/doc/models/error-exception.md
index fa8252a..db0805c 100644
--- a/doc/models/error-exception.md
+++ b/doc/models/error-exception.md
@@ -14,8 +14,8 @@ The error details.
| `name` | `String` | Required | The human-readable, unique name of the error. |
| `message` | `String` | Required | The message that describes the error. |
| `debug_id` | `String` | Required | The PayPal internal ID. Used for correlation purposes. |
-| `details` | [`Array`](../../doc/models/error-details.md) | Optional | An array of additional details about the error. |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links). |
+| `details` | [`Array[ErrorDetails]`](../../doc/models/error-details.md) | Optional | An array of additional details about the error. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links). |
## Example (as JSON)
diff --git a/doc/models/experience-context-shipping-preference.md b/doc/models/experience-context-shipping-preference.md
new file mode 100644
index 0000000..7faad7c
--- /dev/null
+++ b/doc/models/experience-context-shipping-preference.md
@@ -0,0 +1,17 @@
+
+# Experience Context Shipping Preference
+
+The location from which the shipping address is derived., The shipping preference. This only applies to PayPal payment source., The shipping preference. This only applies to PayPal payment source., The location from which the shipping address is derived.
+
+## Enumeration
+
+`ExperienceContextShippingPreference`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `GET_FROM_FILE` | Get the customer-provided shipping address on the PayPal site. |
+| `NO_SHIPPING` | Redacts the shipping address from the PayPal site. Recommended for digital goods. |
+| `SET_PROVIDED_ADDRESS` | Merchant sends the shipping address using purchase_units.shipping.address. The customer cannot change this address on the PayPal site. |
+
diff --git a/doc/models/experience-context.md b/doc/models/experience-context.md
index 4f4ef91..3b8c240 100644
--- a/doc/models/experience-context.md
+++ b/doc/models/experience-context.md
@@ -13,7 +13,7 @@ Customizes the payer experience during the approval process for the payment.
| --- | --- | --- | --- |
| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` |
-| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `shipping_preference` | [`ExperienceContextShippingPreference`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
| `return_url` | `String` | Optional | Describes the URL. |
| `cancel_url` | `String` | Optional | Describes the URL. |
diff --git a/doc/models/experience-status.md b/doc/models/experience-status.md
new file mode 100644
index 0000000..65f589a
--- /dev/null
+++ b/doc/models/experience-status.md
@@ -0,0 +1,18 @@
+
+# Experience Status
+
+This field indicates the status of PayPal's Checkout experience throughout the order lifecycle. The values reflect the current stage of the checkout process.
+
+## Enumeration
+
+`ExperienceStatus`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `NOT_STARTED` | PayPal checkout process has not yet begun. |
+| `IN_PROGRESS` | PayPal checkout initiated. User is on the checkout page for order review before approval. |
+| `CANCELED` | PayPal checkout is canceled (by closing the checkout window or clicking cancel) before the order approval. |
+| `APPROVED` | Order is approved. User has completed the checkout process. |
+
diff --git a/doc/models/failed-payment-details.md b/doc/models/failed-payment-details.md
new file mode 100644
index 0000000..1e85469
--- /dev/null
+++ b/doc/models/failed-payment-details.md
@@ -0,0 +1,32 @@
+
+# Failed Payment Details
+
+The details for the failed payment of the subscription.
+
+## Structure
+
+`FailedPaymentDetails`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `time` | `String` | Required | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+| `reason_code` | [`ReasonCode`](../../doc/models/reason-code.md) | Optional | The reason code for the payment failure.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `120`, *Pattern*: `^[A-Z_]+$` |
+| `next_payment_retry_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+
+## Example (as JSON)
+
+```json
+{
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "time": "time6",
+ "reason_code": "TRANSACTION_RECEIVING_LIMIT_EXCEEDED",
+ "next_payment_retry_time": "next_payment_retry_time6"
+}
+```
+
diff --git a/doc/models/frequency.md b/doc/models/frequency.md
new file mode 100644
index 0000000..d46be79
--- /dev/null
+++ b/doc/models/frequency.md
@@ -0,0 +1,25 @@
+
+# Frequency
+
+The frequency of the billing cycle.
+
+## Structure
+
+`Frequency`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `interval_unit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | The interval at which the subscription is charged or billed.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `interval_count` | `Integer` | Optional | The number of intervals after which a subscriber is billed. For example, if the `interval_unit` is `DAY` with an `interval_count` of `2`, the subscription is billed once every two days. The following table lists the maximum allowed values for the `interval_count` for each `interval_unit`: Interval unit Maximum interval count DAY 365 WEEK 52 MONTH 12 YEAR 1
**Default**: `1`
**Constraints**: `>= 1`, `<= 365` |
+
+## Example (as JSON)
+
+```json
+{
+ "interval_unit": "DAY",
+ "interval_count": 1
+}
+```
+
diff --git a/doc/models/google-pay-card-response.md b/doc/models/google-pay-card-response.md
index 9055f9d..5ae74f7 100644
--- a/doc/models/google-pay-card-response.md
+++ b/doc/models/google-pay-card-response.md
@@ -25,7 +25,7 @@ The payment card to use to fund a Google Pay payment response. Can be a credit o
"name": "name4",
"last_digits": "last_digits8",
"type": "DEBIT",
- "brand": "ELECTRON",
+ "brand": "ACCEL",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/google-pay-request-card.md b/doc/models/google-pay-request-card.md
index e86a0e0..2023561 100644
--- a/doc/models/google-pay-request-card.md
+++ b/doc/models/google-pay-request-card.md
@@ -22,7 +22,7 @@ The payment card used to fund a Google Pay payment. Can be a credit or debit car
{
"name": "name8",
"type": "STORE",
- "brand": "DISCOVER",
+ "brand": "CONFIDIS",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/google-pay-request.md b/doc/models/google-pay-request.md
index 886ed39..f6748b2 100644
--- a/doc/models/google-pay-request.md
+++ b/doc/models/google-pay-request.md
@@ -32,7 +32,7 @@ Information needed to pay using Google Pay.
"card": {
"name": "name6",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/google-pay-wallet-response.md b/doc/models/google-pay-wallet-response.md
index e395fb1..87d57a1 100644
--- a/doc/models/google-pay-wallet-response.md
+++ b/doc/models/google-pay-wallet-response.md
@@ -30,7 +30,7 @@ Google Pay Wallet payment data.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/incentive-details.md b/doc/models/incentive-details.md
new file mode 100644
index 0000000..963c6b8
--- /dev/null
+++ b/doc/models/incentive-details.md
@@ -0,0 +1,32 @@
+
+# Incentive Details
+
+The incentive details.
+
+## Structure
+
+`IncentiveDetails`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `incentive_type` | `String` | Optional | The type of incentive, such as a special offer or coupon.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `incentive_code` | `String` | Optional | The code that identifies an incentive, such as a coupon.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `incentive_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `incentive_program_code` | `String` | Optional | The incentive program code that identifies a merchant loyalty or incentive program.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `item_options` | `String` | Optional | The item options. Describes option choices on the purchase of the item in some detail.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `item_quantity` | `String` | Optional | The number of purchased units of goods or a service.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `item_unit_price` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `item_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `adjustment_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `gift_wrap_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `tax_percentage` | `String` | Optional | The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99`.
**Constraints**: *Pattern*: `^((-?[0-9]+)\|(-?([0-9]+)?[.][0-9]+))$` |
+| `tax_amounts` | [`Array[TaxAmount]`](../../doc/models/tax-amount.md) | Optional | An array of tax amounts levied by a government on the purchase of goods or services.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` |
+| `basic_shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `extra_shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `handling_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `insurance_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `total_item_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `invoice_number` | `String` | Optional | The invoice number. An alphanumeric string that identifies a billing for a merchant.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` |
+| `checkout_options` | [`Array[CheckoutOption]`](../../doc/models/checkout-option.md) | Optional | An array of checkout options. Each option has a name and value.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` |
+
+## Example (as JSON)
+
+```json
+{
+ "item_code": "item_code4",
+ "item_name": "item_name2",
+ "item_description": "item_description0",
+ "item_options": "item_options4",
+ "item_quantity": "item_quantity4"
+}
+```
+
diff --git a/doc/models/item-request.md b/doc/models/item-request.md
new file mode 100644
index 0000000..b2c6c13
--- /dev/null
+++ b/doc/models/item-request.md
@@ -0,0 +1,46 @@
+
+# Item Request
+
+The details for the items to be purchased.
+
+## Structure
+
+`ItemRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `name` | `String` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
+| `unit_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `tax` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `quantity` | `String` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` |
+| `description` | `String` | Optional | This field supports up to 4000 characters, but any content beyond 2048 characters (including spaces) will be truncated. The 2048 character limit is reflected in the response representation of this field.
**Constraints**: *Maximum Length*: `4000` |
+| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` |
+| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` |
+| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` |
+| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. |
+| `billing_plan` | [`OrderBillingPlan`](../../doc/models/order-billing-plan.md) | Optional | Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method token or billing agreement creation. |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name0",
+ "unit_amount": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ },
+ "tax": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "quantity": "quantity6",
+ "description": "description0",
+ "sku": "sku6",
+ "url": "url4",
+ "category": "DIGITAL_GOODS"
+}
+```
+
diff --git a/doc/models/item.md b/doc/models/item.md
index c9b41e7..6af8a75 100644
--- a/doc/models/item.md
+++ b/doc/models/item.md
@@ -19,7 +19,7 @@ The details for the items to be purchased.
| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` |
| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` |
-| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` |
+| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)(\?.*)?$` |
| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. |
| `billing_plan` | [`OrderBillingPlan`](../../doc/models/order-billing-plan.md) | Optional | Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method token or billing agreement creation. |
diff --git a/doc/models/last-payment-details.md b/doc/models/last-payment-details.md
new file mode 100644
index 0000000..1ca974c
--- /dev/null
+++ b/doc/models/last-payment-details.md
@@ -0,0 +1,26 @@
+
+# Last Payment Details
+
+## Structure
+
+`LastPaymentDetails`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
+
+## Example (as JSON)
+
+```json
+{
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "time": "time0"
+}
+```
+
diff --git a/doc/models/level-3-card-processing-data.md b/doc/models/level-3-card-processing-data.md
index bba025a..92e0005 100644
--- a/doc/models/level-3-card-processing-data.md
+++ b/doc/models/level-3-card-processing-data.md
@@ -16,7 +16,7 @@ The level 3 card processing data collections, If your merchant account has been
| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `shipping_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
| `ships_from_postal_code` | `String` | Optional | Use this field to specify the postal code of the shipping location.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` |
-| `line_items` | [`Array`](../../doc/models/line-item.md) | Optional | A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `100` |
+| `line_items` | [`Array[LineItem]`](../../doc/models/line-item.md) | Optional | A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `100` |
## Example (as JSON)
diff --git a/doc/models/line-item.md b/doc/models/line-item.md
index ce2e434..392fd62 100644
--- a/doc/models/line-item.md
+++ b/doc/models/line-item.md
@@ -16,7 +16,7 @@ The line items for this purchase. If your merchant account has been configured f
| `description` | `String` | Optional | The detailed item description.
**Constraints**: *Maximum Length*: `2048` |
| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` |
| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` |
-| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` |
+| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)(\?.*)?$` |
| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. |
| `billing_plan` | [`OrderBillingPlan`](../../doc/models/order-billing-plan.md) | Optional | Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method token or billing agreement creation. |
| `unit_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
diff --git a/doc/models/link-http-method.md b/doc/models/link-http-method.md
index 0d9087f..4e22f23 100644
--- a/doc/models/link-http-method.md
+++ b/doc/models/link-http-method.md
@@ -9,14 +9,14 @@ The HTTP method required to make the related call.
## Fields
-| Name |
-| --- |
-| `GET` |
-| `POST` |
-| `PUT` |
-| `DELETE` |
-| `HEAD` |
-| `CONNECT` |
-| `OPTIONS` |
-| `PATCH` |
+| Name | Description |
+| --- | --- |
+| `GET` | The HTTP GET method. |
+| `POST` | The HTTP POST method. |
+| `PUT` | The HTTP PUT method. |
+| `DELETE` | The HTTP DELETE method. |
+| `HEAD` | The HTTP HEAD method. |
+| `CONNECT` | The HTTP CONNECT method. |
+| `OPTIONS` | The HTTP OPTIONS method. |
+| `PATCH` | The HTTP PATCH method. |
diff --git a/doc/models/merchant-preferences.md b/doc/models/merchant-preferences.md
new file mode 100644
index 0000000..fd11119
--- /dev/null
+++ b/doc/models/merchant-preferences.md
@@ -0,0 +1,25 @@
+
+# Merchant Preferences
+
+The merchant preferences for a subscription.
+
+## Structure
+
+`MerchantPreferences`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `return_url` | `String` | Optional | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` |
+| `cancel_url` | `String` | Optional | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` |
+
+## Example (as JSON)
+
+```json
+{
+ "return_url": "return_url8",
+ "cancel_url": "cancel_url0"
+}
+```
+
diff --git a/doc/models/mobile-return-flow.md b/doc/models/mobile-return-flow.md
new file mode 100644
index 0000000..4236a9b
--- /dev/null
+++ b/doc/models/mobile-return-flow.md
@@ -0,0 +1,16 @@
+
+# Mobile Return Flow
+
+Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the PayPal App.
+
+## Enumeration
+
+`MobileReturnFlow`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `AUTO` | After payment approval in the PayPal App, buyer will automatically be redirected to the merchant website. |
+| `MANUAL` | After payment approval in the PayPal App, buyer will be asked to manually navigate back to the merchant website where they started the transaction from. The buyer is shown a message like 'Return to Merchant' to return to the source where the transaction actually started. |
+
diff --git a/doc/models/mobile-web-context.md b/doc/models/mobile-web-context.md
new file mode 100644
index 0000000..ebe04d8
--- /dev/null
+++ b/doc/models/mobile-web-context.md
@@ -0,0 +1,25 @@
+
+# Mobile Web Context
+
+Buyer's mobile web browser context to app switch to the PayPal consumer app.
+
+## Structure
+
+`MobileWebContext`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `return_flow` | [`MobileReturnFlow`](../../doc/models/mobile-return-flow.md) | Optional | Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the PayPal App.
**Default**: `MobileReturnFlow::AUTO`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `6`, *Pattern*: `^[A-Z_]+$` |
+| `buyer_user_agent` | `String` | Optional | User agent from the request originating from the buyer's device. This will be used to identify the buyer's operating system and browser versions. NOTE: Merchants must not alter or modify the buyer's device user agent.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `512`, *Pattern*: `^.*$` |
+
+## Example (as JSON)
+
+```json
+{
+ "return_flow": "AUTO",
+ "buyer_user_agent": "buyer_user_agent8"
+}
+```
+
diff --git a/doc/models/modify-subscription-request.md b/doc/models/modify-subscription-request.md
new file mode 100644
index 0000000..b6dfa65
--- /dev/null
+++ b/doc/models/modify-subscription-request.md
@@ -0,0 +1,66 @@
+
+# Modify Subscription Request
+
+The request to update the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount` and `shipping_address` values for the subscription. This type of update requires the buyer's consent.
+
+## Structure
+
+`ModifySubscriptionRequest`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `plan_id` | `String` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` |
+| `quantity` | `String` | Optional | The quantity of the product or service in the subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32`, *Pattern*: `^([0-9]+\|([0-9]+)?[.][0-9]+)$` |
+| `shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `shipping_address` | [`ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. |
+| `application_context` | [`SubscriptionPatchApplicationContext`](../../doc/models/subscription-patch-application-context.md) | Optional | The application context, which customizes the payer experience during the subscription approval process with PayPal. |
+| `plan` | [`PlanOverride`](../../doc/models/plan-override.md) | Optional | An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object. |
+
+## Example (as JSON)
+
+```json
+{
+ "plan_id": "plan_id6",
+ "quantity": "quantity0",
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "shipping_address": {
+ "name": {
+ "full_name": "full_name6"
+ },
+ "email_address": "email_address8",
+ "phone_number": {
+ "country_code": "country_code2",
+ "national_number": "national_number6"
+ },
+ "type": "PICKUP_IN_STORE",
+ "options": [
+ {
+ "id": "id2",
+ "label": "label2",
+ "type": "SHIPPING",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "selected": false
+ }
+ ]
+ },
+ "application_context": {
+ "brand_name": "brand_name8",
+ "locale": "locale2",
+ "shipping_preference": "SET_PROVIDED_ADDRESS",
+ "payment_method": {
+ "payee_preferred": "UNRESTRICTED"
+ },
+ "return_url": "return_url0",
+ "cancel_url": "cancel_url2"
+ }
+}
+```
+
diff --git a/doc/models/modify-subscription-response.md b/doc/models/modify-subscription-response.md
new file mode 100644
index 0000000..c21f966
--- /dev/null
+++ b/doc/models/modify-subscription-response.md
@@ -0,0 +1,152 @@
+
+# Modify Subscription Response
+
+The response to a request to update the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount` and `shipping_address` values for the subscription. This type of update requires the buyer's consent.
+
+## Structure
+
+`ModifySubscriptionResponse`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `plan_id` | `String` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` |
+| `quantity` | `String` | Optional | The quantity of the product or service in the subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `7`, *Pattern*: `^[A-Z_]+$` |
+| `os_version` | `String` | Optional | Operating System version of the device that the buyer is using.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^.*$` |
+
+## Example (as JSON)
+
+```json
+{
+ "os_type": "ANDROID",
+ "os_version": "os_version0"
+}
+```
+
diff --git a/doc/models/network-transaction-reference-entity.md b/doc/models/network-transaction-reference-entity.md
index 0cc8328..98c27cd 100644
--- a/doc/models/network-transaction-reference-entity.md
+++ b/doc/models/network-transaction-reference-entity.md
@@ -22,7 +22,7 @@ Previous network transaction reference including id and network.
{
"id": "id6",
"date": "date2",
- "network": "SYNCHRONY",
+ "network": "CONFIDIS",
"time": "time6"
}
```
diff --git a/doc/models/network-transaction-reference.md b/doc/models/network-transaction.md
similarity index 74%
rename from doc/models/network-transaction-reference.md
rename to doc/models/network-transaction.md
index a156fc7..7370a74 100644
--- a/doc/models/network-transaction-reference.md
+++ b/doc/models/network-transaction.md
@@ -1,18 +1,18 @@
-# Network Transaction Reference
+# Network Transaction
Reference values used by the card network to identify a transaction.
## Structure
-`NetworkTransactionReference`
+`NetworkTransaction`
## Fields
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Required | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` |
-| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` |
+| `id` | `String` | Optional | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` |
+| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date". For some specific networks, such as MasterCard and Discover, this date field is mandatory when the `previous_network_transaction_reference_id` is passed.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` |
| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
| `acquirer_reference_number` | `String` | Optional | Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9]+$` |
@@ -20,10 +20,10 @@ Reference values used by the card network to identify a transaction.
```json
{
- "id": "id6",
- "date": "date8",
- "network": "ELECTRON",
- "acquirer_reference_number": "acquirer_reference_number2"
+ "id": "id0",
+ "date": "date4",
+ "network": "CETELEM",
+ "acquirer_reference_number": "acquirer_reference_number8"
}
```
diff --git a/doc/models/order-application-context-shipping-preference.md b/doc/models/order-application-context-shipping-preference.md
index 62f08d8..407668d 100644
--- a/doc/models/order-application-context-shipping-preference.md
+++ b/doc/models/order-application-context-shipping-preference.md
@@ -1,7 +1,7 @@
# Order Application Context Shipping Preference
-DEPRECATED. DEPRECATED. The shipping preference: Displays the shipping address to the customer. Enables the customer to choose an address on the PayPal site. Restricts the customer from changing the address during the payment-approval process. . The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object., The shipping preference. This only applies to PayPal payment source., The shipping preference. This only applies to PayPal payment source.
+DEPRECATED. DEPRECATED. The shipping preference: Displays the shipping address to the customer. Enables the customer to choose an address on the PayPal site. Restricts the customer from changing the address during the payment-approval process. . The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object.
## Enumeration
diff --git a/doc/models/order-application-context.md b/doc/models/order-application-context.md
index 0489f34..0d3b2cd 100644
--- a/doc/models/order-application-context.md
+++ b/doc/models/order-application-context.md
@@ -12,14 +12,14 @@ Customizes the payer experience during the approval process for the payment with
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `brand_name` | `String` | Optional | DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
-| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` |
+| `locale` | `String` | Optional | DEPRECATED. The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.locale`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` |
| `landing_page` | [`OrderApplicationContextLandingPage`](../../doc/models/order-application-context-landing-page.md) | Optional | DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` |
| `shipping_preference` | [`OrderApplicationContextShippingPreference`](../../doc/models/order-application-context-shipping-preference.md) | Optional | DEPRECATED. DEPRECATED. The shipping preference: Displays the shipping address to the customer. Enables the customer to choose an address on the PayPal site. Restricts the customer from changing the address during the payment-approval process. . The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[0-9A-Z_]+$` |
| `user_action` | [`OrderApplicationContextUserAction`](../../doc/models/order-application-context-user-action.md) | Optional | DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` |
-| `payment_method` | [`PaymentMethodPreference`](../../doc/models/payment-method-preference.md) | Optional | The customer and merchant payment preferences. |
+| `payment_method` | [`PaymentMethodPreference`](../../doc/models/payment-method-preference.md) | Optional | DEPRECATED. The customer and merchant payment preferences. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.payment_method_selected`). Please specify this field in the `experience_context` object instead of the `application_context` object.. |
| `return_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. |
| `cancel_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. |
-| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility: `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request. |
+| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | DEPRECATED. Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility: `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request. . The fields in `stored_payment_source` are now available in the `stored_credential` object under the `payment_source` which supports them (eg. `payment_source.card.stored_credential.payment_initiator`). Please specify this field in the `payment_source` object instead of the `application_context` object. |
## Example (as JSON)
diff --git a/doc/models/order-authorize-request-payment-source.md b/doc/models/order-authorize-request-payment-source.md
index be11470..3834c7b 100644
--- a/doc/models/order-authorize-request-payment-source.md
+++ b/doc/models/order-authorize-request-payment-source.md
@@ -71,7 +71,7 @@ The payment source definition.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id6",
@@ -94,7 +94,7 @@ The payment source definition.
"card": {
"name": "name6",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-authorize-request.md b/doc/models/order-authorize-request.md
index b3f39c8..331a5ca 100644
--- a/doc/models/order-authorize-request.md
+++ b/doc/models/order-authorize-request.md
@@ -67,7 +67,7 @@ The authorization of an order request.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id6",
@@ -90,7 +90,7 @@ The authorization of an order request.
"card": {
"name": "name6",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-authorize-response-payment-source.md b/doc/models/order-authorize-response-payment-source.md
index 05812b1..94a9e35 100644
--- a/doc/models/order-authorize-response-payment-source.md
+++ b/doc/models/order-authorize-response-payment-source.md
@@ -24,9 +24,9 @@ The payment source used to fund the payment.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"available_networks": [
- "SYNCHRONY"
+ "DELTA"
],
"type": "UNKNOWN"
},
@@ -60,7 +60,7 @@ The payment source used to fund the payment.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-authorize-response.md b/doc/models/order-authorize-response.md
index 18a3f6d..1109ca4 100644
--- a/doc/models/order-authorize-response.md
+++ b/doc/models/order-authorize-response.md
@@ -1,6 +1,8 @@
# Order Authorize Response
+The order authorize response.
+
## Structure
`OrderAuthorizeResponse`
@@ -14,10 +16,10 @@
| `id` | `String` | Optional | The ID of the order. |
| `payment_source` | [`OrderAuthorizeResponsePaymentSource`](../../doc/models/order-authorize-response-payment-source.md) | Optional | The payment source used to fund the payment. |
| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. |
-| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - |
-| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
+| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | The customer who approves and pays for the order. The customer is also known as the payer. |
+| `purchase_units` | [`Array[PurchaseUnit]`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. |
## Example (as JSON)
@@ -30,9 +32,9 @@
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"available_networks": [
- "SYNCHRONY"
+ "DELTA"
],
"type": "UNKNOWN"
},
@@ -66,7 +68,7 @@
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-billing-plan.md b/doc/models/order-billing-plan.md
index bdb2b07..34ac242 100644
--- a/doc/models/order-billing-plan.md
+++ b/doc/models/order-billing-plan.md
@@ -11,7 +11,7 @@ Metadata for merchant-managed recurring billing plans. Valid only during the sav
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `billing_cycles` | [`Array`](../../doc/models/billing-cycle.md) | Required | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `3` |
+| `billing_cycles` | [`Array[BillingCycle]`](../../doc/models/billing-cycle.md) | Required | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `3` |
| `setup_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `name` | `String` | Optional | Name of the recurring plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[A-Za-z0-9() +',.:-]+$` |
@@ -35,10 +35,6 @@ Metadata for merchant-managed recurring billing plans. Valid only during the sav
"value": "value6"
}
},
- "frequency": {
- "key1": "val1",
- "key2": "val2"
- },
"start_date": "start_date6"
}
],
diff --git a/doc/models/order-capture-request-payment-source.md b/doc/models/order-capture-request-payment-source.md
index d07fbf8..4fde855 100644
--- a/doc/models/order-capture-request-payment-source.md
+++ b/doc/models/order-capture-request-payment-source.md
@@ -71,7 +71,7 @@ The payment source definition.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id6",
@@ -94,7 +94,7 @@ The payment source definition.
"card": {
"name": "name6",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-capture-request.md b/doc/models/order-capture-request.md
index 9fedad1..0c73415 100644
--- a/doc/models/order-capture-request.md
+++ b/doc/models/order-capture-request.md
@@ -67,7 +67,7 @@ Completes an capture payment for an order.
"name": "name4",
"number": "number2",
"expiry": "expiry2",
- "card_type": "CB_NATIONALE",
+ "card_type": "VISA",
"type": "UNKNOWN"
},
"device_manufacturer_id": "device_manufacturer_id6",
@@ -90,7 +90,7 @@ Completes an capture payment for an order.
"card": {
"name": "name6",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/order-confirm-application-context.md b/doc/models/order-confirm-application-context.md
index 62f8022..e7d28e7 100644
--- a/doc/models/order-confirm-application-context.md
+++ b/doc/models/order-confirm-application-context.md
@@ -32,7 +32,7 @@ Customizes the payer confirmation experience.
"previous_network_transaction_reference": {
"id": "id6",
"date": "date2",
- "network": "DELTA",
+ "network": "CONFIDIS",
"acquirer_reference_number": "acquirer_reference_number8"
}
}
diff --git a/doc/models/order-request.md b/doc/models/order-request.md
index e7a0b68..38d81d0 100644
--- a/doc/models/order-request.md
+++ b/doc/models/order-request.md
@@ -12,8 +12,8 @@ The order request details.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Required | The intent to either capture payment immediately or authorize a payment for an order after order creation. |
-| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - |
-| `purchase_units` | [`Array`](../../doc/models/purchase-unit-request.md) | Required | An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
+| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | DEPRECATED. The customer is also known as the payer. The Payer object was intended to only be used with the `payment_source.paypal` object. In order to make this design more clear, the details in the `payer` object are now available under `payment_source.paypal`. Please use `payment_source.paypal`. |
+| `purchase_units` | [`Array[PurchaseUnitRequest]`](../../doc/models/purchase-unit-request.md) | Required | An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
| `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Optional | The payment source definition. |
| `application_context` | [`OrderApplicationContext`](../../doc/models/order-application-context.md) | Optional | Customizes the payer experience during the approval process for the payment with PayPal. Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values. |
diff --git a/doc/models/order-tracker-request.md b/doc/models/order-tracker-request.md
index 5167b0c..99fbb36 100644
--- a/doc/models/order-tracker-request.md
+++ b/doc/models/order-tracker-request.md
@@ -16,7 +16,7 @@ The tracking details of an order.
| `carrier_name_other` | `String` | Optional | The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[a-zA-Z0-9]*$` |
| `notify_payer` | `TrueClass \| FalseClass` | Optional | If true, PayPal will send an email notification to the payer of the PayPal transaction. The email contains the tracking details provided through the Orders tracking API request. Independent of any value passed for `notify_payer`, the payer may receive tracking notifications within the PayPal app, based on the user's notification preferences.
**Default**: `false` |
-| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. |
+| `items` | [`Array[OrderTrackerItem]`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. |
## Example (as JSON)
@@ -25,7 +25,7 @@ The tracking details of an order.
"capture_id": "capture_id0",
"notify_payer": false,
"tracking_number": "tracking_number6",
- "carrier": "LEADER",
+ "carrier": "ZELERIS",
"carrier_name_other": "carrier_name_other0",
"items": [
{
diff --git a/doc/models/order-tracker-response.md b/doc/models/order-tracker-response.md
index faf3695..9c53676 100644
--- a/doc/models/order-tracker-response.md
+++ b/doc/models/order-tracker-response.md
@@ -13,8 +13,8 @@ The tracking response on creation of tracker.
| --- | --- | --- | --- |
| `id` | `String` | Optional | The tracker id. |
| `status` | [`OrderTrackerStatus`](../../doc/models/order-tracker-status.md) | Optional | The status of the item shipment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9A-Z_]+$` |
-| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. |
+| `items` | [`Array[OrderTrackerItem]`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
diff --git a/doc/models/order-update-callback-error-response-details.md b/doc/models/order-update-callback-error-response-details.md
deleted file mode 100644
index dc396f7..0000000
--- a/doc/models/order-update-callback-error-response-details.md
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# Order Update Callback Error Response Details
-
-The error details. Required for client-side `4XX` errors.
-
-## Structure
-
-`OrderUpdateCallbackErrorResponseDetails`
-
-## Fields
-
-| Name | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `field` | `String` | Optional | The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors.
**Constraints**: *Minimum Length*: `0`, *Maximum Length*: `256`, *Pattern*: `^.*$` |
-| `value` | `String` | Optional | The value of the field that caused the error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` |
-| `message` | `String` | Optional | The message that describes the error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^.*$` |
-| `details` | [`Array`](../../doc/models/order-update-callback-error-response-details.md) | Optional | An array of additional details about the error.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `100` |
-
-## Example (as JSON)
-
-```json
-{
- "name": "name2",
- "message": "message8",
- "details": [
- {
- "field": "field4",
- "value": "value2",
- "issue": "issue6"
- },
- {
- "field": "field4",
- "value": "value2",
- "issue": "issue6"
- }
- ]
-}
-```
-
diff --git a/doc/models/order-update-callback-request.md b/doc/models/order-update-callback-request.md
deleted file mode 100644
index 2c4fd6f..0000000
--- a/doc/models/order-update-callback-request.md
+++ /dev/null
@@ -1,115 +0,0 @@
-
-# Order Update Callback Request
-
-Shipping Options Callback request. This will be implemented by the merchants.
-
-## Structure
-
-`OrderUpdateCallbackRequest`
-
-## Fields
-
-| Name | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `id` | `String` | Optional | The ID of the order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9-]+$` |
-| `shipping_address` | [`OrderUpdateCallbackShippingAddress`](../../doc/models/order-update-callback-shipping-address.md) | Required | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
-| `shipping_option` | [`OrderUpdateCallbackShippingOption`](../../doc/models/order-update-callback-shipping-option.md) | Optional | The options that the payee or merchant offers to the payer to ship or pick up their items. |
-| `purchase_units` | [`Array`](../../doc/models/purchase-unit-request.md) | Required | An array of purchase units. At present only 1 purchase_unit is supported. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
**Constraints**: *Maximum Length*: `120` |
-| `admin_area_1` | `String` | Optional | The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is: UK. A county. US. A state. Canada. A province. Japan. A prefecture. Switzerland. A *kanton*.
**Constraints**: *Maximum Length*: `300` |
-| `postal_code` | `String` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` |
-| `country_code` | `String` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region. Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` |
-
-## Example (as JSON)
-
-```json
-{
- "admin_area_2": "admin_area_26",
- "admin_area_1": "admin_area_16",
- "postal_code": "postal_code2",
- "country_code": "country_code0"
-}
-```
-
diff --git a/doc/models/order-update-callback-shipping-option.md b/doc/models/order-update-callback-shipping-option.md
deleted file mode 100644
index dfa4570..0000000
--- a/doc/models/order-update-callback-shipping-option.md
+++ /dev/null
@@ -1,32 +0,0 @@
-
-# Order Update Callback Shipping Option
-
-The options that the payee or merchant offers to the payer to ship or pick up their items.
-
-## Structure
-
-`OrderUpdateCallbackShippingOption`
-
-## Fields
-
-| Name | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `id` | `String` | Required | A unique ID that identifies a payer-selected shipping option.
**Constraints**: *Maximum Length*: `127` |
-| `label` | `String` | Required | A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale.
**Constraints**: *Maximum Length*: `127` |
-| `type` | [`ShippingType`](../../doc/models/shipping-type.md) | Optional | A classification for the method of purchase fulfillment. |
-| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
-
-## Example (as JSON)
-
-```json
-{
- "id": "id8",
- "label": "label8",
- "type": "SHIPPING",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- }
-}
-```
-
diff --git a/doc/models/order.md b/doc/models/order.md
index e4caa83..3574097 100644
--- a/doc/models/order.md
+++ b/doc/models/order.md
@@ -16,10 +16,10 @@ The order details.
| `id` | `String` | Optional | The ID of the order. |
| `payment_source` | [`PaymentSourceResponse`](../../doc/models/payment-source-response.md) | Optional | The payment source used to fund the payment. |
| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. |
-| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - |
-| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
+| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | DEPRECATED. The customer is also known as the payer. The Payer object was intended to only be used with the `payment_source.paypal` object. In order to make this design more clear, the details in the `payer` object are now available under `payment_source.paypal`. Please use `payment_source.paypal`. |
+| `purchase_units` | [`Array[PurchaseUnit]`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. |
## Example (as JSON)
@@ -32,9 +32,9 @@ The order details.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"available_networks": [
- "SYNCHRONY"
+ "DELTA"
],
"type": "UNKNOWN"
},
diff --git a/doc/models/orders-capture.md b/doc/models/orders-capture.md
index 4ebbf23..7fc2fe7 100644
--- a/doc/models/orders-capture.md
+++ b/doc/models/orders-capture.md
@@ -17,12 +17,12 @@ A captured payment.
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` |
| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. |
| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
diff --git a/doc/models/os-type.md b/doc/models/os-type.md
new file mode 100644
index 0000000..75d9fb7
--- /dev/null
+++ b/doc/models/os-type.md
@@ -0,0 +1,17 @@
+
+# Os Type
+
+Operating System type of the device that the buyer is using.
+
+## Enumeration
+
+`OsType`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `ANDROID` | Google Android OS. |
+| `IOS` | Apple OS typically found in Apple mobile devices. |
+| `OTHER` | Any other OS type. |
+
diff --git a/doc/models/payer-information.md b/doc/models/payer-information.md
new file mode 100644
index 0000000..9d8ffbf
--- /dev/null
+++ b/doc/models/payer-information.md
@@ -0,0 +1,38 @@
+
+# Payer Information
+
+The payer information.
+
+## Structure
+
+`PayerInformation`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `account_id` | `String` | Optional | The PayPal` customer account ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[a-zA-Z0-9]*$` |
+| `email_address` | `String` | Optional | The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^.+@[^"\-].+$` |
+| `phone_number` | [`Phone`](../../doc/models/phone.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). |
+| `address_status` | `String` | Optional | The address status of the payer. Value is either: Y. Verified. N. Not verified.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1`, *Pattern*: `^[N\|Y]$` |
+| `payer_status` | `String` | Optional | The status of the payer. Value is `Y` or `N`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1`, *Pattern*: `^[N\|Y]$` |
+| `payer_name` | [`PayerName`](../../doc/models/payer-name.md) | Optional | The name of the party. |
+| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/docs/integration/direct/rest/country-codes/) that identifies the country or region. Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` |
+| `address` | [`SimplePostalAddressCoarseGrained`](../../doc/models/simple-postal-address-coarse-grained.md) | Optional | A simple postal address with coarse-grained fields. Do not use for an international address. Use for backward compatibility only. Does not contain phone. |
+
+## Example (as JSON)
+
+```json
+{
+ "account_id": "account_id6",
+ "email_address": "email_address2",
+ "phone_number": {
+ "country_code": "country_code2",
+ "national_number": "national_number6",
+ "extension_number": "extension_number8"
+ },
+ "address_status": "address_status2",
+ "payer_status": "payer_status8"
+}
+```
+
diff --git a/doc/models/payer-name.md b/doc/models/payer-name.md
new file mode 100644
index 0000000..202fce3
--- /dev/null
+++ b/doc/models/payer-name.md
@@ -0,0 +1,33 @@
+
+# Payer Name
+
+The name of the party.
+
+## Structure
+
+`PayerName`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `prefix` | `String` | Optional | The prefix, or title, to the party's name.
**Constraints**: *Maximum Length*: `140` |
+| `given_name` | `String` | Optional | When the party is a person, the party's given, or first, name.
**Constraints**: *Maximum Length*: `140` |
+| `surname` | `String` | Optional | When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.
**Constraints**: *Maximum Length*: `140` |
+| `middle_name` | `String` | Optional | When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name.
**Constraints**: *Maximum Length*: `140` |
+| `suffix` | `String` | Optional | The suffix for the party's name.
**Constraints**: *Maximum Length*: `140` |
+| `alternate_full_name` | `String` | Optional | DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business.
**Constraints**: *Maximum Length*: `300` |
+| `full_name` | `String` | Optional | When the party is a person, the party's full name.
**Constraints**: *Maximum Length*: `300` |
+
+## Example (as JSON)
+
+```json
+{
+ "prefix": "prefix4",
+ "given_name": "given_name8",
+ "surname": "surname8",
+ "middle_name": "middle_name6",
+ "suffix": "suffix6"
+}
+```
+
diff --git a/doc/models/payer.md b/doc/models/payer.md
index 097fbc6..6119ec7 100644
--- a/doc/models/payer.md
+++ b/doc/models/payer.md
@@ -1,6 +1,8 @@
# Payer
+The customer who approves and pays for the order. The customer is also known as the payer.
+
## Structure
`Payer`
diff --git a/doc/models/payment-authorization.md b/doc/models/payment-authorization.md
index bc86870..0c3051f 100644
--- a/doc/models/payment-authorization.md
+++ b/doc/models/payment-authorization.md
@@ -17,10 +17,10 @@ The authorized payment transaction.
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. |
diff --git a/doc/models/payment-collection.md b/doc/models/payment-collection.md
index 534416e..f2ef89b 100644
--- a/doc/models/payment-collection.md
+++ b/doc/models/payment-collection.md
@@ -11,9 +11,9 @@ The collection of payments, or transactions, for a purchase unit in an order. Fo
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `authorizations` | [`Array`](../../doc/models/authorization-with-additional-data.md) | Optional | An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments. |
-| `captures` | [`Array`](../../doc/models/orders-capture.md) | Optional | An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments. |
-| `refunds` | [`Array`](../../doc/models/refund.md) | Optional | An array of refunds for a purchase unit. A purchase unit can have zero or more refunds. |
+| `authorizations` | [`Array[AuthorizationWithAdditionalData]`](../../doc/models/authorization-with-additional-data.md) | Optional | An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments. |
+| `captures` | [`Array[OrdersCapture]`](../../doc/models/orders-capture.md) | Optional | An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments. |
+| `refunds` | [`Array[Refund]`](../../doc/models/refund.md) | Optional | An array of refunds for a purchase unit. A purchase unit can have zero or more refunds. |
## Example (as JSON)
diff --git a/doc/models/payment-instruction.md b/doc/models/payment-instruction.md
index ab77459..cc1f53e 100644
--- a/doc/models/payment-instruction.md
+++ b/doc/models/payment-instruction.md
@@ -11,7 +11,7 @@ Any additional payment instructions to be consider during payment processing. Th
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` |
+| `platform_fees` | [`Array[PlatformFee]`](../../doc/models/platform-fee.md) | Optional | An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` |
| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` |
| `payee_pricing_tier_id` | `String` | Optional | This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^.*$` |
| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
+
+## Example (as JSON)
+
+```json
+{
+ "payee_preferred": "UNRESTRICTED"
+}
+```
+
diff --git a/doc/models/payment-preferences-override.md b/doc/models/payment-preferences-override.md
new file mode 100644
index 0000000..1541a42
--- /dev/null
+++ b/doc/models/payment-preferences-override.md
@@ -0,0 +1,32 @@
+
+# Payment Preferences Override
+
+The payment preferences to override at subscription level.
+
+## Structure
+
+`PaymentPreferencesOverride`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `auto_bill_outstanding` | `TrueClass \| FalseClass` | Optional | Indicates whether to automatically bill the outstanding amount in the next billing cycle. |
+| `setup_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `setup_fee_failure_action` | [`SetupFeeFailureAction`](../../doc/models/setup-fee-failure-action.md) | Optional | The action to take on the subscription if the initial payment for the setup fails.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `payment_failure_threshold` | `Integer` | Optional | The maximum number of payment failures before a subscription is suspended. For example, if `payment_failure_threshold` is `2`, the subscription automatically updates to the `SUSPEND` state if two consecutive payments fail.
**Constraints**: `>= 0`, `<= 999` |
+
+## Example (as JSON)
+
+```json
+{
+ "auto_bill_outstanding": false,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "setup_fee_failure_action": "CONTINUE",
+ "payment_failure_threshold": 80
+}
+```
+
diff --git a/doc/models/payment-preferences.md b/doc/models/payment-preferences.md
new file mode 100644
index 0000000..1d4532c
--- /dev/null
+++ b/doc/models/payment-preferences.md
@@ -0,0 +1,32 @@
+
+# Payment Preferences
+
+The payment preferences for a subscription.
+
+## Structure
+
+`PaymentPreferences`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `auto_bill_outstanding` | `TrueClass \| FalseClass` | Optional | Indicates whether to automatically bill the outstanding amount in the next billing cycle.
**Default**: `true` |
+| `setup_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
+| `setup_fee_failure_action` | [`SetupFeeFailureAction`](../../doc/models/setup-fee-failure-action.md) | Optional | The action to take on the subscription if the initial payment for the setup fails.
**Default**: `SetupFeeFailureAction::CANCEL`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `payment_failure_threshold` | `Integer` | Optional | The maximum number of payment failures before a subscription is suspended. For example, if `payment_failure_threshold` is `2`, the subscription automatically updates to the `SUSPEND` state if two consecutive payments fail.
**Default**: `0`
**Constraints**: `>= 0`, `<= 999` |
+
+## Example (as JSON)
+
+```json
+{
+ "auto_bill_outstanding": true,
+ "setup_fee_failure_action": "CANCEL",
+ "payment_failure_threshold": 0,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ }
+}
+```
+
diff --git a/doc/models/payment-source-response.md b/doc/models/payment-source-response.md
index 0dfa97c..e413435 100644
--- a/doc/models/payment-source-response.md
+++ b/doc/models/payment-source-response.md
@@ -33,9 +33,9 @@ The payment source used to fund the payment.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"available_networks": [
- "SYNCHRONY"
+ "DELTA"
],
"type": "UNKNOWN"
},
diff --git a/doc/models/payment-token-request-card.md b/doc/models/payment-token-request-card.md
index d76c688..a069904 100644
--- a/doc/models/payment-token-request-card.md
+++ b/doc/models/payment-token-request-card.md
@@ -26,7 +26,7 @@ A Resource representing a request to vault a Card.
"number": "number8",
"expiry": "expiry2",
"security_code": "security_code6",
- "brand": "EFTPOS"
+ "brand": "HIPER"
}
```
diff --git a/doc/models/payment-token-request-payment-source.md b/doc/models/payment-token-request-payment-source.md
index 1e007b5..b7d8b30 100644
--- a/doc/models/payment-token-request-payment-source.md
+++ b/doc/models/payment-token-request-payment-source.md
@@ -23,7 +23,7 @@ The payment method to vault with the instrument details.
"number": "number6",
"expiry": "expiry4",
"security_code": "security_code8",
- "brand": "RUPAY"
+ "brand": "CB_NATIONALE"
},
"token": {
"id": "id6",
diff --git a/doc/models/payment-token-request.md b/doc/models/payment-token-request.md
index 4b90441..6354de7 100644
--- a/doc/models/payment-token-request.md
+++ b/doc/models/payment-token-request.md
@@ -28,7 +28,7 @@ Payment Token Request where the `source` defines the type of instrument to be st
"number": "number6",
"expiry": "expiry4",
"security_code": "security_code8",
- "brand": "RUPAY"
+ "brand": "CB_NATIONALE"
},
"token": {
"id": "id6",
diff --git a/doc/models/payment-token-response-payment-source.md b/doc/models/payment-token-response-payment-source.md
index 0842cc8..c6d9d42 100644
--- a/doc/models/payment-token-response-payment-source.md
+++ b/doc/models/payment-token-response-payment-source.md
@@ -12,8 +12,8 @@ The vaulted payment method details.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `card` | [`CardPaymentTokenEntity`](../../doc/models/card-payment-token-entity.md) | Optional | Full representation of a Card Payment Token including network token. |
-| `paypal` | [`PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | - |
-| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - |
+| `paypal` | [`PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | Full representation of a PayPal Payment Token. |
+| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | Full representation of a Venmo Payment Token. |
| `apple_pay` | [`ApplePayPaymentToken`](../../doc/models/apple-pay-payment-token.md) | Optional | A resource representing a response for Apple Pay. |
## Example (as JSON)
@@ -23,7 +23,7 @@ The vaulted payment method details.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"expiry": "expiry4",
"billing_address": {
"address_line_1": "address_line_12",
@@ -41,6 +41,7 @@ The vaulted payment method details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -65,6 +66,7 @@ The vaulted payment method details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -87,7 +89,7 @@ The vaulted payment method details.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/payment-token-response.md b/doc/models/payment-token-response.md
index 5fab227..daebd40 100644
--- a/doc/models/payment-token-response.md
+++ b/doc/models/payment-token-response.md
@@ -11,10 +11,10 @@ Full representation of a saved payment token.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `id` | `String` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
+| `id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` |
| `customer` | [`CustomerResponse`](../../doc/models/customer-response.md) | Optional | Customer in merchant's or partner's system of records. |
| `payment_source` | [`PaymentTokenResponsePaymentSource`](../../doc/models/payment-token-response-payment-source.md) | Optional | The vaulted payment method details. |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` |
## Example (as JSON)
@@ -29,7 +29,7 @@ Full representation of a saved payment token.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"expiry": "expiry4",
"billing_address": {
"address_line_1": "address_line_12",
@@ -47,6 +47,7 @@ Full representation of a saved payment token.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -71,6 +72,7 @@ Full representation of a saved payment token.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -93,7 +95,7 @@ Full representation of a saved payment token.
"name": "name6",
"last_digits": "last_digits0",
"type": "UNKNOWN",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"billing_address": {
"address_line_1": "address_line_12",
"address_line_2": "address_line_28",
diff --git a/doc/models/payment-token-status.md b/doc/models/payment-token-status.md
index d9faa19..6b70b87 100644
--- a/doc/models/payment-token-status.md
+++ b/doc/models/payment-token-status.md
@@ -12,7 +12,7 @@ The status of the payment token.
| Name | Description |
| --- | --- |
| `CREATED` | A setup token is initialized with minimal information, more data must be added to the setup-token to be vaulted |
-| `PAYER_ACTION_REQUIRED` | A contingecy on payer approval is required before the payment method can be saved. |
+| `PAYER_ACTION_REQUIRED` | A contingency on payer approval is required before the payment method can be saved. |
| `APPROVED` | Setup token is ready to be vaulted. If a buyer approval contigency was returned, it is has been approved. |
| `VAULTED` | The payment token has been vaulted. |
| `TOKENIZED` | A vaulted payment method token has been tokenized for short term (one time) use. |
diff --git a/doc/models/payments-capture.md b/doc/models/payments-capture.md
index bc3fac1..24902c0 100644
--- a/doc/models/payments-capture.md
+++ b/doc/models/payments-capture.md
@@ -17,13 +17,13 @@ A captured payment.
| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. |
| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `255` |
-| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. |
+| `network_transaction_reference` | [`NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. |
| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). |
| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` |
| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. |
| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` |
-| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
-| `processor_response` | [`PaymentsProcessorResponse`](../../doc/models/payments-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). |
+| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. |
| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` |
diff --git a/doc/models/payments-payment-advice-code.md b/doc/models/payments-payment-advice-code.md
deleted file mode 100644
index 6e6cc50..0000000
--- a/doc/models/payments-payment-advice-code.md
+++ /dev/null
@@ -1,18 +0,0 @@
-
-# Payments Payment Advice Code
-
-The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes.
-
-## Enumeration
-
-`PaymentsPaymentAdviceCode`
-
-## Fields
-
-| Name | Description |
-| --- | --- |
-| `PAYMENTADVICE_01` | For Mastercard, expired card account upgrade or portfolio sale conversion. Obtain new account information before next billing cycle. |
-| `PAYMENTADVICE_02` | For Mastercard, over credit limit or insufficient funds. Retry the transaction 72 hours later. For Visa, the card holder wants to stop only one specific payment in the recurring payment relationship. The merchant must NOT resubmit the same transaction. The merchant can continue the billing process in the subsequent billing period. |
-| `PAYMENTADVICE_03` | For Mastercard, account closed as fraudulent. Obtain another type of payment from customer due to account being closed or fraud. Possible reason: Account closed as fraudulent. For Visa, the card holder wants to stop all recurring payment transactions for a specific merchant. Stop recurring payment requests. |
-| `PAYMENTADVICE_21` | For Mastercard, the card holder has been unsuccessful at canceling recurring payment through merchant. Stop recurring payment requests. For Visa, all recurring payments were canceled for the card number requested. Stop recurring payment requests. |
-
diff --git a/doc/models/payments-processor-response.md b/doc/models/payments-processor-response.md
deleted file mode 100644
index dc83297..0000000
--- a/doc/models/payments-processor-response.md
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# Payments Processor Response
-
-The processor response information for payment requests, such as direct credit card transactions.
-
-## Structure
-
-`PaymentsProcessorResponse`
-
-## Fields
-
-| Name | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `avs_code` | [`AvsCode`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. |
-| `cvv_code` | [`CvvCode`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. |
-| `response_code` | [`ProcessorResponseCode`](../../doc/models/processor-response-code.md) | Optional | Processor response code for the non-PayPal payment processor errors. |
-| `payment_advice_code` | [`PaymentsPaymentAdviceCode`](../../doc/models/payments-payment-advice-code.md) | Optional | The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes. |
-
-## Example (as JSON)
-
-```json
-{
- "avs_code": "A",
- "cvv_code": "E",
- "response_code": "5150",
- "payment_advice_code": "01"
-}
-```
-
diff --git a/doc/models/paypal-experience-landing-page.md b/doc/models/paypal-experience-landing-page.md
index b0e40f7..1936c28 100644
--- a/doc/models/paypal-experience-landing-page.md
+++ b/doc/models/paypal-experience-landing-page.md
@@ -14,4 +14,5 @@ The type of landing page to show on the PayPal site for customer checkout.
| `LOGIN` | When the customer clicks PayPal Checkout, the customer is redirected to a page to log in to PayPal and approve the payment. |
| `GUEST_CHECKOUT` | When the customer clicks PayPal Checkout, the customer is redirected to a page to enter credit or debit card and other relevant billing information required to complete the purchase. This option has previously been also called as 'BILLING' |
| `NO_PREFERENCE` | When the customer clicks PayPal Checkout, the customer is redirected to either a page to log in to PayPal and approve the payment or to a page to enter credit or debit card and other relevant billing information required to complete the purchase, depending on their previous interaction with PayPal. |
+| `BILLING` | DEPRECATED - please use GUEST_CHECKOUT. All implementations of 'BILLING' will be routed to 'GUEST_CHECKOUT'. When the customer clicks PayPal Checkout, the customer is redirected to a page to enter credit or debit card and other relevant billing information required to complete the purchase. |
diff --git a/doc/models/paypal-payment-token.md b/doc/models/paypal-payment-token.md
index 0436fca..9fe0ab8 100644
--- a/doc/models/paypal-payment-token.md
+++ b/doc/models/paypal-payment-token.md
@@ -1,6 +1,8 @@
# Paypal Payment Token
+Full representation of a PayPal Payment Token.
+
## Structure
`PaypalPaymentToken`
@@ -15,7 +17,7 @@
| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` |
| `usage_type` | [`PaypalPaymentTokenUsageType`](../../doc/models/paypal-payment-token-usage-type.md) | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
| `customer_type` | [`PaypalPaymentTokenCustomerType`](../../doc/models/paypal-payment-token-customer-type.md) | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
-| `email_address` | `String` | Optional | The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: ``(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])`` |
| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` |
| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. |
| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. |
@@ -34,6 +36,7 @@
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/paypal-reference-id-type.md b/doc/models/paypal-reference-id-type.md
new file mode 100644
index 0000000..dacdea4
--- /dev/null
+++ b/doc/models/paypal-reference-id-type.md
@@ -0,0 +1,18 @@
+
+# Paypal Reference Id Type
+
+The PayPal reference ID type.
+
+## Enumeration
+
+`PaypalReferenceIdType`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `ODR` | An order ID. |
+| `TXN` | A transaction ID. |
+| `SUB` | A subscription ID. |
+| `PAP` | A pre-approved payment ID. |
+
diff --git a/doc/models/paypal-wallet-attributes-response.md b/doc/models/paypal-wallet-attributes-response.md
index 00ab55e..a1199c1 100644
--- a/doc/models/paypal-wallet-attributes-response.md
+++ b/doc/models/paypal-wallet-attributes-response.md
@@ -12,7 +12,7 @@ Additional attributes associated with the use of a PayPal Wallet.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `vault` | [`PaypalWalletVaultResponse`](../../doc/models/paypal-wallet-vault-response.md) | Optional | The details about a saved PayPal Wallet payment source. |
-| `cobranded_cards` | [`Array`](../../doc/models/cobranded-card.md) | Optional | An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `25` |
+| `cobranded_cards` | [`Array[CobrandedCard]`](../../doc/models/cobranded-card.md) | Optional | An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `25` |
## Example (as JSON)
diff --git a/doc/models/paypal-wallet-attributes.md b/doc/models/paypal-wallet-attributes.md
index b9270f5..9542d29 100644
--- a/doc/models/paypal-wallet-attributes.md
+++ b/doc/models/paypal-wallet-attributes.md
@@ -12,7 +12,7 @@ Additional attributes associated with the use of this PayPal Wallet.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `customer` | [`PaypalWalletCustomerRequest`](../../doc/models/paypal-wallet-customer-request.md) | Optional | - |
-| `vault` | [`PaypalWalletVaultInstruction`](../../doc/models/paypal-wallet-vault-instruction.md) | Optional | - |
+| `vault` | [`PaypalWalletVaultInstruction`](../../doc/models/paypal-wallet-vault-instruction.md) | Optional | Resource consolidating common request and response attributes for vaulting PayPal Wallet. |
## Example (as JSON)
@@ -34,7 +34,6 @@ Additional attributes associated with the use of this PayPal Wallet.
"merchant_customer_id": "merchant_customer_id2"
},
"vault": {
- "store_in_vault": "ON_SUCCESS",
"description": "description6",
"usage_pattern": "THRESHOLD_PREPAID",
"usage_type": "MERCHANT",
diff --git a/doc/models/paypal-wallet-experience-context.md b/doc/models/paypal-wallet-experience-context.md
index ac52d58..6db65ae 100644
--- a/doc/models/paypal-wallet-experience-context.md
+++ b/doc/models/paypal-wallet-experience-context.md
@@ -17,6 +17,7 @@ Customizes the payer experience during the approval process for payment with Pay
| `contact_preference` | [`PaypalWalletContactPreference`](../../doc/models/paypal-wallet-contact-preference.md) | Optional | The preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
| `return_url` | `String` | Optional | Describes the URL. |
| `cancel_url` | `String` | Optional | Describes the URL. |
+| `app_switch_context` | [`AppSwitchContext`](../../doc/models/app-switch-context.md) | Optional | Merchant provided details of the native app or mobile web browser to facilitate buyer's app switch to the PayPal consumer app. |
| `landing_page` | [`PaypalExperienceLandingPage`](../../doc/models/paypal-experience-landing-page.md) | Optional | The type of landing page to show on the PayPal site for customer checkout.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
diff --git a/doc/models/paypal-wallet-response.md b/doc/models/paypal-wallet-response.md
index 40d570d..fadbe5b 100644
--- a/doc/models/paypal-wallet-response.md
+++ b/doc/models/paypal-wallet-response.md
@@ -23,6 +23,7 @@ The PayPal Wallet response.
| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). |
| `attributes` | [`PaypalWalletAttributesResponse`](../../doc/models/paypal-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a PayPal Wallet. |
| `stored_credential` | [`PaypalWalletStoredCredential`](../../doc/models/paypal-wallet-stored-credential.md) | Optional | Provides additional details to process a payment using the PayPal wallet billing agreement or a vaulted payment method that has been stored or is intended to be stored. |
+| `experience_status` | [`ExperienceStatus`](../../doc/models/experience-status.md) | Optional | This field indicates the status of PayPal's Checkout experience throughout the order lifecycle. The values reflect the current stage of the checkout process.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` |
## Example (as JSON)
diff --git a/doc/models/paypal-wallet-stored-credential.md b/doc/models/paypal-wallet-stored-credential.md
index eae7be0..feab88a 100644
--- a/doc/models/paypal-wallet-stored-credential.md
+++ b/doc/models/paypal-wallet-stored-credential.md
@@ -12,7 +12,7 @@ Provides additional details to process a payment using the PayPal wallet billing
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
-| `charge_pattern` | [`UsagePattern`](../../doc/models/usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30`, *Pattern*: `^[A-Z0-9_]+$` |
+| `charge_pattern` | [`UsagePattern`](../../doc/models/usage-pattern.md) | Optional | DEPRECATED. Expected business/pricing model for the billing agreement, Please use usage_pattern instead.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30`, *Pattern*: `^[A-Z0-9_]+$` |
| `usage_pattern` | [`UsagePattern`](../../doc/models/usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30`, *Pattern*: `^[A-Z0-9_]+$` |
| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
diff --git a/doc/models/paypal-wallet-vault-instruction.md b/doc/models/paypal-wallet-vault-instruction.md
index dbb0390..b7368b0 100644
--- a/doc/models/paypal-wallet-vault-instruction.md
+++ b/doc/models/paypal-wallet-vault-instruction.md
@@ -1,6 +1,8 @@
# Paypal Wallet Vault Instruction
+Resource consolidating common request and response attributes for vaulting PayPal Wallet.
+
## Structure
`PaypalWalletVaultInstruction`
@@ -9,7 +11,6 @@
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
-| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Optional | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
| `description` | `String` | Optional | The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` |
| `usage_pattern` | [`UsagePattern`](../../doc/models/usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` |
| `usage_type` | [`PaypalPaymentTokenUsageType`](../../doc/models/paypal-payment-token-usage-type.md) | Required | The usage type associated with the PayPal payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` |
@@ -23,7 +24,6 @@
"usage_type": "MERCHANT",
"customer_type": "CONSUMER",
"permit_multiple_payment_tokens": false,
- "store_in_vault": "ON_SUCCESS",
"description": "description4",
"usage_pattern": "UNSCHEDULED_PREPAID"
}
diff --git a/doc/models/paypal-wallet-vault-response.md b/doc/models/paypal-wallet-vault-response.md
index 4713670..14706de 100644
--- a/doc/models/paypal-wallet-vault-response.md
+++ b/doc/models/paypal-wallet-vault-response.md
@@ -13,7 +13,7 @@ The details about a saved PayPal Wallet payment source.
| --- | --- | --- | --- |
| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` |
| `customer` | [`PaypalWalletCustomer`](../../doc/models/paypal-wallet-customer.md) | Optional | The details about a customer in PayPal's system of record. |
## Example (as JSON)
diff --git a/doc/models/phone-number-with-country-code.md b/doc/models/phone-number-with-country-code.md
index 2dfdc08..34e7c3d 100644
--- a/doc/models/phone-number-with-country-code.md
+++ b/doc/models/phone-number-with-country-code.md
@@ -1,7 +1,7 @@
# Phone Number With Country Code
-The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)., The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).
+The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)., The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)., The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).
## Structure
diff --git a/doc/models/phone-number-with-optional-country-code.md b/doc/models/phone-number-with-optional-country-code.md
new file mode 100644
index 0000000..cfa5c07
--- /dev/null
+++ b/doc/models/phone-number-with-optional-country-code.md
@@ -0,0 +1,25 @@
+
+# Phone Number With Optional Country Code
+
+The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).
+
+## Structure
+
+`PhoneNumberWithOptionalCountryCode`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `country_code` | `String` | Optional | The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3`, *Pattern*: `^[0-9]{1,3}?$` |
+| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` |
+
+## Example (as JSON)
+
+```json
+{
+ "country_code": "country_code6",
+ "national_number": "national_number0"
+}
+```
+
diff --git a/doc/models/phone-number.md b/doc/models/phone-number.md
index 1b99ac8..5857391 100644
--- a/doc/models/phone-number.md
+++ b/doc/models/phone-number.md
@@ -1,7 +1,7 @@
# Phone Number
-The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).
+The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)., The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).
## Structure
diff --git a/doc/models/phone-type.md b/doc/models/phone-type.md
index 99bb423..a289eb6 100644
--- a/doc/models/phone-type.md
+++ b/doc/models/phone-type.md
@@ -9,11 +9,11 @@ The phone type.
## Fields
-| Name |
-| --- |
-| `FAX` |
-| `HOME` |
-| `MOBILE` |
-| `OTHER` |
-| `PAGER` |
+| Name | Description |
+| --- | --- |
+| `FAX` | Fax number. |
+| `HOME` | Home phone number. |
+| `MOBILE` | Mobile phone number. |
+| `OTHER` | Other phone number. |
+| `PAGER` | Pager number. |
diff --git a/doc/models/plan-collection.md b/doc/models/plan-collection.md
new file mode 100644
index 0000000..6e105ae
--- /dev/null
+++ b/doc/models/plan-collection.md
@@ -0,0 +1,53 @@
+
+# Plan Collection
+
+The list of plans with details.
+
+## Structure
+
+`PlanCollection`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `plans` | [`Array[BillingPlan]`](../../doc/models/billing-plan.md) | Optional | An array of plans.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` |
+| `total_items` | `Integer` | Optional | The total number of items.
**Constraints**: `>= 0`, `<= 500000000` |
+| `total_pages` | `Integer` | Optional | The total number of pages.
**Constraints**: `>= 0`, `<= 100000000` |
+| `links` | [`Array[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` |
+| `name` | `String` | Optional | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `description` | `String` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `billing_cycles` | [`Array[SubscriptionBillingCycle]`](../../doc/models/subscription-billing-cycle.md) | Optional | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `12` |
+| `payment_preferences` | [`PaymentPreferences`](../../doc/models/payment-preferences.md) | Optional | The payment preferences for a subscription. |
+| `merchant_preferences` | [`MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. |
+| `taxes` | [`Taxes`](../../doc/models/taxes.md) | Optional | The tax details. |
+| `quantity_supported` | `TrueClass \| FalseClass` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` |
+| `name` | `String` | Required | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `status` | [`PlanRequestStatus`](../../doc/models/plan-request-status.md) | Optional | The initial state of the plan. Allowed input values are CREATED and ACTIVE.
**Default**: `PlanRequestStatus::ACTIVE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` |
+| `description` | `String` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` |
+| `billing_cycles` | [`Array[SubscriptionBillingCycle]`](../../doc/models/subscription-billing-cycle.md) | Required | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `12` |
+| `payment_preferences` | [`PaymentPreferences`](../../doc/models/payment-preferences.md) | Required | The payment preferences for a subscription. |
+| `merchant_preferences` | [`MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. |
+| `taxes` | [`Taxes`](../../doc/models/taxes.md) | Optional | The tax details. |
+| `quantity_supported` | `TrueClass \| FalseClass` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `3` |
-| `product` | `Object` | Optional | Product details associated with any one-time product purchase. |
+| `billing_cycles` | [`Array[BillingCycle]`](../../doc/models/billing-cycle.md) | Required | An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `3` |
| `one_time_charges` | [`OneTimeCharge`](../../doc/models/one-time-charge.md) | Required | The one-time charge info at the time of checkout. |
| `name` | `String` | Optional | Name of the recurring plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[A-Za-z0-9() +',.:-]+$` |
@@ -36,10 +35,6 @@ The merchant level Recurring Billing plan metadata for the Billing Agreement.
"value": "value6"
}
},
- "frequency": {
- "key1": "val1",
- "key2": "val2"
- },
"start_date": "start_date6"
}
],
@@ -69,10 +64,6 @@ The merchant level Recurring Billing plan metadata for the Billing Agreement.
"value": "value8"
}
},
- "product": {
- "key1": "val1",
- "key2": "val2"
- },
"name": "name8"
}
```
diff --git a/doc/models/pricing-tier.md b/doc/models/pricing-tier.md
new file mode 100644
index 0000000..bfdc56d
--- /dev/null
+++ b/doc/models/pricing-tier.md
@@ -0,0 +1,30 @@
+
+# Pricing Tier
+
+The pricing tier details.
+
+## Structure
+
+`PricingTier`
+
+## Fields
+
+| Name | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `starting_quantity` | `String` | Required | The starting quantity for the tier.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32`, *Pattern*: `^([0-9]+\|([0-9]+)?[.][0-9]+)$` |
+| `ending_quantity` | `String` | Optional | The ending quantity for the tier. Optional for the last tier.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32`, *Pattern*: `^([0-9]+\|([0-9]+)?[.][0-9]+)$` |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. |
+
+## Example (as JSON)
+
+```json
+{
+ "starting_quantity": "starting_quantity4",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+}
+```
+
diff --git a/doc/models/purchase-unit-request.md b/doc/models/purchase-unit-request.md
index 4498964..134e621 100644
--- a/doc/models/purchase-unit-request.md
+++ b/doc/models/purchase-unit-request.md
@@ -15,11 +15,11 @@ The purchase unit request. Includes required information for the payment contrac
| `amount` | [`AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Required | The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount. The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. |
| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The merchant who receives the funds and fulfills the order. The merchant is also known as the payee. |
| `payment_instruction` | [`PaymentInstruction`](../../doc/models/payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. |
-| `description` | `String` | Optional | The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
+| `description` | `String` | Optional | This field supports up to 3,000 characters, but any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response representation of this field. The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3000` |
| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` |
-| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
-| `soft_descriptor` | `String` | Optional | The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement. If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. For example, if: The PayPal prefix toggle is PAYPAL *. The merchant descriptor in the profile is Janes Gift. The soft descriptor is 800-123-1234. Then, the statement descriptor on the card is PAYPAL * Janes Gift 80.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` |
-| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. |
+| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. invoice_id values are required to be unique within each merchant account by default. Although the uniqueness validation is configurable, disabling this behavior will remove the account's ability to use invoice_id in other APIs as an identifier. It is highly recommended to keep a unique invoice_id for each Order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
+| `soft_descriptor` | `String` | Optional | This field supports up to 127 characters, but any content beyond 22 characters (including spaces) will be truncated. The 22 character limit is reflected in the response representation of this field. The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement. If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. For example, if: The PayPal prefix toggle is PAYPAL *. The merchant descriptor in the profile is Janes Gift. The soft descriptor is 800-123-1234. Then, the statement descriptor on the card is PAYPAL * Janes Gift 80.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1000` |
+| `items` | [`Array[ItemRequest]`](../../doc/models/item-request.md) | Optional | An array of items that the customer purchases from the merchant. |
| `shipping` | [`ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. |
| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. |
diff --git a/doc/models/purchase-unit.md b/doc/models/purchase-unit.md
index b65dfc0..af15450 100644
--- a/doc/models/purchase-unit.md
+++ b/doc/models/purchase-unit.md
@@ -20,11 +20,11 @@ The purchase unit details. Used to capture required information for the payment
| `invoice_id` | `String` | Optional | The API caller-provided external invoice ID for this order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` |
| `id` | `String` | Optional | The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `19` |
| `soft_descriptor` | `String` | Optional | The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters. The soft descriptor supports the following ASCII characters: Alphanumeric characters Dashes Asterisks Periods (.) Spaces For Wallet payments marketplace integrations: The merchant descriptor in the Payment Receiving Preferences must be the marketplace name. You can't use the remaining space to show the customer service number. The remaining spaces can be a combination of seller name and country. For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` |
-| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. |
+| `items` | [`Array[Item]`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. |
| `shipping` | [`ShippingWithTrackingDetails`](../../doc/models/shipping-with-tracking-details.md) | Optional | The order shipping details. |
| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. |
| `payments` | [`PaymentCollection`](../../doc/models/payment-collection.md) | Optional | The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds. |
-| `most_recent_errors` | `Array