diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index e2b0818..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,9 +0,0 @@
-## 1.1.0
-- Added new models to support Apple Pay, Google Pay
-- Expanded models to support additional optional fields
-- Added Proxy support via `ProxyConfigurationBuilder`
-- 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 f7f236c..5546782 100644
--- a/README.md
+++ b/README.md
@@ -5,38 +5,40 @@
### 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
Run the following command to install the package and automatically add the dependency to your composer.json file:
```bash
-composer require "paypal/paypal-server-sdk:1.1.0"
+composer require "paypal/paypal-server-sdk:2.0.0"
```
Or add it to the composer.json file manually as given below:
```json
"require": {
- "paypal/paypal-server-sdk": "1.1.0"
+ "paypal/paypal-server-sdk": "2.0.0"
}
```
You can also view the package at:
-https://packagist.org/packages/paypal/paypal-server-sdk#1.1.0
+https://packagist.org/packages/paypal/paypal-server-sdk#2.0.0
## Initialize the API Client
-**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/client.md)
+**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/client.md)
The following parameters are configurable for the API Client:
@@ -52,13 +54,21 @@ The following parameters are configurable for the API Client:
| retryOnTimeout | `bool` | Whether to retry on request timeout.
*Default*: `true` |
| httpStatusCodesToRetry | `array` | Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524` |
| httpMethodsToRetry | `array` | Http methods to retry against.
*Default*: `'GET', 'PUT'` |
-| loggingConfiguration | [`LoggingConfigurationBuilder`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/logging-configuration-builder.md) | Represents the logging configurations for API calls |
-| proxyConfiguration | [`ProxyConfigurationBuilder`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/proxy-configuration-builder.md) | Represents the proxy configurations for API calls |
-| clientCredentialsAuth | [`ClientCredentialsAuth`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md) | The Credentials Setter for OAuth 2 Client Credentials Grant |
+| loggingConfiguration | [`LoggingConfigurationBuilder`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/logging-configuration-builder.md) | Represents the logging configurations for API calls |
+| proxyConfiguration | [`ProxyConfigurationBuilder`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/proxy-configuration-builder.md) | Represents the proxy configurations for API calls |
+| clientCredentialsAuth | [`ClientCredentialsAuth`](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md) | The Credentials Setter for OAuth 2 Client Credentials Grant |
The API client can be initialized as follows:
```php
+use PaypalServerSdkLib\Logging\LoggingConfigurationBuilder;
+use PaypalServerSdkLib\Logging\RequestLoggingConfigurationBuilder;
+use PaypalServerSdkLib\Logging\ResponseLoggingConfigurationBuilder;
+use Psr\Log\LogLevel;
+use PaypalServerSdkLib\Environment;
+use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
+use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
+
$client = PaypalServerSdkClientBuilder::init()
->clientCredentialsAuthCredentials(
ClientCredentialsAuthCredentialsBuilder::init(
@@ -91,28 +101,30 @@ 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-PHP-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-PHP-Server-SDK/tree/2.0.0/doc/auth/oauth-2-client-credentials-grant.md)
## List of APIs
-* [Orders](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/controllers/orders.md)
-* [Payments](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/controllers/payments.md)
-* [Vault](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/controllers/vault.md)
+* [Transactionsearch](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/controllers/transactionsearch.md)
+* [Orders](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/controllers/orders.md)
+* [Payments](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/controllers/payments.md)
+* [Vault](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/controllers/vault.md)
+* [Subscriptions](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/controllers/subscriptions.md)
## SDK Infrastructure
### Configuration
-* [ProxyConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/proxy-configuration-builder.md)
-* [LoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/logging-configuration-builder.md)
-* [RequestLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/request-logging-configuration-builder.md)
-* [ResponseLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/response-logging-configuration-builder.md)
+* [ProxyConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/proxy-configuration-builder.md)
+* [LoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/logging-configuration-builder.md)
+* [RequestLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/request-logging-configuration-builder.md)
+* [ResponseLoggingConfigurationBuilder](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/response-logging-configuration-builder.md)
### HTTP
-* [HttpRequest](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/http-request.md)
+* [HttpRequest](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/http-request.md)
### Utilities
-* [ApiResponse](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/1.1.0/doc/api-response.md)
+* [ApiResponse](https://www.github.com/paypal/PayPal-PHP-Server-SDK/tree/2.0.0/doc/api-response.md)
diff --git a/composer.json b/composer.json
index a64154a..f3d9c74 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "PayPal's SDK for interacting with the REST APIs",
"type": "library",
"keywords": [],
- "homepage": "https://github.com/paypal/PayPal-PHP-Server-SDK",
+ "homepage": "https://www.apimatic.io",
"license": [
"MIT"
],
diff --git a/doc/auth/oauth-2-client-credentials-grant.md b/doc/auth/oauth-2-client-credentials-grant.md
index 8523a91..14c4c35 100644
--- a/doc/auth/oauth-2-client-credentials-grant.md
+++ b/doc/auth/oauth-2-client-credentials-grant.md
@@ -27,6 +27,9 @@ 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.
```php
+use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
+use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
+
$client = PaypalServerSdkClientBuilder::init()
->clientCredentialsAuthCredentials(
ClientCredentialsAuthCredentialsBuilder::init(
@@ -46,6 +49,9 @@ Your application can also manually provide an OAuthToken using the setter `oAuth
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.
```php
+use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
+use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
+
$client = PaypalServerSdkClientBuilder::init()
->clientCredentialsAuthCredentials(
ClientCredentialsAuthCredentialsBuilder::init(
@@ -68,6 +74,9 @@ $client = PaypalServerSdkClientBuilder::init()
To authorize a client using a stored access token, set up the `oAuthTokenProvider` in `ClientCredentialsAuthCredentialsBuilder` along with the other auth parameters before creating the client:
```php
+use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
+use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
+
$client = PaypalServerSdkClientBuilder::init()
->clientCredentialsAuthCredentials(
ClientCredentialsAuthCredentialsBuilder::init(
diff --git a/doc/client.md b/doc/client.md
index a676205..a5d3a81 100644
--- a/doc/client.md
+++ b/doc/client.md
@@ -22,6 +22,14 @@ The following parameters are configurable for the API Client:
The API client can be initialized as follows:
```php
+use PaypalServerSdkLib\Logging\LoggingConfigurationBuilder;
+use PaypalServerSdkLib\Logging\RequestLoggingConfigurationBuilder;
+use PaypalServerSdkLib\Logging\ResponseLoggingConfigurationBuilder;
+use Psr\Log\LogLevel;
+use PaypalServerSdkLib\Environment;
+use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
+use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
+
$client = PaypalServerSdkClientBuilder::init()
->clientCredentialsAuthCredentials(
ClientCredentialsAuthCredentialsBuilder::init(
@@ -50,5 +58,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
| getOrdersController() | Gets OrdersController |
| getPaymentsController() | Gets PaymentsController |
| getVaultController() | Gets VaultController |
+| getTransactionSearchController() | Gets TransactionSearchController |
+| getSubscriptionsController() | Gets SubscriptionsController |
| getOAuthAuthorizationController() | Gets OAuthAuthorizationController |
diff --git a/doc/controllers/orders.md b/doc/controllers/orders.md
index 93bc239..8c1d962 100644
--- a/doc/controllers/orders.md
+++ b/doc/controllers/orders.md
@@ -12,205 +12,14 @@ $ordersController = $client->getOrdersController();
## 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)
-
-
-# Patch 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. |
purchase_units | replace, add | |
purchase_units[].custom_id | replace, add, remove | |
purchase_units[].description | replace, add, remove | |
purchase_units[].payee.email | replace | |
purchase_units[].shipping.name | replace, add | |
purchase_units[].shipping.email_address | replace, add | |
purchase_units[].shipping.phone_number | replace, add | |
purchase_units[].shipping.options | replace, add | |
purchase_units[].shipping.address | replace, add | |
purchase_units[].shipping.type | replace, add | |
purchase_units[].soft_descriptor | replace, remove | |
purchase_units[].amount | replace | |
purchase_units[].items | replace, add, remove | |
purchase_units[].invoice_id | replace, add, remove | |
purchase_units[].payment_instruction | replace | |
purchase_units[].payment_instruction.disbursement_mode | replace | By default, disbursement_mode is INSTANT. |
purchase_units[].payment_instruction.payee_receivable_fx_rate_id | replace, add, remove | |
purchase_units[].payment_instruction.platform_fees | replace, add, remove | |
purchase_units[].supplementary_data.airline | replace, add, remove | |
purchase_units[].supplementary_data.card | replace, add, remove | |
application_context.client_configuration | replace, add | |
-
-```php
-function patchOrder(array $options): ApiResponse
-```
-
-## 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]+$` |
-| `paypalMockResponse` | `?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. |
-| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `body` | [`?(Patch[])`](../../doc/models/patch.md) | Body, Optional | - |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
-
-## Example Usage
-
-```php
-$collect = [
- 'id' => 'id0',
- 'body' => [
- PatchBuilder::init(
- PatchOp::ADD
- )->build()
- ]
-];
-
-$apiResponse = $ordersController->patchOrder($collect);
-```
-
-## 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) |
-| 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
-
-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.
-
-```php
-function authorizeOrder(array $options): ApiResponse
-```
-
-## 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]+$` |
-| `paypalMockResponse` | `?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. |
-| `paypalRequestId` | `?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=,-]*$` |
-| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
-| `paypalAuthAssertion` | `?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 `getResult()` method on this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'id' => 'id0',
- 'prefer' => 'return=minimal'
-];
-
-$apiResponse = $ordersController->authorizeOrder($collect);
-```
-
-## 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
-
-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.
-
-```php
-function updateOrderTracking(array $options): ApiResponse
-```
-
-## 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]+$` |
-| `trackerId` | `string` | Template, Required | The order tracking ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
-| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-| `body` | [`?(Patch[])`](../../doc/models/patch.md) | Body, Optional | - |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
-
-## Example Usage
-
-```php
-$collect = [
- 'id' => 'id0',
- 'trackerId' => 'tracker_id2',
- 'body' => [
- PatchBuilder::init(
- PatchOp::ADD
- )->build()
- ]
-];
-
-$apiResponse = $ordersController->updateOrderTracking($collect);
-```
-
-## 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) |
-| 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 Tracking
-
-Adds tracking information for an Order.
-
-```php
-function createOrderTracking(array $options): ApiResponse
-```
-
-## 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 | - |
-| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'id' => 'id0',
- 'body' => OrderTrackerRequestBuilder::init(
- 'capture_id8'
- )
- ->notifyPayer(false)
- ->build()
-];
-
-$apiResponse = $ordersController->createOrderTracking($collect);
-```
-
-## 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) |
-| 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) |
+* [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)
# Create Order
@@ -268,6 +77,185 @@ $apiResponse = $ordersController->createOrder($collect);
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+# Get Order
+
+Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2 errors.
+
+```php
+function getOrder(array $options): ApiResponse
+```
+
+## 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]+$` |
+| `paypalMockResponse` | `?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. |
+| `paypalAuthAssertion` | `?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 `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $ordersController->getOrder($collect);
+```
+
+## 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) |
+| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
+| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+
+
+# Patch 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. |
purchase_units | replace, add | |
purchase_units[].custom_id | replace, add, remove | |
purchase_units[].description | replace, add, remove | |
purchase_units[].payee.email | replace | |
purchase_units[].shipping.name | replace, add | |
purchase_units[].shipping.email_address | replace, add | |
purchase_units[].shipping.phone_number | replace, add | |
purchase_units[].shipping.options | replace, add | |
purchase_units[].shipping.address | replace, add | |
purchase_units[].shipping.type | replace, add | |
purchase_units[].soft_descriptor | replace, remove | |
purchase_units[].amount | replace | |
purchase_units[].items | replace, add, remove | |
purchase_units[].invoice_id | replace, add, remove | |
purchase_units[].payment_instruction | replace | |
purchase_units[].payment_instruction.disbursement_mode | replace | By default, disbursement_mode is INSTANT. |
purchase_units[].payment_instruction.payee_receivable_fx_rate_id | replace, add, remove | |
purchase_units[].payment_instruction.platform_fees | replace, add, remove | |
purchase_units[].supplementary_data.airline | replace, add, remove | |
purchase_units[].supplementary_data.card | replace, add, remove | |
application_context.client_configuration | replace, add | |
+
+```php
+function patchOrder(array $options): ApiResponse
+```
+
+## 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]+$` |
+| `paypalMockResponse` | `?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. |
+| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
+| `body` | [`?(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.
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'body' => [
+ PatchBuilder::init(
+ PatchOp::ADD
+ )->build()
+ ]
+];
+
+$apiResponse = $ordersController->patchOrder($collect);
+```
+
+## 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) |
+| 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) |
+
+
+# Confirm Order
+
+Payer confirms their intent to pay for the the Order with the given payment source.
+
+```php
+function confirmOrder(array $options): ApiResponse
+```
+
+## 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]+$` |
+| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `paypalAuthAssertion` | `?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 `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'prefer' => 'return=minimal'
+];
+
+$apiResponse = $ordersController->confirmOrder($collect);
+```
+
+## 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) |
+| 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) |
+| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+
+
+# Authorize 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.
+
+```php
+function authorizeOrder(array $options): ApiResponse
+```
+
+## 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]+$` |
+| `paypalMockResponse` | `?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. |
+| `paypalRequestId` | `?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=,-]*$` |
+| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
+| `paypalAuthAssertion` | `?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 `getResult()` method on this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'prefer' => 'return=minimal'
+];
+
+$apiResponse = $ordersController->authorizeOrder($collect);
+```
+
+## 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) |
+
+
# Capture Order
Captures payment for an order. To successfully capture 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.
@@ -316,63 +304,21 @@ $apiResponse = $ordersController->captureOrder($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.
```php
-function getOrder(array $options): ApiResponse
+function createOrderTracking(array $options): ApiResponse
```
## 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]+$` |
-| `paypalMockResponse` | `?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 | - |
| `paypalAuthAssertion` | `?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 `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'id' => 'id0'
-];
-
-$apiResponse = $ordersController->getOrder($collect);
-```
-
-## 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) |
-| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
-| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-
-
-# Confirm Order
-
-Payer confirms their intent to pay for the the Order with the given payment source.
-
-```php
-function confirmOrder(array $options): ApiResponse
-```
-
-## 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]+$` |
-| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
-| `paypalAuthAssertion` | `?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
@@ -383,10 +329,14 @@ This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The
```php
$collect = [
'id' => 'id0',
- 'prefer' => 'return=minimal'
+ 'body' => OrderTrackerRequestBuilder::init(
+ 'capture_id8'
+ )
+ ->notifyPayer(false)
+ ->build()
];
-$apiResponse = $ordersController->confirmOrder($collect);
+$apiResponse = $ordersController->createOrderTracking($collect);
```
## Errors
@@ -395,6 +345,56 @@ $apiResponse = $ordersController->confirmOrder($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) |
+
+
+# Update Order Tracking
+
+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.
+
+```php
+function updateOrderTracking(array $options): ApiResponse
+```
+
+## 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]+$` |
+| `trackerId` | `string` | Template, Required | The order tracking ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
+| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. |
+| `body` | [`?(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.
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'trackerId' => 'tracker_id2',
+ 'body' => [
+ PatchBuilder::init(
+ PatchOp::ADD
+ )->build()
+ ]
+];
+
+$apiResponse = $ordersController->updateOrderTracking($collect);
+```
+
+## 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) |
+| 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 b8486e3..bad5581 100644
--- a/doc/controllers/payments.md
+++ b/doc/controllers/payments.md
@@ -12,15 +12,56 @@ $paymentsController = $client->getPaymentsController();
## 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)
+# Get Authorized Payment
+
+Shows details for an authorized payment, by ID.
+
+```php
+function getAuthorizedPayment(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `authorizationId` | `string` | Template, Required | The ID of the authorized payment for which to show details. |
+| `paypalMockResponse` | `?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. |
+| `paypalAuthAssertion` | `?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. |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'authorizationId' => 'authorization_id8'
+];
+
+$apiResponse = $paymentsController->getAuthorizedPayment($collect);
+```
+
+## 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) |
+| 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) |
+| 500 | The request failed because an internal server error occurred. | `ApiException` |
+| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+
+
# Capture Authorized Payment
Captures an authorized payment, by ID.
@@ -72,49 +113,9 @@ $apiResponse = $paymentsController->captureAuthorizedPayment($collect);
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Captured Payment
-
-Shows details for a captured payment, by ID.
-
-```php
-function getCapturedPayment(array $options): ApiResponse
-```
-
-## Parameters
-
-| Parameter | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `captureId` | `string` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
-| `paypalMockResponse` | `?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. |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'captureId' => 'capture_id2'
-];
-
-$apiResponse = $paymentsController->getCapturedPayment($collect);
-```
-
-## 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) |
-| 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) |
-| 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.
```php
function reauthorizePayment(array $options): ApiResponse
@@ -151,6 +152,7 @@ $apiResponse = $paymentsController->reauthorizePayment($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` |
@@ -203,6 +205,46 @@ $apiResponse = $paymentsController->voidPayment($collect);
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+# Get Captured Payment
+
+Shows details for a captured payment, by ID.
+
+```php
+function getCapturedPayment(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `captureId` | `string` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
+| `paypalMockResponse` | `?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. |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'captureId' => 'capture_id2'
+];
+
+$apiResponse = $paymentsController->getCapturedPayment($collect);
+```
+
+## 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) |
+| 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) |
+| 500 | The request failed because an internal server error occurred. | `ApiException` |
+| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
+
+
# Refund 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.
@@ -251,46 +293,6 @@ $apiResponse = $paymentsController->refundCapturedPayment($collect);
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
-# Get Authorized Payment
-
-Shows details for an authorized payment, by ID.
-
-```php
-function getAuthorizedPayment(array $options): ApiResponse
-```
-
-## Parameters
-
-| Parameter | Type | Tags | Description |
-| --- | --- | --- | --- |
-| `authorizationId` | `string` | Template, Required | The ID of the authorized payment for which to show details. |
-| `paypalMockResponse` | `?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. |
-| `paypalAuthAssertion` | `?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. |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'authorizationId' => 'authorization_id8'
-];
-
-$apiResponse = $paymentsController->getAuthorizedPayment($collect);
-```
-
-## 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) |
-| 404 | The request failed because the resource does not exist. | [`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 Refund
Shows details for a refund, by ID.
diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md
new file mode 100644
index 0000000..cadc338
--- /dev/null
+++ b/doc/controllers/subscriptions.md
@@ -0,0 +1,795 @@
+# Subscriptions
+
+Use the `/subscriptions` resource to create, update, retrieve, and cancel subscriptions and their associated plans.
+
+```php
+$subscriptionsController = $client->getSubscriptionsController();
+```
+
+## 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.
+
+```php
+function createBillingPlan(array $options): ApiResponse
+```
+
+## 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'` |
+| `paypalRequestId` | `?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 `getResult()` method on this instance returns the response data which is of type [`BillingPlan`](../../doc/models/billing-plan.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'prefer' => 'return=minimal',
+ 'body' => PlanRequestBuilder::init(
+ 'product_id2',
+ 'name6',
+ [
+ SubscriptionBillingCycleBuilder::init(
+ FrequencyBuilder::init(
+ IntervalUnit::DAY
+ )
+ ->intervalCount(1)
+ ->build(),
+ TenureType::REGULAR,
+ 8
+ )
+ ->totalCycles(1)
+ ->build()
+ ],
+ PaymentPreferencesBuilder::init()
+ ->autoBillOutstanding(true)
+ ->setupFeeFailureAction(SetupFeeFailureAction::CANCEL)
+ ->paymentFailureThreshold(0)
+ ->build()
+ )
+ ->status(PlanRequestStatus::ACTIVE)
+ ->quantitySupported(false)
+ ->build()
+];
+
+$apiResponse = $subscriptionsController->createBillingPlan($collect);
+```
+
+## 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.
+
+```php
+function listBillingPlans(array $options): ApiResponse
+```
+
+## 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'` |
+| `productId` | `?string` | Query, Optional | Filters the response by a Product ID.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `50` |
+| `pageSize` | `?int` | Query, Optional | The number of items to return in the response.
**Default**: `10`
**Constraints**: `>= 1`, `<= 20` |
+| `page` | `?int` | 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` |
+| `totalRequired` | `?bool` | 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 `getResult()` method on this instance returns the response data which is of type [`PlanCollection`](../../doc/models/plan-collection.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'prefer' => 'return=minimal',
+ 'pageSize' => 10,
+ 'page' => 1,
+ 'totalRequired' => false
+];
+
+$apiResponse = $subscriptionsController->listBillingPlans($collect);
+```
+
+## 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.
+
+```php
+function getBillingPlan(string $id): ApiResponse
+```
+
+## 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 `getResult()` method on this instance returns the response data which is of type [`BillingPlan`](../../doc/models/billing-plan.md).
+
+## Example Usage
+
+```php
+$id = 'id0';
+
+$apiResponse = $subscriptionsController->getBillingPlan($id);
+```
+
+## 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
+
+```php
+function patchBillingPlan(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the plan. |
+| `body` | [`?(Patch[])`](../../doc/models/patch.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'body' => [
+ PatchBuilder::init(
+ PatchOp::ADD
+ )->build()
+ ]
+];
+
+$apiResponse = $subscriptionsController->patchBillingPlan($collect);
+```
+
+## 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.
+
+```php
+function activateBillingPlan(string $id): ApiResponse
+```
+
+## 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
+
+```php
+$id = 'id0';
+
+$apiResponse = $subscriptionsController->activateBillingPlan($id);
+```
+
+## 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.
+
+```php
+function deactivateBillingPlan(string $id): ApiResponse
+```
+
+## 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
+
+```php
+$id = 'id0';
+
+$apiResponse = $subscriptionsController->deactivateBillingPlan($id);
+```
+
+## 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.
+
+```php
+function updateBillingPlanPricingSchemes(array $options): ApiResponse
+```
+
+## 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
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'body' => UpdatePricingSchemesRequestBuilder::init(
+ [
+ UpdatePricingSchemeBuilder::init(
+ 34,
+ SubscriptionPricingSchemeBuilder::init()->build()
+ )->build()
+ ]
+ )->build()
+];
+
+$apiResponse = $subscriptionsController->updateBillingPlanPricingSchemes($collect);
+```
+
+## 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.
+
+```php
+function createSubscription(array $options): ApiResponse
+```
+
+## 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'` |
+| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 72 hours. |
+| `paypalClientMetadataId` | `?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 `getResult()` method on this instance returns the response data which is of type [`Subscription`](../../doc/models/subscription.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'prefer' => 'return=minimal',
+ 'body' => CreateSubscriptionRequestBuilder::init(
+ 'plan_id8'
+ )
+ ->autoRenewal(false)
+ ->build()
+];
+
+$apiResponse = $subscriptionsController->createSubscription($collect);
+```
+
+## 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.
+
+```php
+function listSubscriptions(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `planIds` | `?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_,]+$` |
+| `createdAfter` | `?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})$` |
+| `createdBefore` | `?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})$` |
+| `statusUpdatedBefore` | `?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})$` |
+| `statusUpdatedAfter` | `?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` |
+| `pageSize` | `?int` | Query, Optional | The number of items to return in the response.
**Default**: `10`
**Constraints**: `>= 1`, `<= 20` |
+| `page` | `?int` | 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`, `<= 10000000` |
+| `customerIds` | `?(string[])` | Query, Optional | Filters the response by comma separated vault customer IDs (FSS subscriptions only).
**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 `getResult()` method on this instance returns the response data which is of type [`SubscriptionCollection`](../../doc/models/subscription-collection.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'pageSize' => 10,
+ 'page' => 1
+];
+
+$apiResponse = $subscriptionsController->listSubscriptions($collect);
+```
+
+## 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.
+
+```php
+function getSubscription(array $options): ApiResponse
+```
+
+## 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 `getResult()` method on this instance returns the response data which is of type [`Subscription`](../../doc/models/subscription.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->getSubscription($collect);
+```
+
+## 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
+
+```php
+function patchSubscription(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID for the subscription. |
+| `body` | [`?(Patch[])`](../../doc/models/patch.md) | Body, Optional | - |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'body' => [
+ PatchBuilder::init(
+ PatchOp::ADD
+ )->build()
+ ]
+];
+
+$apiResponse = $subscriptionsController->patchSubscription($collect);
+```
+
+## 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.
+
+```php
+function reviseSubscription(array $options): ApiResponse
+```
+
+## 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 `getResult()` method on this instance returns the response data which is of type [`ModifySubscriptionResponse`](../../doc/models/modify-subscription-response.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->reviseSubscription($collect);
+```
+
+## 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.
+
+```php
+function suspendSubscription(array $options): ApiResponse
+```
+
+## 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
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->suspendSubscription($collect);
+```
+
+## 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.
+
+```php
+function cancelSubscription(array $options): ApiResponse
+```
+
+## 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
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->cancelSubscription($collect);
+```
+
+## 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.
+
+```php
+function activateSubscription(array $options): ApiResponse
+```
+
+## 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
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->activateSubscription($collect);
+```
+
+## 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.
+
+```php
+function captureSubscription(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the subscription. |
+| `paypalRequestId` | `?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 `getResult()` method on this instance returns the response data which is of type [`?SubscriptionTransactionDetails`](../../doc/models/subscription-transaction-details.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0'
+];
+
+$apiResponse = $subscriptionsController->captureSubscription($collect);
+```
+
+## 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.
+
+```php
+function listSubscriptionTransactions(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `id` | `string` | Template, Required | The ID of the subscription. |
+| `startTime` | `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})$` |
+| `endTime` | `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 `getResult()` method on this instance returns the response data which is of type [`TransactionsList`](../../doc/models/transactions-list.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'id' => 'id0',
+ 'startTime' => 'start_time6',
+ 'endTime' => 'end_time2'
+];
+
+$apiResponse = $subscriptionsController->listSubscriptionTransactions($collect);
+```
+
+## 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..5ae0d8c
--- /dev/null
+++ b/doc/controllers/transactionsearch.md
@@ -0,0 +1,105 @@
+# Transactionsearch
+
+```php
+$transactionsearchController = $client->getTransactionsearchController();
+```
+
+## 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.
+
+```php
+function searchTransactions(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `startDate` | `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})$` |
+| `endDate` | `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})$` |
+| `transactionId` | `?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` |
+| `transactionType` | `?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/). |
+| `transactionStatus` | `?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. |
+| `transactionAmount` | `?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. |
+| `transactionCurrency` | `?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. |
+| `paymentInstrumentType` | `?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. |
+| `storeId` | `?string` | Query, Optional | Filters the transactions in the response by a store ID. |
+| `terminalId` | `?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'` |
+| `balanceAffectingRecordsOnly` | `?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'` |
+| `pageSize` | `?int` | 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` | `?int` | 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 `getResult()` method on this instance returns the response data which is of type [`SearchResponse`](../../doc/models/search-response.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'startDate' => 'start_date6',
+ 'endDate' => 'end_date0',
+ 'fields' => 'transaction_info',
+ 'balanceAffectingRecordsOnly' => 'Y',
+ 'pageSize' => 100,
+ 'page' => 1
+];
+
+$apiResponse = $transactionSearchController->searchTransactions($collect);
+```
+
+## 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.
+
+```php
+function searchBalances(array $options): ApiResponse
+```
+
+## Parameters
+
+| Parameter | Type | Tags | Description |
+| --- | --- | --- | --- |
+| `asOfTime` | `?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})$` |
+| `currencyCode` | `?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 `getResult()` method on this instance returns the response data which is of type [`BalancesResponse`](../../doc/models/balances-response.md).
+
+## Example Usage
+
+```php
+$collect = [];
+
+$apiResponse = $transactionSearchController->searchBalances($collect);
+```
+
+## 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 ddfea2d..0fc0207 100644
--- a/doc/controllers/vault.md
+++ b/doc/controllers/vault.md
@@ -12,124 +12,12 @@ $vaultController = $client->getVaultController();
## 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
-
-Delete the payment token associated with the payment token id.
-
-```php
-function deletePaymentToken(string $id): ApiResponse
-```
-
-## 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_-]+$` |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
-
-## Example Usage
-
-```php
-$id = 'id0';
-
-$apiResponse = $vaultController->deletePaymentToken($id);
-```
-
-## 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) |
-| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
-| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
-
-
-# Create Setup Token
-
-Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
-
-```php
-function createSetupToken(array $options): ApiResponse
-```
-
-## 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. |
-| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
-
-## Example Usage
-
-```php
-$collect = [
- 'body' => SetupTokenRequestBuilder::init(
- SetupTokenRequestPaymentSourceBuilder::init()->build()
- )->build()
-];
-
-$apiResponse = $vaultController->createSetupToken($collect);
-```
-
-## 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) |
-| 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
-
-Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
-
-```php
-function getSetupToken(string $id): ApiResponse
-```
-
-## 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_-]+$` |
-
-## Response Type
-
-This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
-
-## Example Usage
-
-```php
-$id = 'id0';
-
-$apiResponse = $vaultController->getSetupToken($id);
-```
-
-## Errors
-
-| HTTP Status Code | Error Description | Exception Class |
-| --- | --- | --- |
-| 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) |
+* [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
@@ -145,7 +33,7 @@ function createPaymentToken(array $options): ApiResponse
| 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. |
-| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` |
+| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 3 hours.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108`, *Pattern*: `^.*$` |
## Response Type
@@ -252,3 +140,115 @@ $apiResponse = $vaultController->getPaymentToken($id);
| 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) |
+
+# Delete Payment Token
+
+Delete the payment token associated with the payment token id.
+
+```php
+function deletePaymentToken(string $id): ApiResponse
+```
+
+## 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_-]+$` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance.
+
+## Example Usage
+
+```php
+$id = 'id0';
+
+$apiResponse = $vaultController->deletePaymentToken($id);
+```
+
+## 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) |
+| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
+| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
+
+
+# Create Setup Token
+
+Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
+
+```php
+function createSetupToken(array $options): ApiResponse
+```
+
+## 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. |
+| `paypalRequestId` | `?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 `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
+
+## Example Usage
+
+```php
+$collect = [
+ 'body' => SetupTokenRequestBuilder::init(
+ SetupTokenRequestPaymentSourceBuilder::init()->build()
+ )->build()
+];
+
+$apiResponse = $vaultController->createSetupToken($collect);
+```
+
+## 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) |
+| 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
+
+Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
+
+```php
+function getSetupToken(string $id): ApiResponse
+```
+
+## 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_-]+$` |
+
+## Response Type
+
+This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
+
+## Example Usage
+
+```php
+$id = 'id0';
+
+$apiResponse = $vaultController->getSetupToken($id);
+```
+
+## Errors
+
+| HTTP Status Code | Error Description | Exception Class |
+| --- | --- | --- |
+| 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) |
+
diff --git a/doc/models/activate-subscription-request.md b/doc/models/activate-subscription-request.md
new file mode 100644
index 0000000..cdc78c3
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `reason` | `?string` | Optional | The reason for activation of a subscription. Required to reactivate the subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | getReason(): ?string | setReason(?string reason): void |
+
+## Example (as JSON)
+
+```json
+{
+ "reason": "reason4"
+}
+```
+
diff --git a/doc/models/amount-breakdown.md b/doc/models/amount-breakdown.md
index 7fa8fe1..9b55b6e 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
| `taxTotal` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTaxTotal(): ?Money | setTaxTotal(?Money taxTotal): void |
| `insurance` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getInsurance(): ?Money | setInsurance(?Money insurance): void |
| `shippingDiscount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingDiscount(): ?Money | setShippingDiscount(?Money shippingDiscount): void |
-| `discount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getDiscount(): ?Money | setDiscount(?Money discount): void |
+| `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. | getDiscount(): ?Money | setDiscount(?Money discount): void |
## 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..4a830e2
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `nativeApp` | [`?NativeAppContext`](../../doc/models/native-app-context.md) | Optional | Merchant provided, buyer's native app preferences to app switch to the PayPal consumer app. | getNativeApp(): ?NativeAppContext | setNativeApp(?NativeAppContext nativeApp): void |
+| `mobileWeb` | [`?MobileWebContext`](../../doc/models/mobile-web-context.md) | Optional | Buyer's mobile web browser context to app switch to the PayPal consumer app. | getMobileWeb(): ?MobileWebContext | setMobileWeb(?MobileWebContext mobileWeb): void |
+
+## 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 00af889..b102599 100644
--- a/doc/models/apple-pay-card-response.md
+++ b/doc/models/apple-pay-card-response.md
@@ -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 3d64a66..0f1f65e 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 081523f..2f3b88e 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 d0a37ab..bda0234 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..ae092c8
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `type` | [`?string(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_]+$` | getType(): ?string | setType(?string type): void |
+| `brand` | [`?string(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_]+$` | getBrand(): ?string | setBrand(?string brand): void |
+| `billingAddress` | [`?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). | getBillingAddress(): ?Address | setBillingAddress(?Address billingAddress): void |
+
+## 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 8d481b2..f1402aa 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 7cb89cb..5441d2a 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}$` | getName(): ?string | setName(?string name): void |
| `number` | `?string` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | getNumber(): ?string | setNumber(?string number): void |
| `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])$` | getExpiry(): ?string | setExpiry(?string expiry): void |
-| `cardType` | [`?string(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_]+$` | getCardType(): ?string | setCardType(?string cardType): void |
+| `cardType` | [`?string(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_]+$` | getCardType(): ?string | setCardType(?string cardType): void |
| `type` | [`?string(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_]+$` | getType(): ?string | setType(?string type): void |
| `brand` | [`?string(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_]+$` | getBrand(): ?string | setBrand(?string brand): void |
| `billingAddress` | [`?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). | getBillingAddress(): ?Address | setBillingAddress(?Address billingAddress): void |
diff --git a/doc/models/application-context-user-action.md b/doc/models/application-context-user-action.md
new file mode 100644
index 0000000..a0a7730
--- /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..e88b989
--- /dev/null
+++ b/doc/models/auction-information.md
@@ -0,0 +1,29 @@
+
+# Auction Information
+
+The auction information.
+
+## Structure
+
+`AuctionInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `auctionSite` | `?string` | Optional | The name of the auction site.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getAuctionSite(): ?string | setAuctionSite(?string auctionSite): void |
+| `auctionItemSite` | `?string` | Optional | The auction site URL.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getAuctionItemSite(): ?string | setAuctionItemSite(?string auctionItemSite): void |
+| `auctionBuyerId` | `?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_'\-., ":;\!?]*$` | getAuctionBuyerId(): ?string | setAuctionBuyerId(?string auctionBuyerId): void |
+| `auctionClosingDate` | `?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})$` | getAuctionClosingDate(): ?string | setAuctionClosingDate(?string auctionClosingDate): void |
+
+## 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 b9a5020..6907d41 100644
--- a/doc/models/authorization-with-additional-data.md
+++ b/doc/models/authorization-with-additional-data.md
@@ -17,7 +17,7 @@ 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `expirationTime` | `?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})$` | getExpirationTime(): ?string | setExpirationTime(?string expirationTime): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
diff --git a/doc/models/authorization.md b/doc/models/authorization.md
index 7831eb0..8a13513 100644
--- a/doc/models/authorization.md
+++ b/doc/models/authorization.md
@@ -17,7 +17,7 @@ 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `expirationTime` | `?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})$` | getExpirationTime(): ?string | setExpirationTime(?string expirationTime): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
diff --git a/doc/models/balance-information.md b/doc/models/balance-information.md
new file mode 100644
index 0000000..6a99661
--- /dev/null
+++ b/doc/models/balance-information.md
@@ -0,0 +1,40 @@
+
+# Balance Information
+
+The Balance information.
+
+## Structure
+
+`BalanceInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `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` | getCurrency(): string | setCurrency(string currency): void |
+| `primary` | `?bool` | Optional | Optional field representing if the currency is primary currency or not. | getPrimary(): ?bool | setPrimary(?bool primary): void |
+| `totalBalance` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getTotalBalance(): Money | setTotalBalance(Money totalBalance): void |
+| `availableBalance` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAvailableBalance(): ?Money | setAvailableBalance(?Money availableBalance): void |
+| `withheldBalance` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getWithheldBalance(): ?Money | setWithheldBalance(?Money withheldBalance): void |
+
+## 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..a8126ed
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `balances` | [`?(BalanceInformation[])`](../../doc/models/balance-information.md) | Optional | An array of balance detail objects.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `200` | getBalances(): ?array | setBalances(?array balances): void |
+| `accountId` | `?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}$` | getAccountId(): ?string | setAccountId(?string accountId): void |
+| `asOfTime` | `?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})$` | getAsOfTime(): ?string | setAsOfTime(?string asOfTime): void |
+| `lastRefreshTime` | `?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})$` | getLastRefreshTime(): ?string | setLastRefreshTime(?string lastRefreshTime): void |
+
+## 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..eee2d47
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `achDebit` | `mixed` | Optional | A Resource representing a request to vault a ACH Debit. | getAchDebit(): | setAchDebit( achDebit): void |
+| `sepaDebit` | [`?SepaDebitRequest`](../../doc/models/sepa-debit-request.md) | Optional | An API resource denoting a request to securely store a SEPA Debit. | getSepaDebit(): ?SepaDebitRequest | setSepaDebit(?SepaDebitRequest sepaDebit): void |
+
+## 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..946a71b
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `pricingScheme` | [`?SubscriptionPricingScheme`](../../doc/models/subscription-pricing-scheme.md) | Optional | The pricing scheme details. | getPricingScheme(): ?SubscriptionPricingScheme | setPricingScheme(?SubscriptionPricingScheme pricingScheme): void |
+| `sequence` | `int` | 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` | getSequence(): int | setSequence(int sequence): void |
+| `totalCycles` | `?int` | 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` | getTotalCycles(): ?int | setTotalCycles(?int totalCycles): void |
+
+## Example (as JSON)
+
+```json
+{
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 58,
+ "total_cycles": 248
+}
+```
+
diff --git a/doc/models/billing-cycle.md b/doc/models/billing-cycle.md
index a5a001e..2e0fa12 100644
--- a/doc/models/billing-cycle.md
+++ b/doc/models/billing-cycle.md
@@ -13,7 +13,6 @@ The billing cycle providing details of the billing frequency, amount, duration a
| --- | --- | --- | --- | --- | --- |
| `tenureType` | [`string(TenureType)`](../../doc/models/tenure-type.md) | Required | The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted) or regular billing cycle.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getTenureType(): string | setTenureType(string tenureType): void |
| `pricingScheme` | [`?PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | The pricing scheme details. | getPricingScheme(): ?PricingScheme | setPricingScheme(?PricingScheme pricingScheme): void |
-| `frequency` | `mixed` | Optional | The frequency details for this billing cycle. | getFrequency(): | setFrequency( frequency): void |
| `totalCycles` | `?int` | 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` | getTotalCycles(): ?int | setTotalCycles(?int totalCycles): void |
| `sequence` | `?int` | 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` | getSequence(): ?int | setSequence(?int sequence): void |
| `startDate` | `?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])$` | getStartDate(): ?string | setStartDate(?string startDate): void |
@@ -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..fcbac14
--- /dev/null
+++ b/doc/models/billing-plan.md
@@ -0,0 +1,40 @@
+
+# Billing Plan
+
+The plan details.
+
+## Structure
+
+`BillingPlan`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `id` | `?string` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` | getId(): ?string | setId(?string id): void |
+| `productId` | `?string` | Optional | The ID for the product.
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` | getProductId(): ?string | setProductId(?string productId): void |
+| `name` | `?string` | Optional | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getName(): ?string | setName(?string name): void |
+| `status` | [`?string(SubscriptionPlanStatus)`](../../doc/models/subscription-plan-status.md) | Optional | The plan status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getStatus(): ?string | setStatus(?string status): void |
+| `description` | `?string` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getDescription(): ?string | setDescription(?string description): void |
+| `billingCycles` | [`?(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` | getBillingCycles(): ?array | setBillingCycles(?array billingCycles): void |
+| `paymentPreferences` | [`?PaymentPreferences`](../../doc/models/payment-preferences.md) | Optional | The payment preferences for a subscription. | getPaymentPreferences(): ?PaymentPreferences | setPaymentPreferences(?PaymentPreferences paymentPreferences): void |
+| `merchantPreferences` | [`?MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. | getMerchantPreferences(): ?MerchantPreferences | setMerchantPreferences(?MerchantPreferences merchantPreferences): void |
+| `taxes` | [`?Taxes`](../../doc/models/taxes.md) | Optional | The tax details. | getTaxes(): ?Taxes | setTaxes(?Taxes taxes): void |
+| `quantitySupported` | `?bool` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Default**: `false` | getQuantitySupported(): ?bool | setQuantitySupported(?bool quantitySupported): void |
+| `createTime` | `?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})$` | getCreateTime(): ?string | setCreateTime(?string createTime): void |
+| `updateTime` | `?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})$` | getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "quantity_supported": false,
+ "id": "id0",
+ "product_id": "product_id4",
+ "name": "name0",
+ "status": "CREATED",
+ "description": "description0"
+}
+```
+
diff --git a/doc/models/blik-experience-context.md b/doc/models/blik-experience-context.md
index 33b7a1e..cc452a3 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
| --- | --- | --- | --- | --- | --- |
| `brandName` | `?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*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
-| `shippingPreference` | [`?string(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_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
| `returnUrl` | `?string` | Optional | Describes the URL. | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?string` | Optional | Describes the URL. | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
| `consumerIp` | `?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*$` | getConsumerIp(): ?string | setConsumerIp(?string consumerIp): void |
diff --git a/doc/models/cancel-subscription-request.md b/doc/models/cancel-subscription-request.md
new file mode 100644
index 0000000..88d54f8
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `reason` | `string` | Required | The reason for the cancellation of a subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | getReason(): string | setReason(string reason): void |
+
+## Example (as JSON)
+
+```json
+{
+ "reason": "reason8"
+}
+```
+
diff --git a/doc/models/capture-request.md b/doc/models/capture-request.md
index 0eca119..ac6870a 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `invoiceId` | `?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}$` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
-| `noteToPayer` | `?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}$` | getNoteToPayer(): ?string | setNoteToPayer(?string noteToPayer): void |
| `amount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): ?Money | setAmount(?Money amount): void |
+| `invoiceId` | `?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` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `finalCapture` | `?bool` | 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` | getFinalCapture(): ?bool | setFinalCapture(?bool finalCapture): void |
| `paymentInstruction` | [`?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. | getPaymentInstruction(): ?CapturePaymentInstruction | setPaymentInstruction(?CapturePaymentInstruction paymentInstruction): void |
+| `noteToPayer` | `?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` | getNoteToPayer(): ?string | setNoteToPayer(?string noteToPayer): void |
| `softDescriptor` | `?string` | Optional | The payment descriptor on the payer's account statement.
**Constraints**: *Maximum Length*: `22` | getSoftDescriptor(): ?string | setSoftDescriptor(?string softDescriptor): void |
## Example (as JSON)
@@ -21,12 +23,11 @@
```json
{
"final_capture": false,
- "invoice_id": "invoice_id4",
- "note_to_payer": "note_to_payer6",
"amount": {
"currency_code": "currency_code6",
"value": "value0"
},
+ "invoice_id": "invoice_id4",
"payment_instruction": {
"platform_fees": [
{
@@ -62,7 +63,8 @@
],
"disbursement_mode": "INSTANT",
"payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0"
- }
+ },
+ "note_to_payer": "note_to_payer6"
}
```
diff --git a/doc/models/capture-subscription-request.md b/doc/models/capture-subscription-request.md
new file mode 100644
index 0000000..2f6b603
--- /dev/null
+++ b/doc/models/capture-subscription-request.md
@@ -0,0 +1,30 @@
+
+# Capture Subscription Request
+
+The charge amount from the subscriber.
+
+## Structure
+
+`CaptureSubscriptionRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `note` | `string` | Required | The reason or note for the subscription charge.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | getNote(): string | setNote(string note): void |
+| `captureType` | [`string(CaptureType)`](../../doc/models/capture-type.md) | Required | The type of capture.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getCaptureType(): string | setCaptureType(string captureType): void |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): Money | setAmount(Money amount): void |
+
+## 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 ab6b277..567260a 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `finalCapture` | `?bool` | 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` | getFinalCapture(): ?bool | setFinalCapture(?bool finalCapture): void |
| `sellerReceivableBreakdown` | [`?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. | getSellerReceivableBreakdown(): ?SellerReceivableBreakdown | setSellerReceivableBreakdown(?SellerReceivableBreakdown sellerReceivableBreakdown): void |
| `disbursementMode` | [`?string(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_]+$` | getDisbursementMode(): ?string | setDisbursementMode(?string disbursementMode): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
-| `processorResponse` | [`?PaymentsProcessorResponse`](../../doc/models/payments-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | getProcessorResponse(): ?PaymentsProcessorResponse | setProcessorResponse(?PaymentsProcessorResponse processorResponse): void |
+| `processorResponse` | [`?ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | getProcessorResponse(): ?ProcessorResponse | setProcessorResponse(?ProcessorResponse processorResponse): void |
| `createTime` | `?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})$` | getCreateTime(): ?string | setCreateTime(?string createTime): void |
| `updateTime` | `?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})$` | getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
| `supplementaryData` | [`?PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. | getSupplementaryData(): ?PaymentSupplementaryData | setSupplementaryData(?PaymentSupplementaryData supplementaryData): void |
diff --git a/doc/models/card-brand.md b/doc/models/card-brand.md
index 97bdded..05b038f 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..aaf436a
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `id` | `?string` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | getId(): ?string | setId(?string id): void |
+| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
+| `phone` | [`?PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | getPhone(): ?PhoneWithType | setPhone(?PhoneWithType phone): void |
+| `merchantCustomerId` | `?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-_.^*$@#]+$` | getMerchantCustomerId(): ?string | setMerchantCustomerId(?string merchantCustomerId): void |
+
+## 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..7420e4a
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `?string` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` | getName(): ?string | setName(?string name): void |
+| `billingAddress` | [`?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). | getBillingAddress(): ?Address | setBillingAddress(?Address billingAddress): void |
+| `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])$` | getExpiry(): ?string | setExpiry(?string expiry): void |
+| `currencyCode` | `?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` | getCurrencyCode(): ?string | setCurrencyCode(?string currencyCode): void |
+
+## 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 c6cc38c..d062cda 100644
--- a/doc/models/card-response.md
+++ b/doc/models/card-response.md
@@ -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 e621d8b..df37fb5 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
| `paymentInitiator` | [`string(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_]+$` | getPaymentInitiator(): string | setPaymentInitiator(string paymentInitiator): void |
| `paymentType` | [`string(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_]+$` | getPaymentType(): string | setPaymentType(string paymentType): void |
| `usage` | [`?string(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).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getUsage(): ?string | setUsage(?string usage): void |
-| `previousNetworkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getPreviousNetworkTransactionReference(): ?NetworkTransactionReference | setPreviousNetworkTransactionReference(?NetworkTransactionReference previousNetworkTransactionReference): void |
+| `previousNetworkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getPreviousNetworkTransactionReference(): ?NetworkTransaction | setPreviousNetworkTransactionReference(?NetworkTransaction previousNetworkTransactionReference): void |
## 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-verification-details.md b/doc/models/card-verification-details.md
index 77296f3..be1b368 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
| --- | --- | --- | --- | --- | --- |
| `networkTransactionId` | `?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-_@.:&+=*^'~#!$%()]+$` | getNetworkTransactionId(): ?string | setNetworkTransactionId(?string networkTransactionId): void |
| `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]+$` | getDate(): ?string | setDate(?string date): void |
-| `network` | [`?string(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_]+$` | getNetwork(): ?string | setNetwork(?string network): void |
-| `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})$` | getTime(): ?string | setTime(?string time): void |
+| `network` | [`?string(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_]+$` | getNetwork(): ?string | setNetwork(?string network): void |
+| `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})$` | getTime(): ?string | setTime(?string time): void |
| `amount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): ?Money | setAmount(?Money amount): void |
| `processorResponse` | [`?CardVerificationProcessorResponse`](../../doc/models/card-verification-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | getProcessorResponse(): ?CardVerificationProcessorResponse | setProcessorResponse(?CardVerificationProcessorResponse processorResponse): void |
| `threeDSecure` | `mixed` | 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. | getThreeDSecure(): | setThreeDSecure( threeDSecure): void |
@@ -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..195bef3
--- /dev/null
+++ b/doc/models/cart-information.md
@@ -0,0 +1,35 @@
+
+# Cart Information
+
+The cart information.
+
+## Structure
+
+`CartInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `itemDetails` | [`?(ItemDetails[])`](../../doc/models/item-details.md) | Optional | An array of item details.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` | getItemDetails(): ?array | setItemDetails(?array itemDetails): void |
+| `taxInclusive` | `?bool` | Optional | Indicates whether the item amount or the shipping amount already includes tax.
**Default**: `false` | getTaxInclusive(): ?bool | setTaxInclusive(?bool taxInclusive): void |
+| `paypalInvoiceId` | `?string` | Optional | The ID of the invoice. Appears for only PayPal-generated invoices.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getPaypalInvoiceId(): ?string | setPaypalInvoiceId(?string paypalInvoiceId): void |
+
+## Example (as JSON)
+
+```json
+{
+ "tax_inclusive": false,
+ "item_details": [
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ }
+ ],
+ "paypal_invoice_id": "paypal_invoice_id2"
+}
+```
+
diff --git a/doc/models/checkout-option.md b/doc/models/checkout-option.md
new file mode 100644
index 0000000..3404ccf
--- /dev/null
+++ b/doc/models/checkout-option.md
@@ -0,0 +1,25 @@
+
+# Checkout Option
+
+A checkout option as a name-and-value pair.
+
+## Structure
+
+`CheckoutOption`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `checkoutOptionName` | `?string` | Optional | The checkout option name, such as `color` or `texture`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getCheckoutOptionName(): ?string | setCheckoutOptionName(?string checkoutOptionName): void |
+| `checkoutOptionValue` | `?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_'\-., ":;\!?]*$` | getCheckoutOptionValue(): ?string | setCheckoutOptionValue(?string checkoutOptionValue): void |
+
+## Example (as JSON)
+
+```json
+{
+ "checkout_option_name": "checkout_option_name6",
+ "checkout_option_value": "checkout_option_value0"
+}
+```
+
diff --git a/doc/models/confirm-order-request.md b/doc/models/confirm-order-request.md
index f538778..6ca852d 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..30f91d9
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `planId` | `string` | Required | The ID of the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` | getPlanId(): string | setPlanId(string planId): void |
+| `startTime` | `?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})$` | getStartTime(): ?string | setStartTime(?string startTime): void |
+| `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]+)$` | getQuantity(): ?string | setQuantity(?string quantity): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `subscriber` | [`?SubscriberRequest`](../../doc/models/subscriber-request.md) | Optional | The subscriber request information . | getSubscriber(): ?SubscriberRequest | setSubscriber(?SubscriberRequest subscriber): void |
+| `autoRenewal` | `?bool` | Optional | DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete.
**Default**: `false` | getAutoRenewal(): ?bool | setAutoRenewal(?bool autoRenewal): void |
+| `applicationContext` | [`?SubscriptionApplicationContext`](../../doc/models/subscription-application-context.md) | Optional | DEPRECATED. The application context, which customizes the payer experience during the subscription approval process with PayPal. | getApplicationContext(): ?SubscriptionApplicationContext | setApplicationContext(?SubscriptionApplicationContext applicationContext): void |
+| `customId` | `?string` | Optional | The custom id for the subscription. Can be invoice id.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[\x20-\x7E]+` | getCustomId(): ?string | setCustomId(?string customId): void |
+| `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. | getPlan(): ?PlanOverride | setPlan(?PlanOverride plan): void |
+
+## Example (as JSON)
+
+```json
+{
+ "plan_id": "plan_id8",
+ "auto_renewal": false,
+ "start_time": "start_time0",
+ "quantity": "quantity2",
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "subscriber": {
+ "name": {
+ "given_name": "given_name2",
+ "surname": "surname8"
+ },
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "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
+ }
+ ]
+ },
+ "payment_source": {
+ "card": {
+ "name": "name6",
+ "number": "number6",
+ "expiry": "expiry4",
+ "security_code": "security_code8",
+ "type": "UNKNOWN"
+ }
+ }
+ }
+}
+```
+
diff --git a/doc/models/customer-vault-payment-tokens-response.md b/doc/models/customer-vault-payment-tokens-response.md
index 5aa57f8..67bcc75 100644
--- a/doc/models/customer-vault-payment-tokens-response.md
+++ b/doc/models/customer-vault-payment-tokens-response.md
@@ -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..c2a851a
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `tenureType` | [`string(TenureType)`](../../doc/models/tenure-type.md) | Required | The type of the billing cycle.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getTenureType(): string | setTenureType(string tenureType): void |
+| `sequence` | `int` | Required | The order in which to run this cycle among other billing cycles.
**Constraints**: `>= 0`, `<= 99` | getSequence(): int | setSequence(int sequence): void |
+| `cyclesCompleted` | `int` | Required | The number of billing cycles that have completed.
**Constraints**: `>= 0`, `<= 9999` | getCyclesCompleted(): int | setCyclesCompleted(int cyclesCompleted): void |
+| `cyclesRemaining` | `?int` | 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` | getCyclesRemaining(): ?int | setCyclesRemaining(?int cyclesRemaining): void |
+| `currentPricingSchemeVersion` | `?int` | Optional | The active pricing scheme version for the billing cycle.
**Constraints**: `>= 1`, `<= 99` | getCurrentPricingSchemeVersion(): ?int | setCurrentPricingSchemeVersion(?int currentPricingSchemeVersion): void |
+| `totalCycles` | `?int` | 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` | getTotalCycles(): ?int | setTotalCycles(?int totalCycles): void |
+
+## 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..558c274
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `string` | Required | The human-readable, unique name of the error. | getName(): string | setName(string name): void |
+| `message` | `string` | Required | The message that describes the error. | getMessage(): string | setMessage(string message): void |
+| `debugId` | `string` | Required | The PayPal internal ID. Used for correlation purposes. | getDebugId(): string | setDebugId(string debugId): void |
+| `informationLink` | `?string` | Optional | The information link, or URI, that shows detailed information about this error for the developer. | getInformationLink(): ?string | setInformationLink(?string informationLink): void |
+| `details` | [`?(TransactionSearchErrorDetails[])`](../../doc/models/transaction-search-error-details.md) | Optional | An array of additional details about the error. | getDetails(): ?array | setDetails(?array details): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
+
+## 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/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 cb1a60d..3e8f1d2 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.
| --- | --- | --- | --- | --- | --- |
| `brandName` | `?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*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
-| `shippingPreference` | [`?string(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_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
| `returnUrl` | `?string` | Optional | Describes the URL. | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?string` | Optional | Describes the URL. | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
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..28ff05e
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): Money | setAmount(Money amount): void |
+| `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})$` | getTime(): string | setTime(string time): void |
+| `reasonCode` | [`?string(ReasonCode)`](../../doc/models/reason-code.md) | Optional | The reason code for the payment failure.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `120`, *Pattern*: `^[A-Z_]+$` | getReasonCode(): ?string | setReasonCode(?string reasonCode): void |
+| `nextPaymentRetryTime` | `?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})$` | getNextPaymentRetryTime(): ?string | setNextPaymentRetryTime(?string nextPaymentRetryTime): void |
+
+## 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..b4f86b5
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `intervalUnit` | [`string(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_]+$` | getIntervalUnit(): string | setIntervalUnit(string intervalUnit): void |
+| `intervalCount` | `?int` | 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` | getIntervalCount(): ?int | setIntervalCount(?int intervalCount): void |
+
+## 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 13fb90f..ab5c3b0 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 0845b41..a694841 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 6fe302e..e8153ac 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 ba35697..4296688 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..2d305cf
--- /dev/null
+++ b/doc/models/incentive-details.md
@@ -0,0 +1,32 @@
+
+# Incentive Details
+
+The incentive details.
+
+## Structure
+
+`IncentiveDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `incentiveType` | `?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_'\-., ":;\!?]*$` | getIncentiveType(): ?string | setIncentiveType(?string incentiveType): void |
+| `incentiveCode` | `?string` | Optional | The code that identifies an incentive, such as a coupon.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getIncentiveCode(): ?string | setIncentiveCode(?string incentiveCode): void |
+| `incentiveAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getIncentiveAmount(): ?Money | setIncentiveAmount(?Money incentiveAmount): void |
+| `incentiveProgramCode` | `?string` | Optional | The incentive program code that identifies a merchant loyalty or incentive program.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getIncentiveProgramCode(): ?string | setIncentiveProgramCode(?string incentiveProgramCode): void |
+
+## Example (as JSON)
+
+```json
+{
+ "incentive_type": "incentive_type4",
+ "incentive_code": "incentive_code0",
+ "incentive_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "incentive_program_code": "incentive_program_code4"
+}
+```
+
diff --git a/doc/models/incentive-information.md b/doc/models/incentive-information.md
new file mode 100644
index 0000000..2b3ea3a
--- /dev/null
+++ b/doc/models/incentive-information.md
@@ -0,0 +1,51 @@
+
+# Incentive Information
+
+The incentive details.
+
+## Structure
+
+`IncentiveInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `incentiveDetails` | [`?(IncentiveDetails[])`](../../doc/models/incentive-details.md) | Optional | An array of incentive details.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` | getIncentiveDetails(): ?array | setIncentiveDetails(?array incentiveDetails): void |
+
+## Example (as JSON)
+
+```json
+{
+ "incentive_details": [
+ {
+ "incentive_type": "incentive_type4",
+ "incentive_code": "incentive_code0",
+ "incentive_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "incentive_program_code": "incentive_program_code4"
+ },
+ {
+ "incentive_type": "incentive_type4",
+ "incentive_code": "incentive_code0",
+ "incentive_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "incentive_program_code": "incentive_program_code4"
+ },
+ {
+ "incentive_type": "incentive_type4",
+ "incentive_code": "incentive_code0",
+ "incentive_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "incentive_program_code": "incentive_program_code4"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/interval-unit.md b/doc/models/interval-unit.md
new file mode 100644
index 0000000..df7ce04
--- /dev/null
+++ b/doc/models/interval-unit.md
@@ -0,0 +1,18 @@
+
+# Interval Unit
+
+The interval at which the subscription is charged or billed.
+
+## Enumeration
+
+`IntervalUnit`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `DAY` | A daily billing cycle. |
+| `WEEK` | A weekly billing cycle. |
+| `MONTH` | A monthly billing cycle. |
+| `YEAR` | A yearly billing cycle. |
+
diff --git a/doc/models/item-details.md b/doc/models/item-details.md
new file mode 100644
index 0000000..39d0a56
--- /dev/null
+++ b/doc/models/item-details.md
@@ -0,0 +1,45 @@
+
+# Item Details
+
+The item details.
+
+## Structure
+
+`ItemDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `itemCode` | `?string` | Optional | An item code that identifies a merchant's goods or service.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getItemCode(): ?string | setItemCode(?string itemCode): void |
+| `itemName` | `?string` | Optional | The item name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `200`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getItemName(): ?string | setItemName(?string itemName): void |
+| `itemDescription` | `?string` | Optional | The item description.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getItemDescription(): ?string | setItemDescription(?string itemDescription): void |
+| `itemOptions` | `?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_'\-., ":;\!?]*$` | getItemOptions(): ?string | setItemOptions(?string itemOptions): void |
+| `itemQuantity` | `?string` | Optional | The number of purchased units of goods or a service.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getItemQuantity(): ?string | setItemQuantity(?string itemQuantity): void |
+| `itemUnitPrice` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getItemUnitPrice(): ?Money | setItemUnitPrice(?Money itemUnitPrice): void |
+| `itemAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getItemAmount(): ?Money | setItemAmount(?Money itemAmount): void |
+| `discountAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getDiscountAmount(): ?Money | setDiscountAmount(?Money discountAmount): void |
+| `adjustmentAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAdjustmentAmount(): ?Money | setAdjustmentAmount(?Money adjustmentAmount): void |
+| `giftWrapAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getGiftWrapAmount(): ?Money | setGiftWrapAmount(?Money giftWrapAmount): void |
+| `taxPercentage` | `?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]+))$` | getTaxPercentage(): ?string | setTaxPercentage(?string taxPercentage): void |
+| `taxAmounts` | [`?(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` | getTaxAmounts(): ?array | setTaxAmounts(?array taxAmounts): void |
+| `basicShippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getBasicShippingAmount(): ?Money | setBasicShippingAmount(?Money basicShippingAmount): void |
+| `extraShippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getExtraShippingAmount(): ?Money | setExtraShippingAmount(?Money extraShippingAmount): void |
+| `handlingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getHandlingAmount(): ?Money | setHandlingAmount(?Money handlingAmount): void |
+| `insuranceAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getInsuranceAmount(): ?Money | setInsuranceAmount(?Money insuranceAmount): void |
+| `totalItemAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTotalItemAmount(): ?Money | setTotalItemAmount(?Money totalItemAmount): void |
+| `invoiceNumber` | `?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_'\-., ":;\!?]*$` | getInvoiceNumber(): ?string | setInvoiceNumber(?string invoiceNumber): void |
+| `checkoutOptions` | [`?(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` | getCheckoutOptions(): ?array | setCheckoutOptions(?array checkoutOptions): void |
+
+## 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..d8631b0
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `string` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | getName(): string | setName(string name): void |
+| `unitAmount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getUnitAmount(): Money | setUnitAmount(Money unitAmount): void |
+| `tax` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTax(): ?Money | setTax(?Money tax): void |
+| `quantity` | `string` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | getQuantity(): string | setQuantity(string quantity): void |
+| `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` | getDescription(): ?string | setDescription(?string description): void |
+| `sku` | `?string` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | getSku(): ?string | setSku(?string sku): void |
+| `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` | getUrl(): ?string | setUrl(?string url): void |
+| `category` | [`?string(ItemCategory)`](../../doc/models/item-category.md) | Optional | The item category type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` | getCategory(): ?string | setCategory(?string category): void |
+| `imageUrl` | `?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)` | getImageUrl(): ?string | setImageUrl(?string imageUrl): void |
+| `upc` | [`?UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | getUpc(): ?UniversalProductCode | setUpc(?UniversalProductCode upc): void |
+| `billingPlan` | [`?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. | getBillingPlan(): ?OrderBillingPlan | setBillingPlan(?OrderBillingPlan billingPlan): void |
+
+## 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 b1473fc..b1a1fb0 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` | getSku(): ?string | setSku(?string sku): void |
| `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` | getUrl(): ?string | setUrl(?string url): void |
| `category` | [`?string(ItemCategory)`](../../doc/models/item-category.md) | Optional | The item category type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` | getCategory(): ?string | setCategory(?string category): void |
-| `imageUrl` | `?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)` | getImageUrl(): ?string | setImageUrl(?string imageUrl): void |
+| `imageUrl` | `?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)(\?.*)?$` | getImageUrl(): ?string | setImageUrl(?string imageUrl): void |
| `upc` | [`?UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | getUpc(): ?UniversalProductCode | setUpc(?UniversalProductCode upc): void |
| `billingPlan` | [`?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. | getBillingPlan(): ?OrderBillingPlan | setBillingPlan(?OrderBillingPlan billingPlan): void |
diff --git a/doc/models/last-payment-details.md b/doc/models/last-payment-details.md
new file mode 100644
index 0000000..fc17df5
--- /dev/null
+++ b/doc/models/last-payment-details.md
@@ -0,0 +1,26 @@
+
+# Last Payment Details
+
+## Structure
+
+`LastPaymentDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `amount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): ?Money | setAmount(?Money amount): void |
+| `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})$` | getTime(): ?string | setTime(?string time): void |
+
+## Example (as JSON)
+
+```json
+{
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "time": "time0"
+}
+```
+
diff --git a/doc/models/line-item.md b/doc/models/line-item.md
index fe91713..f18336c 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` | getDescription(): ?string | setDescription(?string description): void |
| `sku` | `?string` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | getSku(): ?string | setSku(?string sku): void |
| `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` | getUrl(): ?string | setUrl(?string url): void |
-| `imageUrl` | `?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)` | getImageUrl(): ?string | setImageUrl(?string imageUrl): void |
+| `imageUrl` | `?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)(\?.*)?$` | getImageUrl(): ?string | setImageUrl(?string imageUrl): void |
| `upc` | [`?UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | getUpc(): ?UniversalProductCode | setUpc(?UniversalProductCode upc): void |
| `billingPlan` | [`?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. | getBillingPlan(): ?OrderBillingPlan | setBillingPlan(?OrderBillingPlan billingPlan): void |
| `unitAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getUnitAmount(): ?Money | setUnitAmount(?Money unitAmount): void |
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..d6d60a5
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `returnUrl` | `?string` | Optional | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
+| `cancelUrl` | `?string` | Optional | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
+
+## 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..8fda110
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `returnFlow` | [`?string(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_]+$` | getReturnFlow(): ?string | setReturnFlow(?string returnFlow): void |
+| `buyerUserAgent` | `?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*: `^.*$` | getBuyerUserAgent(): ?string | setBuyerUserAgent(?string buyerUserAgent): void |
+
+## 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..70dad45
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `planId` | `?string` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` | getPlanId(): ?string | setPlanId(?string planId): void |
+| `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]+)$` | getQuantity(): ?string | setQuantity(?string quantity): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `shippingAddress` | [`?ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | getShippingAddress(): ?ShippingDetails | setShippingAddress(?ShippingDetails shippingAddress): void |
+| `applicationContext` | [`?SubscriptionPatchApplicationContext`](../../doc/models/subscription-patch-application-context.md) | Optional | The application context, which customizes the payer experience during the subscription approval process with PayPal. | getApplicationContext(): ?SubscriptionPatchApplicationContext | setApplicationContext(?SubscriptionPatchApplicationContext applicationContext): void |
+| `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. | getPlan(): ?PlanOverride | setPlan(?PlanOverride plan): void |
+
+## 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..089c007
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `planId` | `?string` | Optional | The unique PayPal-generated ID for the plan.
**Constraints**: *Minimum Length*: `26`, *Maximum Length*: `26`, *Pattern*: `^P-[A-Z0-9]*$` | getPlanId(): ?string | setPlanId(?string planId): void |
+| `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]+)$` | getQuantity(): ?string | setQuantity(?string quantity): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `shippingAddress` | [`?ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | getShippingAddress(): ?ShippingDetails | setShippingAddress(?ShippingDetails shippingAddress): void |
+| `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. | getPlan(): ?PlanOverride | setPlan(?PlanOverride plan): void |
+| `planOverridden` | `?bool` | Optional | Indicates whether the subscription has overridden any plan attributes. | getPlanOverridden(): ?bool | setPlanOverridden(?bool planOverridden): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
+
+## 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
+ }
+ ]
+ },
+ "plan": {
+ "billing_cycles": [
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 8,
+ "total_cycles": 198
+ },
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 8,
+ "total_cycles": 198
+ }
+ ],
+ "payment_preferences": {
+ "auto_bill_outstanding": false,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "setup_fee_failure_action": "CONTINUE",
+ "payment_failure_threshold": 104
+ },
+ "taxes": {
+ "percentage": "percentage8",
+ "inclusive": false
+ }
+ }
+}
+```
+
diff --git a/doc/models/native-app-context.md b/doc/models/native-app-context.md
new file mode 100644
index 0000000..9972abc
--- /dev/null
+++ b/doc/models/native-app-context.md
@@ -0,0 +1,25 @@
+
+# Native App Context
+
+Merchant provided, buyer's native app preferences to app switch to the PayPal consumer app.
+
+## Structure
+
+`NativeAppContext`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `osType` | [`?string(OsType)`](../../doc/models/os-type.md) | Optional | Operating System type of the device that the buyer is using.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `7`, *Pattern*: `^[A-Z_]+$` | getOsType(): ?string | setOsType(?string osType): void |
+| `osVersion` | `?string` | Optional | Operating System version of the device that the buyer is using.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^.*$` | getOsVersion(): ?string | setOsVersion(?string osVersion): void |
+
+## 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 d2fcd49..f1e62bd 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 51%
rename from doc/models/network-transaction-reference.md
rename to doc/models/network-transaction.md
index d6fd865..a15e6cc 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `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-_@.:&+=*^'~#!$%()]+$` | getId(): string | setId(string id): void |
-| `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]+$` | getDate(): ?string | setDate(?string date): void |
+| `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-_@.:&+=*^'~#!$%()]+$` | getId(): ?string | setId(?string id): void |
+| `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]+$` | getDate(): ?string | setDate(?string date): void |
| `network` | [`?string(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_]+$` | getNetwork(): ?string | setNetwork(?string network): void |
| `acquirerReferenceNumber` | `?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]+$` | getAcquirerReferenceNumber(): ?string | setAcquirerReferenceNumber(?string acquirerReferenceNumber): void |
@@ -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 b698549..f3ee053 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `brandName` | `?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` | getBrandName(): ?string | setBrandName(?string brandName): void |
-| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
+| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
| `landingPage` | [`?string(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.
**Default**: `OrderApplicationContextLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | getLandingPage(): ?string | setLandingPage(?string landingPage): void |
| `shippingPreference` | [`?string(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.
**Default**: `OrderApplicationContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[0-9A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
| `userAction` | [`?string(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.
**Default**: `OrderApplicationContextUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
-| `paymentMethod` | [`?PaymentMethodPreference`](../../doc/models/payment-method-preference.md) | Optional | The customer and merchant payment preferences. | getPaymentMethod(): ?PaymentMethodPreference | setPaymentMethod(?PaymentMethodPreference paymentMethod): void |
+| `paymentMethod` | [`?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.. | getPaymentMethod(): ?PaymentMethodPreference | setPaymentMethod(?PaymentMethodPreference paymentMethod): void |
| `returnUrl` | `?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. | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?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. | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
-| `storedPaymentSource` | [`?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. | getStoredPaymentSource(): ?StoredPaymentSource | setStoredPaymentSource(?StoredPaymentSource storedPaymentSource): void |
+| `storedPaymentSource` | [`?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. | getStoredPaymentSource(): ?StoredPaymentSource | setStoredPaymentSource(?StoredPaymentSource storedPaymentSource): void |
## Example (as JSON)
diff --git a/doc/models/order-authorize-request-payment-source.md b/doc/models/order-authorize-request-payment-source.md
index 9cad4a2..1da58e7 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 3535e14..2988e4b 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 b496184..341e001 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 6548cc0..35445ef 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. | getId(): ?string | setId(?string id): void |
| `paymentSource` | [`?OrderAuthorizeResponsePaymentSource`](../../doc/models/order-authorize-response-payment-source.md) | Optional | The payment source used to fund the payment. | getPaymentSource(): ?OrderAuthorizeResponsePaymentSource | setPaymentSource(?OrderAuthorizeResponsePaymentSource paymentSource): void |
| `intent` | [`?string(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. | getIntent(): ?string | setIntent(?string intent): void |
-| `payer` | [`?Payer`](../../doc/models/payer.md) | Optional | - | getPayer(): ?Payer | setPayer(?Payer payer): void |
+| `payer` | [`?Payer`](../../doc/models/payer.md) | Optional | The customer who approves and pays for the order. The customer is also known as the payer. | getPayer(): ?Payer | setPayer(?Payer payer): void |
| `purchaseUnits` | [`?(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` | getPurchaseUnits(): ?array | setPurchaseUnits(?array purchaseUnits): void |
| `status` | [`?string(OrderStatus)`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getStatus(): ?string | setStatus(?string status): void |
-| `links` | [`?(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` | getLinks(): ?array | setLinks(?array links): void |
+| `links` | [`?(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. | getLinks(): ?array | setLinks(?array links): void |
## 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 2431fe3..b3c9472 100644
--- a/doc/models/order-billing-plan.md
+++ b/doc/models/order-billing-plan.md
@@ -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 fefe58f..c0eb33e 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 2cd8732..38d0d44 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 9111e50..42602ac 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 b3f63c6..d763783 100644
--- a/doc/models/order-request.md
+++ b/doc/models/order-request.md
@@ -12,7 +12,7 @@ The order request details.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `intent` | [`string(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. | getIntent(): string | setIntent(string intent): void |
-| `payer` | [`?Payer`](../../doc/models/payer.md) | Optional | - | getPayer(): ?Payer | setPayer(?Payer payer): void |
+| `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`. | getPayer(): ?Payer | setPayer(?Payer payer): void |
| `purchaseUnits` | [`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` | getPurchaseUnits(): array | setPurchaseUnits(array purchaseUnits): void |
| `paymentSource` | [`?PaymentSource`](../../doc/models/payment-source.md) | Optional | The payment source definition. | getPaymentSource(): ?PaymentSource | setPaymentSource(?PaymentSource paymentSource): void |
| `applicationContext` | [`?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. | getApplicationContext(): ?OrderApplicationContext | setApplicationContext(?OrderApplicationContext applicationContext): void |
diff --git a/doc/models/order-tracker-request.md b/doc/models/order-tracker-request.md
index 9b6825c..f7ea549 100644
--- a/doc/models/order-tracker-request.md
+++ b/doc/models/order-tracker-request.md
@@ -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-update-callback-error-response-details.md b/doc/models/order-update-callback-error-response-details.md
deleted file mode 100644
index ee1b757..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 | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `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*: `^.*$` | getField(): ?string | setField(?string field): void |
-| `value` | `?string` | Optional | The value of the field that caused the error.
**Constraints**: *Minimum Length*: `0`, *Maximum Length*: `1024`, *Pattern*: `^.*$` | getValue(): ?string | setValue(?string value): void |
-| `issue` | `string` | Required | The unique, fine-grained application-level error code.
**Constraints**: *Minimum Length*: `0`, *Maximum Length*: `256`, *Pattern*: `^.*$` | getIssue(): string | setIssue(string issue): void |
-
-## Example (as JSON)
-
-```json
-{
- "field": "field8",
- "value": "value6",
- "issue": "issue0"
-}
-```
-
diff --git a/doc/models/order-update-callback-error-response.md b/doc/models/order-update-callback-error-response.md
deleted file mode 100644
index 98451b1..0000000
--- a/doc/models/order-update-callback-error-response.md
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# Order Update Callback Error Response
-
-The error details.
-
-## Structure
-
-`OrderUpdateCallbackErrorResponse`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `name` | `string` | Required | The human-readable, unique name of the error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | getName(): string | setName(string name): void |
-| `message` | `?string` | Optional | The message that describes the error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^.*$` | getMessage(): ?string | setMessage(?string message): void |
-| `details` | [`?(OrderUpdateCallbackErrorResponseDetails[])`](../../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` | getDetails(): ?array | setDetails(?array details): void |
-
-## 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 708180a..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 | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `id` | `?string` | Optional | The ID of the order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9-]+$` | getId(): ?string | setId(?string id): void |
-| `shippingAddress` | [`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). | getShippingAddress(): OrderUpdateCallbackShippingAddress | setShippingAddress(OrderUpdateCallbackShippingAddress shippingAddress): void |
-| `shippingOption` | [`?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. | getShippingOption(): ?OrderUpdateCallbackShippingOption | setShippingOption(?OrderUpdateCallbackShippingOption shippingOption): void |
-| `purchaseUnits` | [`PurchaseUnitRequest[]`](../../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**: *Minimum Items*: `1`, *Maximum Items*: `1` | getPurchaseUnits(): array | setPurchaseUnits(array purchaseUnits): void |
-
-## Example (as JSON)
-
-```json
-{
- "shipping_address": {
- "admin_area_2": "admin_area_24",
- "admin_area_1": "admin_area_16",
- "postal_code": "postal_code2",
- "country_code": "country_code0"
- },
- "purchase_units": [
- {
- "reference_id": "reference_id4",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0",
- "breakdown": {
- "item_total": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "shipping": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "handling": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax_total": {
- "currency_code": "currency_code4",
- "value": "value0"
- },
- "insurance": {
- "currency_code": "currency_code2",
- "value": "value8"
- }
- }
- },
- "payee": {
- "email_address": "email_address4",
- "merchant_id": "merchant_id6"
- },
- "payment_instruction": {
- "platform_fees": [
- {
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "payee": {
- "email_address": "email_address4",
- "merchant_id": "merchant_id6"
- }
- },
- {
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "payee": {
- "email_address": "email_address4",
- "merchant_id": "merchant_id6"
- }
- },
- {
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "payee": {
- "email_address": "email_address4",
- "merchant_id": "merchant_id6"
- }
- }
- ],
- "disbursement_mode": "INSTANT",
- "payee_pricing_tier_id": "payee_pricing_tier_id2",
- "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0"
- },
- "description": "description6",
- "custom_id": "custom_id4"
- }
- ],
- "id": "id2",
- "shipping_option": {
- "id": "id4",
- "label": "label4",
- "type": "PICKUP_IN_STORE",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- }
- }
-}
-```
-
diff --git a/doc/models/order-update-callback-response.md b/doc/models/order-update-callback-response.md
deleted file mode 100644
index 076ec33..0000000
--- a/doc/models/order-update-callback-response.md
+++ /dev/null
@@ -1,83 +0,0 @@
-
-# Order Update Callback Response
-
-Returns the updated shipping options for an order.
-
-## Structure
-
-`OrderUpdateCallbackResponse`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `id` | `?string` | Optional | The ID of the order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9-]+$` | getId(): ?string | setId(?string id): void |
-| `purchaseUnits` | [`?ShippingOptionsPurchaseUnit`](../../doc/models/shipping-options-purchase-unit.md) | Optional | This would contain shipping option and amount data at purchase unit level. | getPurchaseUnits(): ?ShippingOptionsPurchaseUnit | setPurchaseUnits(?ShippingOptionsPurchaseUnit purchaseUnits): void |
-
-## Example (as JSON)
-
-```json
-{
- "id": "id2",
- "purchase_units": {
- "reference_id": "reference_id4",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0",
- "breakdown": {
- "item_total": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "shipping": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "handling": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax_total": {
- "currency_code": "currency_code4",
- "value": "value0"
- },
- "insurance": {
- "currency_code": "currency_code2",
- "value": "value8"
- }
- }
- },
- "items": [
- {
- "name": "name8",
- "unit_amount": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "quantity": "quantity4",
- "description": "description2",
- "sku": "sku6",
- "url": "url2",
- "category": "DONATION"
- }
- ],
- "shipping_options": [
- {
- "id": "id8",
- "label": "label8",
- "type": "PICKUP_IN_STORE",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "selected": false
- }
- ]
- }
-}
-```
-
diff --git a/doc/models/order-update-callback-shipping-address.md b/doc/models/order-update-callback-shipping-address.md
deleted file mode 100644
index 5c1c1d6..0000000
--- a/doc/models/order-update-callback-shipping-address.md
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# Order Update Callback Shipping Address
-
-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).
-
-## Structure
-
-`OrderUpdateCallbackShippingAddress`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `adminArea2` | `?string` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | getAdminArea2(): ?string | setAdminArea2(?string adminArea2): void |
-| `adminArea1` | `?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` | getAdminArea1(): ?string | setAdminArea1(?string adminArea1): void |
-| `postalCode` | `?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` | getPostalCode(): ?string | setPostalCode(?string postalCode): void |
-| `countryCode` | `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)$` | getCountryCode(): string | setCountryCode(string countryCode): void |
-
-## 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 0648452..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 | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `id` | `string` | Required | A unique ID that identifies a payer-selected shipping option.
**Constraints**: *Maximum Length*: `127` | getId(): string | setId(string id): void |
-| `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` | getLabel(): string | setLabel(string label): void |
-| `type` | [`?string(ShippingType)`](../../doc/models/shipping-type.md) | Optional | A classification for the method of purchase fulfillment. | getType(): ?string | setType(?string type): void |
-| `amount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): ?Money | setAmount(?Money amount): void |
-
-## 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 b1a86a7..6e8663c 100644
--- a/doc/models/order.md
+++ b/doc/models/order.md
@@ -16,7 +16,7 @@ The order details.
| `id` | `?string` | Optional | The ID of the order. | getId(): ?string | setId(?string id): void |
| `paymentSource` | [`?PaymentSourceResponse`](../../doc/models/payment-source-response.md) | Optional | The payment source used to fund the payment. | getPaymentSource(): ?PaymentSourceResponse | setPaymentSource(?PaymentSourceResponse paymentSource): void |
| `intent` | [`?string(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. | getIntent(): ?string | setIntent(?string intent): void |
-| `payer` | [`?Payer`](../../doc/models/payer.md) | Optional | - | getPayer(): ?Payer | setPayer(?Payer payer): void |
+| `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`. | getPayer(): ?Payer | setPayer(?Payer payer): void |
| `purchaseUnits` | [`?(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` | getPurchaseUnits(): ?array | setPurchaseUnits(?array purchaseUnits): void |
| `status` | [`?string(OrderStatus)`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getStatus(): ?string | setStatus(?string status): void |
| `links` | [`?(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. | getLinks(): ?array | setLinks(?array links): void |
@@ -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 ac2d578..5c907da 100644
--- a/doc/models/orders-capture.md
+++ b/doc/models/orders-capture.md
@@ -17,7 +17,7 @@ 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `finalCapture` | `?bool` | 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` | getFinalCapture(): ?bool | setFinalCapture(?bool finalCapture): void |
| `sellerReceivableBreakdown` | [`?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. | getSellerReceivableBreakdown(): ?SellerReceivableBreakdown | setSellerReceivableBreakdown(?SellerReceivableBreakdown sellerReceivableBreakdown): void |
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..28cf1bd
--- /dev/null
+++ b/doc/models/payer-information.md
@@ -0,0 +1,38 @@
+
+# Payer Information
+
+The payer information.
+
+## Structure
+
+`PayerInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `accountId` | `?string` | Optional | The PayPal` customer account ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[a-zA-Z0-9]*$` | getAccountId(): ?string | setAccountId(?string accountId): void |
+| `emailAddress` | `?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*: `^.+@[^"\-].+$` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
+| `phoneNumber` | [`?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). | getPhoneNumber(): ?Phone | setPhoneNumber(?Phone phoneNumber): void |
+| `addressStatus` | `?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]$` | getAddressStatus(): ?string | setAddressStatus(?string addressStatus): void |
+| `payerStatus` | `?string` | Optional | The status of the payer. Value is `Y` or `N`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1`, *Pattern*: `^[N\|Y]$` | getPayerStatus(): ?string | setPayerStatus(?string payerStatus): void |
+| `payerName` | [`?PayerName`](../../doc/models/payer-name.md) | Optional | The name of the party. | getPayerName(): ?PayerName | setPayerName(?PayerName payerName): void |
+| `countryCode` | `?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)$` | getCountryCode(): ?string | setCountryCode(?string countryCode): void |
+| `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. | getAddress(): ?SimplePostalAddressCoarseGrained | setAddress(?SimplePostalAddressCoarseGrained address): void |
+
+## 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..5490816
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `prefix` | `?string` | Optional | The prefix, or title, to the party's name.
**Constraints**: *Maximum Length*: `140` | getPrefix(): ?string | setPrefix(?string prefix): void |
+| `givenName` | `?string` | Optional | When the party is a person, the party's given, or first, name.
**Constraints**: *Maximum Length*: `140` | getGivenName(): ?string | setGivenName(?string givenName): void |
+| `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` | getSurname(): ?string | setSurname(?string surname): void |
+| `middleName` | `?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` | getMiddleName(): ?string | setMiddleName(?string middleName): void |
+| `suffix` | `?string` | Optional | The suffix for the party's name.
**Constraints**: *Maximum Length*: `140` | getSuffix(): ?string | setSuffix(?string suffix): void |
+| `alternateFullName` | `?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` | getAlternateFullName(): ?string | setAlternateFullName(?string alternateFullName): void |
+| `fullName` | `?string` | Optional | When the party is a person, the party's full name.
**Constraints**: *Maximum Length*: `300` | getFullName(): ?string | setFullName(?string fullName): void |
+
+## 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 7f76b61..c5ea46e 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 8425d3c..ecf073d 100644
--- a/doc/models/payment-authorization.md
+++ b/doc/models/payment-authorization.md
@@ -17,7 +17,7 @@ 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `expirationTime` | `?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})$` | getExpirationTime(): ?string | setExpirationTime(?string expirationTime): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
diff --git a/doc/models/payment-method.md b/doc/models/payment-method.md
new file mode 100644
index 0000000..eac79b8
--- /dev/null
+++ b/doc/models/payment-method.md
@@ -0,0 +1,23 @@
+
+# Payment Method
+
+The customer and merchant payment preferences.
+
+## Structure
+
+`PaymentMethod`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `payeePreferred` | [`?string(PayeePaymentMethodPreference)`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getPayeePreferred(): ?string | setPayeePreferred(?string payeePreferred): void |
+
+## 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..a44c39b
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `autoBillOutstanding` | `?bool` | Optional | Indicates whether to automatically bill the outstanding amount in the next billing cycle. | getAutoBillOutstanding(): ?bool | setAutoBillOutstanding(?bool autoBillOutstanding): void |
+| `setupFee` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getSetupFee(): ?Money | setSetupFee(?Money setupFee): void |
+| `setupFeeFailureAction` | [`?string(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_]+$` | getSetupFeeFailureAction(): ?string | setSetupFeeFailureAction(?string setupFeeFailureAction): void |
+| `paymentFailureThreshold` | `?int` | 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` | getPaymentFailureThreshold(): ?int | setPaymentFailureThreshold(?int paymentFailureThreshold): void |
+
+## 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..a33460a
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `autoBillOutstanding` | `?bool` | Optional | Indicates whether to automatically bill the outstanding amount in the next billing cycle.
**Default**: `true` | getAutoBillOutstanding(): ?bool | setAutoBillOutstanding(?bool autoBillOutstanding): void |
+| `setupFee` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getSetupFee(): ?Money | setSetupFee(?Money setupFee): void |
+| `setupFeeFailureAction` | [`?string(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_]+$` | getSetupFeeFailureAction(): ?string | setSetupFeeFailureAction(?string setupFeeFailureAction): void |
+| `paymentFailureThreshold` | `?int` | 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` | getPaymentFailureThreshold(): ?int | setPaymentFailureThreshold(?int paymentFailureThreshold): void |
+
+## 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 2f811aa..63a3159 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 26797ec..6eb8e90 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 41f024e..79a1904 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 195b737..75d5484 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 f38ab71..860a8e2 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `card` | [`?CardPaymentTokenEntity`](../../doc/models/card-payment-token-entity.md) | Optional | Full representation of a Card Payment Token including network token. | getCard(): ?CardPaymentTokenEntity | setCard(?CardPaymentTokenEntity card): void |
-| `paypal` | [`?PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | - | getPaypal(): ?PaypalPaymentToken | setPaypal(?PaypalPaymentToken paypal): void |
-| `venmo` | [`?VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | getVenmo(): ?VenmoPaymentToken | setVenmo(?VenmoPaymentToken venmo): void |
+| `paypal` | [`?PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | Full representation of a PayPal Payment Token. | getPaypal(): ?PaypalPaymentToken | setPaypal(?PaypalPaymentToken paypal): void |
+| `venmo` | [`?VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | Full representation of a Venmo Payment Token. | getVenmo(): ?VenmoPaymentToken | setVenmo(?VenmoPaymentToken venmo): void |
| `applePay` | [`?ApplePayPaymentToken`](../../doc/models/apple-pay-payment-token.md) | Optional | A resource representing a response for Apple Pay. | getApplePay(): ?ApplePayPaymentToken | setApplePay(?ApplePayPaymentToken applePay): void |
## 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 d33fb96..78a13ce 100644
--- a/doc/models/payment-token-response.md
+++ b/doc/models/payment-token-response.md
@@ -11,7 +11,7 @@ Full representation of a saved payment token.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `id` | `?string` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | getId(): ?string | setId(?string id): void |
+| `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_-]+$` | getId(): ?string | setId(?string id): void |
| `customer` | [`?CustomerResponse`](../../doc/models/customer-response.md) | Optional | Customer in merchant's or partner's system of records. | getCustomer(): ?CustomerResponse | setCustomer(?CustomerResponse customer): void |
| `paymentSource` | [`?PaymentTokenResponsePaymentSource`](../../doc/models/payment-token-response-payment-source.md) | Optional | The vaulted payment method details. | getPaymentSource(): ?PaymentTokenResponsePaymentSource | setPaymentSource(?PaymentTokenResponsePaymentSource paymentSource): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | getLinks(): ?array | setLinks(?array links): void |
@@ -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 eb84b9e..e109745 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. | getAmount(): ?Money | setAmount(?Money amount): void |
| `invoiceId` | `?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. | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `networkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransactionReference | setNetworkTransactionReference(?NetworkTransactionReference networkTransactionReference): void |
+| `networkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getNetworkTransactionReference(): ?NetworkTransaction | setNetworkTransactionReference(?NetworkTransaction networkTransactionReference): void |
| `sellerProtection` | [`?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). | getSellerProtection(): ?SellerProtection | setSellerProtection(?SellerProtection sellerProtection): void |
| `finalCapture` | `?bool` | 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` | getFinalCapture(): ?bool | setFinalCapture(?bool finalCapture): void |
| `sellerReceivableBreakdown` | [`?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. | getSellerReceivableBreakdown(): ?SellerReceivableBreakdown | setSellerReceivableBreakdown(?SellerReceivableBreakdown sellerReceivableBreakdown): void |
| `disbursementMode` | [`?string(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_]+$` | getDisbursementMode(): ?string | setDisbursementMode(?string disbursementMode): void |
| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
-| `processorResponse` | [`?PaymentsProcessorResponse`](../../doc/models/payments-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | getProcessorResponse(): ?PaymentsProcessorResponse | setProcessorResponse(?PaymentsProcessorResponse processorResponse): void |
+| `processorResponse` | [`?ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | getProcessorResponse(): ?ProcessorResponse | setProcessorResponse(?ProcessorResponse processorResponse): void |
| `createTime` | `?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})$` | getCreateTime(): ?string | setCreateTime(?string createTime): void |
| `updateTime` | `?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})$` | getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
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 409bf34..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 | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `avsCode` | [`?string(AvsCode)`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. | getAvsCode(): ?string | setAvsCode(?string avsCode): void |
-| `cvvCode` | [`?string(CvvCode)`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. | getCvvCode(): ?string | setCvvCode(?string cvvCode): void |
-| `responseCode` | [`?string(ProcessorResponseCode)`](../../doc/models/processor-response-code.md) | Optional | Processor response code for the non-PayPal payment processor errors. | getResponseCode(): ?string | setResponseCode(?string responseCode): void |
-| `paymentAdviceCode` | [`?string(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. | getPaymentAdviceCode(): ?string | setPaymentAdviceCode(?string paymentAdviceCode): void |
-
-## 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 9f76b62..1528772 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 @@
| `permitMultiplePaymentTokens` | `?bool` | 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` | getPermitMultiplePaymentTokens(): ?bool | setPermitMultiplePaymentTokens(?bool permitMultiplePaymentTokens): void |
| `usageType` | [`?string(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_]+$` | getUsageType(): ?string | setUsageType(?string usageType): void |
| `customerType` | [`?string(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_]+$` | getCustomerType(): ?string | setCustomerType(?string customerType): void |
-| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
+| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
| `payerId` | `?string` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | getPayerId(): ?string | setPayerId(?string payerId): void |
| `name` | [`?Name`](../../doc/models/name.md) | Optional | The name of the party. | getName(): ?Name | setName(?Name name): void |
| `phone` | [`?PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | getPhone(): ?PhoneWithType | setPhone(?PhoneWithType phone): void |
@@ -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.md b/doc/models/paypal-wallet-attributes.md
index 3bd12ee..289d9a6 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `customer` | [`?PaypalWalletCustomerRequest`](../../doc/models/paypal-wallet-customer-request.md) | Optional | - | getCustomer(): ?PaypalWalletCustomerRequest | setCustomer(?PaypalWalletCustomerRequest customer): void |
-| `vault` | [`?PaypalWalletVaultInstruction`](../../doc/models/paypal-wallet-vault-instruction.md) | Optional | - | getVault(): ?PaypalWalletVaultInstruction | setVault(?PaypalWalletVaultInstruction vault): void |
+| `vault` | [`?PaypalWalletVaultInstruction`](../../doc/models/paypal-wallet-vault-instruction.md) | Optional | Resource consolidating common request and response attributes for vaulting PayPal Wallet. | getVault(): ?PaypalWalletVaultInstruction | setVault(?PaypalWalletVaultInstruction vault): void |
## 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 eefc018..99d5318 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
| `contactPreference` | [`?string(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.
**Default**: `PaypalWalletContactPreference::NO_CONTACT_INFO`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getContactPreference(): ?string | setContactPreference(?string contactPreference): void |
| `returnUrl` | `?string` | Optional | Describes the URL. | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?string` | Optional | Describes the URL. | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
+| `appSwitchContext` | [`?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. | getAppSwitchContext(): ?AppSwitchContext | setAppSwitchContext(?AppSwitchContext appSwitchContext): void |
| `landingPage` | [`?string(PaypalExperienceLandingPage)`](../../doc/models/paypal-experience-landing-page.md) | Optional | The type of landing page to show on the PayPal site for customer checkout.
**Default**: `PaypalExperienceLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | getLandingPage(): ?string | setLandingPage(?string landingPage): void |
| `userAction` | [`?string(PaypalExperienceUserAction)`](../../doc/models/paypal-experience-user-action.md) | Optional | Configures a Continue or Pay Now checkout flow.
**Default**: `PaypalExperienceUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
| `paymentMethodPreference` | [`?string(PayeePaymentMethodPreference)`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getPaymentMethodPreference(): ?string | setPaymentMethodPreference(?string paymentMethodPreference): void |
diff --git a/doc/models/paypal-wallet-response.md b/doc/models/paypal-wallet-response.md
index bc9a78e..2114106 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). | getAddress(): ?Address | setAddress(?Address address): void |
| `attributes` | [`?PaypalWalletAttributesResponse`](../../doc/models/paypal-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a PayPal Wallet. | getAttributes(): ?PaypalWalletAttributesResponse | setAttributes(?PaypalWalletAttributesResponse attributes): void |
| `storedCredential` | [`?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. | getStoredCredential(): ?PaypalWalletStoredCredential | setStoredCredential(?PaypalWalletStoredCredential storedCredential): void |
+| `experienceStatus` | [`?string(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_]+$` | getExperienceStatus(): ?string | setExperienceStatus(?string experienceStatus): void |
## Example (as JSON)
diff --git a/doc/models/paypal-wallet-stored-credential.md b/doc/models/paypal-wallet-stored-credential.md
index ca48ba7..e9d478c 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `paymentInitiator` | [`string(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_]+$` | getPaymentInitiator(): string | setPaymentInitiator(string paymentInitiator): void |
-| `chargePattern` | [`?string(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_]+$` | getChargePattern(): ?string | setChargePattern(?string chargePattern): void |
+| `chargePattern` | [`?string(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_]+$` | getChargePattern(): ?string | setChargePattern(?string chargePattern): void |
| `usagePattern` | [`?string(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_]+$` | getUsagePattern(): ?string | setUsagePattern(?string usagePattern): void |
| `usage` | [`?string(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).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getUsage(): ?string | setUsage(?string usage): void |
diff --git a/doc/models/paypal-wallet-vault-instruction.md b/doc/models/paypal-wallet-vault-instruction.md
index e043fe5..8961ae1 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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `storeInVault` | [`?string(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_]+$` | getStoreInVault(): ?string | setStoreInVault(?string storeInVault): void |
| `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` | getDescription(): ?string | setDescription(?string description): void |
| `usagePattern` | [`?string(UsagePattern)`](../../doc/models/usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` | getUsagePattern(): ?string | setUsagePattern(?string usagePattern): void |
| `usageType` | [`string(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_]+$` | getUsageType(): string | setUsageType(string usageType): void |
@@ -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/phone-number-with-country-code.md b/doc/models/phone-number-with-country-code.md
index 62b06e2..35f18d5 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..782a576
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `countryCode` | `?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}?$` | getCountryCode(): ?string | setCountryCode(?string countryCode): void |
+| `nationalNumber` | `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}?$` | getNationalNumber(): string | setNationalNumber(string nationalNumber): void |
+
+## 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 eaf3b5b..ed92164 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..59dbc46
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `plans` | [`?(BillingPlan[])`](../../doc/models/billing-plan.md) | Optional | An array of plans.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` | getPlans(): ?array | setPlans(?array plans): void |
+| `totalItems` | `?int` | Optional | The total number of items.
**Constraints**: `>= 0`, `<= 500000000` | getTotalItems(): ?int | setTotalItems(?int totalItems): void |
+| `totalPages` | `?int` | Optional | The total number of pages.
**Constraints**: `>= 0`, `<= 100000000` | getTotalPages(): ?int | setTotalPages(?int totalPages): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "plans": [
+ {
+ "id": "id4",
+ "product_id": "product_id0",
+ "name": "name4",
+ "status": "INACTIVE",
+ "description": "description4"
+ }
+ ],
+ "total_items": 158,
+ "total_pages": 194,
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/plan-details.md b/doc/models/plan-details.md
new file mode 100644
index 0000000..8ff2518
--- /dev/null
+++ b/doc/models/plan-details.md
@@ -0,0 +1,176 @@
+
+# Plan Details
+
+The plan details.
+
+## Structure
+
+`PlanDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `productId` | `?string` | Optional | The ID for the product.
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` | getProductId(): ?string | setProductId(?string productId): void |
+| `name` | `?string` | Optional | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getName(): ?string | setName(?string name): void |
+| `description` | `?string` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getDescription(): ?string | setDescription(?string description): void |
+| `billingCycles` | [`?(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` | getBillingCycles(): ?array | setBillingCycles(?array billingCycles): void |
+| `paymentPreferences` | [`?PaymentPreferences`](../../doc/models/payment-preferences.md) | Optional | The payment preferences for a subscription. | getPaymentPreferences(): ?PaymentPreferences | setPaymentPreferences(?PaymentPreferences paymentPreferences): void |
+| `merchantPreferences` | [`?MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. | getMerchantPreferences(): ?MerchantPreferences | setMerchantPreferences(?MerchantPreferences merchantPreferences): void |
+| `taxes` | [`?Taxes`](../../doc/models/taxes.md) | Optional | The tax details. | getTaxes(): ?Taxes | setTaxes(?Taxes taxes): void |
+| `quantitySupported` | `?bool` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Default**: `false` | getQuantitySupported(): ?bool | setQuantitySupported(?bool quantitySupported): void |
+
+## Example (as JSON)
+
+```json
+{
+ "quantity_supported": false,
+ "product_id": "product_id6",
+ "name": "name8",
+ "description": "description2",
+ "billing_cycles": [
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "frequency": {
+ "interval_unit": "DAY",
+ "interval_count": 94
+ },
+ "tenure_type": "REGULAR",
+ "sequence": 8,
+ "total_cycles": 198
+ },
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "frequency": {
+ "interval_unit": "DAY",
+ "interval_count": 94
+ },
+ "tenure_type": "REGULAR",
+ "sequence": 8,
+ "total_cycles": 198
+ },
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "frequency": {
+ "interval_unit": "DAY",
+ "interval_count": 94
+ },
+ "tenure_type": "REGULAR",
+ "sequence": 8,
+ "total_cycles": 198
+ }
+ ],
+ "payment_preferences": {
+ "auto_bill_outstanding": false,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "setup_fee_failure_action": "CONTINUE",
+ "payment_failure_threshold": 104
+ }
+}
+```
+
diff --git a/doc/models/plan-override.md b/doc/models/plan-override.md
new file mode 100644
index 0000000..ed0b99e
--- /dev/null
+++ b/doc/models/plan-override.md
@@ -0,0 +1,156 @@
+
+# Plan Override
+
+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.
+
+## Structure
+
+`PlanOverride`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `billingCycles` | [`?(BillingCycleOverride[])`](../../doc/models/billing-cycle-override.md) | Optional | An array of billing cycles for trial billing and regular billing. The subscription billing cycle definition has to adhere to the plan billing cycle definition.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `12` | getBillingCycles(): ?array | setBillingCycles(?array billingCycles): void |
+| `paymentPreferences` | [`?PaymentPreferencesOverride`](../../doc/models/payment-preferences-override.md) | Optional | The payment preferences to override at subscription level. | getPaymentPreferences(): ?PaymentPreferencesOverride | setPaymentPreferences(?PaymentPreferencesOverride paymentPreferences): void |
+| `taxes` | [`?TaxesOverride`](../../doc/models/taxes-override.md) | Optional | The tax details. | getTaxes(): ?TaxesOverride | setTaxes(?TaxesOverride taxes): void |
+
+## Example (as JSON)
+
+```json
+{
+ "billing_cycles": [
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 8,
+ "total_cycles": 198
+ },
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 8,
+ "total_cycles": 198
+ },
+ {
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ },
+ "sequence": 8,
+ "total_cycles": 198
+ }
+ ],
+ "payment_preferences": {
+ "auto_bill_outstanding": false,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "setup_fee_failure_action": "CONTINUE",
+ "payment_failure_threshold": 104
+ },
+ "taxes": {
+ "percentage": "percentage8",
+ "inclusive": false
+ }
+}
+```
+
diff --git a/doc/models/plan-request-status.md b/doc/models/plan-request-status.md
new file mode 100644
index 0000000..ec9a2a0
--- /dev/null
+++ b/doc/models/plan-request-status.md
@@ -0,0 +1,17 @@
+
+# Plan Request Status
+
+The initial state of the plan. Allowed input values are CREATED and ACTIVE.
+
+## Enumeration
+
+`PlanRequestStatus`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `CREATED` | The plan was created. You cannot create subscriptions for a plan in this state. |
+| `INACTIVE` | The plan is inactive. |
+| `ACTIVE` | The plan is active. You can only create subscriptions for a plan in this state. |
+
diff --git a/doc/models/plan-request.md b/doc/models/plan-request.md
new file mode 100644
index 0000000..352cd65
--- /dev/null
+++ b/doc/models/plan-request.md
@@ -0,0 +1,98 @@
+
+# Plan Request
+
+The create plan request details.
+
+## Structure
+
+`PlanRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `productId` | `string` | Required | The ID of the product created through Catalog Products API.
**Constraints**: *Minimum Length*: `22`, *Maximum Length*: `22`, *Pattern*: `^PROD-[A-Z0-9]*$` | getProductId(): string | setProductId(string productId): void |
+| `name` | `string` | Required | The plan name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getName(): string | setName(string name): void |
+| `status` | [`?string(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_]+$` | getStatus(): ?string | setStatus(?string status): void |
+| `description` | `?string` | Optional | The detailed description of the plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getDescription(): ?string | setDescription(?string description): void |
+| `billingCycles` | [`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` | getBillingCycles(): array | setBillingCycles(array billingCycles): void |
+| `paymentPreferences` | [`PaymentPreferences`](../../doc/models/payment-preferences.md) | Required | The payment preferences for a subscription. | getPaymentPreferences(): PaymentPreferences | setPaymentPreferences(PaymentPreferences paymentPreferences): void |
+| `merchantPreferences` | [`?MerchantPreferences`](../../doc/models/merchant-preferences.md) | Optional | The merchant preferences for a subscription. | getMerchantPreferences(): ?MerchantPreferences | setMerchantPreferences(?MerchantPreferences merchantPreferences): void |
+| `taxes` | [`?Taxes`](../../doc/models/taxes.md) | Optional | The tax details. | getTaxes(): ?Taxes | setTaxes(?Taxes taxes): void |
+| `quantitySupported` | `?bool` | Optional | Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
**Default**: `false` | getQuantitySupported(): ?bool | setQuantitySupported(?bool quantitySupported): void |
+
+## Example (as JSON)
+
+```json
+{
+ "product_id": "product_id2",
+ "name": "name2",
+ "status": "ACTIVE",
+ "billing_cycles": [
+ {
+ "frequency": {
+ "interval_unit": "DAY",
+ "interval_count": 1
+ },
+ "tenure_type": "REGULAR",
+ "sequence": 8,
+ "total_cycles": 1,
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ }
+ }
+ ],
+ "payment_preferences": {
+ "auto_bill_outstanding": true,
+ "setup_fee_failure_action": "CANCEL",
+ "payment_failure_threshold": 0,
+ "setup_fee": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ }
+ },
+ "quantity_supported": false,
+ "description": "description8",
+ "merchant_preferences": {
+ "return_url": "return_url4",
+ "cancel_url": "cancel_url6"
+ },
+ "taxes": {
+ "percentage": "percentage8",
+ "inclusive": false
+ }
+}
+```
+
diff --git a/doc/models/plan.md b/doc/models/plan.md
index 5f97311..5b81978 100644
--- a/doc/models/plan.md
+++ b/doc/models/plan.md
@@ -12,7 +12,6 @@ The merchant level Recurring Billing plan metadata for the Billing Agreement.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `billingCycles` | [`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` | getBillingCycles(): array | setBillingCycles(array billingCycles): void |
-| `product` | `mixed` | Optional | Product details associated with any one-time product purchase. | getProduct(): | setProduct( product): void |
| `oneTimeCharges` | [`OneTimeCharge`](../../doc/models/one-time-charge.md) | Required | The one-time charge info at the time of checkout. | getOneTimeCharges(): OneTimeCharge | setOneTimeCharges(OneTimeCharge oneTimeCharges): void |
| `name` | `?string` | Optional | Name of the recurring plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[A-Za-z0-9() +',.:-]+$` | getName(): ?string | setName(?string name): void |
@@ -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..f64448e
--- /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 | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `startingQuantity` | `string` | Required | The starting quantity for the tier.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32`, *Pattern*: `^([0-9]+\|([0-9]+)?[.][0-9]+)$` | getStartingQuantity(): string | setStartingQuantity(string startingQuantity): void |
+| `endingQuantity` | `?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]+)$` | getEndingQuantity(): ?string | setEndingQuantity(?string endingQuantity): void |
+| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getAmount(): Money | setAmount(Money amount): void |
+
+## 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 24a13c7..088909c 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. | getAmount(): AmountWithBreakdown | setAmount(AmountWithBreakdown amount): void |
| `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. | getPayee(): ?PayeeBase | setPayee(?PayeeBase payee): void |
| `paymentInstruction` | [`?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. | getPaymentInstruction(): ?PaymentInstruction | setPaymentInstruction(?PaymentInstruction paymentInstruction): void |
-| `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` | getDescription(): ?string | setDescription(?string description): void |
+| `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` | getDescription(): ?string | setDescription(?string description): void |
| `customId` | `?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` | getCustomId(): ?string | setCustomId(?string customId): void |
-| `invoiceId` | `?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` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
-| `softDescriptor` | `?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` | getSoftDescriptor(): ?string | setSoftDescriptor(?string softDescriptor): void |
-| `items` | [`?(Item[])`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | getItems(): ?array | setItems(?array items): void |
+| `invoiceId` | `?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` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
+| `softDescriptor` | `?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` | getSoftDescriptor(): ?string | setSoftDescriptor(?string softDescriptor): void |
+| `items` | [`?(ItemRequest[])`](../../doc/models/item-request.md) | Optional | An array of items that the customer purchases from the merchant. | getItems(): ?array | setItems(?array items): void |
| `shipping` | [`?ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | getShipping(): ?ShippingDetails | setShipping(?ShippingDetails shipping): void |
| `supplementaryData` | [`?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. | getSupplementaryData(): ?SupplementaryData | setSupplementaryData(?SupplementaryData supplementaryData): void |
diff --git a/doc/models/reason-code.md b/doc/models/reason-code.md
new file mode 100644
index 0000000..008a6e1
--- /dev/null
+++ b/doc/models/reason-code.md
@@ -0,0 +1,22 @@
+
+# Reason Code
+
+The reason code for the payment failure.
+
+## Enumeration
+
+`ReasonCode`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `PAYMENT_DENIED` | PayPal declined the payment due to one or more customer issues. |
+| `INTERNAL_SERVER_ERROR` | An internal server error has occurred. |
+| `PAYEE_ACCOUNT_RESTRICTED` | The payee account is not in good standing and cannot receive payments. |
+| `PAYER_ACCOUNT_RESTRICTED` | The payer account is not in good standing and cannot make payments. |
+| `PAYER_CANNOT_PAY` | Payer cannot pay for this transaction. |
+| `SENDING_LIMIT_EXCEEDED` | The transaction exceeds the payer's sending limit. |
+| `TRANSACTION_RECEIVING_LIMIT_EXCEEDED` | The transaction exceeds the receiver's receiving limit. |
+| `CURRENCY_MISMATCH` | The transaction is declined due to a currency mismatch. |
+
diff --git a/doc/models/reauthorize-request.md b/doc/models/reauthorize-request.md
index 79f9289..7549031 100644
--- a/doc/models/reauthorize-request.md
+++ b/doc/models/reauthorize-request.md
@@ -1,7 +1,7 @@
# Reauthorize Request
-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. You can reauthorize a payment only once from days four to 29. 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 once. 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. You can reauthorize a payment only once from days four to 29. 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 once. 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.
## Structure
diff --git a/doc/models/return-flow.md b/doc/models/return-flow.md
new file mode 100644
index 0000000..f717f6c
--- /dev/null
+++ b/doc/models/return-flow.md
@@ -0,0 +1,16 @@
+
+# Return Flow
+
+Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the Venmo App.
+
+## Enumeration
+
+`ReturnFlow`
+
+## 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/search-error-exception.md b/doc/models/search-error-exception.md
new file mode 100644
index 0000000..ef93bf9
--- /dev/null
+++ b/doc/models/search-error-exception.md
@@ -0,0 +1,51 @@
+
+# Search Error Exception
+
+The error details.
+
+## Structure
+
+`SearchErrorException`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `string` | Required | The human-readable, unique name of the error. | getName(): string | setName(string name): void |
+| `message` | `string` | Required | The message that describes the error. | getMessage(): string | setMessage(string message): void |
+| `debugId` | `string` | Required | The PayPal internal ID. Used for correlation purposes. | getDebugId(): string | setDebugId(string debugId): void |
+| `informationLink` | `?string` | Optional | The information link, or URI, that shows detailed information about this error for the developer. | getInformationLink(): ?string | setInformationLink(?string informationLink): void |
+| `details` | [`?(TransactionSearchErrorDetails[])`](../../doc/models/transaction-search-error-details.md) | Optional | An array of additional details about the error. | getDetails(): ?array | setDetails(?array details): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
+| `totalItems` | `?int` | Optional | The total number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
**Constraints**: `>= 0`, `<= 2147483647` | getTotalItems(): ?int | setTotalItems(?int totalItems): void |
+| `maximumItems` | `?int` | Optional | The maximum number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
**Constraints**: `>= 0`, `<= 2147483647` | getMaximumItems(): ?int | setMaximumItems(?int maximumItems): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name8",
+ "message": "message8",
+ "debug_id": "debug_id6",
+ "information_link": "information_link0",
+ "details": [
+ {
+ "field": "field4",
+ "value": "value2",
+ "location": "location4",
+ "issue": "issue6",
+ "description": "description0"
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "total_items": 20,
+ "maximum_items": 206
+}
+```
+
diff --git a/doc/models/search-response.md b/doc/models/search-response.md
new file mode 100644
index 0000000..2bff67d
--- /dev/null
+++ b/doc/models/search-response.md
@@ -0,0 +1,228 @@
+
+# Search Response
+
+The search response information.
+
+## Structure
+
+`SearchResponse`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `transactionDetails` | [`?(TransactionDetails[])`](../../doc/models/transaction-details.md) | Optional | An array of transaction detail objects.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `2147483647` | getTransactionDetails(): ?array | setTransactionDetails(?array transactionDetails): void |
+| `accountNumber` | `?string` | Optional | The merchant account number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[a-zA-Z0-9]*$` | getAccountNumber(): ?string | setAccountNumber(?string accountNumber): void |
+| `startDate` | `?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})$` | getStartDate(): ?string | setStartDate(?string startDate): void |
+| `endDate` | `?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})$` | getEndDate(): ?string | setEndDate(?string endDate): void |
+| `lastRefreshedDatetime` | `?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})$` | getLastRefreshedDatetime(): ?string | setLastRefreshedDatetime(?string lastRefreshedDatetime): void |
+| `page` | `?int` | Optional | A zero-relative index of transactions.
**Constraints**: `>= 0`, `<= 2147483647` | getPage(): ?int | setPage(?int page): void |
+| `totalItems` | `?int` | Optional | The total number of transactions as an integer beginning with the specified `page` in the full result and not just in this response.
**Constraints**: `>= 0`, `<= 2147483647` | getTotalItems(): ?int | setTotalItems(?int totalItems): void |
+| `totalPages` | `?int` | Optional | The total number of pages, as an `integer`, when the `total_items` is divided into pages of the specified `page_size`.
**Constraints**: `>= 0`, `<= 2147483647` | getTotalPages(): ?int | setTotalPages(?int totalPages): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32767` | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "transaction_details": [
+ {
+ "transaction_info": {
+ "paypal_account_id": "paypal_account_id4",
+ "transaction_id": "transaction_id0",
+ "paypal_reference_id": "paypal_reference_id2",
+ "paypal_reference_id_type": "ODR",
+ "transaction_event_code": "transaction_event_code6"
+ },
+ "payer_info": {
+ "account_id": "account_id2",
+ "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_status2"
+ },
+ "shipping_info": {
+ "name": "name0",
+ "method": "method4",
+ "address": {
+ "line1": "line18",
+ "line2": "line20",
+ "city": "city6",
+ "state": "state2",
+ "country_code": "country_code6",
+ "postal_code": "postal_code8"
+ },
+ "secondary_shipping_address": {
+ "line1": "line16",
+ "line2": "line28",
+ "city": "city4",
+ "state": "state0",
+ "country_code": "country_code4",
+ "postal_code": "postal_code6"
+ }
+ },
+ "cart_info": {
+ "item_details": [
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ },
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ }
+ ],
+ "tax_inclusive": false,
+ "paypal_invoice_id": "paypal_invoice_id6"
+ },
+ "store_info": {
+ "store_id": "store_id2",
+ "terminal_id": "terminal_id6"
+ }
+ },
+ {
+ "transaction_info": {
+ "paypal_account_id": "paypal_account_id4",
+ "transaction_id": "transaction_id0",
+ "paypal_reference_id": "paypal_reference_id2",
+ "paypal_reference_id_type": "ODR",
+ "transaction_event_code": "transaction_event_code6"
+ },
+ "payer_info": {
+ "account_id": "account_id2",
+ "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_status2"
+ },
+ "shipping_info": {
+ "name": "name0",
+ "method": "method4",
+ "address": {
+ "line1": "line18",
+ "line2": "line20",
+ "city": "city6",
+ "state": "state2",
+ "country_code": "country_code6",
+ "postal_code": "postal_code8"
+ },
+ "secondary_shipping_address": {
+ "line1": "line16",
+ "line2": "line28",
+ "city": "city4",
+ "state": "state0",
+ "country_code": "country_code4",
+ "postal_code": "postal_code6"
+ }
+ },
+ "cart_info": {
+ "item_details": [
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ },
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ }
+ ],
+ "tax_inclusive": false,
+ "paypal_invoice_id": "paypal_invoice_id6"
+ },
+ "store_info": {
+ "store_id": "store_id2",
+ "terminal_id": "terminal_id6"
+ }
+ },
+ {
+ "transaction_info": {
+ "paypal_account_id": "paypal_account_id4",
+ "transaction_id": "transaction_id0",
+ "paypal_reference_id": "paypal_reference_id2",
+ "paypal_reference_id_type": "ODR",
+ "transaction_event_code": "transaction_event_code6"
+ },
+ "payer_info": {
+ "account_id": "account_id2",
+ "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_status2"
+ },
+ "shipping_info": {
+ "name": "name0",
+ "method": "method4",
+ "address": {
+ "line1": "line18",
+ "line2": "line20",
+ "city": "city6",
+ "state": "state2",
+ "country_code": "country_code6",
+ "postal_code": "postal_code8"
+ },
+ "secondary_shipping_address": {
+ "line1": "line16",
+ "line2": "line28",
+ "city": "city4",
+ "state": "state0",
+ "country_code": "country_code4",
+ "postal_code": "postal_code6"
+ }
+ },
+ "cart_info": {
+ "item_details": [
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ },
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ }
+ ],
+ "tax_inclusive": false,
+ "paypal_invoice_id": "paypal_invoice_id6"
+ },
+ "store_info": {
+ "store_id": "store_id2",
+ "terminal_id": "terminal_id6"
+ }
+ }
+ ],
+ "account_number": "account_number8",
+ "start_date": "start_date2",
+ "end_date": "end_date8",
+ "last_refreshed_datetime": "last_refreshed_datetime4"
+}
+```
+
diff --git a/doc/models/sepa-debit-experience-context.md b/doc/models/sepa-debit-experience-context.md
new file mode 100644
index 0000000..35d7a1a
--- /dev/null
+++ b/doc/models/sepa-debit-experience-context.md
@@ -0,0 +1,27 @@
+
+# Sepa Debit Experience Context
+
+Customizes the payer experience during the approval process for the SEPA Debit payment.
+
+## Structure
+
+`SepaDebitExperienceContext`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
+| `returnUrl` | `string` | Required | Describes the URL. | getReturnUrl(): string | setReturnUrl(string returnUrl): void |
+| `cancelUrl` | `string` | Required | Describes the URL. | getCancelUrl(): string | setCancelUrl(string cancelUrl): void |
+
+## Example (as JSON)
+
+```json
+{
+ "locale": "locale8",
+ "return_url": "return_url6",
+ "cancel_url": "cancel_url8"
+}
+```
+
diff --git a/doc/models/sepa-debit-request.md b/doc/models/sepa-debit-request.md
new file mode 100644
index 0000000..dd68424
--- /dev/null
+++ b/doc/models/sepa-debit-request.md
@@ -0,0 +1,27 @@
+
+# Sepa Debit Request
+
+An API resource denoting a request to securely store a SEPA Debit.
+
+## Structure
+
+`SepaDebitRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `experienceContext` | [`?SepaDebitExperienceContext`](../../doc/models/sepa-debit-experience-context.md) | Optional | Customizes the payer experience during the approval process for the SEPA Debit payment. | getExperienceContext(): ?SepaDebitExperienceContext | setExperienceContext(?SepaDebitExperienceContext experienceContext): void |
+
+## Example (as JSON)
+
+```json
+{
+ "experience_context": {
+ "locale": "locale6",
+ "return_url": "return_url4",
+ "cancel_url": "cancel_url6"
+ }
+}
+```
+
diff --git a/doc/models/setup-fee-failure-action.md b/doc/models/setup-fee-failure-action.md
new file mode 100644
index 0000000..491a3a7
--- /dev/null
+++ b/doc/models/setup-fee-failure-action.md
@@ -0,0 +1,16 @@
+
+# Setup Fee Failure Action
+
+The action to take on the subscription if the initial payment for the setup fails.
+
+## Enumeration
+
+`SetupFeeFailureAction`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `CONTINUE_` | Continues the subscription if the initial payment for the setup fails. |
+| `CANCEL` | Cancels the subscription if the initial payment for the setup fails. |
+
diff --git a/doc/models/setup-token-request-card.md b/doc/models/setup-token-request-card.md
index ca4771e..aa3c728 100644
--- a/doc/models/setup-token-request-card.md
+++ b/doc/models/setup-token-request-card.md
@@ -18,7 +18,7 @@ A Resource representing a request to vault a Card.
| `brand` | [`?string(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_]+$` | getBrand(): ?string | setBrand(?string brand): void |
| `billingAddress` | [`?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). | getBillingAddress(): ?Address | setBillingAddress(?Address billingAddress): void |
| `verificationMethod` | [`?string(VaultCardVerificationMethod)`](../../doc/models/vault-card-verification-method.md) | Optional | The verification method of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getVerificationMethod(): ?string | setVerificationMethod(?string verificationMethod): void |
-| `experienceContext` | [`?SetupTokenCardExperienceContext`](../../doc/models/setup-token-card-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | getExperienceContext(): ?SetupTokenCardExperienceContext | setExperienceContext(?SetupTokenCardExperienceContext experienceContext): void |
+| `experienceContext` | [`?VaultCardExperienceContext`](../../doc/models/vault-card-experience-context.md) | Optional | A resource representing an experience context of vault a card. | getExperienceContext(): ?VaultCardExperienceContext | setExperienceContext(?VaultCardExperienceContext experienceContext): void |
## Example (as JSON)
@@ -28,7 +28,7 @@ A Resource representing a request to vault a Card.
"number": "number0",
"expiry": "expiry0",
"security_code": "security_code4",
- "brand": "DINERS"
+ "brand": "STAR"
}
```
diff --git a/doc/models/setup-token-request-payment-source.md b/doc/models/setup-token-request-payment-source.md
index 170153c..263e95c 100644
--- a/doc/models/setup-token-request-payment-source.md
+++ b/doc/models/setup-token-request-payment-source.md
@@ -13,8 +13,10 @@ The payment method to vault with the instrument details.
| --- | --- | --- | --- | --- | --- |
| `card` | [`?SetupTokenRequestCard`](../../doc/models/setup-token-request-card.md) | Optional | A Resource representing a request to vault a Card. | getCard(): ?SetupTokenRequestCard | setCard(?SetupTokenRequestCard card): void |
| `paypal` | [`?VaultPaypalWalletRequest`](../../doc/models/vault-paypal-wallet-request.md) | Optional | A resource representing a request to vault PayPal Wallet. | getPaypal(): ?VaultPaypalWalletRequest | setPaypal(?VaultPaypalWalletRequest paypal): void |
-| `venmo` | [`?VaultVenmoRequest`](../../doc/models/vault-venmo-request.md) | Optional | - | getVenmo(): ?VaultVenmoRequest | setVenmo(?VaultVenmoRequest venmo): void |
+| `venmo` | [`?VaultVenmoRequest`](../../doc/models/vault-venmo-request.md) | Optional | A resource representing a request to vault Venmo. | getVenmo(): ?VaultVenmoRequest | setVenmo(?VaultVenmoRequest venmo): void |
+| `applePay` | [`?VaultApplePayRequest`](../../doc/models/vault-apple-pay-request.md) | Optional | A resource representing a request to vault Apple Pay. | getApplePay(): ?VaultApplePayRequest | setApplePay(?VaultApplePayRequest applePay): void |
| `token` | [`?VaultTokenRequest`](../../doc/models/vault-token-request.md) | Optional | The Tokenized Payment Source representing a Request to Vault a Token. | getToken(): ?VaultTokenRequest | setToken(?VaultTokenRequest token): void |
+| `bank` | [`?BankRequest`](../../doc/models/bank-request.md) | Optional | A Resource representing a request to vault a Bank used for ACH Debit. | getBank(): ?BankRequest | setBank(?BankRequest bank): void |
## Example (as JSON)
@@ -25,7 +27,7 @@ The payment method to vault with the instrument details.
"number": "number6",
"expiry": "expiry4",
"security_code": "security_code8",
- "brand": "RUPAY"
+ "brand": "CB_NATIONALE"
},
"paypal": {
"description": "description2",
@@ -34,6 +36,7 @@ The payment method to vault with the instrument details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -58,6 +61,7 @@ The payment method to vault with the instrument details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -75,6 +79,21 @@ The payment method to vault with the instrument details.
"permit_multiple_payment_tokens": false,
"usage_type": "MERCHANT"
},
+ "apple_pay": {
+ "token": "token6",
+ "card": {
+ "type": "UNKNOWN",
+ "brand": "CB_NATIONALE",
+ "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"
+ }
+ }
+ },
"token": {
"id": "id6",
"type": "SETUP_TOKEN"
diff --git a/doc/models/setup-token-request.md b/doc/models/setup-token-request.md
index bc30f15..c494687 100644
--- a/doc/models/setup-token-request.md
+++ b/doc/models/setup-token-request.md
@@ -28,7 +28,7 @@ Setup Token Request where the `source` defines the type of instrument to be stor
"number": "number6",
"expiry": "expiry4",
"security_code": "security_code8",
- "brand": "RUPAY"
+ "brand": "CB_NATIONALE"
},
"paypal": {
"description": "description2",
@@ -37,6 +37,7 @@ Setup Token Request where the `source` defines the type of instrument to be stor
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -61,6 +62,7 @@ Setup Token Request where the `source` defines the type of instrument to be stor
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -78,6 +80,21 @@ Setup Token Request where the `source` defines the type of instrument to be stor
"permit_multiple_payment_tokens": false,
"usage_type": "MERCHANT"
},
+ "apple_pay": {
+ "token": "token6",
+ "card": {
+ "type": "UNKNOWN",
+ "brand": "CB_NATIONALE",
+ "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"
+ }
+ }
+ },
"token": {
"id": "id6",
"type": "SETUP_TOKEN"
diff --git a/doc/models/setup-token-response-card.md b/doc/models/setup-token-response-card.md
index b5f5f2f..1d8658e 100644
--- a/doc/models/setup-token-response-card.md
+++ b/doc/models/setup-token-response-card.md
@@ -27,7 +27,7 @@
{
"name": "name8",
"last_digits": "last_digits2",
- "brand": "ELO",
+ "brand": "DISCOVER",
"expiry": "expiry6",
"billing_address": {
"address_line_1": "address_line_12",
diff --git a/doc/models/setup-token-response-payment-source.md b/doc/models/setup-token-response-payment-source.md
index cd47f8e..6317ba9 100644
--- a/doc/models/setup-token-response-payment-source.md
+++ b/doc/models/setup-token-response-payment-source.md
@@ -12,8 +12,8 @@ The setup payment method details.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `card` | [`?SetupTokenResponseCard`](../../doc/models/setup-token-response-card.md) | Optional | - | getCard(): ?SetupTokenResponseCard | setCard(?SetupTokenResponseCard card): void |
-| `paypal` | [`?PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | - | getPaypal(): ?PaypalPaymentToken | setPaypal(?PaypalPaymentToken paypal): void |
-| `venmo` | [`?VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | getVenmo(): ?VenmoPaymentToken | setVenmo(?VenmoPaymentToken venmo): void |
+| `paypal` | [`?PaypalPaymentToken`](../../doc/models/paypal-payment-token.md) | Optional | Full representation of a PayPal Payment Token. | getPaypal(): ?PaypalPaymentToken | setPaypal(?PaypalPaymentToken paypal): void |
+| `venmo` | [`?VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | Full representation of a Venmo Payment Token. | getVenmo(): ?VenmoPaymentToken | setVenmo(?VenmoPaymentToken venmo): void |
## Example (as JSON)
@@ -22,7 +22,7 @@ The setup 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",
@@ -40,6 +40,7 @@ The setup payment method details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -64,6 +65,7 @@ The setup payment method details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/setup-token-response.md b/doc/models/setup-token-response.md
index f871dce..2ace5b9 100644
--- a/doc/models/setup-token-response.md
+++ b/doc/models/setup-token-response.md
@@ -11,7 +11,7 @@ Minimal representation of a cached setup token.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `id` | `?string` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | getId(): ?string | setId(?string id): void |
+| `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_-]+$` | getId(): ?string | setId(?string id): void |
| `customer` | [`?Customer`](../../doc/models/customer.md) | Optional | This object defines a customer in your system. Use it to manage customer profiles, save payment methods and contact details. | getCustomer(): ?Customer | setCustomer(?Customer customer): void |
| `status` | [`?string(PaymentTokenStatus)`](../../doc/models/payment-token-status.md) | Optional | The status of the payment token.
**Default**: `PaymentTokenStatus::CREATED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getStatus(): ?string | setStatus(?string status): void |
| `paymentSource` | [`?SetupTokenResponsePaymentSource`](../../doc/models/setup-token-response-payment-source.md) | Optional | The setup payment method details. | getPaymentSource(): ?SetupTokenResponsePaymentSource | setPaymentSource(?SetupTokenResponsePaymentSource paymentSource): void |
@@ -31,7 +31,7 @@ Minimal representation of a cached setup token.
"card": {
"name": "name6",
"last_digits": "last_digits0",
- "brand": "RUPAY",
+ "brand": "CB_NATIONALE",
"expiry": "expiry4",
"billing_address": {
"address_line_1": "address_line_12",
@@ -49,6 +49,7 @@ Minimal representation of a cached setup token.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
@@ -73,6 +74,7 @@ Minimal representation of a cached setup token.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/shipment-carrier.md b/doc/models/shipment-carrier.md
index 5fef9e6..98dd196 100644
--- a/doc/models/shipment-carrier.md
+++ b/doc/models/shipment-carrier.md
@@ -1387,4 +1387,40 @@ The carrier for the shipment. Some carriers have a global version as well as loc
| `UPS_CHECKER` | ups-checker. |
| `WINESHIPPING` | Wineshipping. |
| `SPEDISCI` | Spedisci online. |
+| `FOURKITES` | Fourkites. |
+| `ETONAS` | Etonas. |
+| `FINMILE` | Fin Mile. |
+| `UNIUNI` | Uniuni. |
+| `RODONAVES` | Rodonaves. |
+| `INPOST_IT` | Inpost Italy. |
+| `TFORCE_FREIGHT` | Tforce Freight. |
+| `RICHMOM` | Rich Mom. |
+| `FRANCO` | Corriere Franco. |
+| `ECPARCEL` | Ecparcel. |
+| `FEDEX_CHINA` | Fedex China. |
+| `GOFO_EXPRESS` | Gofo Express. |
+| `SHIPBOB` | Shipbob. |
+| `JERSEYPOST_ATLAS` | Jersey Post Group. |
+| `CORETRAILS` | Coretrails. |
+| `RHENUS_ITALY` | Rhenus Logistics Italy. |
+| `JADLOG` | Jadlog. |
+| `JITSU` | Jitsu. |
+| `YANWEN_EXPRESS` | Yanwen Express. |
+| `DASHLINK` | Dashlink. |
+| `SEINO_SUPER_EXPRESS` | Seino Super Express. |
+| `FLOSHIP` | Floship. |
+| `METROSCG` | Metro Supply Chain. |
+| `SENDPARCEL` | Sendparcel. |
+| `P2P` | P2p. |
+| `CN_EXPRESS` | Cn Express. |
+| `CIRROTRACK` | Cirro Track. |
+| `LAND_LOGISTICS` | Land Logistics. |
+| `VEHO` | Veho. |
+| `MEDLINE` | Medline. |
+| `VDTRACK` | Vdtrack. |
+| `SINO_SCM` | Sino Scm. |
+| `ENUM_3PE_EXPRESS` | 3pe Express. |
+| `SWIFTX` | Swiftx. |
+| `SFYDEXPRESS` | Sfyd Express. |
+| `TOPTRANS` | Toptrans. |
diff --git a/doc/models/shipping-information.md b/doc/models/shipping-information.md
new file mode 100644
index 0000000..eeff8a7
--- /dev/null
+++ b/doc/models/shipping-information.md
@@ -0,0 +1,43 @@
+
+# Shipping Information
+
+The shipping information.
+
+## Structure
+
+`ShippingInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `?string` | Optional | The recipient's name.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getName(): ?string | setName(?string name): void |
+| `method` | `?string` | Optional | The shipping method that is associated with this order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `500`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getMethod(): ?string | setMethod(?string method): void |
+| `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. | getAddress(): ?SimplePostalAddressCoarseGrained | setAddress(?SimplePostalAddressCoarseGrained address): void |
+| `secondaryShippingAddress` | [`?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. | getSecondaryShippingAddress(): ?SimplePostalAddressCoarseGrained | setSecondaryShippingAddress(?SimplePostalAddressCoarseGrained secondaryShippingAddress): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name8",
+ "method": "method2",
+ "address": {
+ "line1": "line18",
+ "line2": "line20",
+ "city": "city6",
+ "state": "state2",
+ "country_code": "country_code6",
+ "postal_code": "postal_code8"
+ },
+ "secondary_shipping_address": {
+ "line1": "line16",
+ "line2": "line28",
+ "city": "city4",
+ "state": "state0",
+ "country_code": "country_code4",
+ "postal_code": "postal_code6"
+ }
+}
+```
+
diff --git a/doc/models/shipping-options-purchase-unit.md b/doc/models/shipping-options-purchase-unit.md
deleted file mode 100644
index 4b02fa5..0000000
--- a/doc/models/shipping-options-purchase-unit.md
+++ /dev/null
@@ -1,108 +0,0 @@
-
-# Shipping Options Purchase Unit
-
-This would contain shipping option and amount data at purchase unit level.
-
-## Structure
-
-`ShippingOptionsPurchaseUnit`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `referenceId` | `?string` | Optional | The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`. Note: If there are multiple purchase units, reference_id is required for each purchase unit.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | getReferenceId(): ?string | setReferenceId(?string referenceId): void |
-| `amount` | [`?AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Optional | 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. | getAmount(): ?AmountWithBreakdown | setAmount(?AmountWithBreakdown amount): void |
-| `items` | [`?(Item[])`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | getItems(): ?array | setItems(?array items): void |
-| `shippingOptions` | [`?(ShippingOption[])`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getShippingOptions(): ?array | setShippingOptions(?array shippingOptions): void |
-
-## Example (as JSON)
-
-```json
-{
- "reference_id": "reference_id4",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0",
- "breakdown": {
- "item_total": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "shipping": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "handling": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax_total": {
- "currency_code": "currency_code4",
- "value": "value0"
- },
- "insurance": {
- "currency_code": "currency_code2",
- "value": "value8"
- }
- }
- },
- "items": [
- {
- "name": "name8",
- "unit_amount": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "quantity": "quantity4",
- "description": "description2",
- "sku": "sku6",
- "url": "url2",
- "category": "DONATION"
- },
- {
- "name": "name8",
- "unit_amount": {
- "currency_code": "currency_code2",
- "value": "value8"
- },
- "tax": {
- "currency_code": "currency_code0",
- "value": "value6"
- },
- "quantity": "quantity4",
- "description": "description2",
- "sku": "sku6",
- "url": "url2",
- "category": "DONATION"
- }
- ],
- "shipping_options": [
- {
- "id": "id8",
- "label": "label8",
- "type": "PICKUP_IN_STORE",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "selected": false
- },
- {
- "id": "id8",
- "label": "label8",
- "type": "PICKUP_IN_STORE",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "selected": false
- }
- ]
-}
-```
-
diff --git a/doc/models/shipping-with-tracking-details.md b/doc/models/shipping-with-tracking-details.md
index 937bef5..d5dca6e 100644
--- a/doc/models/shipping-with-tracking-details.md
+++ b/doc/models/shipping-with-tracking-details.md
@@ -1,8 +1,6 @@
# Shipping With Tracking Details
-The order shipping details.
-
## Structure
`ShippingWithTrackingDetails`
@@ -11,18 +9,72 @@ The order shipping details.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
+| `trackers` | [`?(OrderTrackerResponse[])`](../../doc/models/order-tracker-response.md) | Optional | An array of trackers for a transaction. | getTrackers(): ?array | setTrackers(?array trackers): void |
| `name` | [`?ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | getName(): ?ShippingName | setName(?ShippingName name): void |
| `emailAddress` | `?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])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-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])+)\])$`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
-| `phoneNumber` | [`?PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | getPhoneNumber(): ?PhoneNumberWithCountryCode | setPhoneNumber(?PhoneNumberWithCountryCode phoneNumber): void |
+| `phoneNumber` | [`?PhoneNumberWithOptionalCountryCode`](../../doc/models/phone-number-with-optional-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | getPhoneNumber(): ?PhoneNumberWithOptionalCountryCode | setPhoneNumber(?PhoneNumberWithOptionalCountryCode phoneNumber): void |
| `type` | [`?string(FulfillmentType)`](../../doc/models/fulfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getType(): ?string | setType(?string type): void |
| `options` | [`?(ShippingOption[])`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `10` | getOptions(): ?array | setOptions(?array options): void |
| `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). | getAddress(): ?Address | setAddress(?Address address): void |
-| `trackers` | [`?(OrderTrackerResponse[])`](../../doc/models/order-tracker-response.md) | Optional | An array of trackers for a transaction. | getTrackers(): ?array | setTrackers(?array trackers): void |
## Example (as JSON)
```json
{
+ "trackers": [
+ {
+ "id": "id2",
+ "status": "CANCELLED",
+ "items": [
+ {
+ "name": "name8",
+ "quantity": "quantity4",
+ "sku": "sku6",
+ "url": "url2",
+ "image_url": "image_url4"
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "create_time": "create_time8"
+ },
+ {
+ "id": "id2",
+ "status": "CANCELLED",
+ "items": [
+ {
+ "name": "name8",
+ "quantity": "quantity4",
+ "sku": "sku6",
+ "url": "url2",
+ "image_url": "image_url4"
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "create_time": "create_time8"
+ }
+ ],
"name": {
"full_name": "full_name6"
},
@@ -31,29 +83,7 @@ The order shipping details.
"country_code": "country_code2",
"national_number": "national_number6"
},
- "type": "SHIPPING",
- "options": [
- {
- "id": "id2",
- "label": "label2",
- "type": "SHIPPING",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "selected": false
- },
- {
- "id": "id2",
- "label": "label2",
- "type": "SHIPPING",
- "amount": {
- "currency_code": "currency_code6",
- "value": "value0"
- },
- "selected": false
- }
- ]
+ "type": "SHIPPING"
}
```
diff --git a/doc/models/simple-postal-address-coarse-grained.md b/doc/models/simple-postal-address-coarse-grained.md
new file mode 100644
index 0000000..fe3426c
--- /dev/null
+++ b/doc/models/simple-postal-address-coarse-grained.md
@@ -0,0 +1,33 @@
+
+# Simple Postal Address Coarse Grained
+
+A simple postal address with coarse-grained fields. Do not use for an international address. Use for backward compatibility only. Does not contain phone.
+
+## Structure
+
+`SimplePostalAddressCoarseGrained`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `line1` | `string` | Required | The first line of the address. For example, number or street. | getLine1(): string | setLine1(string line1): void |
+| `line2` | `?string` | Optional | The second line of the address. For example, suite or apartment number. | getLine2(): ?string | setLine2(?string line2): void |
+| `city` | `string` | Required | The city name. | getCity(): string | setCity(string city): void |
+| `state` | `?string` | Optional | The [code](/docs/api/reference/state-codes/) for a US state or the equivalent for other countries. Required for transactions if the address is in one of these countries: [Argentina](/docs/api/reference/state-codes/#argentina), [Brazil](/docs/api/reference/state-codes/#brazil), [Canada](/docs/api/reference/state-codes/#canada), [China](/docs/api/reference/state-codes/#china), [India](/docs/api/reference/state-codes/#india), [Italy](/docs/api/reference/state-codes/#italy), [Japan](/docs/api/reference/state-codes/#japan), [Mexico](/docs/api/reference/state-codes/#mexico), [Thailand](/docs/api/reference/state-codes/#thailand), or [United States](/docs/api/reference/state-codes/#usa). Maximum length is 40 single-byte characters. | getState(): ?string | setState(?string state): void |
+| `countryCode` | `string` | Required | 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)$` | getCountryCode(): string | setCountryCode(string countryCode): void |
+| `postalCode` | `?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). | getPostalCode(): ?string | setPostalCode(?string postalCode): void |
+
+## Example (as JSON)
+
+```json
+{
+ "line1": "line14",
+ "line2": "line26",
+ "city": "city2",
+ "state": "state8",
+ "country_code": "country_code2",
+ "postal_code": "postal_code4"
+}
+```
+
diff --git a/doc/models/store-information.md b/doc/models/store-information.md
new file mode 100644
index 0000000..a0a9214
--- /dev/null
+++ b/doc/models/store-information.md
@@ -0,0 +1,25 @@
+
+# Store Information
+
+The store information.
+
+## Structure
+
+`StoreInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `storeId` | `?string` | Optional | The ID of a store for a merchant in the system of record.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^[a-zA-Z0-9]*$` | getStoreId(): ?string | setStoreId(?string storeId): void |
+| `terminalId` | `?string` | Optional | The terminal ID for the checkout stand in a merchant store.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9]*$` | getTerminalId(): ?string | setTerminalId(?string terminalId): void |
+
+## Example (as JSON)
+
+```json
+{
+ "store_id": "store_id6",
+ "terminal_id": "terminal_id0"
+}
+```
+
diff --git a/doc/models/stored-payment-source.md b/doc/models/stored-payment-source.md
index 778ed99..f241c7f 100644
--- a/doc/models/stored-payment-source.md
+++ b/doc/models/stored-payment-source.md
@@ -14,7 +14,7 @@ Provides additional details to process a payment using a `payment_source` that h
| `paymentInitiator` | [`string(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_]+$` | getPaymentInitiator(): string | setPaymentInitiator(string paymentInitiator): void |
| `paymentType` | [`string(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_]+$` | getPaymentType(): string | setPaymentType(string paymentType): void |
| `usage` | [`?string(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).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getUsage(): ?string | setUsage(?string usage): void |
-| `previousNetworkTransactionReference` | [`?NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | getPreviousNetworkTransactionReference(): ?NetworkTransactionReference | setPreviousNetworkTransactionReference(?NetworkTransactionReference previousNetworkTransactionReference): void |
+| `previousNetworkTransactionReference` | [`?NetworkTransaction`](../../doc/models/network-transaction.md) | Optional | Reference values used by the card network to identify a transaction. | getPreviousNetworkTransactionReference(): ?NetworkTransaction | setPreviousNetworkTransactionReference(?NetworkTransaction previousNetworkTransactionReference): void |
## Example (as JSON)
@@ -26,7 +26,7 @@ Provides additional details to process a payment using a `payment_source` that h
"previous_network_transaction_reference": {
"id": "id6",
"date": "date2",
- "network": "DELTA",
+ "network": "CONFIDIS",
"acquirer_reference_number": "acquirer_reference_number8"
}
}
diff --git a/doc/models/subscriber-request.md b/doc/models/subscriber-request.md
new file mode 100644
index 0000000..bd54eaa
--- /dev/null
+++ b/doc/models/subscriber-request.md
@@ -0,0 +1,67 @@
+
+# Subscriber Request
+
+The subscriber request information .
+
+## Structure
+
+`SubscriberRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | [`?Name`](../../doc/models/name.md) | Optional | The name of the party. | getName(): ?Name | setName(?Name name): void |
+| `phone` | [`?PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | getPhone(): ?PhoneWithType | setPhone(?PhoneWithType phone): void |
+| `shippingAddress` | [`?ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | getShippingAddress(): ?ShippingDetails | setShippingAddress(?ShippingDetails shippingAddress): void |
+| `paymentSource` | [`?SubscriptionPaymentSource`](../../doc/models/subscription-payment-source.md) | Optional | The payment source definition. To be eligible to create subscription using debit or credit card, you will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its available only for non-3DS cards and for merchants in US and AU regions. | getPaymentSource(): ?SubscriptionPaymentSource | setPaymentSource(?SubscriptionPaymentSource paymentSource): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": {
+ "given_name": "given_name2",
+ "surname": "surname8"
+ },
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "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
+ }
+ ]
+ },
+ "payment_source": {
+ "card": {
+ "name": "name6",
+ "number": "number6",
+ "expiry": "expiry4",
+ "security_code": "security_code8",
+ "type": "UNKNOWN"
+ }
+ }
+}
+```
+
diff --git a/doc/models/subscriber.md b/doc/models/subscriber.md
new file mode 100644
index 0000000..6324c2c
--- /dev/null
+++ b/doc/models/subscriber.md
@@ -0,0 +1,66 @@
+
+# Subscriber
+
+The subscriber response information.
+
+## Structure
+
+`Subscriber`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | [`?Name`](../../doc/models/name.md) | Optional | The name of the party. | getName(): ?Name | setName(?Name name): void |
+| `shippingAddress` | [`?ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | getShippingAddress(): ?ShippingDetails | setShippingAddress(?ShippingDetails shippingAddress): void |
+| `paymentSource` | [`?SubscriptionPaymentSourceResponse`](../../doc/models/subscription-payment-source-response.md) | Optional | The payment source used to fund the payment. | getPaymentSource(): ?SubscriptionPaymentSourceResponse | setPaymentSource(?SubscriptionPaymentSourceResponse paymentSource): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": {
+ "given_name": "given_name2",
+ "surname": "surname8"
+ },
+ "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
+ }
+ ]
+ },
+ "payment_source": {
+ "card": {
+ "name": "name6",
+ "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": "expiry4",
+ "currency_code": "currency_code2"
+ }
+ }
+}
+```
+
diff --git a/doc/models/subscription-amount-with-breakdown.md b/doc/models/subscription-amount-with-breakdown.md
new file mode 100644
index 0000000..27fec79
--- /dev/null
+++ b/doc/models/subscription-amount-with-breakdown.md
@@ -0,0 +1,51 @@
+
+# Subscription Amount With Breakdown
+
+The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts.
+
+## Structure
+
+`SubscriptionAmountWithBreakdown`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `grossAmount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getGrossAmount(): Money | setGrossAmount(Money grossAmount): void |
+| `totalItemAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTotalItemAmount(): ?Money | setTotalItemAmount(?Money totalItemAmount): void |
+| `feeAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getFeeAmount(): ?Money | setFeeAmount(?Money feeAmount): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `taxAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTaxAmount(): ?Money | setTaxAmount(?Money taxAmount): void |
+| `netAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getNetAmount(): ?Money | setNetAmount(?Money netAmount): void |
+
+## Example (as JSON)
+
+```json
+{
+ "gross_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "total_item_amount": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "fee_amount": {
+ "currency_code": "currency_code2",
+ "value": "value4"
+ },
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "tax_amount": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ },
+ "net_amount": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ }
+}
+```
+
diff --git a/doc/models/subscription-application-context.md b/doc/models/subscription-application-context.md
new file mode 100644
index 0000000..dda6f97
--- /dev/null
+++ b/doc/models/subscription-application-context.md
@@ -0,0 +1,37 @@
+
+# Subscription Application Context
+
+The application context, which customizes the payer experience during the subscription approval process with PayPal.
+
+## Structure
+
+`SubscriptionApplicationContext`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `brandName` | `?string` | Optional | The label that overrides the business name in the PayPal account on the PayPal site.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
+| `locale` | `?string` | Optional | 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`.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | getLocale(): ?string | setLocale(?string locale): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `userAction` | [`?string(ApplicationContextUserAction)`](../../doc/models/application-context-user-action.md) | Optional | Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience.
**Default**: `ApplicationContextUserAction::SUBSCRIBE_NOW`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
+| `paymentMethod` | [`?PaymentMethod`](../../doc/models/payment-method.md) | Optional | The customer and merchant payment preferences. | getPaymentMethod(): ?PaymentMethod | setPaymentMethod(?PaymentMethod paymentMethod): void |
+| `returnUrl` | `string` | Required | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getReturnUrl(): string | setReturnUrl(string returnUrl): void |
+| `cancelUrl` | `string` | Required | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getCancelUrl(): string | setCancelUrl(string cancelUrl): void |
+
+## Example (as JSON)
+
+```json
+{
+ "shipping_preference": "GET_FROM_FILE",
+ "user_action": "SUBSCRIBE_NOW",
+ "return_url": "return_url0",
+ "cancel_url": "cancel_url2",
+ "brand_name": "brand_name8",
+ "locale": "locale2",
+ "payment_method": {
+ "payee_preferred": "UNRESTRICTED"
+ }
+}
+```
+
diff --git a/doc/models/subscription-billing-cycle.md b/doc/models/subscription-billing-cycle.md
new file mode 100644
index 0000000..71c381a
--- /dev/null
+++ b/doc/models/subscription-billing-cycle.md
@@ -0,0 +1,68 @@
+
+# Subscription Billing Cycle
+
+The billing cycle details.
+
+## Structure
+
+`SubscriptionBillingCycle`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `pricingScheme` | [`?SubscriptionPricingScheme`](../../doc/models/subscription-pricing-scheme.md) | Optional | The pricing scheme details. | getPricingScheme(): ?SubscriptionPricingScheme | setPricingScheme(?SubscriptionPricingScheme pricingScheme): void |
+| `frequency` | [`Frequency`](../../doc/models/frequency.md) | Required | The frequency of the billing cycle. | getFrequency(): Frequency | setFrequency(Frequency frequency): void |
+| `tenureType` | [`string(TenureType)`](../../doc/models/tenure-type.md) | Required | The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are allowed per plan.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getTenureType(): string | setTenureType(string tenureType): void |
+| `sequence` | `int` | 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` | getSequence(): int | setSequence(int sequence): void |
+| `totalCycles` | `?int` | 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` | getTotalCycles(): ?int | setTotalCycles(?int totalCycles): void |
+
+## Example (as JSON)
+
+```json
+{
+ "frequency": {
+ "interval_unit": "DAY",
+ "interval_count": 1
+ },
+ "tenure_type": "REGULAR",
+ "sequence": 30,
+ "total_cycles": 1,
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ }
+}
+```
+
diff --git a/doc/models/subscription-billing-information.md b/doc/models/subscription-billing-information.md
new file mode 100644
index 0000000..b3aef4c
--- /dev/null
+++ b/doc/models/subscription-billing-information.md
@@ -0,0 +1,69 @@
+
+# Subscription Billing Information
+
+The billing details for the subscription. If the subscription was or is active, these fields are populated.
+
+## Structure
+
+`SubscriptionBillingInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `outstandingBalance` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | getOutstandingBalance(): Money | setOutstandingBalance(Money outstandingBalance): void |
+| `cycleExecutions` | [`?(CycleExecution[])`](../../doc/models/cycle-execution.md) | Optional | The trial and regular billing executions.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `3` | getCycleExecutions(): ?array | setCycleExecutions(?array cycleExecutions): void |
+| `lastPayment` | [`?LastPaymentDetails`](../../doc/models/last-payment-details.md) | Optional | The details for the last payment. | getLastPayment(): ?LastPaymentDetails | setLastPayment(?LastPaymentDetails lastPayment): void |
+| `nextBillingTime` | `?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})$` | getNextBillingTime(): ?string | setNextBillingTime(?string nextBillingTime): void |
+| `finalPaymentTime` | `?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})$` | getFinalPaymentTime(): ?string | setFinalPaymentTime(?string finalPaymentTime): void |
+| `failedPaymentsCount` | `int` | Required | The number of consecutive payment failures. Resets to `0` after a successful payment. If this reaches the `payment_failure_threshold` value, the subscription updates to the `SUSPENDED` state.
**Constraints**: `>= 0`, `<= 999` | getFailedPaymentsCount(): int | setFailedPaymentsCount(int failedPaymentsCount): void |
+| `lastFailedPayment` | [`?FailedPaymentDetails`](../../doc/models/failed-payment-details.md) | Optional | The details for the failed payment of the subscription. | getLastFailedPayment(): ?FailedPaymentDetails | setLastFailedPayment(?FailedPaymentDetails lastFailedPayment): void |
+
+## Example (as JSON)
+
+```json
+{
+ "outstanding_balance": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "cycle_executions": [
+ {
+ "tenure_type": "REGULAR",
+ "sequence": 64,
+ "cycles_completed": 110,
+ "cycles_remaining": 14,
+ "current_pricing_scheme_version": 99,
+ "total_cycles": 254
+ },
+ {
+ "tenure_type": "REGULAR",
+ "sequence": 64,
+ "cycles_completed": 110,
+ "cycles_remaining": 14,
+ "current_pricing_scheme_version": 99,
+ "total_cycles": 254
+ }
+ ],
+ "last_payment": {
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "time": "time2"
+ },
+ "next_billing_time": "next_billing_time0",
+ "final_payment_time": "final_payment_time4",
+ "failed_payments_count": 70,
+ "last_failed_payment": {
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ },
+ "time": "time4",
+ "reason_code": "PAYER_CANNOT_PAY",
+ "next_payment_retry_time": "next_payment_retry_time6"
+ }
+}
+```
+
diff --git a/doc/models/subscription-card-request.md b/doc/models/subscription-card-request.md
new file mode 100644
index 0000000..93a7d2a
--- /dev/null
+++ b/doc/models/subscription-card-request.md
@@ -0,0 +1,34 @@
+
+# Subscription Card Request
+
+The payment card to use to fund a payment. Can be a credit or debit card.
+
+## Structure
+
+`SubscriptionCardRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `?string` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | getName(): ?string | setName(?string name): void |
+| `number` | `?string` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | getNumber(): ?string | setNumber(?string number): void |
+| `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])$` | getExpiry(): ?string | setExpiry(?string expiry): void |
+| `securityCode` | `?string` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | getSecurityCode(): ?string | setSecurityCode(?string securityCode): void |
+| `type` | [`?string(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_]+$` | getType(): ?string | setType(?string type): void |
+| `brand` | [`?string(SubscriptionsCardBrand)`](../../doc/models/subscriptions-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_]+$` | getBrand(): ?string | setBrand(?string brand): void |
+| `billingAddress` | [`?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). | getBillingAddress(): ?Address | setBillingAddress(?Address billingAddress): void |
+| `attributes` | [`?SubscriptionsCardAttributes`](../../doc/models/subscriptions-card-attributes.md) | Optional | Additional attributes associated with the use of this card. | getAttributes(): ?SubscriptionsCardAttributes | setAttributes(?SubscriptionsCardAttributes attributes): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name6",
+ "number": "number6",
+ "expiry": "expiry4",
+ "security_code": "security_code8",
+ "type": "UNKNOWN"
+}
+```
+
diff --git a/doc/models/subscription-collection.md b/doc/models/subscription-collection.md
new file mode 100644
index 0000000..7e341fb
--- /dev/null
+++ b/doc/models/subscription-collection.md
@@ -0,0 +1,52 @@
+
+# Subscription Collection
+
+The list of subscriptions.
+
+## Structure
+
+`SubscriptionCollection`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `subscriptions` | [`?(Subscription[])`](../../doc/models/subscription.md) | Optional | An array of subscriptions.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` | getSubscriptions(): ?array | setSubscriptions(?array subscriptions): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "subscriptions": [
+ {
+ "id": "id6",
+ "plan_id": "plan_id8",
+ "start_time": "start_time0",
+ "quantity": "quantity2",
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ }
+ },
+ {
+ "id": "id6",
+ "plan_id": "plan_id8",
+ "start_time": "start_time0",
+ "quantity": "quantity2",
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ }
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/subscription-customer-information.md b/doc/models/subscription-customer-information.md
new file mode 100644
index 0000000..3bda7c2
--- /dev/null
+++ b/doc/models/subscription-customer-information.md
@@ -0,0 +1,32 @@
+
+# Subscription Customer Information
+
+The details about a customer in PayPal's system of record.
+
+## Structure
+
+`SubscriptionCustomerInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `id` | `?string` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | getId(): ?string | setId(?string id): void |
+| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
+| `phone` | [`?PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | getPhone(): ?PhoneWithType | setPhone(?PhoneWithType phone): void |
+
+## Example (as JSON)
+
+```json
+{
+ "id": "id2",
+ "email_address": "email_address0",
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ }
+}
+```
+
diff --git a/doc/models/subscription-error-exception.md b/doc/models/subscription-error-exception.md
new file mode 100644
index 0000000..cb302f2
--- /dev/null
+++ b/doc/models/subscription-error-exception.md
@@ -0,0 +1,107 @@
+
+# Subscription Error Exception
+
+The error details.
+
+## Structure
+
+`SubscriptionErrorException`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `name` | `string` | Required | The human-readable, unique name of the error. | getName(): string | setName(string name): void |
+| `message` | `string` | Required | The message that describes the error. | getMessage(): string | setMessage(string message): void |
+| `debugId` | `string` | Required | The PayPal internal ID. Used for correlation purposes. | getDebugId(): string | setDebugId(string debugId): void |
+| `informationLink` | `?string` | Optional | The information link, or URI, that shows detailed information about this error for the developer. | getInformationLink(): ?string | setInformationLink(?string informationLink): void |
+| `details` | [`?(ErrorDetails[])`](../../doc/models/error-details.md) | Optional | An array of additional details about the error. | getDetails(): ?array | setDetails(?array details): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "name": "name0",
+ "message": "message0",
+ "debug_id": "debug_id4",
+ "information_link": "information_link8",
+ "details": [
+ {
+ "field": "field4",
+ "value": "value2",
+ "location": "location4",
+ "issue": "issue6",
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "description": "description0"
+ },
+ {
+ "field": "field4",
+ "value": "value2",
+ "location": "location4",
+ "issue": "issue6",
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "description": "description0"
+ },
+ {
+ "field": "field4",
+ "value": "value2",
+ "location": "location4",
+ "issue": "issue6",
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "description": "description0"
+ }
+ ],
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/subscription-patch-application-context.md b/doc/models/subscription-patch-application-context.md
new file mode 100644
index 0000000..7d41480
--- /dev/null
+++ b/doc/models/subscription-patch-application-context.md
@@ -0,0 +1,35 @@
+
+# Subscription Patch Application Context
+
+The application context, which customizes the payer experience during the subscription approval process with PayPal.
+
+## Structure
+
+`SubscriptionPatchApplicationContext`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `brandName` | `?string` | Optional | The label that overrides the business name in the PayPal account on the PayPal site.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
+| `locale` | `?string` | Optional | 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`.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | getLocale(): ?string | setLocale(?string locale): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `paymentMethod` | [`?PaymentMethod`](../../doc/models/payment-method.md) | Optional | The customer and merchant payment preferences. | getPaymentMethod(): ?PaymentMethod | setPaymentMethod(?PaymentMethod paymentMethod): void |
+| `returnUrl` | `string` | Required | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getReturnUrl(): string | setReturnUrl(string returnUrl): void |
+| `cancelUrl` | `string` | Required | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | getCancelUrl(): string | setCancelUrl(string cancelUrl): void |
+
+## Example (as JSON)
+
+```json
+{
+ "shipping_preference": "GET_FROM_FILE",
+ "return_url": "return_url4",
+ "cancel_url": "cancel_url8",
+ "brand_name": "brand_name4",
+ "locale": "locale8",
+ "payment_method": {
+ "payee_preferred": "UNRESTRICTED"
+ }
+}
+```
+
diff --git a/doc/models/subscription-payer-name.md b/doc/models/subscription-payer-name.md
new file mode 100644
index 0000000..9c5c1b8
--- /dev/null
+++ b/doc/models/subscription-payer-name.md
@@ -0,0 +1,32 @@
+
+# Subscription Payer Name
+
+The name of the party.
+
+## Structure
+
+`SubscriptionPayerName`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `prefix` | `?string` | Optional | The prefix, or title, to the party's name.
**Constraints**: *Maximum Length*: `140` | getPrefix(): ?string | setPrefix(?string prefix): void |
+| `givenName` | `?string` | Optional | When the party is a person, the party's given, or first, name.
**Constraints**: *Maximum Length*: `140` | getGivenName(): ?string | setGivenName(?string givenName): void |
+| `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` | getSurname(): ?string | setSurname(?string surname): void |
+| `middleName` | `?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` | getMiddleName(): ?string | setMiddleName(?string middleName): void |
+| `suffix` | `?string` | Optional | The suffix for the party's name.
**Constraints**: *Maximum Length*: `140` | getSuffix(): ?string | setSuffix(?string suffix): void |
+| `fullName` | `?string` | Optional | When the party is a person, the party's full name.
**Constraints**: *Maximum Length*: `300` | getFullName(): ?string | setFullName(?string fullName): void |
+
+## Example (as JSON)
+
+```json
+{
+ "prefix": "prefix4",
+ "given_name": "given_name8",
+ "surname": "surname2",
+ "middle_name": "middle_name4",
+ "suffix": "suffix4"
+}
+```
+
diff --git a/doc/models/subscription-payment-source-response.md b/doc/models/subscription-payment-source-response.md
new file mode 100644
index 0000000..feb5adc
--- /dev/null
+++ b/doc/models/subscription-payment-source-response.md
@@ -0,0 +1,35 @@
+
+# Subscription Payment Source Response
+
+The payment source used to fund the payment.
+
+## Structure
+
+`SubscriptionPaymentSourceResponse`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `card` | [`?CardResponseWithBillingAddress`](../../doc/models/card-response-with-billing-address.md) | Optional | The payment card used to fund the payment. Card can be a credit or debit card. | getCard(): ?CardResponseWithBillingAddress | setCard(?CardResponseWithBillingAddress card): void |
+
+## Example (as JSON)
+
+```json
+{
+ "card": {
+ "name": "name6",
+ "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": "expiry4",
+ "currency_code": "currency_code2"
+ }
+}
+```
+
diff --git a/doc/models/subscription-payment-source.md b/doc/models/subscription-payment-source.md
new file mode 100644
index 0000000..ed7503d
--- /dev/null
+++ b/doc/models/subscription-payment-source.md
@@ -0,0 +1,29 @@
+
+# Subscription Payment Source
+
+The payment source definition. To be eligible to create subscription using debit or credit card, you will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its available only for non-3DS cards and for merchants in US and AU regions.
+
+## Structure
+
+`SubscriptionPaymentSource`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `card` | [`?SubscriptionCardRequest`](../../doc/models/subscription-card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card. | getCard(): ?SubscriptionCardRequest | setCard(?SubscriptionCardRequest card): void |
+
+## Example (as JSON)
+
+```json
+{
+ "card": {
+ "name": "name6",
+ "number": "number6",
+ "expiry": "expiry4",
+ "security_code": "security_code8",
+ "type": "UNKNOWN"
+ }
+}
+```
+
diff --git a/doc/models/subscription-plan-status.md b/doc/models/subscription-plan-status.md
new file mode 100644
index 0000000..2f4e757
--- /dev/null
+++ b/doc/models/subscription-plan-status.md
@@ -0,0 +1,17 @@
+
+# Subscription Plan Status
+
+The plan status.
+
+## Enumeration
+
+`SubscriptionPlanStatus`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `CREATED` | The plan was created. You cannot create subscriptions for a plan in this state. |
+| `INACTIVE` | The plan is inactive. |
+| `ACTIVE` | The plan is active. You can only create subscriptions for a plan in this state. |
+
diff --git a/doc/models/subscription-pricing-model.md b/doc/models/subscription-pricing-model.md
new file mode 100644
index 0000000..a76c322
--- /dev/null
+++ b/doc/models/subscription-pricing-model.md
@@ -0,0 +1,16 @@
+
+# Subscription Pricing Model
+
+The pricing model for tiered plan. The `tiers` parameter is required.
+
+## Enumeration
+
+`SubscriptionPricingModel`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `VOLUME` | A volume pricing model. |
+| `TIERED` | A tiered pricing model. |
+
diff --git a/doc/models/subscription-pricing-scheme.md b/doc/models/subscription-pricing-scheme.md
new file mode 100644
index 0000000..cbe303e
--- /dev/null
+++ b/doc/models/subscription-pricing-scheme.md
@@ -0,0 +1,60 @@
+
+# Subscription Pricing Scheme
+
+The pricing scheme details.
+
+## Structure
+
+`SubscriptionPricingScheme`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `version` | `?int` | Optional | The version of the pricing scheme.
**Constraints**: `>= 0`, `<= 999` | getVersion(): ?int | setVersion(?int version): void |
+| `fixedPrice` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getFixedPrice(): ?Money | setFixedPrice(?Money fixedPrice): void |
+| `pricingModel` | [`?string(SubscriptionPricingModel)`](../../doc/models/subscription-pricing-model.md) | Optional | The pricing model for tiered plan. The `tiers` parameter is required.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getPricingModel(): ?string | setPricingModel(?string pricingModel): void |
+| `tiers` | [`?(PricingTier[])`](../../doc/models/pricing-tier.md) | Optional | An array of pricing tiers which are used for billing volume/tiered plans. pricing_model field has to be specified.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | getTiers(): ?array | setTiers(?array tiers): void |
+| `createTime` | `?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})$` | getCreateTime(): ?string | setCreateTime(?string createTime): void |
+| `updateTime` | `?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})$` | getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
+
+## Example (as JSON)
+
+```json
+{
+ "version": 172,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time2"
+}
+```
+
diff --git a/doc/models/subscription-transaction-details.md b/doc/models/subscription-transaction-details.md
new file mode 100644
index 0000000..09bbe12
--- /dev/null
+++ b/doc/models/subscription-transaction-details.md
@@ -0,0 +1,64 @@
+
+# Subscription Transaction Details
+
+The transaction details.
+
+## Structure
+
+`SubscriptionTransactionDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `status` | [`?string(CaptureStatus)`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | getStatus(): ?string | setStatus(?string status): void |
+| `id` | `string` | Required | The PayPal-generated transaction ID.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `50` | getId(): string | setId(string id): void |
+| `amountWithBreakdown` | [`SubscriptionAmountWithBreakdown`](../../doc/models/subscription-amount-with-breakdown.md) | Required | The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts. | getAmountWithBreakdown(): SubscriptionAmountWithBreakdown | setAmountWithBreakdown(SubscriptionAmountWithBreakdown amountWithBreakdown): void |
+| `payerName` | [`?SubscriptionPayerName`](../../doc/models/subscription-payer-name.md) | Optional | The name of the party. | getPayerName(): ?SubscriptionPayerName | setPayerName(?SubscriptionPayerName payerName): void |
+| `payerEmail` | `?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])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-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])+)\])$`` | getPayerEmail(): ?string | setPayerEmail(?string payerEmail): void |
+| `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})$` | getTime(): string | setTime(string time): void |
+
+## Example (as JSON)
+
+```json
+{
+ "status": "REFUNDED",
+ "id": "id4",
+ "amount_with_breakdown": {
+ "gross_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "total_item_amount": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "fee_amount": {
+ "currency_code": "currency_code2",
+ "value": "value4"
+ },
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "tax_amount": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ },
+ "net_amount": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ }
+ },
+ "payer_name": {
+ "prefix": "prefix8",
+ "given_name": "given_name2",
+ "surname": "surname8",
+ "middle_name": "middle_name0",
+ "suffix": "suffix0"
+ },
+ "payer_email": "payer_email2",
+ "time": "time4"
+}
+```
+
diff --git a/doc/models/subscription.md b/doc/models/subscription.md
new file mode 100644
index 0000000..232294d
--- /dev/null
+++ b/doc/models/subscription.md
@@ -0,0 +1,42 @@
+
+# Subscription
+
+The subscription details.
+
+## Structure
+
+`Subscription`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `id` | `?string` | Optional | The PayPal-generated ID for the subscription.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `50` | getId(): ?string | setId(?string id): void |
+| `planId` | `?string` | Optional | The ID of the plan.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `50` | getPlanId(): ?string | setPlanId(?string planId): void |
+| `startTime` | `?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})$` | getStartTime(): ?string | setStartTime(?string startTime): void |
+| `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]+)$` | getQuantity(): ?string | setQuantity(?string quantity): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `subscriber` | [`?Subscriber`](../../doc/models/subscriber.md) | Optional | The subscriber response information. | getSubscriber(): ?Subscriber | setSubscriber(?Subscriber subscriber): void |
+| `billingInfo` | [`?SubscriptionBillingInformation`](../../doc/models/subscription-billing-information.md) | Optional | The billing details for the subscription. If the subscription was or is active, these fields are populated. | getBillingInfo(): ?SubscriptionBillingInformation | setBillingInfo(?SubscriptionBillingInformation billingInfo): void |
+| `createTime` | `?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})$` | getCreateTime(): ?string | setCreateTime(?string createTime): void |
+| `updateTime` | `?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})$` | getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
+| `customId` | `?string` | Optional | The custom id for the subscription. Can be invoice id.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[\x20-\x7E]+` | getCustomId(): ?string | setCustomId(?string customId): void |
+| `planOverridden` | `?bool` | Optional | Indicates whether the subscription has overridden any plan attributes. | getPlanOverridden(): ?bool | setPlanOverridden(?bool planOverridden): void |
+| `plan` | [`?PlanDetails`](../../doc/models/plan-details.md) | Optional | The plan details. | getPlan(): ?PlanDetails | setPlan(?PlanDetails plan): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "id": "id4",
+ "plan_id": "plan_id6",
+ "start_time": "start_time8",
+ "quantity": "quantity0",
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ }
+}
+```
+
diff --git a/doc/models/subscriptions-card-attributes.md b/doc/models/subscriptions-card-attributes.md
new file mode 100644
index 0000000..23d27f3
--- /dev/null
+++ b/doc/models/subscriptions-card-attributes.md
@@ -0,0 +1,41 @@
+
+# Subscriptions Card Attributes
+
+Additional attributes associated with the use of this card.
+
+## Structure
+
+`SubscriptionsCardAttributes`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `customer` | [`?CardCustomer`](../../doc/models/card-customer.md) | Optional | The details about a customer in PayPal's system of record. | getCustomer(): ?CardCustomer | setCustomer(?CardCustomer customer): void |
+| `vault` | [`?VaultInstructionBase`](../../doc/models/vault-instruction-base.md) | Optional | Basic vault instruction specification that can be extended by specific payment sources that supports vaulting. | getVault(): ?VaultInstructionBase | setVault(?VaultInstructionBase vault): void |
+| `verification` | [`?CardVerification`](../../doc/models/card-verification.md) | Optional | The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). | getVerification(): ?CardVerification | setVerification(?CardVerification verification): void |
+
+## Example (as JSON)
+
+```json
+{
+ "customer": {
+ "id": "id0",
+ "email_address": "email_address2",
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "merchant_customer_id": "merchant_customer_id2"
+ },
+ "vault": {
+ "store_in_vault": "ON_SUCCESS"
+ },
+ "verification": {
+ "method": "3D_SECURE"
+ }
+}
+```
+
diff --git a/doc/models/subscriptions-card-brand.md b/doc/models/subscriptions-card-brand.md
new file mode 100644
index 0000000..60a5d91
--- /dev/null
+++ b/doc/models/subscriptions-card-brand.md
@@ -0,0 +1,39 @@
+
+# Subscriptions Card Brand
+
+The card network or brand. Applies to credit, debit, gift, and payment cards.
+
+## Enumeration
+
+`SubscriptionsCardBrand`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `VISA` | Visa card. |
+| `MASTERCARD` | Mastercard card. |
+| `DISCOVER` | Discover card. |
+| `AMEX` | American Express card. |
+| `SOLO` | Solo debit card. |
+| `JCB` | Japan Credit Bureau card. |
+| `STAR` | Military Star card. |
+| `DELTA` | Delta Airlines card. |
+| `SWITCH_` | Switch credit card. |
+| `MAESTRO` | Maestro credit card. |
+| `CB_NATIONALE` | Carte Bancaire (CB) credit card. |
+| `CONFIGOGA` | Configoga credit card. |
+| `CONFIDIS` | Confidis credit card. |
+| `ELECTRON` | Visa Electron credit card. |
+| `CETELEM` | Cetelem credit card. |
+| `CHINA_UNION_PAY` | China union pay credit card. |
+| `DINERS` | The Diners Club International banking and payment services capability network owned by Discover Financial Services (DFS), one of the most recognized brands in US financial services. |
+| `ELO` | The Brazilian Elo card payment network. |
+| `HIPER` | The Hiper - Ingenico ePayment network. |
+| `HIPERCARD` | The Brazilian Hipercard payment network that's widely accepted in the retail market. |
+| `RUPAY` | The RuPay payment network. |
+| `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. |
+| `UNKNOWN` | UNKNOWN payment network. |
+
diff --git a/doc/models/supplementary-purchase-data.md b/doc/models/supplementary-purchase-data.md
deleted file mode 100644
index 07d668b..0000000
--- a/doc/models/supplementary-purchase-data.md
+++ /dev/null
@@ -1,25 +0,0 @@
-
-# Supplementary Purchase Data
-
-The capture identification-related fields. Includes the invoice ID, custom ID, note to payer, and soft descriptor.
-
-## Structure
-
-`SupplementaryPurchaseData`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `invoiceId` | `?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}$` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
-| `noteToPayer` | `?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}$` | getNoteToPayer(): ?string | setNoteToPayer(?string noteToPayer): void |
-
-## Example (as JSON)
-
-```json
-{
- "invoice_id": "invoice_id8",
- "note_to_payer": "note_to_payer0"
-}
-```
-
diff --git a/doc/models/suspend-subscription.md b/doc/models/suspend-subscription.md
new file mode 100644
index 0000000..7db99fc
--- /dev/null
+++ b/doc/models/suspend-subscription.md
@@ -0,0 +1,23 @@
+
+# Suspend Subscription
+
+The suspend subscription request details.
+
+## Structure
+
+`SuspendSubscription`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `reason` | `string` | Required | The reason for suspension of the Subscription.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | getReason(): string | setReason(string reason): void |
+
+## Example (as JSON)
+
+```json
+{
+ "reason": "reason4"
+}
+```
+
diff --git a/doc/models/tax-amount.md b/doc/models/tax-amount.md
new file mode 100644
index 0000000..5df8229
--- /dev/null
+++ b/doc/models/tax-amount.md
@@ -0,0 +1,26 @@
+
+# Tax Amount
+
+The tax levied by a government on the purchase of goods or services.
+
+## Structure
+
+`TaxAmount`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `taxAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTaxAmount(): ?Money | setTaxAmount(?Money taxAmount): void |
+
+## Example (as JSON)
+
+```json
+{
+ "tax_amount": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ }
+}
+```
+
diff --git a/doc/models/taxes-override.md b/doc/models/taxes-override.md
new file mode 100644
index 0000000..64f5400
--- /dev/null
+++ b/doc/models/taxes-override.md
@@ -0,0 +1,25 @@
+
+# Taxes Override
+
+The tax details.
+
+## Structure
+
+`TaxesOverride`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `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]+))$` | getPercentage(): ?string | setPercentage(?string percentage): void |
+| `inclusive` | `?bool` | Optional | Indicates whether the tax was already included in the billing amount. | getInclusive(): ?bool | setInclusive(?bool inclusive): void |
+
+## Example (as JSON)
+
+```json
+{
+ "percentage": "percentage8",
+ "inclusive": false
+}
+```
+
diff --git a/doc/models/taxes.md b/doc/models/taxes.md
new file mode 100644
index 0000000..8fcf7fc
--- /dev/null
+++ b/doc/models/taxes.md
@@ -0,0 +1,25 @@
+
+# Taxes
+
+The tax details.
+
+## Structure
+
+`Taxes`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `percentage` | `string` | Required | 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]+))$` | getPercentage(): string | setPercentage(string percentage): void |
+| `inclusive` | `?bool` | Optional | Indicates whether the tax was already included in the billing amount.
**Default**: `true` | getInclusive(): ?bool | setInclusive(?bool inclusive): void |
+
+## Example (as JSON)
+
+```json
+{
+ "percentage": "percentage6",
+ "inclusive": true
+}
+```
+
diff --git a/doc/models/tenure-type.md b/doc/models/tenure-type.md
index 7d57a94..4da9e8a 100644
--- a/doc/models/tenure-type.md
+++ b/doc/models/tenure-type.md
@@ -1,7 +1,7 @@
# Tenure Type
-The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted) or regular billing cycle.
+The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted) or regular billing cycle., The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are allowed per plan., The type of the billing cycle.
## Enumeration
diff --git a/doc/models/transaction-details.md b/doc/models/transaction-details.md
new file mode 100644
index 0000000..3fc3f67
--- /dev/null
+++ b/doc/models/transaction-details.md
@@ -0,0 +1,90 @@
+
+# Transaction Details
+
+The transaction details.
+
+## Structure
+
+`TransactionDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `transactionInfo` | [`?TransactionInformation`](../../doc/models/transaction-information.md) | Optional | The transaction information. | getTransactionInfo(): ?TransactionInformation | setTransactionInfo(?TransactionInformation transactionInfo): void |
+| `payerInfo` | [`?PayerInformation`](../../doc/models/payer-information.md) | Optional | The payer information. | getPayerInfo(): ?PayerInformation | setPayerInfo(?PayerInformation payerInfo): void |
+| `shippingInfo` | [`?ShippingInformation`](../../doc/models/shipping-information.md) | Optional | The shipping information. | getShippingInfo(): ?ShippingInformation | setShippingInfo(?ShippingInformation shippingInfo): void |
+| `cartInfo` | [`?CartInformation`](../../doc/models/cart-information.md) | Optional | The cart information. | getCartInfo(): ?CartInformation | setCartInfo(?CartInformation cartInfo): void |
+| `storeInfo` | [`?StoreInformation`](../../doc/models/store-information.md) | Optional | The store information. | getStoreInfo(): ?StoreInformation | setStoreInfo(?StoreInformation storeInfo): void |
+| `auctionInfo` | [`?AuctionInformation`](../../doc/models/auction-information.md) | Optional | The auction information. | getAuctionInfo(): ?AuctionInformation | setAuctionInfo(?AuctionInformation auctionInfo): void |
+| `incentiveInfo` | [`?IncentiveInformation`](../../doc/models/incentive-information.md) | Optional | The incentive details. | getIncentiveInfo(): ?IncentiveInformation | setIncentiveInfo(?IncentiveInformation incentiveInfo): void |
+
+## Example (as JSON)
+
+```json
+{
+ "transaction_info": {
+ "paypal_account_id": "paypal_account_id4",
+ "transaction_id": "transaction_id0",
+ "paypal_reference_id": "paypal_reference_id2",
+ "paypal_reference_id_type": "ODR",
+ "transaction_event_code": "transaction_event_code6"
+ },
+ "payer_info": {
+ "account_id": "account_id2",
+ "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_status2"
+ },
+ "shipping_info": {
+ "name": "name0",
+ "method": "method4",
+ "address": {
+ "line1": "line18",
+ "line2": "line20",
+ "city": "city6",
+ "state": "state2",
+ "country_code": "country_code6",
+ "postal_code": "postal_code8"
+ },
+ "secondary_shipping_address": {
+ "line1": "line16",
+ "line2": "line28",
+ "city": "city4",
+ "state": "state0",
+ "country_code": "country_code4",
+ "postal_code": "postal_code6"
+ }
+ },
+ "cart_info": {
+ "item_details": [
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ },
+ {
+ "item_code": "item_code0",
+ "item_name": "item_name8",
+ "item_description": "item_description4",
+ "item_options": "item_options2",
+ "item_quantity": "item_quantity2"
+ }
+ ],
+ "tax_inclusive": false,
+ "paypal_invoice_id": "paypal_invoice_id6"
+ },
+ "store_info": {
+ "store_id": "store_id2",
+ "terminal_id": "terminal_id6"
+ }
+}
+```
+
diff --git a/doc/models/transaction-information.md b/doc/models/transaction-information.md
new file mode 100644
index 0000000..c59885b
--- /dev/null
+++ b/doc/models/transaction-information.md
@@ -0,0 +1,60 @@
+
+# Transaction Information
+
+The transaction information.
+
+## Structure
+
+`TransactionInformation`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `paypalAccountId` | `?string` | Optional | The ID of the PayPal account of the counterparty.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[a-zA-Z0-9]*$` | getPaypalAccountId(): ?string | setPaypalAccountId(?string paypalAccountId): void |
+| `transactionId` | `?string` | Optional | The PayPal-generated transaction ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[a-zA-Z0-9]*$` | getTransactionId(): ?string | setTransactionId(?string transactionId): void |
+| `paypalReferenceId` | `?string` | Optional | The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-existing transaction or event.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[a-zA-Z0-9]*$` | getPaypalReferenceId(): ?string | setPaypalReferenceId(?string paypalReferenceId): void |
+| `paypalReferenceIdType` | [`?string(PaypalReferenceIdType)`](../../doc/models/paypal-reference-id-type.md) | Optional | The PayPal reference ID type.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3`, *Pattern*: `^[a-zA-Z0-9]*$` | getPaypalReferenceIdType(): ?string | setPaypalReferenceIdType(?string paypalReferenceIdType): void |
+| `transactionEventCode` | `?string` | Optional | A five-digit transaction event code that classifies the transaction type based on money movement and debit or credit. For example, T0001. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `5`, *Pattern*: `^[a-zA-Z0-9]*$` | getTransactionEventCode(): ?string | setTransactionEventCode(?string transactionEventCode): void |
+| `transactionInitiationDate` | `?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})$` | getTransactionInitiationDate(): ?string | setTransactionInitiationDate(?string transactionInitiationDate): void |
+| `transactionUpdatedDate` | `?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})$` | getTransactionUpdatedDate(): ?string | setTransactionUpdatedDate(?string transactionUpdatedDate): void |
+| `transactionAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTransactionAmount(): ?Money | setTransactionAmount(?Money transactionAmount): void |
+| `feeAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getFeeAmount(): ?Money | setFeeAmount(?Money feeAmount): void |
+| `discountAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getDiscountAmount(): ?Money | setDiscountAmount(?Money discountAmount): void |
+| `insuranceAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getInsuranceAmount(): ?Money | setInsuranceAmount(?Money insuranceAmount): void |
+| `salesTaxAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getSalesTaxAmount(): ?Money | setSalesTaxAmount(?Money salesTaxAmount): void |
+| `shippingAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
+| `shippingDiscountAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingDiscountAmount(): ?Money | setShippingDiscountAmount(?Money shippingDiscountAmount): void |
+| `shippingTaxAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingTaxAmount(): ?Money | setShippingTaxAmount(?Money shippingTaxAmount): void |
+| `otherAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getOtherAmount(): ?Money | setOtherAmount(?Money otherAmount): void |
+| `tipAmount` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTipAmount(): ?Money | setTipAmount(?Money tipAmount): void |
+| `transactionStatus` | `?string` | Optional | A code that indicates the transaction status. 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 fully reversed and funds were refunded to the original sender.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1`, *Pattern*: `^[a-zA-Z0-9]*$` | getTransactionStatus(): ?string | setTransactionStatus(?string transactionStatus): void |
+| `transactionSubject` | `?string` | Optional | The subject of payment. The payer passes this value to the payee. The payer controls this data through the interface through which he or she sends the data.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getTransactionSubject(): ?string | setTransactionSubject(?string transactionSubject): void |
+| `transactionNote` | `?string` | Optional | A special note that the payer passes to the payee. Might contain special customer requests, such as shipping instructions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getTransactionNote(): ?string | setTransactionNote(?string transactionNote): void |
+| `paymentTrackingId` | `?string` | Optional | The payment tracking ID, which is a unique ID that partners specify to either get information about a payment or request a refund.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[a-zA-Z0-9]*$` | getPaymentTrackingId(): ?string | setPaymentTrackingId(?string paymentTrackingId): void |
+| `bankReferenceId` | `?string` | Optional | The bank reference ID. The bank provides this value for an ACH transaction.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[a-zA-Z0-9]*$` | getBankReferenceId(): ?string | setBankReferenceId(?string bankReferenceId): void |
+| `endingBalance` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getEndingBalance(): ?Money | setEndingBalance(?Money endingBalance): void |
+| `availableBalance` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getAvailableBalance(): ?Money | setAvailableBalance(?Money availableBalance): void |
+| `invoiceId` | `?string` | Optional | The invoice ID that is sent by the merchant with the transaction. Note: If an invoice ID was sent with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing transaction is reported.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getInvoiceId(): ?string | setInvoiceId(?string invoiceId): void |
+| `customField` | `?string` | Optional | The merchant-provided custom text. Note: Usually, this field includes the unique ID for payments made with MassPay type transaction.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[a-zA-Z0-9_'\-., ":;\!?]*$` | getCustomField(): ?string | setCustomField(?string customField): void |
+| `protectionEligibility` | `?string` | Optional | Indicates whether the transaction is eligible for protection. Value is: 01. Eligible. 02. Not eligible 03. Partially eligible.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2`, *Pattern*: `^[a-zA-Z0-9]*$` | getProtectionEligibility(): ?string | setProtectionEligibility(?string protectionEligibility): void |
+| `creditTerm` | `?string` | Optional | The credit term. The time span covered by the installment payments as expressed in the term length plus the length time unit code.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z0-9.]*$` | getCreditTerm(): ?string | setCreditTerm(?string creditTerm): void |
+| `creditTransactionalFee` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getCreditTransactionalFee(): ?Money | setCreditTransactionalFee(?Money creditTransactionalFee): void |
+| `creditPromotionalFee` | [`?Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getCreditPromotionalFee(): ?Money | setCreditPromotionalFee(?Money creditPromotionalFee): void |
+| `annualPercentageRate` | `?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]+))$` | getAnnualPercentageRate(): ?string | setAnnualPercentageRate(?string annualPercentageRate): void |
+| `paymentMethodType` | `?string` | Optional | The payment method that was used for a transaction. Value is PUI, installment, or mEFT. Note: Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners in the EMEA region can use this attribute to note transactions that attract turn-over tax.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[a-zA-Z0-9-]*$` | getPaymentMethodType(): ?string | setPaymentMethodType(?string paymentMethodType): void |
+| `instrumentType` | `?string` | Optional | A high-level classification of the type of financial instrument that was used to fund a payment. The pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD, DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods (APM).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | getInstrumentType(): ?string | setInstrumentType(?string instrumentType): void |
+| `instrumentSubType` | `?string` | Optional | A finer-grained classification of the financial instrument that was used to fund a payment. For example, `Visa card` or a `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is not provided because the value is defined by an external party.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | getInstrumentSubType(): ?string | setInstrumentSubType(?string instrumentSubType): void |
+
+## Example (as JSON)
+
+```json
+{
+ "paypal_account_id": "paypal_account_id6",
+ "transaction_id": "transaction_id2",
+ "paypal_reference_id": "paypal_reference_id4",
+ "paypal_reference_id_type": "ODR",
+ "transaction_event_code": "transaction_event_code8"
+}
+```
+
diff --git a/doc/models/transaction-search-error-details.md b/doc/models/transaction-search-error-details.md
new file mode 100644
index 0000000..3207128
--- /dev/null
+++ b/doc/models/transaction-search-error-details.md
@@ -0,0 +1,31 @@
+
+# Transaction Search Error Details
+
+The error details. Required for client-side `4XX` errors.
+
+## Structure
+
+`TransactionSearchErrorDetails`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `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. | getField(): ?string | setField(?string field): void |
+| `value` | `?string` | Optional | The value of the field that caused the error. | getValue(): ?string | setValue(?string value): void |
+| `location` | `?string` | Optional | The location of the field that caused the error. Value is `body`, `path`, or `query`.
**Default**: `'body'` | getLocation(): ?string | setLocation(?string location): void |
+| `issue` | `string` | Required | The unique, fine-grained application-level error code. | getIssue(): string | setIssue(string issue): void |
+| `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. | getDescription(): ?string | setDescription(?string description): void |
+
+## Example (as JSON)
+
+```json
+{
+ "location": "body",
+ "issue": "issue2",
+ "field": "field0",
+ "value": "value8",
+ "description": "description6"
+}
+```
+
diff --git a/doc/models/transactions-list.md b/doc/models/transactions-list.md
new file mode 100644
index 0000000..7ccbb6a
--- /dev/null
+++ b/doc/models/transactions-list.md
@@ -0,0 +1,80 @@
+
+# Transactions List
+
+The list transactions for a subscription request details.
+
+## Structure
+
+`TransactionsList`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `transactions` | [`?(SubscriptionTransactionDetails[])`](../../doc/models/subscription-transaction-details.md) | Optional | An array of transactions.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `32767` | getTransactions(): ?array | setTransactions(?array transactions): void |
+| `totalItems` | `?int` | Optional | The total number of items.
**Constraints**: `>= 0`, `<= 500000000` | getTotalItems(): ?int | setTotalItems(?int totalItems): void |
+| `totalPages` | `?int` | Optional | The total number of pages.
**Constraints**: `>= 0`, `<= 100000000` | getTotalPages(): ?int | setTotalPages(?int totalPages): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getLinks(): ?array | setLinks(?array links): void |
+
+## Example (as JSON)
+
+```json
+{
+ "transactions": [
+ {
+ "status": "PARTIALLY_REFUNDED",
+ "id": "id8",
+ "amount_with_breakdown": {
+ "gross_amount": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "total_item_amount": {
+ "currency_code": "currency_code8",
+ "value": "value4"
+ },
+ "fee_amount": {
+ "currency_code": "currency_code2",
+ "value": "value4"
+ },
+ "shipping_amount": {
+ "currency_code": "currency_code0",
+ "value": "value6"
+ },
+ "tax_amount": {
+ "currency_code": "currency_code2",
+ "value": "value8"
+ },
+ "net_amount": {
+ "currency_code": "currency_code6",
+ "value": "value2"
+ }
+ },
+ "payer_name": {
+ "prefix": "prefix8",
+ "given_name": "given_name2",
+ "surname": "surname8",
+ "middle_name": "middle_name0",
+ "suffix": "suffix0"
+ },
+ "payer_email": "payer_email6",
+ "time": "time8"
+ }
+ ],
+ "total_items": 254,
+ "total_pages": 34,
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ]
+}
+```
+
diff --git a/doc/models/update-pricing-scheme.md b/doc/models/update-pricing-scheme.md
new file mode 100644
index 0000000..deca753
--- /dev/null
+++ b/doc/models/update-pricing-scheme.md
@@ -0,0 +1,59 @@
+
+# Update Pricing Scheme
+
+The update pricing scheme request details.
+
+## Structure
+
+`UpdatePricingScheme`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `billingCycleSequence` | `int` | Required | The billing cycle sequence.
**Constraints**: `>= 1`, `<= 99` | getBillingCycleSequence(): int | setBillingCycleSequence(int billingCycleSequence): void |
+| `pricingScheme` | [`SubscriptionPricingScheme`](../../doc/models/subscription-pricing-scheme.md) | Required | The pricing scheme details. | getPricingScheme(): SubscriptionPricingScheme | setPricingScheme(SubscriptionPricingScheme pricingScheme): void |
+
+## Example (as JSON)
+
+```json
+{
+ "billing_cycle_sequence": 99,
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ }
+}
+```
+
diff --git a/doc/models/update-pricing-schemes-request.md b/doc/models/update-pricing-schemes-request.md
new file mode 100644
index 0000000..c47998d
--- /dev/null
+++ b/doc/models/update-pricing-schemes-request.md
@@ -0,0 +1,62 @@
+
+# Update Pricing Schemes Request
+
+The update pricing scheme request details.
+
+## Structure
+
+`UpdatePricingSchemesRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `pricingSchemes` | [`UpdatePricingScheme[]`](../../doc/models/update-pricing-scheme.md) | Required | An array of pricing schemes.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `99` | getPricingSchemes(): array | setPricingSchemes(array pricingSchemes): void |
+
+## Example (as JSON)
+
+```json
+{
+ "pricing_schemes": [
+ {
+ "billing_cycle_sequence": 34,
+ "pricing_scheme": {
+ "version": 10,
+ "fixed_price": {
+ "currency_code": "currency_code4",
+ "value": "value0"
+ },
+ "pricing_model": "VOLUME",
+ "tiers": [
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ },
+ {
+ "starting_quantity": "starting_quantity8",
+ "ending_quantity": "ending_quantity6",
+ "amount": {
+ "currency_code": "currency_code6",
+ "value": "value0"
+ }
+ }
+ ],
+ "create_time": "create_time4"
+ }
+ }
+ ]
+}
+```
+
diff --git a/doc/models/vault-apple-pay-request.md b/doc/models/vault-apple-pay-request.md
new file mode 100644
index 0000000..84c3458
--- /dev/null
+++ b/doc/models/vault-apple-pay-request.md
@@ -0,0 +1,36 @@
+
+# Vault Apple Pay Request
+
+A resource representing a request to vault Apple Pay.
+
+## Structure
+
+`VaultApplePayRequest`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `token` | `?string` | Optional | Encrypted Apple Pay token, containing card information. This token would be base64 encoded.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` | getToken(): ?string | setToken(?string token): void |
+| `card` | [`?ApplePayRequestCard`](../../doc/models/apple-pay-request-card.md) | Optional | The payment card to be used to fund a payment. Can be a credit or debit card. | getCard(): ?ApplePayRequestCard | setCard(?ApplePayRequestCard card): void |
+
+## Example (as JSON)
+
+```json
+{
+ "token": "token4",
+ "card": {
+ "type": "UNKNOWN",
+ "brand": "CB_NATIONALE",
+ "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/setup-token-card-experience-context.md b/doc/models/vault-card-experience-context.md
similarity index 64%
rename from doc/models/setup-token-card-experience-context.md
rename to doc/models/vault-card-experience-context.md
index d47ad74..a725dd8 100644
--- a/doc/models/setup-token-card-experience-context.md
+++ b/doc/models/vault-card-experience-context.md
@@ -1,31 +1,33 @@
-# Setup Token Card Experience Context
+# Vault Card Experience Context
-Customizes the Vault creation flow experience for your customers.
+A resource representing an experience context of vault a card.
## Structure
-`SetupTokenCardExperienceContext`
+`VaultCardExperienceContext`
## Fields
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `brandName` | `?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*: `300`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
+| `brandName` | `?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*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
| `returnUrl` | `?string` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?string` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
-| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
+| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
+| `userAction` | [`?string(VaultUserAction)`](../../doc/models/vault-user-action.md) | Optional | User Action on action to be performed after a successful payer approval.
**Default**: `VaultUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
## Example (as JSON)
```json
{
- "vault_instruction": "ON_CREATE_PAYMENT_TOKENS",
- "brand_name": "brand_name2",
- "locale": "locale6",
+ "user_action": "CONTINUE",
+ "brand_name": "brand_name4",
+ "locale": "locale8",
"return_url": "return_url4",
- "cancel_url": "cancel_url6"
+ "cancel_url": "cancel_url8",
+ "vault_instruction": "ON_CREATE_PAYMENT_TOKENS"
}
```
diff --git a/doc/models/vault-experience-context.md b/doc/models/vault-experience-context.md
index 7cd5315..9c6ec6e 100644
--- a/doc/models/vault-experience-context.md
+++ b/doc/models/vault-experience-context.md
@@ -11,19 +11,21 @@ Customizes the Vault creation flow experience for your customers.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `brandName` | `?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*: `300`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
+| `brandName` | `?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*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
| `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}))?$` | getLocale(): ?string | setLocale(?string locale): void |
| `returnUrl` | `?string` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | getReturnUrl(): ?string | setReturnUrl(?string returnUrl): void |
| `cancelUrl` | `?string` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | getCancelUrl(): ?string | setCancelUrl(?string cancelUrl): void |
-| `shippingPreference` | [`?string(OrderApplicationContextShippingPreference)`](../../doc/models/order-application-context-shipping-preference.md) | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `OrderApplicationContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
-| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
+| `appSwitchContext` | [`?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. | getAppSwitchContext(): ?AppSwitchContext | setAppSwitchContext(?AppSwitchContext appSwitchContext): void |
+| `userAction` | [`?string(VaultUserAction)`](../../doc/models/vault-user-action.md) | Optional | User Action on action to be performed after a successful payer approval.
**Default**: `VaultUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
## Example (as JSON)
```json
{
"shipping_preference": "GET_FROM_FILE",
- "vault_instruction": "ON_CREATE_PAYMENT_TOKENS",
+ "user_action": "CONTINUE",
"brand_name": "brand_name0",
"locale": "locale4",
"return_url": "return_url2",
diff --git a/doc/models/vault-paypal-wallet-request.md b/doc/models/vault-paypal-wallet-request.md
index 12d186f..4291618 100644
--- a/doc/models/vault-paypal-wallet-request.md
+++ b/doc/models/vault-paypal-wallet-request.md
@@ -18,7 +18,7 @@ A resource representing a request to vault PayPal Wallet.
| `usageType` | [`?string(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_]+$` | getUsageType(): ?string | setUsageType(?string usageType): void |
| `customerType` | [`?string(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_]+$` | getCustomerType(): ?string | setCustomerType(?string customerType): void |
| `billingPlan` | [`?Plan`](../../doc/models/plan.md) | Optional | The merchant level Recurring Billing plan metadata for the Billing Agreement. | getBillingPlan(): ?Plan | setBillingPlan(?Plan billingPlan): void |
-| `experienceContext` | [`?VaultExperienceContext`](../../doc/models/vault-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | getExperienceContext(): ?VaultExperienceContext | setExperienceContext(?VaultExperienceContext experienceContext): void |
+| `experienceContext` | [`?VaultExperienceContext`](../../doc/models/vault-experience-context.md) | Optional | A resource representing an experience context of vault PayPal Wallet. | getExperienceContext(): ?VaultExperienceContext | setExperienceContext(?VaultExperienceContext experienceContext): void |
## Example (as JSON)
@@ -31,6 +31,7 @@ A resource representing a request to vault PayPal Wallet.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/vault-user-action.md b/doc/models/vault-user-action.md
new file mode 100644
index 0000000..b8fb6c7
--- /dev/null
+++ b/doc/models/vault-user-action.md
@@ -0,0 +1,16 @@
+
+# Vault User Action
+
+User Action on action to be performed after a successful payer approval.
+
+## Enumeration
+
+`VaultUserAction`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `SETUP_NOW` | After you redirect the customer to the PayPal payment page, a Setup Now button appears. Use this option when no additional inputs are needed from merchant site and to create the billing agreement immediately when the customer clicks Setup Now. |
+| `CONTINUE_` | After you redirect the customer to the PayPal payment page, a Continue button appears. Use this option when you want to redirect the customer from the completed payment page to the merchant site for additional inputs without immediately creating the billing agreement. |
+
diff --git a/doc/models/vault-venmo-experience-context.md b/doc/models/vault-venmo-experience-context.md
deleted file mode 100644
index 65240b5..0000000
--- a/doc/models/vault-venmo-experience-context.md
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# Vault Venmo Experience Context
-
-Customizes the Vault creation flow experience for your customers.
-
-## Structure
-
-`VaultVenmoExperienceContext`
-
-## Fields
-
-| Name | Type | Tags | Description | Getter | Setter |
-| --- | --- | --- | --- | --- | --- |
-| `brandName` | `?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*: `300`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
-| `shippingPreference` | [`?string(OrderApplicationContextShippingPreference)`](../../doc/models/order-application-context-shipping-preference.md) | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `OrderApplicationContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
-| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
-
-## Example (as JSON)
-
-```json
-{
- "shipping_preference": "GET_FROM_FILE",
- "vault_instruction": "ON_CREATE_PAYMENT_TOKENS",
- "brand_name": "brand_name0"
-}
-```
-
diff --git a/doc/models/vault-venmo-request.md b/doc/models/vault-venmo-request.md
index 247e650..d24e8d9 100644
--- a/doc/models/vault-venmo-request.md
+++ b/doc/models/vault-venmo-request.md
@@ -1,6 +1,8 @@
# Vault Venmo Request
+A resource representing a request to vault Venmo.
+
## Structure
`VaultVenmoRequest`
@@ -15,7 +17,7 @@
| `permitMultiplePaymentTokens` | `?bool` | 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` | getPermitMultiplePaymentTokens(): ?bool | setPermitMultiplePaymentTokens(?bool permitMultiplePaymentTokens): void |
| `usageType` | [`?string(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_]+$` | getUsageType(): ?string | setUsageType(?string usageType): void |
| `customerType` | [`?string(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_]+$` | getCustomerType(): ?string | setCustomerType(?string customerType): void |
-| `experienceContext` | [`?VaultVenmoExperienceContext`](../../doc/models/vault-venmo-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | getExperienceContext(): ?VaultVenmoExperienceContext | setExperienceContext(?VaultVenmoExperienceContext experienceContext): void |
+| `experienceContext` | [`?VenmoExperienceContext`](../../doc/models/venmo-experience-context.md) | Optional | A resource representing an experience context of vault a venmo account. | getExperienceContext(): ?VenmoExperienceContext | setExperienceContext(?VenmoExperienceContext experienceContext): void |
## Example (as JSON)
@@ -28,6 +30,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/vaulted-digital-wallet-shipping-details.md b/doc/models/vaulted-digital-wallet-shipping-details.md
index ed2dd47..fa59631 100644
--- a/doc/models/vaulted-digital-wallet-shipping-details.md
+++ b/doc/models/vaulted-digital-wallet-shipping-details.md
@@ -12,6 +12,7 @@ The shipping details.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `name` | [`?ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | getName(): ?ShippingName | setName(?ShippingName name): void |
+| `emailAddress` | `?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])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-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])+)\])$`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
| `phoneNumber` | [`?PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | getPhoneNumber(): ?PhoneNumberWithCountryCode | setPhoneNumber(?PhoneNumberWithCountryCode phoneNumber): void |
| `type` | [`?string(FulfillmentType)`](../../doc/models/fulfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getType(): ?string | setType(?string type): void |
| `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). | getAddress(): ?Address | setAddress(?Address address): void |
@@ -23,6 +24,7 @@ The shipping details.
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address6",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/vaulted-digital-wallet.md b/doc/models/vaulted-digital-wallet.md
index 2ebefef..17758be 100644
--- a/doc/models/vaulted-digital-wallet.md
+++ b/doc/models/vaulted-digital-wallet.md
@@ -29,6 +29,7 @@ Resource consolidating common request and response attributes for vaulting a Dig
"name": {
"full_name": "full_name6"
},
+ "email_address": "email_address2",
"phone_number": {
"country_code": "country_code2",
"national_number": "national_number6"
diff --git a/doc/models/venmo-experience-context.md b/doc/models/venmo-experience-context.md
new file mode 100644
index 0000000..0654bd1
--- /dev/null
+++ b/doc/models/venmo-experience-context.md
@@ -0,0 +1,29 @@
+
+# Venmo Experience Context
+
+A resource representing an experience context of vault a venmo account.
+
+## Structure
+
+`VenmoExperienceContext`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `brandName` | `?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*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
+| `shippingPreference` | [`?string(ExperienceContextShippingPreference)`](../../doc/models/experience-context-shipping-preference.md) | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `ExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `vaultInstruction` | [`?string(VaultInstructionAction)`](../../doc/models/vault-instruction-action.md) | Optional | DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getVaultInstruction(): ?string | setVaultInstruction(?string vaultInstruction): void |
+| `userAction` | [`?string(VaultUserAction)`](../../doc/models/vault-user-action.md) | Optional | User Action on action to be performed after a successful payer approval.
**Default**: `VaultUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
+
+## Example (as JSON)
+
+```json
+{
+ "shipping_preference": "GET_FROM_FILE",
+ "user_action": "CONTINUE",
+ "brand_name": "brand_name0",
+ "vault_instruction": "ON_CREATE_PAYMENT_TOKENS"
+}
+```
+
diff --git a/doc/models/venmo-payment-token.md b/doc/models/venmo-payment-token.md
index fb8ad65..0fb70d8 100644
--- a/doc/models/venmo-payment-token.md
+++ b/doc/models/venmo-payment-token.md
@@ -1,6 +1,8 @@
# Venmo Payment Token
+Full representation of a Venmo Payment Token.
+
## Structure
`VenmoPaymentToken`
@@ -15,7 +17,7 @@
| `permitMultiplePaymentTokens` | `?bool` | 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` | getPermitMultiplePaymentTokens(): ?bool | setPermitMultiplePaymentTokens(?bool permitMultiplePaymentTokens): void |
| `usageType` | [`?string(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_]+$` | getUsageType(): ?string | setUsageType(?string usageType): void |
| `customerType` | [`?string(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_]+$` | getCustomerType(): ?string | setCustomerType(?string customerType): void |
-| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
+| `emailAddress` | `?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])+)\])`` | getEmailAddress(): ?string | setEmailAddress(?string emailAddress): void |
| `payerId` | `?string` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | getPayerId(): ?string | setPayerId(?string payerId): void |
| `name` | [`?Name`](../../doc/models/name.md) | Optional | The name of the party. | getName(): ?Name | setName(?Name name): void |
| `phone` | [`?PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | getPhone(): ?PhoneWithType | setPhone(?PhoneWithType phone): void |
@@ -33,6 +35,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/venmo-vault-response-status.md b/doc/models/venmo-vault-response-status.md
new file mode 100644
index 0000000..e5371c0
--- /dev/null
+++ b/doc/models/venmo-vault-response-status.md
@@ -0,0 +1,17 @@
+
+# Venmo Vault Response Status
+
+The vault status.
+
+## Enumeration
+
+`VenmoVaultResponseStatus`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `VAULTED` | The payment source has been saved in your customer's vault. This vault status reflects `/v3/vault` status. |
+| `CREATED` | DEPRECATED. The payment source has been saved in your customer's vault. This status applies to deprecated integration patterns and will not be returned for v3/vault integrations. |
+| `APPROVED` | Customer has approved the action of saving the specified payment_source into their vault. Use v3/vault/payment-tokens with given setup_token to save the payment source in the vault |
+
diff --git a/doc/models/venmo-vault-response.md b/doc/models/venmo-vault-response.md
new file mode 100644
index 0000000..e587fd6
--- /dev/null
+++ b/doc/models/venmo-vault-response.md
@@ -0,0 +1,58 @@
+
+# Venmo Vault Response
+
+The details about a saved venmo payment source.
+
+## Structure
+
+`VenmoVaultResponse`
+
+## Fields
+
+| Name | Type | Tags | Description | Getter | Setter |
+| --- | --- | --- | --- | --- | --- |
+| `id` | `?string` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | getId(): ?string | setId(?string id): void |
+| `status` | [`?string(VenmoVaultResponseStatus)`](../../doc/models/venmo-vault-response-status.md) | Optional | The vault status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | getStatus(): ?string | setStatus(?string status): void |
+| `links` | [`?(LinkDescription[])`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | getLinks(): ?array | setLinks(?array links): void |
+| `customer` | [`?CustomerInformation`](../../doc/models/customer-information.md) | Optional | This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer. | getCustomer(): ?CustomerInformation | setCustomer(?CustomerInformation customer): void |
+
+## Example (as JSON)
+
+```json
+{
+ "id": "id2",
+ "status": "CREATED",
+ "links": [
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ },
+ {
+ "href": "href6",
+ "rel": "rel0",
+ "method": "HEAD"
+ }
+ ],
+ "customer": {
+ "id": "id0",
+ "email_address": "email_address2",
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "name": {
+ "given_name": "given_name2",
+ "surname": "surname8"
+ }
+ }
+}
+```
+
diff --git a/doc/models/venmo-wallet-attributes-response.md b/doc/models/venmo-wallet-attributes-response.md
index 37a784f..67ef34b 100644
--- a/doc/models/venmo-wallet-attributes-response.md
+++ b/doc/models/venmo-wallet-attributes-response.md
@@ -11,7 +11,7 @@ Additional attributes associated with the use of a Venmo Wallet.
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `vault` | [`?VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | getVault(): ?VaultResponse | setVault(?VaultResponse vault): void |
+| `vault` | [`?VenmoVaultResponse`](../../doc/models/venmo-vault-response.md) | Optional | The details about a saved venmo payment source. | getVault(): ?VenmoVaultResponse | setVault(?VenmoVaultResponse vault): void |
## Example (as JSON)
@@ -20,20 +20,27 @@ Additional attributes associated with the use of a Venmo Wallet.
"vault": {
"id": "id6",
"status": "APPROVED",
- "customer": {
- "id": "id0",
- "name": {
- "given_name": "given_name2",
- "surname": "surname8"
- }
- },
"links": [
{
"href": "href6",
"rel": "rel0",
"method": "HEAD"
}
- ]
+ ],
+ "customer": {
+ "id": "id0",
+ "email_address": "email_address2",
+ "phone": {
+ "phone_type": "OTHER",
+ "phone_number": {
+ "national_number": "national_number6"
+ }
+ },
+ "name": {
+ "given_name": "given_name2",
+ "surname": "surname8"
+ }
+ }
}
}
```
diff --git a/doc/models/shipping-preference.md b/doc/models/venmo-wallet-experience-context-shipping-preference.md
similarity index 83%
rename from doc/models/shipping-preference.md
rename to doc/models/venmo-wallet-experience-context-shipping-preference.md
index c724a22..f1c53d2 100644
--- a/doc/models/shipping-preference.md
+++ b/doc/models/venmo-wallet-experience-context-shipping-preference.md
@@ -1,11 +1,11 @@
-# Shipping Preference
+# Venmo Wallet Experience Context Shipping Preference
The location from which the shipping address is derived.
## Enumeration
-`ShippingPreference`
+`VenmoWalletExperienceContextShippingPreference`
## Fields
diff --git a/doc/models/venmo-wallet-experience-context-user-action.md b/doc/models/venmo-wallet-experience-context-user-action.md
new file mode 100644
index 0000000..65376f8
--- /dev/null
+++ b/doc/models/venmo-wallet-experience-context-user-action.md
@@ -0,0 +1,16 @@
+
+# Venmo Wallet Experience Context User Action
+
+Configures a Continue or Pay Now checkout flow.
+
+## Enumeration
+
+`VenmoWalletExperienceContextUserAction`
+
+## Fields
+
+| Name | Description |
+| --- | --- |
+| `CONTINUE_` | After you redirect the customer to the Venmo payment page, a Continue button appears. Use this option when the final amount is not known when the checkout flow is initiated and you want to redirect the customer to the merchant page without processing the payment. |
+| `PAY_NOW` | After you redirect the customer to the Venmo payment page, a Pay Now button appears. Use this option when the final amount is known when the checkout is initiated and you want to process the payment immediately when the customer clicks Pay Now. |
+
diff --git a/doc/models/venmo-wallet-experience-context.md b/doc/models/venmo-wallet-experience-context.md
index 6330ce6..b38e324 100644
--- a/doc/models/venmo-wallet-experience-context.md
+++ b/doc/models/venmo-wallet-experience-context.md
@@ -12,14 +12,16 @@ Customizes the buyer experience during the approval process for payment with Ven
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `brandName` | `?string` | Optional | The business name of the merchant. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | getBrandName(): ?string | setBrandName(?string brandName): void |
-| `shippingPreference` | [`?string(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_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
+| `shippingPreference` | [`?string(VenmoWalletExperienceContextShippingPreference)`](../../doc/models/venmo-wallet-experience-context-shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `VenmoWalletExperienceContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
| `orderUpdateCallbackConfig` | [`?CallbackConfiguration`](../../doc/models/callback-configuration.md) | Optional | CallBack Configuration that the merchant can provide to PayPal/Venmo. | getOrderUpdateCallbackConfig(): ?CallbackConfiguration | setOrderUpdateCallbackConfig(?CallbackConfiguration orderUpdateCallbackConfig): void |
+| `userAction` | [`?string(VenmoWalletExperienceContextUserAction)`](../../doc/models/venmo-wallet-experience-context-user-action.md) | Optional | Configures a Continue or Pay Now checkout flow.
**Default**: `VenmoWalletExperienceContextUserAction::CONTINUE_`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | getUserAction(): ?string | setUserAction(?string userAction): void |
## Example (as JSON)
```json
{
"shipping_preference": "GET_FROM_FILE",
+ "user_action": "CONTINUE",
"brand_name": "brand_name6",
"order_update_callback_config": {
"callback_events": [
diff --git a/doc/models/venmo-wallet-request.md b/doc/models/venmo-wallet-request.md
index 711af21..7ee2452 100644
--- a/doc/models/venmo-wallet-request.md
+++ b/doc/models/venmo-wallet-request.md
@@ -32,7 +32,8 @@ Information needed to pay using Venmo.
"SHIPPING_OPTIONS"
],
"callback_url": "callback_url6"
- }
+ },
+ "user_action": "CONTINUE"
},
"attributes": {
"customer": {
diff --git a/doc/models/venmo-wallet-response.md b/doc/models/venmo-wallet-response.md
index 4834889..8274589 100644
--- a/doc/models/venmo-wallet-response.md
+++ b/doc/models/venmo-wallet-response.md
@@ -17,12 +17,14 @@ Venmo wallet response.
| `name` | [`?Name`](../../doc/models/name.md) | Optional | The name of the party. | getName(): ?Name | setName(?Name name): void |
| `phoneNumber` | [`?PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | getPhoneNumber(): ?PhoneNumber | setPhoneNumber(?PhoneNumber phoneNumber): void |
| `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). | getAddress(): ?Address | setAddress(?Address address): void |
+| `returnFlow` | [`?string(ReturnFlow)`](../../doc/models/return-flow.md) | Optional | Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the Venmo App.
**Default**: `ReturnFlow::AUTO`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `6`, *Pattern*: `^[A-Z_]+$` | getReturnFlow(): ?string | setReturnFlow(?string returnFlow): void |
| `attributes` | [`?VenmoWalletAttributesResponse`](../../doc/models/venmo-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a Venmo Wallet. | getAttributes(): ?VenmoWalletAttributesResponse | setAttributes(?VenmoWalletAttributesResponse attributes): void |
## Example (as JSON)
```json
{
+ "return_flow": "AUTO",
"email_address": "email_address6",
"account_id": "account_id8",
"user_name": "user_name2",
diff --git a/doc/proxy-configuration-builder.md b/doc/proxy-configuration-builder.md
index 9b74a2f..ad0dd38 100644
--- a/doc/proxy-configuration-builder.md
+++ b/doc/proxy-configuration-builder.md
@@ -11,7 +11,7 @@ Represents the proxy server configurations for API calls. Create instance using
| `port(int $port)` | Sets the port used to connect to the proxy server. **Default port:** 0 |
| `tunnel(bool $tunnel)` | Enables or disables tunneling through the proxy server. **Default tunnel:** false |
| `auth(string $user , string $pass)` | Sets both username and password in a single method. **Default user:** '', **Default pass:** '' |
-| `authMethod(string $authMethod)` | Sets the proxy authentication method. **Default authMethod:** CURLAUTH_BASIC |
+| `authMethod(int $authMethod)` | Sets the proxy authentication method. **Default authMethod:** CURLAUTH_BASIC |
### Client Initialization with Proxy Configuration
diff --git a/src/Controllers/OrdersController.php b/src/Controllers/OrdersController.php
index 76cd35e..f3a8721 100644
--- a/src/Controllers/OrdersController.php
+++ b/src/Controllers/OrdersController.php
@@ -23,6 +23,97 @@ use PaypalServerSdkLib\Models\OrderAuthorizeResponse;
class OrdersController extends BaseController
{
+ /**
+ * 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.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function createOrder(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/checkout/orders')
+ ->auth('Oauth2')
+ ->parameters(
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body'),
+ HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
+ HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId'),
+ HeaderParam::init('PayPal-Partner-Attribution-Id', $options)->extract('paypalPartnerAttributionId'),
+ HeaderParam::init('PayPal-Client-Metadata-Id', $options)->extract('paypalClientMetadataId'),
+ HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->type(Order::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2
+ * errors.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getOrder(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/checkout/orders/{id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
+ QueryParam::init('fields', $options)->extract('fields')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->type(Order::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
/**
* 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
@@ -111,6 +202,57 @@ class OrdersController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
+ /**
+ * Payer confirms their intent to pay for the the Order with the given payment source.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function confirmOrder(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(
+ RequestMethod::POST,
+ '/v2/checkout/orders/{id}/confirm-payment-source'
+ )
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ HeaderParam::init('PayPal-Client-Metadata-Id', $options)->extract('paypalClientMetadataId'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
+ HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->type(Order::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
/**
* 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
@@ -177,161 +319,6 @@ class OrdersController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
- /**
- * 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.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function updateOrderTracking(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(
- RequestMethod::PATCH,
- '/v2/checkout/orders/{id}/trackers/{tracker_id}'
- )
- ->auth('Oauth2')
- ->parameters(
- TemplateParam::init('id', $options)->extract('id'),
- TemplateParam::init('tracker_id', $options)->extract('trackerId'),
- HeaderParam::init('Content-Type', 'application/json'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
- BodyParam::init($options)->extract('body')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '400',
- ErrorType::init(
- 'Request is not well-formed, syntactically incorrect, or violates schema.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '403',
- ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
- )
- ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
- ->throwErrorOn(
- '422',
- ErrorType::init(
- 'The requested action could not be performed, semantically incorrect, or fa' .
- 'iled business validation.',
- ErrorException::class
- )
- )
- ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
- /**
- * Adds tracking information for an Order.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function createOrderTracking(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/checkout/orders/{id}/track')
- ->auth('Oauth2')
- ->parameters(
- TemplateParam::init('id', $options)->extract('id'),
- HeaderParam::init('Content-Type', 'application/json'),
- BodyParam::init($options)->extract('body'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '400',
- ErrorType::init(
- 'Request is not well-formed, syntactically incorrect, or violates schema.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '403',
- ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
- )
- ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
- ->throwErrorOn(
- '422',
- ErrorType::init(
- 'The requested action could not be performed, semantically incorrect, or fa' .
- 'iled business validation.',
- ErrorException::class
- )
- )
- ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->type(Order::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
- /**
- * 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.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function createOrder(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/checkout/orders')
- ->auth('Oauth2')
- ->parameters(
- HeaderParam::init('Content-Type', 'application/json'),
- BodyParam::init($options)->extract('body'),
- HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
- HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId'),
- HeaderParam::init('PayPal-Partner-Attribution-Id', $options)->extract('paypalPartnerAttributionId'),
- HeaderParam::init('PayPal-Client-Metadata-Id', $options)->extract('paypalClientMetadataId'),
- HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '400',
- ErrorType::init(
- 'Request is not well-formed, syntactically incorrect, or violates schema.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '401',
- ErrorType::init(
- 'Authentication failed due to missing authorization header, or invalid auth' .
- 'entication credentials.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '422',
- ErrorType::init(
- 'The requested action could not be performed, semantically incorrect, or fa' .
- 'iled business validation.',
- ErrorException::class
- )
- )
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->type(Order::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
/**
* Captures payment for an order. To successfully capture 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
@@ -398,62 +385,21 @@ class OrdersController extends BaseController
}
/**
- * Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2
- * errors.
+ * Adds tracking information for an Order.
*
* @param array $options Array with all options for search
*
* @return ApiResponse Response from the API call
*/
- public function getOrder(array $options): ApiResponse
+ public function createOrderTracking(array $options): ApiResponse
{
- $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/checkout/orders/{id}')
- ->auth('Oauth2')
- ->parameters(
- TemplateParam::init('id', $options)->extract('id'),
- HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
- QueryParam::init('fields', $options)->extract('fields')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '401',
- ErrorType::init(
- 'Authentication failed due to missing authorization header, or invalid auth' .
- 'entication credentials.',
- ErrorException::class
- )
- )
- ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->type(Order::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
- /**
- * Payer confirms their intent to pay for the the Order with the given payment source.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function confirmOrder(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(
- RequestMethod::POST,
- '/v2/checkout/orders/{id}/confirm-payment-source'
- )
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v2/checkout/orders/{id}/track')
->auth('Oauth2')
->parameters(
TemplateParam::init('id', $options)->extract('id'),
HeaderParam::init('Content-Type', 'application/json'),
- HeaderParam::init('PayPal-Client-Metadata-Id', $options)->extract('paypalClientMetadataId'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
- HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
- BodyParam::init($options)->extract('body')
+ BodyParam::init($options)->extract('body'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
);
$_resHandler = $this->responseHandler()
@@ -468,6 +414,7 @@ class OrdersController extends BaseController
'403',
ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
)
+ ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
->throwErrorOn(
'422',
ErrorType::init(
@@ -483,4 +430,57 @@ class OrdersController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
+
+ /**
+ * 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.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function updateOrderTracking(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(
+ RequestMethod::PATCH,
+ '/v2/checkout/orders/{id}/trackers/{tracker_id}'
+ )
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ TemplateParam::init('tracker_id', $options)->extract('trackerId'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
+ )
+ ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
}
diff --git a/src/Controllers/PaymentsController.php b/src/Controllers/PaymentsController.php
index 6e07d4a..6df91a4 100644
--- a/src/Controllers/PaymentsController.php
+++ b/src/Controllers/PaymentsController.php
@@ -23,6 +23,51 @@ use PaypalServerSdkLib\Models\Refund;
class PaymentsController extends BaseController
{
+ /**
+ * Shows details for an authorized payment, by ID.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getAuthorizedPayment(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/payments/authorizations/{authorization_id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('authorization_id', $options)->extract('authorizationId'),
+ HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
+ HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'The request failed because the caller has insufficient permissions.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The request failed because the resource does not exist.', ErrorException::class)
+ )
+ ->throwErrorOn('500', ErrorType::init('The request failed because an internal server error occurred.'))
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->type(PaymentAuthorization::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
/**
* Captures an authorized payment, by ID.
*
@@ -97,50 +142,6 @@ class PaymentsController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
- /**
- * Shows details for a captured payment, by ID.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function getCapturedPayment(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/payments/captures/{capture_id}')
- ->auth('Oauth2')
- ->parameters(
- TemplateParam::init('capture_id', $options)->extract('captureId'),
- HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '401',
- ErrorType::init(
- 'Authentication failed due to missing authorization header, or invalid auth' .
- 'entication credentials.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '403',
- ErrorType::init(
- 'The request failed because the caller has insufficient permissions.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '404',
- ErrorType::init('The request failed because the resource does not exist.', ErrorException::class)
- )
- ->throwErrorOn('500', ErrorType::init('The request failed because an internal server error occurred.'))
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->type(CapturedPayment::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
/**
* 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
@@ -150,7 +151,7 @@ class PaymentsController extends BaseController
* 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.
+ * the `amount` request parameter.
*
* @param array $options Array with all options for search
*
@@ -189,6 +190,13 @@ class PaymentsController extends BaseController
ErrorException::class
)
)
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'The request failed because the caller has insufficient permissions.',
+ ErrorException::class
+ )
+ )
->throwErrorOn(
'404',
ErrorType::init('The request failed because the resource does not exist.', ErrorException::class)
@@ -276,6 +284,50 @@ class PaymentsController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
+ /**
+ * Shows details for a captured payment, by ID.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getCapturedPayment(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/payments/captures/{capture_id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('capture_id', $options)->extract('captureId'),
+ HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'The request failed because the caller has insufficient permissions.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The request failed because the resource does not exist.', ErrorException::class)
+ )
+ ->throwErrorOn('500', ErrorType::init('The request failed because an internal server error occurred.'))
+ ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
+ ->type(CapturedPayment::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
/**
* 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.
@@ -349,44 +401,6 @@ class PaymentsController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
- /**
- * Shows details for an authorized payment, by ID.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function getAuthorizedPayment(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/payments/authorizations/{authorization_id}')
- ->auth('Oauth2')
- ->parameters(
- TemplateParam::init('authorization_id', $options)->extract('authorizationId'),
- HeaderParam::init('PayPal-Mock-Response', $options)->extract('paypalMockResponse'),
- HeaderParam::init('PayPal-Auth-Assertion', $options)->extract('paypalAuthAssertion')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '401',
- ErrorType::init(
- 'Authentication failed due to missing authorization header, or invalid auth' .
- 'entication credentials.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '404',
- ErrorType::init('The request failed because the resource does not exist.', ErrorException::class)
- )
- ->throwErrorOn('500', ErrorType::init('The request failed because an internal server error occurred.'))
- ->throwErrorOn('0', ErrorType::init('The error response.', ErrorException::class))
- ->type(PaymentAuthorization::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
/**
* Shows details for a refund, by ID.
*
diff --git a/src/Controllers/SubscriptionsController.php b/src/Controllers/SubscriptionsController.php
new file mode 100644
index 0000000..b68be30
--- /dev/null
+++ b/src/Controllers/SubscriptionsController.php
@@ -0,0 +1,1033 @@
+requestBuilder(RequestMethod::POST, '/v1/billing/plans')
+ ->auth('Oauth2')
+ ->parameters(
+ HeaderParam::init('Content-Type', 'application/json'),
+ HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
+ HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(BillingPlan::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Lists billing plans.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function listBillingPlans(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/billing/plans')
+ ->auth('Oauth2')
+ ->parameters(
+ HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
+ QueryParam::init('product_id', $options)->extract('productId'),
+ QueryParam::init('page_size', $options)->extract('pageSize', 10),
+ QueryParam::init('page', $options)->extract('page', 1),
+ QueryParam::init('total_required', $options)->extract('totalRequired', false)
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(PlanCollection::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Shows details for a plan, by ID.
+ *
+ * @param string $id The ID of the plan.
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getBillingPlan(string $id): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/billing/plans/{id}')
+ ->auth('Oauth2')
+ ->parameters(TemplateParam::init('id', $id));
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(BillingPlan::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * 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
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function patchBillingPlan(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::PATCH, '/v1/billing/plans/{id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Activates a plan, by ID.
+ *
+ * @param string $id The ID of the plan.
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function activateBillingPlan(string $id): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/plans/{id}/activate')
+ ->auth('Oauth2')
+ ->parameters(TemplateParam::init('id', $id));
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Deactivates a plan, by ID.
+ *
+ * @param string $id The ID of the plan.
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function deactivateBillingPlan(string $id): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/plans/{id}/deactivate')
+ ->auth('Oauth2')
+ ->parameters(TemplateParam::init('id', $id));
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to
+ * $7 per month.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function updateBillingPlanPricingSchemes(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/plans/{id}/update-pricing-schemes')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Creates a subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function createSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions')
+ ->auth('Oauth2')
+ ->parameters(
+ HeaderParam::init('Content-Type', 'application/json'),
+ HeaderParam::init('Prefer', $options)->extract('prefer', 'return=minimal'),
+ HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId'),
+ HeaderParam::init('PayPal-Client-Metadata-Id', $options)->extract('paypalClientMetadataId'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(Subscription::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * List all subscriptions for merchant account.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function listSubscriptions(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/billing/subscriptions')
+ ->auth('Oauth2')
+ ->parameters(
+ QueryParam::init('plan_ids', $options)->extract('planIds'),
+ QueryParam::init('statuses', $options)->extract('statuses'),
+ QueryParam::init('created_after', $options)->extract('createdAfter'),
+ QueryParam::init('created_before', $options)->extract('createdBefore'),
+ QueryParam::init('status_updated_before', $options)->extract('statusUpdatedBefore'),
+ QueryParam::init('status_updated_after', $options)->extract('statusUpdatedAfter'),
+ QueryParam::init('filter', $options)->extract('filter'),
+ QueryParam::init('page_size', $options)->extract('pageSize', 10),
+ QueryParam::init('page', $options)->extract('page', 1),
+ QueryParam::init('customer_ids', $options)->extract('customerIds')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(SubscriptionCollection::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Shows details for a subscription, by ID.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/billing/subscriptions/{id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ QueryParam::init('fields', $options)->extract('fields')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(Subscription::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * 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
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function patchSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::PATCH, '/v1/billing/subscriptions/{id}')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * 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.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function reviseSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions/{id}/revise')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(ModifySubscriptionResponse::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Suspends the subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function suspendSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions/{id}/suspend')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Cancels the subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function cancelSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions/{id}/cancel')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Activates the subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function activateSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions/{id}/activate')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Captures an authorized payment from the subscriber on the subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function captureSubscription(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v1/billing/subscriptions/{id}/capture')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ HeaderParam::init('Content-Type', 'application/json'),
+ HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId'),
+ BodyParam::init($options)->extract('body')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->nullableType()
+ ->type(SubscriptionTransactionDetails::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Lists transactions for a subscription.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function listSubscriptionTransactions(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/billing/subscriptions/{id}/transactions')
+ ->auth('Oauth2')
+ ->parameters(
+ TemplateParam::init('id', $options)->extract('id'),
+ QueryParam::init('start_time', $options)->extract('startTime'),
+ QueryParam::init('end_time', $options)->extract('endTime')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Bad Request. Request is not well-formed, syntactically incorrect, or violates schema.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '401',
+ ErrorType::init(
+ 'Authentication failed due to missing authorization header, or invalid auth' .
+ 'entication credentials.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ SubscriptionErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '404',
+ ErrorType::init('The specified resource does not exist.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error has occurred.', SubscriptionErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', SubscriptionErrorException::class))
+ ->type(TransactionsList::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+}
diff --git a/src/Controllers/TransactionSearchController.php b/src/Controllers/TransactionSearchController.php
new file mode 100644
index 0000000..7d64e14
--- /dev/null
+++ b/src/Controllers/TransactionSearchController.php
@@ -0,0 +1,107 @@
+requestBuilder(RequestMethod::GET, '/v1/reporting/transactions')
+ ->auth('Oauth2')
+ ->parameters(
+ QueryParam::init('start_date', $options)->extract('startDate'),
+ QueryParam::init('end_date', $options)->extract('endDate'),
+ QueryParam::init('transaction_id', $options)->extract('transactionId'),
+ QueryParam::init('transaction_type', $options)->extract('transactionType'),
+ QueryParam::init('transaction_status', $options)->extract('transactionStatus'),
+ QueryParam::init('transaction_amount', $options)->extract('transactionAmount'),
+ QueryParam::init('transaction_currency', $options)->extract('transactionCurrency'),
+ QueryParam::init('payment_instrument_type', $options)->extract('paymentInstrumentType'),
+ QueryParam::init('store_id', $options)->extract('storeId'),
+ QueryParam::init('terminal_id', $options)->extract('terminalId'),
+ QueryParam::init('fields', $options)->extract('fields', 'transaction_info'),
+ QueryParam::init('balance_affecting_records_only', $options)
+ ->extract('balanceAffectingRecordsOnly', 'Y'),
+ QueryParam::init('page_size', $options)->extract('pageSize', 100),
+ QueryParam::init('page', $options)->extract('page', 1)
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn('0', ErrorType::init('The error response.', SearchErrorException::class))
+ ->type(SearchResponse::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * 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.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function searchBalances(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v1/reporting/balances')
+ ->auth('Oauth2')
+ ->parameters(
+ QueryParam::init('as_of_time', $options)->extract('asOfTime'),
+ QueryParam::init('currency_code', $options)->extract('currencyCode')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'The request is not well-formed, is syntactically incorrect, or violates schema.',
+ DefaultErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init(
+ 'Authorization failed due to insufficient permissions.',
+ DefaultErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '500',
+ ErrorType::init('An internal server error occurred.', DefaultErrorException::class)
+ )
+ ->throwErrorOn('0', ErrorType::init('The error response.', DefaultErrorException::class))
+ ->type(BalancesResponse::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+}
diff --git a/src/Controllers/VaultController.php b/src/Controllers/VaultController.php
index cf87f82..b554c9f 100644
--- a/src/Controllers/VaultController.php
+++ b/src/Controllers/VaultController.php
@@ -24,117 +24,6 @@ use PaypalServerSdkLib\Models\SetupTokenResponse;
class VaultController extends BaseController
{
- /**
- * Delete the payment token associated with the payment token id.
- *
- * @param string $id ID of the payment token.
- *
- * @return ApiResponse Response from the API call
- */
- public function deletePaymentToken(string $id): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::DELETE, '/v3/vault/payment-tokens/{id}')
- ->auth('Oauth2')
- ->parameters(TemplateParam::init('id', $id));
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '400',
- ErrorType::init(
- 'Request is not well-formed, syntactically incorrect, or violates schema.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '403',
- ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
- )
- ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
- /**
- * Creates a Setup Token from the given payment source and adds it to the Vault of the associated
- * customer.
- *
- * @param array $options Array with all options for search
- *
- * @return ApiResponse Response from the API call
- */
- public function createSetupToken(array $options): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v3/vault/setup-tokens')
- ->auth('Oauth2')
- ->parameters(
- HeaderParam::init('Content-Type', 'application/json'),
- BodyParam::init($options)->extract('body'),
- HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId')
- );
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '400',
- ErrorType::init(
- 'Request is not well-formed, syntactically incorrect, or violates schema.',
- ErrorException::class
- )
- )
- ->throwErrorOn(
- '403',
- ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
- )
- ->throwErrorOn(
- '422',
- ErrorType::init(
- 'The requested action could not be performed, semantically incorrect, or fa' .
- 'iled business validation.',
- ErrorException::class
- )
- )
- ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
- ->type(SetupTokenResponse::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
- /**
- * Returns a readable representation of temporarily vaulted payment source associated with the setup
- * token id.
- *
- * @param string $id ID of the setup token.
- *
- * @return ApiResponse Response from the API call
- */
- public function getSetupToken(string $id): ApiResponse
- {
- $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v3/vault/setup-tokens/{id}')
- ->auth('Oauth2')
- ->parameters(TemplateParam::init('id', $id));
-
- $_resHandler = $this->responseHandler()
- ->throwErrorOn(
- '403',
- ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
- )
- ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
- ->throwErrorOn(
- '422',
- ErrorType::init(
- 'The requested action could not be performed, semantically incorrect, or fa' .
- 'iled business validation.',
- ErrorException::class
- )
- )
- ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
- ->type(SetupTokenResponse::class)
- ->returnApiResponse();
-
- return $this->execute($_reqBuilder, $_resHandler);
- }
-
/**
* Creates a Payment Token from the given payment source and adds it to the Vault of the associated
* customer.
@@ -257,4 +146,115 @@ class VaultController extends BaseController
return $this->execute($_reqBuilder, $_resHandler);
}
+
+ /**
+ * Delete the payment token associated with the payment token id.
+ *
+ * @param string $id ID of the payment token.
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function deletePaymentToken(string $id): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::DELETE, '/v3/vault/payment-tokens/{id}')
+ ->auth('Oauth2')
+ ->parameters(TemplateParam::init('id', $id));
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
+ )
+ ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Creates a Setup Token from the given payment source and adds it to the Vault of the associated
+ * customer.
+ *
+ * @param array $options Array with all options for search
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function createSetupToken(array $options): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::POST, '/v3/vault/setup-tokens')
+ ->auth('Oauth2')
+ ->parameters(
+ HeaderParam::init('Content-Type', 'application/json'),
+ BodyParam::init($options)->extract('body'),
+ HeaderParam::init('PayPal-Request-Id', $options)->extract('paypalRequestId')
+ );
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '400',
+ ErrorType::init(
+ 'Request is not well-formed, syntactically incorrect, or violates schema.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn(
+ '403',
+ ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
+ )
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
+ ->type(SetupTokenResponse::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
+
+ /**
+ * Returns a readable representation of temporarily vaulted payment source associated with the setup
+ * token id.
+ *
+ * @param string $id ID of the setup token.
+ *
+ * @return ApiResponse Response from the API call
+ */
+ public function getSetupToken(string $id): ApiResponse
+ {
+ $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v3/vault/setup-tokens/{id}')
+ ->auth('Oauth2')
+ ->parameters(TemplateParam::init('id', $id));
+
+ $_resHandler = $this->responseHandler()
+ ->throwErrorOn(
+ '403',
+ ErrorType::init('Authorization failed due to insufficient permissions.', ErrorException::class)
+ )
+ ->throwErrorOn('404', ErrorType::init('The specified resource does not exist.', ErrorException::class))
+ ->throwErrorOn(
+ '422',
+ ErrorType::init(
+ 'The requested action could not be performed, semantically incorrect, or fa' .
+ 'iled business validation.',
+ ErrorException::class
+ )
+ )
+ ->throwErrorOn('500', ErrorType::init('An internal server error has occurred.', ErrorException::class))
+ ->type(SetupTokenResponse::class)
+ ->returnApiResponse();
+
+ return $this->execute($_reqBuilder, $_resHandler);
+ }
}
diff --git a/src/Exceptions/DefaultErrorException.php b/src/Exceptions/DefaultErrorException.php
new file mode 100644
index 0000000..7d302ba
--- /dev/null
+++ b/src/Exceptions/DefaultErrorException.php
@@ -0,0 +1,223 @@
+name = $name;
+ $this->messageProperty = $messageProperty;
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Name.
+ * The human-readable, unique name of the error.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The human-readable, unique name of the error.
+ *
+ * @required
+ * @maps name
+ */
+ public function setName(string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Message Property.
+ * The message that describes the error.
+ */
+ public function getMessageProperty(): string
+ {
+ return $this->messageProperty;
+ }
+
+ /**
+ * Sets Message Property.
+ * The message that describes the error.
+ *
+ * @required
+ * @maps message
+ */
+ public function setMessageProperty(string $messageProperty): void
+ {
+ $this->messageProperty = $messageProperty;
+ }
+
+ /**
+ * Returns Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ */
+ public function getDebugId(): string
+ {
+ return $this->debugId;
+ }
+
+ /**
+ * Sets Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ *
+ * @required
+ * @maps debug_id
+ */
+ public function setDebugId(string $debugId): void
+ {
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ */
+ public function getInformationLink(): ?string
+ {
+ return $this->informationLink;
+ }
+
+ /**
+ * Sets Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ *
+ * @maps information_link
+ */
+ public function setInformationLink(?string $informationLink): void
+ {
+ $this->informationLink = $informationLink;
+ }
+
+ /**
+ * Returns Details.
+ * An array of additional details about the error.
+ *
+ * @return \PaypalServerSdkLib\Models\TransactionSearchErrorDetails[]|null
+ */
+ public function getDetails(): ?array
+ {
+ return $this->details;
+ }
+
+ /**
+ * Sets Details.
+ * An array of additional details about the error.
+ *
+ * @maps details
+ *
+ * @param \PaypalServerSdkLib\Models\TransactionSearchErrorDetails[]|null $details
+ */
+ public function setDetails(?array $details): void
+ {
+ $this->details = $details;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return \PaypalServerSdkLib\Models\LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param \PaypalServerSdkLib\Models\LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the DefaultErrorException object to a human-readable string representation.
+ *
+ * @return string The string representation of the DefaultErrorException object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'DefaultErrorException',
+ [
+ 'name' => $this->name,
+ 'messageProperty' => $this->messageProperty,
+ 'debugId' => $this->debugId,
+ 'informationLink' => $this->informationLink,
+ 'details' => $this->details,
+ 'links' => $this->links
+ ],
+ parent::__toString()
+ );
+ }
+}
diff --git a/src/Exceptions/SearchErrorException.php b/src/Exceptions/SearchErrorException.php
new file mode 100644
index 0000000..8fd5b9f
--- /dev/null
+++ b/src/Exceptions/SearchErrorException.php
@@ -0,0 +1,275 @@
+name = $name;
+ $this->messageProperty = $messageProperty;
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Name.
+ * The human-readable, unique name of the error.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The human-readable, unique name of the error.
+ *
+ * @required
+ * @maps name
+ */
+ public function setName(string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Message Property.
+ * The message that describes the error.
+ */
+ public function getMessageProperty(): string
+ {
+ return $this->messageProperty;
+ }
+
+ /**
+ * Sets Message Property.
+ * The message that describes the error.
+ *
+ * @required
+ * @maps message
+ */
+ public function setMessageProperty(string $messageProperty): void
+ {
+ $this->messageProperty = $messageProperty;
+ }
+
+ /**
+ * Returns Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ */
+ public function getDebugId(): string
+ {
+ return $this->debugId;
+ }
+
+ /**
+ * Sets Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ *
+ * @required
+ * @maps debug_id
+ */
+ public function setDebugId(string $debugId): void
+ {
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ */
+ public function getInformationLink(): ?string
+ {
+ return $this->informationLink;
+ }
+
+ /**
+ * Sets Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ *
+ * @maps information_link
+ */
+ public function setInformationLink(?string $informationLink): void
+ {
+ $this->informationLink = $informationLink;
+ }
+
+ /**
+ * Returns Details.
+ * An array of additional details about the error.
+ *
+ * @return \PaypalServerSdkLib\Models\TransactionSearchErrorDetails[]|null
+ */
+ public function getDetails(): ?array
+ {
+ return $this->details;
+ }
+
+ /**
+ * Sets Details.
+ * An array of additional details about the error.
+ *
+ * @maps details
+ *
+ * @param \PaypalServerSdkLib\Models\TransactionSearchErrorDetails[]|null $details
+ */
+ public function setDetails(?array $details): void
+ {
+ $this->details = $details;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return \PaypalServerSdkLib\Models\LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param \PaypalServerSdkLib\Models\LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Returns Total Items.
+ * The total number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
+ */
+ public function getTotalItems(): ?int
+ {
+ return $this->totalItems;
+ }
+
+ /**
+ * Sets Total Items.
+ * The total number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
+ *
+ * @maps total_items
+ */
+ public function setTotalItems(?int $totalItems): void
+ {
+ $this->totalItems = $totalItems;
+ }
+
+ /**
+ * Returns Maximum Items.
+ * The maximum number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
+ */
+ public function getMaximumItems(): ?int
+ {
+ return $this->maximumItems;
+ }
+
+ /**
+ * Sets Maximum Items.
+ * The maximum number of transactions. Valid only for `RESULTSET_TOO_LARGE`.
+ *
+ * @maps maximum_items
+ */
+ public function setMaximumItems(?int $maximumItems): void
+ {
+ $this->maximumItems = $maximumItems;
+ }
+
+ /**
+ * Converts the SearchErrorException object to a human-readable string representation.
+ *
+ * @return string The string representation of the SearchErrorException object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SearchErrorException',
+ [
+ 'name' => $this->name,
+ 'messageProperty' => $this->messageProperty,
+ 'debugId' => $this->debugId,
+ 'informationLink' => $this->informationLink,
+ 'details' => $this->details,
+ 'links' => $this->links,
+ 'totalItems' => $this->totalItems,
+ 'maximumItems' => $this->maximumItems
+ ],
+ parent::__toString()
+ );
+ }
+}
diff --git a/src/Exceptions/SubscriptionErrorException.php b/src/Exceptions/SubscriptionErrorException.php
new file mode 100644
index 0000000..dc81fc1
--- /dev/null
+++ b/src/Exceptions/SubscriptionErrorException.php
@@ -0,0 +1,223 @@
+name = $name;
+ $this->messageProperty = $messageProperty;
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Name.
+ * The human-readable, unique name of the error.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The human-readable, unique name of the error.
+ *
+ * @required
+ * @maps name
+ */
+ public function setName(string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Message Property.
+ * The message that describes the error.
+ */
+ public function getMessageProperty(): string
+ {
+ return $this->messageProperty;
+ }
+
+ /**
+ * Sets Message Property.
+ * The message that describes the error.
+ *
+ * @required
+ * @maps message
+ */
+ public function setMessageProperty(string $messageProperty): void
+ {
+ $this->messageProperty = $messageProperty;
+ }
+
+ /**
+ * Returns Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ */
+ public function getDebugId(): string
+ {
+ return $this->debugId;
+ }
+
+ /**
+ * Sets Debug Id.
+ * The PayPal internal ID. Used for correlation purposes.
+ *
+ * @required
+ * @maps debug_id
+ */
+ public function setDebugId(string $debugId): void
+ {
+ $this->debugId = $debugId;
+ }
+
+ /**
+ * Returns Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ */
+ public function getInformationLink(): ?string
+ {
+ return $this->informationLink;
+ }
+
+ /**
+ * Sets Information Link.
+ * The information link, or URI, that shows detailed information about this error for the developer.
+ *
+ * @maps information_link
+ */
+ public function setInformationLink(?string $informationLink): void
+ {
+ $this->informationLink = $informationLink;
+ }
+
+ /**
+ * Returns Details.
+ * An array of additional details about the error.
+ *
+ * @return \PaypalServerSdkLib\Models\ErrorDetails[]|null
+ */
+ public function getDetails(): ?array
+ {
+ return $this->details;
+ }
+
+ /**
+ * Sets Details.
+ * An array of additional details about the error.
+ *
+ * @maps details
+ *
+ * @param \PaypalServerSdkLib\Models\ErrorDetails[]|null $details
+ */
+ public function setDetails(?array $details): void
+ {
+ $this->details = $details;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).
+ *
+ * @return \PaypalServerSdkLib\Models\LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param \PaypalServerSdkLib\Models\LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the SubscriptionErrorException object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionErrorException object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionErrorException',
+ [
+ 'name' => $this->name,
+ 'messageProperty' => $this->messageProperty,
+ 'debugId' => $this->debugId,
+ 'informationLink' => $this->informationLink,
+ 'details' => $this->details,
+ 'links' => $this->links
+ ],
+ parent::__toString()
+ );
+ }
+}
diff --git a/src/Models/ActivateSubscriptionRequest.php b/src/Models/ActivateSubscriptionRequest.php
new file mode 100644
index 0000000..914f606
--- /dev/null
+++ b/src/Models/ActivateSubscriptionRequest.php
@@ -0,0 +1,74 @@
+reason;
+ }
+
+ /**
+ * Sets Reason.
+ * The reason for activation of a subscription. Required to reactivate the subscription.
+ *
+ * @maps reason
+ */
+ public function setReason(?string $reason): void
+ {
+ $this->reason = $reason;
+ }
+
+ /**
+ * Converts the ActivateSubscriptionRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the ActivateSubscriptionRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('ActivateSubscriptionRequest', ['reason' => $this->reason]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->reason)) {
+ $json['reason'] = $this->reason;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/AmountBreakdown.php b/src/Models/AmountBreakdown.php
index 8a0a2ca..fd9e622 100644
--- a/src/Models/AmountBreakdown.php
+++ b/src/Models/AmountBreakdown.php
@@ -176,7 +176,8 @@ class AmountBreakdown implements \JsonSerializable
/**
* Returns Discount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
+ * The discount amount and currency code. For list of supported currencies and decimal precision, see
+ * the PayPal REST APIs Currency Codes.
*/
public function getDiscount(): ?Money
{
@@ -185,7 +186,8 @@ class AmountBreakdown implements \JsonSerializable
/**
* Sets Discount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
+ * The discount amount and currency code. For list of supported currencies and decimal precision, see
+ * the PayPal REST APIs Currency Codes.
*
* @maps discount
*/
diff --git a/src/Models/AppSwitchContext.php b/src/Models/AppSwitchContext.php
new file mode 100644
index 0000000..fe41f82
--- /dev/null
+++ b/src/Models/AppSwitchContext.php
@@ -0,0 +1,106 @@
+nativeApp;
+ }
+
+ /**
+ * Sets Native App.
+ * Merchant provided, buyer's native app preferences to app switch to the PayPal consumer app.
+ *
+ * @maps native_app
+ */
+ public function setNativeApp(?NativeAppContext $nativeApp): void
+ {
+ $this->nativeApp = $nativeApp;
+ }
+
+ /**
+ * Returns Mobile Web.
+ * Buyer's mobile web browser context to app switch to the PayPal consumer app.
+ */
+ public function getMobileWeb(): ?MobileWebContext
+ {
+ return $this->mobileWeb;
+ }
+
+ /**
+ * Sets Mobile Web.
+ * Buyer's mobile web browser context to app switch to the PayPal consumer app.
+ *
+ * @maps mobile_web
+ */
+ public function setMobileWeb(?MobileWebContext $mobileWeb): void
+ {
+ $this->mobileWeb = $mobileWeb;
+ }
+
+ /**
+ * Converts the AppSwitchContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the AppSwitchContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'AppSwitchContext',
+ ['nativeApp' => $this->nativeApp, 'mobileWeb' => $this->mobileWeb]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->nativeApp)) {
+ $json['native_app'] = $this->nativeApp;
+ }
+ if (isset($this->mobileWeb)) {
+ $json['mobile_web'] = $this->mobileWeb;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ApplePayRequestCard.php b/src/Models/ApplePayRequestCard.php
new file mode 100644
index 0000000..2ac9e4a
--- /dev/null
+++ b/src/Models/ApplePayRequestCard.php
@@ -0,0 +1,139 @@
+type;
+ }
+
+ /**
+ * Sets Type.
+ * Type of card. i.e Credit, Debit and so on.
+ *
+ * @maps type
+ */
+ public function setType(?string $type): void
+ {
+ $this->type = $type;
+ }
+
+ /**
+ * Returns Brand.
+ * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ */
+ public function getBrand(): ?string
+ {
+ return $this->brand;
+ }
+
+ /**
+ * Sets Brand.
+ * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ *
+ * @maps brand
+ */
+ public function setBrand(?string $brand): void
+ {
+ $this->brand = $brand;
+ }
+
+ /**
+ * Returns Billing Address.
+ * 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).
+ */
+ public function getBillingAddress(): ?Address
+ {
+ return $this->billingAddress;
+ }
+
+ /**
+ * Sets Billing Address.
+ * 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).
+ *
+ * @maps billing_address
+ */
+ public function setBillingAddress(?Address $billingAddress): void
+ {
+ $this->billingAddress = $billingAddress;
+ }
+
+ /**
+ * Converts the ApplePayRequestCard object to a human-readable string representation.
+ *
+ * @return string The string representation of the ApplePayRequestCard object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ApplePayRequestCard',
+ ['type' => $this->type, 'brand' => $this->brand, 'billingAddress' => $this->billingAddress]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->type)) {
+ $json['type'] = $this->type;
+ }
+ if (isset($this->brand)) {
+ $json['brand'] = $this->brand;
+ }
+ if (isset($this->billingAddress)) {
+ $json['billing_address'] = $this->billingAddress;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ApplePayTokenizedCard.php b/src/Models/ApplePayTokenizedCard.php
index 69546c7..c30babe 100644
--- a/src/Models/ApplePayTokenizedCard.php
+++ b/src/Models/ApplePayTokenizedCard.php
@@ -117,7 +117,7 @@ class ApplePayTokenizedCard implements \JsonSerializable
/**
* Returns Card Type.
- * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ * The card brand or network. Typically used in the response.
*/
public function getCardType(): ?string
{
@@ -126,7 +126,7 @@ class ApplePayTokenizedCard implements \JsonSerializable
/**
* Sets Card Type.
- * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ * The card brand or network. Typically used in the response.
*
* @maps card_type
*/
diff --git a/src/Models/ApplicationContextUserAction.php b/src/Models/ApplicationContextUserAction.php
new file mode 100644
index 0000000..fdd0965
--- /dev/null
+++ b/src/Models/ApplicationContextUserAction.php
@@ -0,0 +1,30 @@
+auctionSite;
+ }
+
+ /**
+ * Sets Auction Site.
+ * The name of the auction site.
+ *
+ * @maps auction_site
+ */
+ public function setAuctionSite(?string $auctionSite): void
+ {
+ $this->auctionSite = $auctionSite;
+ }
+
+ /**
+ * Returns Auction Item Site.
+ * The auction site URL.
+ */
+ public function getAuctionItemSite(): ?string
+ {
+ return $this->auctionItemSite;
+ }
+
+ /**
+ * Sets Auction Item Site.
+ * The auction site URL.
+ *
+ * @maps auction_item_site
+ */
+ public function setAuctionItemSite(?string $auctionItemSite): void
+ {
+ $this->auctionItemSite = $auctionItemSite;
+ }
+
+ /**
+ * Returns Auction Buyer Id.
+ * 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.
+ */
+ public function getAuctionBuyerId(): ?string
+ {
+ return $this->auctionBuyerId;
+ }
+
+ /**
+ * Sets Auction Buyer Id.
+ * 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.
+ *
+ * @maps auction_buyer_id
+ */
+ public function setAuctionBuyerId(?string $auctionBuyerId): void
+ {
+ $this->auctionBuyerId = $auctionBuyerId;
+ }
+
+ /**
+ * Returns Auction Closing Date.
+ * 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.
+ */
+ public function getAuctionClosingDate(): ?string
+ {
+ return $this->auctionClosingDate;
+ }
+
+ /**
+ * Sets Auction Closing Date.
+ * 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.
+ *
+ * @maps auction_closing_date
+ */
+ public function setAuctionClosingDate(?string $auctionClosingDate): void
+ {
+ $this->auctionClosingDate = $auctionClosingDate;
+ }
+
+ /**
+ * Converts the AuctionInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the AuctionInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'AuctionInformation',
+ [
+ 'auctionSite' => $this->auctionSite,
+ 'auctionItemSite' => $this->auctionItemSite,
+ 'auctionBuyerId' => $this->auctionBuyerId,
+ 'auctionClosingDate' => $this->auctionClosingDate
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->auctionSite)) {
+ $json['auction_site'] = $this->auctionSite;
+ }
+ if (isset($this->auctionItemSite)) {
+ $json['auction_item_site'] = $this->auctionItemSite;
+ }
+ if (isset($this->auctionBuyerId)) {
+ $json['auction_buyer_id'] = $this->auctionBuyerId;
+ }
+ if (isset($this->auctionClosingDate)) {
+ $json['auction_closing_date'] = $this->auctionClosingDate;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/Authorization.php b/src/Models/Authorization.php
index 3b50671..a07277e 100644
--- a/src/Models/Authorization.php
+++ b/src/Models/Authorization.php
@@ -49,7 +49,7 @@ class Authorization implements \JsonSerializable
private $customId;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $networkTransactionReference;
@@ -206,7 +206,7 @@ class Authorization implements \JsonSerializable
* Returns Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getNetworkTransactionReference(): ?NetworkTransaction
{
return $this->networkTransactionReference;
}
@@ -217,7 +217,7 @@ class Authorization implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
diff --git a/src/Models/AuthorizationWithAdditionalData.php b/src/Models/AuthorizationWithAdditionalData.php
index d9a619b..02bcc27 100644
--- a/src/Models/AuthorizationWithAdditionalData.php
+++ b/src/Models/AuthorizationWithAdditionalData.php
@@ -50,7 +50,7 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
private $customId;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $networkTransactionReference;
@@ -212,7 +212,7 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
* Returns Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getNetworkTransactionReference(): ?NetworkTransaction
{
return $this->networkTransactionReference;
}
@@ -223,7 +223,7 @@ class AuthorizationWithAdditionalData implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
diff --git a/src/Models/BalanceInformation.php b/src/Models/BalanceInformation.php
new file mode 100644
index 0000000..c39bf80
--- /dev/null
+++ b/src/Models/BalanceInformation.php
@@ -0,0 +1,205 @@
+currency = $currency;
+ $this->totalBalance = $totalBalance;
+ }
+
+ /**
+ * Returns Currency.
+ * The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that
+ * identifies the currency.
+ */
+ public function getCurrency(): string
+ {
+ return $this->currency;
+ }
+
+ /**
+ * Sets Currency.
+ * The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that
+ * identifies the currency.
+ *
+ * @required
+ * @maps currency
+ */
+ public function setCurrency(string $currency): void
+ {
+ $this->currency = $currency;
+ }
+
+ /**
+ * Returns Primary.
+ * Optional field representing if the currency is primary currency or not.
+ */
+ public function getPrimary(): ?bool
+ {
+ return $this->primary;
+ }
+
+ /**
+ * Sets Primary.
+ * Optional field representing if the currency is primary currency or not.
+ *
+ * @maps primary
+ */
+ public function setPrimary(?bool $primary): void
+ {
+ $this->primary = $primary;
+ }
+
+ /**
+ * Returns Total Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTotalBalance(): Money
+ {
+ return $this->totalBalance;
+ }
+
+ /**
+ * Sets Total Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps total_balance
+ */
+ public function setTotalBalance(Money $totalBalance): void
+ {
+ $this->totalBalance = $totalBalance;
+ }
+
+ /**
+ * Returns Available Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAvailableBalance(): ?Money
+ {
+ return $this->availableBalance;
+ }
+
+ /**
+ * Sets Available Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps available_balance
+ */
+ public function setAvailableBalance(?Money $availableBalance): void
+ {
+ $this->availableBalance = $availableBalance;
+ }
+
+ /**
+ * Returns Withheld Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getWithheldBalance(): ?Money
+ {
+ return $this->withheldBalance;
+ }
+
+ /**
+ * Sets Withheld Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps withheld_balance
+ */
+ public function setWithheldBalance(?Money $withheldBalance): void
+ {
+ $this->withheldBalance = $withheldBalance;
+ }
+
+ /**
+ * Converts the BalanceInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the BalanceInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'BalanceInformation',
+ [
+ 'currency' => $this->currency,
+ 'primary' => $this->primary,
+ 'totalBalance' => $this->totalBalance,
+ 'availableBalance' => $this->availableBalance,
+ 'withheldBalance' => $this->withheldBalance
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['currency'] = $this->currency;
+ if (isset($this->primary)) {
+ $json['primary'] = $this->primary;
+ }
+ $json['total_balance'] = $this->totalBalance;
+ if (isset($this->availableBalance)) {
+ $json['available_balance'] = $this->availableBalance;
+ }
+ if (isset($this->withheldBalance)) {
+ $json['withheld_balance'] = $this->withheldBalance;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/BalancesResponse.php b/src/Models/BalancesResponse.php
new file mode 100644
index 0000000..765d053
--- /dev/null
+++ b/src/Models/BalancesResponse.php
@@ -0,0 +1,182 @@
+balances;
+ }
+
+ /**
+ * Sets Balances.
+ * An array of balance detail objects.
+ *
+ * @maps balances
+ *
+ * @param BalanceInformation[]|null $balances
+ */
+ public function setBalances(?array $balances): void
+ {
+ $this->balances = $balances;
+ }
+
+ /**
+ * Returns Account Id.
+ * 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.
+ */
+ public function getAccountId(): ?string
+ {
+ return $this->accountId;
+ }
+
+ /**
+ * Sets Account Id.
+ * 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.
+ *
+ * @maps account_id
+ */
+ public function setAccountId(?string $accountId): void
+ {
+ $this->accountId = $accountId;
+ }
+
+ /**
+ * Returns As of Time.
+ * 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.
+ */
+ public function getAsOfTime(): ?string
+ {
+ return $this->asOfTime;
+ }
+
+ /**
+ * Sets As of Time.
+ * 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.
+ *
+ * @maps as_of_time
+ */
+ public function setAsOfTime(?string $asOfTime): void
+ {
+ $this->asOfTime = $asOfTime;
+ }
+
+ /**
+ * Returns Last Refresh Time.
+ * 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.
+ */
+ public function getLastRefreshTime(): ?string
+ {
+ return $this->lastRefreshTime;
+ }
+
+ /**
+ * Sets Last Refresh Time.
+ * 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.
+ *
+ * @maps last_refresh_time
+ */
+ public function setLastRefreshTime(?string $lastRefreshTime): void
+ {
+ $this->lastRefreshTime = $lastRefreshTime;
+ }
+
+ /**
+ * Converts the BalancesResponse object to a human-readable string representation.
+ *
+ * @return string The string representation of the BalancesResponse object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'BalancesResponse',
+ [
+ 'balances' => $this->balances,
+ 'accountId' => $this->accountId,
+ 'asOfTime' => $this->asOfTime,
+ 'lastRefreshTime' => $this->lastRefreshTime
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->balances)) {
+ $json['balances'] = $this->balances;
+ }
+ if (isset($this->accountId)) {
+ $json['account_id'] = $this->accountId;
+ }
+ if (isset($this->asOfTime)) {
+ $json['as_of_time'] = $this->asOfTime;
+ }
+ if (isset($this->lastRefreshTime)) {
+ $json['last_refresh_time'] = $this->lastRefreshTime;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/BankRequest.php b/src/Models/BankRequest.php
new file mode 100644
index 0000000..486ce91
--- /dev/null
+++ b/src/Models/BankRequest.php
@@ -0,0 +1,109 @@
+achDebit;
+ }
+
+ /**
+ * Sets Ach Debit.
+ * A Resource representing a request to vault a ACH Debit.
+ *
+ * @maps ach_debit
+ *
+ * @param mixed $achDebit
+ */
+ public function setAchDebit($achDebit): void
+ {
+ $this->achDebit = $achDebit;
+ }
+
+ /**
+ * Returns Sepa Debit.
+ * An API resource denoting a request to securely store a SEPA Debit.
+ */
+ public function getSepaDebit(): ?SepaDebitRequest
+ {
+ return $this->sepaDebit;
+ }
+
+ /**
+ * Sets Sepa Debit.
+ * An API resource denoting a request to securely store a SEPA Debit.
+ *
+ * @maps sepa_debit
+ */
+ public function setSepaDebit(?SepaDebitRequest $sepaDebit): void
+ {
+ $this->sepaDebit = $sepaDebit;
+ }
+
+ /**
+ * Converts the BankRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the BankRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'BankRequest',
+ ['achDebit' => $this->achDebit, 'sepaDebit' => $this->sepaDebit]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->achDebit)) {
+ $json['ach_debit'] = $this->achDebit;
+ }
+ if (isset($this->sepaDebit)) {
+ $json['sepa_debit'] = $this->sepaDebit;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/BillingCycle.php b/src/Models/BillingCycle.php
index 50d893f..8e51e44 100644
--- a/src/Models/BillingCycle.php
+++ b/src/Models/BillingCycle.php
@@ -31,11 +31,6 @@ class BillingCycle implements \JsonSerializable
*/
private $pricingScheme;
- /**
- * @var mixed
- */
- private $frequency;
-
/**
* @var int|null
*/
@@ -102,30 +97,6 @@ class BillingCycle implements \JsonSerializable
$this->pricingScheme = $pricingScheme;
}
- /**
- * Returns Frequency.
- * The frequency details for this billing cycle.
- *
- * @return mixed
- */
- public function getFrequency()
- {
- return $this->frequency;
- }
-
- /**
- * Sets Frequency.
- * The frequency details for this billing cycle.
- *
- * @maps frequency
- *
- * @param mixed $frequency
- */
- public function setFrequency($frequency): void
- {
- $this->frequency = $frequency;
- }
-
/**
* Returns Total Cycles.
* The number of times this billing cycle gets executed. Trial billing cycles can only be executed a
@@ -216,7 +187,6 @@ class BillingCycle implements \JsonSerializable
[
'tenureType' => $this->tenureType,
'pricingScheme' => $this->pricingScheme,
- 'frequency' => $this->frequency,
'totalCycles' => $this->totalCycles,
'sequence' => $this->sequence,
'startDate' => $this->startDate
@@ -240,9 +210,6 @@ class BillingCycle implements \JsonSerializable
if (isset($this->pricingScheme)) {
$json['pricing_scheme'] = $this->pricingScheme;
}
- if (isset($this->frequency)) {
- $json['frequency'] = $this->frequency;
- }
if (isset($this->totalCycles)) {
$json['total_cycles'] = $this->totalCycles;
}
diff --git a/src/Models/BillingCycleOverride.php b/src/Models/BillingCycleOverride.php
new file mode 100644
index 0000000..62c1dab
--- /dev/null
+++ b/src/Models/BillingCycleOverride.php
@@ -0,0 +1,155 @@
+sequence = $sequence;
+ }
+
+ /**
+ * Returns Pricing Scheme.
+ * The pricing scheme details.
+ */
+ public function getPricingScheme(): ?SubscriptionPricingScheme
+ {
+ return $this->pricingScheme;
+ }
+
+ /**
+ * Sets Pricing Scheme.
+ * The pricing scheme details.
+ *
+ * @maps pricing_scheme
+ */
+ public function setPricingScheme(?SubscriptionPricingScheme $pricingScheme): void
+ {
+ $this->pricingScheme = $pricingScheme;
+ }
+
+ /**
+ * Returns Sequence.
+ * 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.
+ */
+ public function getSequence(): int
+ {
+ return $this->sequence;
+ }
+
+ /**
+ * Sets Sequence.
+ * 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.
+ *
+ * @required
+ * @maps sequence
+ */
+ public function setSequence(int $sequence): void
+ {
+ $this->sequence = $sequence;
+ }
+
+ /**
+ * Returns Total Cycles.
+ * 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).
+ */
+ public function getTotalCycles(): ?int
+ {
+ return $this->totalCycles;
+ }
+
+ /**
+ * Sets Total Cycles.
+ * 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).
+ *
+ * @maps total_cycles
+ */
+ public function setTotalCycles(?int $totalCycles): void
+ {
+ $this->totalCycles = $totalCycles;
+ }
+
+ /**
+ * Converts the BillingCycleOverride object to a human-readable string representation.
+ *
+ * @return string The string representation of the BillingCycleOverride object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'BillingCycleOverride',
+ [
+ 'pricingScheme' => $this->pricingScheme,
+ 'sequence' => $this->sequence,
+ 'totalCycles' => $this->totalCycles
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->pricingScheme)) {
+ $json['pricing_scheme'] = $this->pricingScheme;
+ }
+ $json['sequence'] = $this->sequence;
+ if (isset($this->totalCycles)) {
+ $json['total_cycles'] = $this->totalCycles;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/BillingPlan.php b/src/Models/BillingPlan.php
new file mode 100644
index 0000000..e4fb86a
--- /dev/null
+++ b/src/Models/BillingPlan.php
@@ -0,0 +1,445 @@
+id;
+ }
+
+ /**
+ * Sets Id.
+ * The unique PayPal-generated ID for the plan.
+ *
+ * @maps id
+ */
+ public function setId(?string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Product Id.
+ * The ID for the product.
+ */
+ public function getProductId(): ?string
+ {
+ return $this->productId;
+ }
+
+ /**
+ * Sets Product Id.
+ * The ID for the product.
+ *
+ * @maps product_id
+ */
+ public function setProductId(?string $productId): void
+ {
+ $this->productId = $productId;
+ }
+
+ /**
+ * Returns Name.
+ * The plan name.
+ */
+ public function getName(): ?string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The plan name.
+ *
+ * @maps name
+ */
+ public function setName(?string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Status.
+ * The plan status.
+ */
+ public function getStatus(): ?string
+ {
+ return $this->status;
+ }
+
+ /**
+ * Sets Status.
+ * The plan status.
+ *
+ * @maps status
+ */
+ public function setStatus(?string $status): void
+ {
+ $this->status = $status;
+ }
+
+ /**
+ * Returns Description.
+ * The detailed description of the plan.
+ */
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ /**
+ * Sets Description.
+ * The detailed description of the plan.
+ *
+ * @maps description
+ */
+ public function setDescription(?string $description): void
+ {
+ $this->description = $description;
+ }
+
+ /**
+ * Returns Billing Cycles.
+ * 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.
+ *
+ * @return SubscriptionBillingCycle[]|null
+ */
+ public function getBillingCycles(): ?array
+ {
+ return $this->billingCycles;
+ }
+
+ /**
+ * Sets Billing Cycles.
+ * 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.
+ *
+ * @maps billing_cycles
+ *
+ * @param SubscriptionBillingCycle[]|null $billingCycles
+ */
+ public function setBillingCycles(?array $billingCycles): void
+ {
+ $this->billingCycles = $billingCycles;
+ }
+
+ /**
+ * Returns Payment Preferences.
+ * The payment preferences for a subscription.
+ */
+ public function getPaymentPreferences(): ?PaymentPreferences
+ {
+ return $this->paymentPreferences;
+ }
+
+ /**
+ * Sets Payment Preferences.
+ * The payment preferences for a subscription.
+ *
+ * @maps payment_preferences
+ */
+ public function setPaymentPreferences(?PaymentPreferences $paymentPreferences): void
+ {
+ $this->paymentPreferences = $paymentPreferences;
+ }
+
+ /**
+ * Returns Merchant Preferences.
+ * The merchant preferences for a subscription.
+ */
+ public function getMerchantPreferences(): ?MerchantPreferences
+ {
+ return $this->merchantPreferences;
+ }
+
+ /**
+ * Sets Merchant Preferences.
+ * The merchant preferences for a subscription.
+ *
+ * @maps merchant_preferences
+ */
+ public function setMerchantPreferences(?MerchantPreferences $merchantPreferences): void
+ {
+ $this->merchantPreferences = $merchantPreferences;
+ }
+
+ /**
+ * Returns Taxes.
+ * The tax details.
+ */
+ public function getTaxes(): ?Taxes
+ {
+ return $this->taxes;
+ }
+
+ /**
+ * Sets Taxes.
+ * The tax details.
+ *
+ * @maps taxes
+ */
+ public function setTaxes(?Taxes $taxes): void
+ {
+ $this->taxes = $taxes;
+ }
+
+ /**
+ * Returns Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ */
+ public function getQuantitySupported(): ?bool
+ {
+ return $this->quantitySupported;
+ }
+
+ /**
+ * Sets Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ *
+ * @maps quantity_supported
+ */
+ public function setQuantitySupported(?bool $quantitySupported): void
+ {
+ $this->quantitySupported = $quantitySupported;
+ }
+
+ /**
+ * Returns Create Time.
+ * 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.
+ */
+ public function getCreateTime(): ?string
+ {
+ return $this->createTime;
+ }
+
+ /**
+ * Sets Create Time.
+ * 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.
+ *
+ * @maps create_time
+ */
+ public function setCreateTime(?string $createTime): void
+ {
+ $this->createTime = $createTime;
+ }
+
+ /**
+ * Returns Update Time.
+ * 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.
+ */
+ public function getUpdateTime(): ?string
+ {
+ return $this->updateTime;
+ }
+
+ /**
+ * Sets Update Time.
+ * 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.
+ *
+ * @maps update_time
+ */
+ public function setUpdateTime(?string $updateTime): void
+ {
+ $this->updateTime = $updateTime;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the BillingPlan object to a human-readable string representation.
+ *
+ * @return string The string representation of the BillingPlan object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'BillingPlan',
+ [
+ 'id' => $this->id,
+ 'productId' => $this->productId,
+ 'name' => $this->name,
+ 'status' => $this->status,
+ 'description' => $this->description,
+ 'billingCycles' => $this->billingCycles,
+ 'paymentPreferences' => $this->paymentPreferences,
+ 'merchantPreferences' => $this->merchantPreferences,
+ 'taxes' => $this->taxes,
+ 'quantitySupported' => $this->quantitySupported,
+ 'createTime' => $this->createTime,
+ 'updateTime' => $this->updateTime,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
+ if (isset($this->productId)) {
+ $json['product_id'] = $this->productId;
+ }
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->status)) {
+ $json['status'] = $this->status;
+ }
+ if (isset($this->description)) {
+ $json['description'] = $this->description;
+ }
+ if (isset($this->billingCycles)) {
+ $json['billing_cycles'] = $this->billingCycles;
+ }
+ if (isset($this->paymentPreferences)) {
+ $json['payment_preferences'] = $this->paymentPreferences;
+ }
+ if (isset($this->merchantPreferences)) {
+ $json['merchant_preferences'] = $this->merchantPreferences;
+ }
+ if (isset($this->taxes)) {
+ $json['taxes'] = $this->taxes;
+ }
+ if (isset($this->quantitySupported)) {
+ $json['quantity_supported'] = $this->quantitySupported;
+ }
+ if (isset($this->createTime)) {
+ $json['create_time'] = $this->createTime;
+ }
+ if (isset($this->updateTime)) {
+ $json['update_time'] = $this->updateTime;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/BlikExperienceContext.php b/src/Models/BlikExperienceContext.php
index 948c560..7f6f221 100644
--- a/src/Models/BlikExperienceContext.php
+++ b/src/Models/BlikExperienceContext.php
@@ -31,7 +31,7 @@ class BlikExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $shippingPreference = ShippingPreference::GET_FROM_FILE;
+ private $shippingPreference = ExperienceContextShippingPreference::GET_FROM_FILE;
/**
* @var string|null
diff --git a/src/Models/Builders/ActivateSubscriptionRequestBuilder.php b/src/Models/Builders/ActivateSubscriptionRequestBuilder.php
new file mode 100644
index 0000000..2a14686
--- /dev/null
+++ b/src/Models/Builders/ActivateSubscriptionRequestBuilder.php
@@ -0,0 +1,59 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Activate Subscription Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ActivateSubscriptionRequest());
+ }
+
+ /**
+ * Sets reason field.
+ *
+ * @param string|null $value
+ */
+ public function reason(?string $value): self
+ {
+ $this->instance->setReason($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Activate Subscription Request object.
+ */
+ public function build(): ActivateSubscriptionRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/AppSwitchContextBuilder.php b/src/Models/Builders/AppSwitchContextBuilder.php
new file mode 100644
index 0000000..4bc764c
--- /dev/null
+++ b/src/Models/Builders/AppSwitchContextBuilder.php
@@ -0,0 +1,72 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new App Switch Context Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new AppSwitchContext());
+ }
+
+ /**
+ * Sets native app field.
+ *
+ * @param NativeAppContext|null $value
+ */
+ public function nativeApp(?NativeAppContext $value): self
+ {
+ $this->instance->setNativeApp($value);
+ return $this;
+ }
+
+ /**
+ * Sets mobile web field.
+ *
+ * @param MobileWebContext|null $value
+ */
+ public function mobileWeb(?MobileWebContext $value): self
+ {
+ $this->instance->setMobileWeb($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new App Switch Context object.
+ */
+ public function build(): AppSwitchContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ApplePayRequestCardBuilder.php b/src/Models/Builders/ApplePayRequestCardBuilder.php
new file mode 100644
index 0000000..84e7802
--- /dev/null
+++ b/src/Models/Builders/ApplePayRequestCardBuilder.php
@@ -0,0 +1,82 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Apple Pay Request Card Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ApplePayRequestCard());
+ }
+
+ /**
+ * Sets type field.
+ *
+ * @param string|null $value
+ */
+ public function type(?string $value): self
+ {
+ $this->instance->setType($value);
+ return $this;
+ }
+
+ /**
+ * Sets brand field.
+ *
+ * @param string|null $value
+ */
+ public function brand(?string $value): self
+ {
+ $this->instance->setBrand($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing address field.
+ *
+ * @param Address|null $value
+ */
+ public function billingAddress(?Address $value): self
+ {
+ $this->instance->setBillingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Apple Pay Request Card object.
+ */
+ public function build(): ApplePayRequestCard
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/AuctionInformationBuilder.php b/src/Models/Builders/AuctionInformationBuilder.php
new file mode 100644
index 0000000..c524c29
--- /dev/null
+++ b/src/Models/Builders/AuctionInformationBuilder.php
@@ -0,0 +1,92 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Auction Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new AuctionInformation());
+ }
+
+ /**
+ * Sets auction site field.
+ *
+ * @param string|null $value
+ */
+ public function auctionSite(?string $value): self
+ {
+ $this->instance->setAuctionSite($value);
+ return $this;
+ }
+
+ /**
+ * Sets auction item site field.
+ *
+ * @param string|null $value
+ */
+ public function auctionItemSite(?string $value): self
+ {
+ $this->instance->setAuctionItemSite($value);
+ return $this;
+ }
+
+ /**
+ * Sets auction buyer id field.
+ *
+ * @param string|null $value
+ */
+ public function auctionBuyerId(?string $value): self
+ {
+ $this->instance->setAuctionBuyerId($value);
+ return $this;
+ }
+
+ /**
+ * Sets auction closing date field.
+ *
+ * @param string|null $value
+ */
+ public function auctionClosingDate(?string $value): self
+ {
+ $this->instance->setAuctionClosingDate($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Auction Information object.
+ */
+ public function build(): AuctionInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/AuthorizationBuilder.php b/src/Models/Builders/AuthorizationBuilder.php
index 284eebc..e132d51 100644
--- a/src/Models/Builders/AuthorizationBuilder.php
+++ b/src/Models/Builders/AuthorizationBuilder.php
@@ -15,7 +15,7 @@ use PaypalServerSdkLib\Models\Authorization;
use PaypalServerSdkLib\Models\AuthorizationStatusDetails;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\SellerProtection;
/**
@@ -112,9 +112,9 @@ class AuthorizationBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php b/src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php
index 9facc68..d0111db 100644
--- a/src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php
+++ b/src/Models/Builders/AuthorizationWithAdditionalDataBuilder.php
@@ -15,7 +15,7 @@ use PaypalServerSdkLib\Models\AuthorizationStatusDetails;
use PaypalServerSdkLib\Models\AuthorizationWithAdditionalData;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\ProcessorResponse;
use PaypalServerSdkLib\Models\SellerProtection;
@@ -113,9 +113,9 @@ class AuthorizationWithAdditionalDataBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/BalanceInformationBuilder.php b/src/Models/Builders/BalanceInformationBuilder.php
new file mode 100644
index 0000000..e69a83b
--- /dev/null
+++ b/src/Models/Builders/BalanceInformationBuilder.php
@@ -0,0 +1,85 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Balance Information Builder object.
+ *
+ * @param string $currency
+ * @param Money $totalBalance
+ */
+ public static function init(string $currency, Money $totalBalance): self
+ {
+ return new self(new BalanceInformation($currency, $totalBalance));
+ }
+
+ /**
+ * Sets primary field.
+ *
+ * @param bool|null $value
+ */
+ public function primary(?bool $value): self
+ {
+ $this->instance->setPrimary($value);
+ return $this;
+ }
+
+ /**
+ * Sets available balance field.
+ *
+ * @param Money|null $value
+ */
+ public function availableBalance(?Money $value): self
+ {
+ $this->instance->setAvailableBalance($value);
+ return $this;
+ }
+
+ /**
+ * Sets withheld balance field.
+ *
+ * @param Money|null $value
+ */
+ public function withheldBalance(?Money $value): self
+ {
+ $this->instance->setWithheldBalance($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Balance Information object.
+ */
+ public function build(): BalanceInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/BalancesResponseBuilder.php b/src/Models/Builders/BalancesResponseBuilder.php
new file mode 100644
index 0000000..9c3b546
--- /dev/null
+++ b/src/Models/Builders/BalancesResponseBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Balances Response Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new BalancesResponse());
+ }
+
+ /**
+ * Sets balances field.
+ *
+ * @param BalanceInformation[]|null $value
+ */
+ public function balances(?array $value): self
+ {
+ $this->instance->setBalances($value);
+ return $this;
+ }
+
+ /**
+ * Sets account id field.
+ *
+ * @param string|null $value
+ */
+ public function accountId(?string $value): self
+ {
+ $this->instance->setAccountId($value);
+ return $this;
+ }
+
+ /**
+ * Sets as of time field.
+ *
+ * @param string|null $value
+ */
+ public function asOfTime(?string $value): self
+ {
+ $this->instance->setAsOfTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets last refresh time field.
+ *
+ * @param string|null $value
+ */
+ public function lastRefreshTime(?string $value): self
+ {
+ $this->instance->setLastRefreshTime($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Balances Response object.
+ */
+ public function build(): BalancesResponse
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/BankRequestBuilder.php b/src/Models/Builders/BankRequestBuilder.php
new file mode 100644
index 0000000..e9c6243
--- /dev/null
+++ b/src/Models/Builders/BankRequestBuilder.php
@@ -0,0 +1,71 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Bank Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new BankRequest());
+ }
+
+ /**
+ * Sets ach debit field.
+ *
+ * @param mixed $value
+ */
+ public function achDebit($value): self
+ {
+ $this->instance->setAchDebit($value);
+ return $this;
+ }
+
+ /**
+ * Sets sepa debit field.
+ *
+ * @param SepaDebitRequest|null $value
+ */
+ public function sepaDebit(?SepaDebitRequest $value): self
+ {
+ $this->instance->setSepaDebit($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Bank Request object.
+ */
+ public function build(): BankRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/BillingCycleBuilder.php b/src/Models/Builders/BillingCycleBuilder.php
index 5fe4216..94a8944 100644
--- a/src/Models/Builders/BillingCycleBuilder.php
+++ b/src/Models/Builders/BillingCycleBuilder.php
@@ -52,17 +52,6 @@ class BillingCycleBuilder
return $this;
}
- /**
- * Sets frequency field.
- *
- * @param mixed $value
- */
- public function frequency($value): self
- {
- $this->instance->setFrequency($value);
- return $this;
- }
-
/**
* Sets total cycles field.
*
diff --git a/src/Models/Builders/BillingCycleOverrideBuilder.php b/src/Models/Builders/BillingCycleOverrideBuilder.php
new file mode 100644
index 0000000..3fd22fd
--- /dev/null
+++ b/src/Models/Builders/BillingCycleOverrideBuilder.php
@@ -0,0 +1,73 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Billing Cycle Override Builder object.
+ *
+ * @param int $sequence
+ */
+ public static function init(int $sequence): self
+ {
+ return new self(new BillingCycleOverride($sequence));
+ }
+
+ /**
+ * Sets pricing scheme field.
+ *
+ * @param SubscriptionPricingScheme|null $value
+ */
+ public function pricingScheme(?SubscriptionPricingScheme $value): self
+ {
+ $this->instance->setPricingScheme($value);
+ return $this;
+ }
+
+ /**
+ * Sets total cycles field.
+ *
+ * @param int|null $value
+ */
+ public function totalCycles(?int $value): self
+ {
+ $this->instance->setTotalCycles($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Billing Cycle Override object.
+ */
+ public function build(): BillingCycleOverride
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/BillingPlanBuilder.php b/src/Models/Builders/BillingPlanBuilder.php
new file mode 100644
index 0000000..1e3afc8
--- /dev/null
+++ b/src/Models/Builders/BillingPlanBuilder.php
@@ -0,0 +1,196 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Billing Plan Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new BillingPlan());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
+ }
+
+ /**
+ * Sets product id field.
+ *
+ * @param string|null $value
+ */
+ public function productId(?string $value): self
+ {
+ $this->instance->setProductId($value);
+ return $this;
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param string|null $value
+ */
+ public function name(?string $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets status field.
+ *
+ * @param string|null $value
+ */
+ public function status(?string $value): self
+ {
+ $this->instance->setStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets description field.
+ *
+ * @param string|null $value
+ */
+ public function description(?string $value): self
+ {
+ $this->instance->setDescription($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing cycles field.
+ *
+ * @param SubscriptionBillingCycle[]|null $value
+ */
+ public function billingCycles(?array $value): self
+ {
+ $this->instance->setBillingCycles($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment preferences field.
+ *
+ * @param PaymentPreferences|null $value
+ */
+ public function paymentPreferences(?PaymentPreferences $value): self
+ {
+ $this->instance->setPaymentPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets merchant preferences field.
+ *
+ * @param MerchantPreferences|null $value
+ */
+ public function merchantPreferences(?MerchantPreferences $value): self
+ {
+ $this->instance->setMerchantPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets taxes field.
+ *
+ * @param Taxes|null $value
+ */
+ public function taxes(?Taxes $value): self
+ {
+ $this->instance->setTaxes($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity supported field.
+ *
+ * @param bool|null $value
+ */
+ public function quantitySupported(?bool $value): self
+ {
+ $this->instance->setQuantitySupported($value);
+ return $this;
+ }
+
+ /**
+ * Sets create time field.
+ *
+ * @param string|null $value
+ */
+ public function createTime(?string $value): self
+ {
+ $this->instance->setCreateTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets update time field.
+ *
+ * @param string|null $value
+ */
+ public function updateTime(?string $value): self
+ {
+ $this->instance->setUpdateTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Billing Plan object.
+ */
+ public function build(): BillingPlan
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CancelSubscriptionRequestBuilder.php b/src/Models/Builders/CancelSubscriptionRequestBuilder.php
new file mode 100644
index 0000000..a18af50
--- /dev/null
+++ b/src/Models/Builders/CancelSubscriptionRequestBuilder.php
@@ -0,0 +1,50 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Cancel Subscription Request Builder object.
+ *
+ * @param string $reason
+ */
+ public static function init(string $reason): self
+ {
+ return new self(new CancelSubscriptionRequest($reason));
+ }
+
+ /**
+ * Initializes a new Cancel Subscription Request object.
+ */
+ public function build(): CancelSubscriptionRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CaptureRequestBuilder.php b/src/Models/Builders/CaptureRequestBuilder.php
index 1e0d5ff..7ec7e3f 100644
--- a/src/Models/Builders/CaptureRequestBuilder.php
+++ b/src/Models/Builders/CaptureRequestBuilder.php
@@ -40,28 +40,6 @@ class CaptureRequestBuilder
return new self(new CaptureRequest());
}
- /**
- * Sets invoice id field.
- *
- * @param string|null $value
- */
- public function invoiceId(?string $value): self
- {
- $this->instance->setInvoiceId($value);
- return $this;
- }
-
- /**
- * Sets note to payer field.
- *
- * @param string|null $value
- */
- public function noteToPayer(?string $value): self
- {
- $this->instance->setNoteToPayer($value);
- return $this;
- }
-
/**
* Sets amount field.
*
@@ -73,6 +51,17 @@ class CaptureRequestBuilder
return $this;
}
+ /**
+ * Sets invoice id field.
+ *
+ * @param string|null $value
+ */
+ public function invoiceId(?string $value): self
+ {
+ $this->instance->setInvoiceId($value);
+ return $this;
+ }
+
/**
* Sets final capture field.
*
@@ -95,6 +84,17 @@ class CaptureRequestBuilder
return $this;
}
+ /**
+ * Sets note to payer field.
+ *
+ * @param string|null $value
+ */
+ public function noteToPayer(?string $value): self
+ {
+ $this->instance->setNoteToPayer($value);
+ return $this;
+ }
+
/**
* Sets soft descriptor field.
*
diff --git a/src/Models/Builders/CaptureSubscriptionRequestBuilder.php b/src/Models/Builders/CaptureSubscriptionRequestBuilder.php
new file mode 100644
index 0000000..33f6140
--- /dev/null
+++ b/src/Models/Builders/CaptureSubscriptionRequestBuilder.php
@@ -0,0 +1,53 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Capture Subscription Request Builder object.
+ *
+ * @param string $note
+ * @param string $captureType
+ * @param Money $amount
+ */
+ public static function init(string $note, string $captureType, Money $amount): self
+ {
+ return new self(new CaptureSubscriptionRequest($note, $captureType, $amount));
+ }
+
+ /**
+ * Initializes a new Capture Subscription Request object.
+ */
+ public function build(): CaptureSubscriptionRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CapturedPaymentBuilder.php b/src/Models/Builders/CapturedPaymentBuilder.php
index 76ef28e..50c3211 100644
--- a/src/Models/Builders/CapturedPaymentBuilder.php
+++ b/src/Models/Builders/CapturedPaymentBuilder.php
@@ -15,10 +15,10 @@ use PaypalServerSdkLib\Models\CapturedPayment;
use PaypalServerSdkLib\Models\CaptureStatusDetails;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\PayeeBase;
-use PaypalServerSdkLib\Models\PaymentsProcessorResponse;
use PaypalServerSdkLib\Models\PaymentSupplementaryData;
+use PaypalServerSdkLib\Models\ProcessorResponse;
use PaypalServerSdkLib\Models\SellerProtection;
use PaypalServerSdkLib\Models\SellerReceivableBreakdown;
@@ -116,9 +116,9 @@ class CapturedPaymentBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
@@ -182,9 +182,9 @@ class CapturedPaymentBuilder
/**
* Sets processor response field.
*
- * @param PaymentsProcessorResponse|null $value
+ * @param ProcessorResponse|null $value
*/
- public function processorResponse(?PaymentsProcessorResponse $value): self
+ public function processorResponse(?ProcessorResponse $value): self
{
$this->instance->setProcessorResponse($value);
return $this;
diff --git a/src/Models/Builders/CardCustomerBuilder.php b/src/Models/Builders/CardCustomerBuilder.php
new file mode 100644
index 0000000..a924a06
--- /dev/null
+++ b/src/Models/Builders/CardCustomerBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Card Customer Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new CardCustomer());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
+ }
+
+ /**
+ * Sets email address field.
+ *
+ * @param string|null $value
+ */
+ public function emailAddress(?string $value): self
+ {
+ $this->instance->setEmailAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets phone field.
+ *
+ * @param PhoneWithType|null $value
+ */
+ public function phone(?PhoneWithType $value): self
+ {
+ $this->instance->setPhone($value);
+ return $this;
+ }
+
+ /**
+ * Sets merchant customer id field.
+ *
+ * @param string|null $value
+ */
+ public function merchantCustomerId(?string $value): self
+ {
+ $this->instance->setMerchantCustomerId($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Card Customer object.
+ */
+ public function build(): CardCustomer
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CardResponseWithBillingAddressBuilder.php b/src/Models/Builders/CardResponseWithBillingAddressBuilder.php
new file mode 100644
index 0000000..006a157
--- /dev/null
+++ b/src/Models/Builders/CardResponseWithBillingAddressBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Card Response With Billing Address Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new CardResponseWithBillingAddress());
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param string|null $value
+ */
+ public function name(?string $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing address field.
+ *
+ * @param Address|null $value
+ */
+ public function billingAddress(?Address $value): self
+ {
+ $this->instance->setBillingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets expiry field.
+ *
+ * @param string|null $value
+ */
+ public function expiry(?string $value): self
+ {
+ $this->instance->setExpiry($value);
+ return $this;
+ }
+
+ /**
+ * Sets currency code field.
+ *
+ * @param string|null $value
+ */
+ public function currencyCode(?string $value): self
+ {
+ $this->instance->setCurrencyCode($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Card Response With Billing Address object.
+ */
+ public function build(): CardResponseWithBillingAddress
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CardStoredCredentialBuilder.php b/src/Models/Builders/CardStoredCredentialBuilder.php
index 77dc3d4..c6165f8 100644
--- a/src/Models/Builders/CardStoredCredentialBuilder.php
+++ b/src/Models/Builders/CardStoredCredentialBuilder.php
@@ -12,7 +12,7 @@ namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\CardStoredCredential;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
/**
* Builder for model CardStoredCredential
@@ -56,9 +56,9 @@ class CardStoredCredentialBuilder
/**
* Sets previous network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function previousNetworkTransactionReference(?NetworkTransactionReference $value): self
+ public function previousNetworkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setPreviousNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/CartInformationBuilder.php b/src/Models/Builders/CartInformationBuilder.php
new file mode 100644
index 0000000..514e7a1
--- /dev/null
+++ b/src/Models/Builders/CartInformationBuilder.php
@@ -0,0 +1,82 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Cart Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new CartInformation());
+ }
+
+ /**
+ * Sets item details field.
+ *
+ * @param ItemDetails[]|null $value
+ */
+ public function itemDetails(?array $value): self
+ {
+ $this->instance->setItemDetails($value);
+ return $this;
+ }
+
+ /**
+ * Sets tax inclusive field.
+ *
+ * @param bool|null $value
+ */
+ public function taxInclusive(?bool $value): self
+ {
+ $this->instance->setTaxInclusive($value);
+ return $this;
+ }
+
+ /**
+ * Sets paypal invoice id field.
+ *
+ * @param string|null $value
+ */
+ public function paypalInvoiceId(?string $value): self
+ {
+ $this->instance->setPaypalInvoiceId($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Cart Information object.
+ */
+ public function build(): CartInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CheckoutOptionBuilder.php b/src/Models/Builders/CheckoutOptionBuilder.php
new file mode 100644
index 0000000..e125eec
--- /dev/null
+++ b/src/Models/Builders/CheckoutOptionBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Checkout Option Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new CheckoutOption());
+ }
+
+ /**
+ * Sets checkout option name field.
+ *
+ * @param string|null $value
+ */
+ public function checkoutOptionName(?string $value): self
+ {
+ $this->instance->setCheckoutOptionName($value);
+ return $this;
+ }
+
+ /**
+ * Sets checkout option value field.
+ *
+ * @param string|null $value
+ */
+ public function checkoutOptionValue(?string $value): self
+ {
+ $this->instance->setCheckoutOptionValue($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Checkout Option object.
+ */
+ public function build(): CheckoutOption
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CreateSubscriptionRequestBuilder.php b/src/Models/Builders/CreateSubscriptionRequestBuilder.php
new file mode 100644
index 0000000..f183edb
--- /dev/null
+++ b/src/Models/Builders/CreateSubscriptionRequestBuilder.php
@@ -0,0 +1,142 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Create Subscription Request Builder object.
+ *
+ * @param string $planId
+ */
+ public static function init(string $planId): self
+ {
+ return new self(new CreateSubscriptionRequest($planId));
+ }
+
+ /**
+ * Sets start time field.
+ *
+ * @param string|null $value
+ */
+ public function startTime(?string $value): self
+ {
+ $this->instance->setStartTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity field.
+ *
+ * @param string|null $value
+ */
+ public function quantity(?string $value): self
+ {
+ $this->instance->setQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets subscriber field.
+ *
+ * @param SubscriberRequest|null $value
+ */
+ public function subscriber(?SubscriberRequest $value): self
+ {
+ $this->instance->setSubscriber($value);
+ return $this;
+ }
+
+ /**
+ * Sets auto renewal field.
+ *
+ * @param bool|null $value
+ */
+ public function autoRenewal(?bool $value): self
+ {
+ $this->instance->setAutoRenewal($value);
+ return $this;
+ }
+
+ /**
+ * Sets application context field.
+ *
+ * @param SubscriptionApplicationContext|null $value
+ */
+ public function applicationContext(?SubscriptionApplicationContext $value): self
+ {
+ $this->instance->setApplicationContext($value);
+ return $this;
+ }
+
+ /**
+ * Sets custom id field.
+ *
+ * @param string|null $value
+ */
+ public function customId(?string $value): self
+ {
+ $this->instance->setCustomId($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan field.
+ *
+ * @param PlanOverride|null $value
+ */
+ public function plan(?PlanOverride $value): self
+ {
+ $this->instance->setPlan($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Create Subscription Request object.
+ */
+ public function build(): CreateSubscriptionRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/CycleExecutionBuilder.php b/src/Models/Builders/CycleExecutionBuilder.php
new file mode 100644
index 0000000..0efdd15
--- /dev/null
+++ b/src/Models/Builders/CycleExecutionBuilder.php
@@ -0,0 +1,85 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Cycle Execution Builder object.
+ *
+ * @param string $tenureType
+ * @param int $sequence
+ * @param int $cyclesCompleted
+ */
+ public static function init(string $tenureType, int $sequence, int $cyclesCompleted): self
+ {
+ return new self(new CycleExecution($tenureType, $sequence, $cyclesCompleted));
+ }
+
+ /**
+ * Sets cycles remaining field.
+ *
+ * @param int|null $value
+ */
+ public function cyclesRemaining(?int $value): self
+ {
+ $this->instance->setCyclesRemaining($value);
+ return $this;
+ }
+
+ /**
+ * Sets current pricing scheme version field.
+ *
+ * @param int|null $value
+ */
+ public function currentPricingSchemeVersion(?int $value): self
+ {
+ $this->instance->setCurrentPricingSchemeVersion($value);
+ return $this;
+ }
+
+ /**
+ * Sets total cycles field.
+ *
+ * @param int|null $value
+ */
+ public function totalCycles(?int $value): self
+ {
+ $this->instance->setTotalCycles($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Cycle Execution object.
+ */
+ public function build(): CycleExecution
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/FailedPaymentDetailsBuilder.php b/src/Models/Builders/FailedPaymentDetailsBuilder.php
new file mode 100644
index 0000000..14bef52
--- /dev/null
+++ b/src/Models/Builders/FailedPaymentDetailsBuilder.php
@@ -0,0 +1,74 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Failed Payment Details Builder object.
+ *
+ * @param Money $amount
+ * @param string $time
+ */
+ public static function init(Money $amount, string $time): self
+ {
+ return new self(new FailedPaymentDetails($amount, $time));
+ }
+
+ /**
+ * Sets reason code field.
+ *
+ * @param string|null $value
+ */
+ public function reasonCode(?string $value): self
+ {
+ $this->instance->setReasonCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets next payment retry time field.
+ *
+ * @param string|null $value
+ */
+ public function nextPaymentRetryTime(?string $value): self
+ {
+ $this->instance->setNextPaymentRetryTime($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Failed Payment Details object.
+ */
+ public function build(): FailedPaymentDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/FrequencyBuilder.php b/src/Models/Builders/FrequencyBuilder.php
new file mode 100644
index 0000000..ce69432
--- /dev/null
+++ b/src/Models/Builders/FrequencyBuilder.php
@@ -0,0 +1,61 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Frequency Builder object.
+ *
+ * @param string $intervalUnit
+ */
+ public static function init(string $intervalUnit): self
+ {
+ return new self(new Frequency($intervalUnit));
+ }
+
+ /**
+ * Sets interval count field.
+ *
+ * @param int|null $value
+ */
+ public function intervalCount(?int $value): self
+ {
+ $this->instance->setIntervalCount($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Frequency object.
+ */
+ public function build(): Frequency
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/IncentiveDetailsBuilder.php b/src/Models/Builders/IncentiveDetailsBuilder.php
new file mode 100644
index 0000000..3b0a97f
--- /dev/null
+++ b/src/Models/Builders/IncentiveDetailsBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Incentive Details Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new IncentiveDetails());
+ }
+
+ /**
+ * Sets incentive type field.
+ *
+ * @param string|null $value
+ */
+ public function incentiveType(?string $value): self
+ {
+ $this->instance->setIncentiveType($value);
+ return $this;
+ }
+
+ /**
+ * Sets incentive code field.
+ *
+ * @param string|null $value
+ */
+ public function incentiveCode(?string $value): self
+ {
+ $this->instance->setIncentiveCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets incentive amount field.
+ *
+ * @param Money|null $value
+ */
+ public function incentiveAmount(?Money $value): self
+ {
+ $this->instance->setIncentiveAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets incentive program code field.
+ *
+ * @param string|null $value
+ */
+ public function incentiveProgramCode(?string $value): self
+ {
+ $this->instance->setIncentiveProgramCode($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Incentive Details object.
+ */
+ public function build(): IncentiveDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/IncentiveInformationBuilder.php b/src/Models/Builders/IncentiveInformationBuilder.php
new file mode 100644
index 0000000..c0ba618
--- /dev/null
+++ b/src/Models/Builders/IncentiveInformationBuilder.php
@@ -0,0 +1,60 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Incentive Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new IncentiveInformation());
+ }
+
+ /**
+ * Sets incentive details field.
+ *
+ * @param IncentiveDetails[]|null $value
+ */
+ public function incentiveDetails(?array $value): self
+ {
+ $this->instance->setIncentiveDetails($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Incentive Information object.
+ */
+ public function build(): IncentiveInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ItemDetailsBuilder.php b/src/Models/Builders/ItemDetailsBuilder.php
new file mode 100644
index 0000000..b764567
--- /dev/null
+++ b/src/Models/Builders/ItemDetailsBuilder.php
@@ -0,0 +1,260 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Item Details Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ItemDetails());
+ }
+
+ /**
+ * Sets item code field.
+ *
+ * @param string|null $value
+ */
+ public function itemCode(?string $value): self
+ {
+ $this->instance->setItemCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets item name field.
+ *
+ * @param string|null $value
+ */
+ public function itemName(?string $value): self
+ {
+ $this->instance->setItemName($value);
+ return $this;
+ }
+
+ /**
+ * Sets item description field.
+ *
+ * @param string|null $value
+ */
+ public function itemDescription(?string $value): self
+ {
+ $this->instance->setItemDescription($value);
+ return $this;
+ }
+
+ /**
+ * Sets item options field.
+ *
+ * @param string|null $value
+ */
+ public function itemOptions(?string $value): self
+ {
+ $this->instance->setItemOptions($value);
+ return $this;
+ }
+
+ /**
+ * Sets item quantity field.
+ *
+ * @param string|null $value
+ */
+ public function itemQuantity(?string $value): self
+ {
+ $this->instance->setItemQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Sets item unit price field.
+ *
+ * @param Money|null $value
+ */
+ public function itemUnitPrice(?Money $value): self
+ {
+ $this->instance->setItemUnitPrice($value);
+ return $this;
+ }
+
+ /**
+ * Sets item amount field.
+ *
+ * @param Money|null $value
+ */
+ public function itemAmount(?Money $value): self
+ {
+ $this->instance->setItemAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets discount amount field.
+ *
+ * @param Money|null $value
+ */
+ public function discountAmount(?Money $value): self
+ {
+ $this->instance->setDiscountAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets adjustment amount field.
+ *
+ * @param Money|null $value
+ */
+ public function adjustmentAmount(?Money $value): self
+ {
+ $this->instance->setAdjustmentAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets gift wrap amount field.
+ *
+ * @param Money|null $value
+ */
+ public function giftWrapAmount(?Money $value): self
+ {
+ $this->instance->setGiftWrapAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets tax percentage field.
+ *
+ * @param string|null $value
+ */
+ public function taxPercentage(?string $value): self
+ {
+ $this->instance->setTaxPercentage($value);
+ return $this;
+ }
+
+ /**
+ * Sets tax amounts field.
+ *
+ * @param TaxAmount[]|null $value
+ */
+ public function taxAmounts(?array $value): self
+ {
+ $this->instance->setTaxAmounts($value);
+ return $this;
+ }
+
+ /**
+ * Sets basic shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function basicShippingAmount(?Money $value): self
+ {
+ $this->instance->setBasicShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets extra shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function extraShippingAmount(?Money $value): self
+ {
+ $this->instance->setExtraShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets handling amount field.
+ *
+ * @param Money|null $value
+ */
+ public function handlingAmount(?Money $value): self
+ {
+ $this->instance->setHandlingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets insurance amount field.
+ *
+ * @param Money|null $value
+ */
+ public function insuranceAmount(?Money $value): self
+ {
+ $this->instance->setInsuranceAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets total item amount field.
+ *
+ * @param Money|null $value
+ */
+ public function totalItemAmount(?Money $value): self
+ {
+ $this->instance->setTotalItemAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets invoice number field.
+ *
+ * @param string|null $value
+ */
+ public function invoiceNumber(?string $value): self
+ {
+ $this->instance->setInvoiceNumber($value);
+ return $this;
+ }
+
+ /**
+ * Sets checkout options field.
+ *
+ * @param CheckoutOption[]|null $value
+ */
+ public function checkoutOptions(?array $value): self
+ {
+ $this->instance->setCheckoutOptions($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Item Details object.
+ */
+ public function build(): ItemDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ItemRequestBuilder.php b/src/Models/Builders/ItemRequestBuilder.php
new file mode 100644
index 0000000..f14de17
--- /dev/null
+++ b/src/Models/Builders/ItemRequestBuilder.php
@@ -0,0 +1,143 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Item Request Builder object.
+ *
+ * @param string $name
+ * @param Money $unitAmount
+ * @param string $quantity
+ */
+ public static function init(string $name, Money $unitAmount, string $quantity): self
+ {
+ return new self(new ItemRequest($name, $unitAmount, $quantity));
+ }
+
+ /**
+ * Sets tax field.
+ *
+ * @param Money|null $value
+ */
+ public function tax(?Money $value): self
+ {
+ $this->instance->setTax($value);
+ return $this;
+ }
+
+ /**
+ * Sets description field.
+ *
+ * @param string|null $value
+ */
+ public function description(?string $value): self
+ {
+ $this->instance->setDescription($value);
+ return $this;
+ }
+
+ /**
+ * Sets sku field.
+ *
+ * @param string|null $value
+ */
+ public function sku(?string $value): self
+ {
+ $this->instance->setSku($value);
+ return $this;
+ }
+
+ /**
+ * Sets url field.
+ *
+ * @param string|null $value
+ */
+ public function url(?string $value): self
+ {
+ $this->instance->setUrl($value);
+ return $this;
+ }
+
+ /**
+ * Sets category field.
+ *
+ * @param string|null $value
+ */
+ public function category(?string $value): self
+ {
+ $this->instance->setCategory($value);
+ return $this;
+ }
+
+ /**
+ * Sets image url field.
+ *
+ * @param string|null $value
+ */
+ public function imageUrl(?string $value): self
+ {
+ $this->instance->setImageUrl($value);
+ return $this;
+ }
+
+ /**
+ * Sets upc field.
+ *
+ * @param UniversalProductCode|null $value
+ */
+ public function upc(?UniversalProductCode $value): self
+ {
+ $this->instance->setUpc($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing plan field.
+ *
+ * @param OrderBillingPlan|null $value
+ */
+ public function billingPlan(?OrderBillingPlan $value): self
+ {
+ $this->instance->setBillingPlan($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Item Request object.
+ */
+ public function build(): ItemRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/LastPaymentDetailsBuilder.php b/src/Models/Builders/LastPaymentDetailsBuilder.php
new file mode 100644
index 0000000..2cb92dc
--- /dev/null
+++ b/src/Models/Builders/LastPaymentDetailsBuilder.php
@@ -0,0 +1,71 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Last Payment Details Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new LastPaymentDetails());
+ }
+
+ /**
+ * Sets amount field.
+ *
+ * @param Money|null $value
+ */
+ public function amount(?Money $value): self
+ {
+ $this->instance->setAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets time field.
+ *
+ * @param string|null $value
+ */
+ public function time(?string $value): self
+ {
+ $this->instance->setTime($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Last Payment Details object.
+ */
+ public function build(): LastPaymentDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/MerchantPreferencesBuilder.php b/src/Models/Builders/MerchantPreferencesBuilder.php
new file mode 100644
index 0000000..596950f
--- /dev/null
+++ b/src/Models/Builders/MerchantPreferencesBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Merchant Preferences Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new MerchantPreferences());
+ }
+
+ /**
+ * Sets return url field.
+ *
+ * @param string|null $value
+ */
+ public function returnUrl(?string $value): self
+ {
+ $this->instance->setReturnUrl($value);
+ return $this;
+ }
+
+ /**
+ * Sets cancel url field.
+ *
+ * @param string|null $value
+ */
+ public function cancelUrl(?string $value): self
+ {
+ $this->instance->setCancelUrl($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Merchant Preferences object.
+ */
+ public function build(): MerchantPreferences
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/MobileWebContextBuilder.php b/src/Models/Builders/MobileWebContextBuilder.php
new file mode 100644
index 0000000..14feb57
--- /dev/null
+++ b/src/Models/Builders/MobileWebContextBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Mobile Web Context Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new MobileWebContext());
+ }
+
+ /**
+ * Sets return flow field.
+ *
+ * @param string|null $value
+ */
+ public function returnFlow(?string $value): self
+ {
+ $this->instance->setReturnFlow($value);
+ return $this;
+ }
+
+ /**
+ * Sets buyer user agent field.
+ *
+ * @param string|null $value
+ */
+ public function buyerUserAgent(?string $value): self
+ {
+ $this->instance->setBuyerUserAgent($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Mobile Web Context object.
+ */
+ public function build(): MobileWebContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ModifySubscriptionRequestBuilder.php b/src/Models/Builders/ModifySubscriptionRequestBuilder.php
new file mode 100644
index 0000000..7a295f9
--- /dev/null
+++ b/src/Models/Builders/ModifySubscriptionRequestBuilder.php
@@ -0,0 +1,118 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Modify Subscription Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ModifySubscriptionRequest());
+ }
+
+ /**
+ * Sets plan id field.
+ *
+ * @param string|null $value
+ */
+ public function planId(?string $value): self
+ {
+ $this->instance->setPlanId($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity field.
+ *
+ * @param string|null $value
+ */
+ public function quantity(?string $value): self
+ {
+ $this->instance->setQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping address field.
+ *
+ * @param ShippingDetails|null $value
+ */
+ public function shippingAddress(?ShippingDetails $value): self
+ {
+ $this->instance->setShippingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets application context field.
+ *
+ * @param SubscriptionPatchApplicationContext|null $value
+ */
+ public function applicationContext(?SubscriptionPatchApplicationContext $value): self
+ {
+ $this->instance->setApplicationContext($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan field.
+ *
+ * @param PlanOverride|null $value
+ */
+ public function plan(?PlanOverride $value): self
+ {
+ $this->instance->setPlan($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Modify Subscription Request object.
+ */
+ public function build(): ModifySubscriptionRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ModifySubscriptionResponseBuilder.php b/src/Models/Builders/ModifySubscriptionResponseBuilder.php
new file mode 100644
index 0000000..dd74d16
--- /dev/null
+++ b/src/Models/Builders/ModifySubscriptionResponseBuilder.php
@@ -0,0 +1,129 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Modify Subscription Response Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ModifySubscriptionResponse());
+ }
+
+ /**
+ * Sets plan id field.
+ *
+ * @param string|null $value
+ */
+ public function planId(?string $value): self
+ {
+ $this->instance->setPlanId($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity field.
+ *
+ * @param string|null $value
+ */
+ public function quantity(?string $value): self
+ {
+ $this->instance->setQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping address field.
+ *
+ * @param ShippingDetails|null $value
+ */
+ public function shippingAddress(?ShippingDetails $value): self
+ {
+ $this->instance->setShippingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan field.
+ *
+ * @param PlanOverride|null $value
+ */
+ public function plan(?PlanOverride $value): self
+ {
+ $this->instance->setPlan($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan overridden field.
+ *
+ * @param bool|null $value
+ */
+ public function planOverridden(?bool $value): self
+ {
+ $this->instance->setPlanOverridden($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Modify Subscription Response object.
+ */
+ public function build(): ModifySubscriptionResponse
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/NativeAppContextBuilder.php b/src/Models/Builders/NativeAppContextBuilder.php
new file mode 100644
index 0000000..ed746bf
--- /dev/null
+++ b/src/Models/Builders/NativeAppContextBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Native App Context Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new NativeAppContext());
+ }
+
+ /**
+ * Sets os type field.
+ *
+ * @param string|null $value
+ */
+ public function osType(?string $value): self
+ {
+ $this->instance->setOsType($value);
+ return $this;
+ }
+
+ /**
+ * Sets os version field.
+ *
+ * @param string|null $value
+ */
+ public function osVersion(?string $value): self
+ {
+ $this->instance->setOsVersion($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Native App Context object.
+ */
+ public function build(): NativeAppContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/NetworkTransactionReferenceBuilder.php b/src/Models/Builders/NetworkTransactionBuilder.php
similarity index 62%
rename from src/Models/Builders/NetworkTransactionReferenceBuilder.php
rename to src/Models/Builders/NetworkTransactionBuilder.php
index ab51d52..47d6957 100644
--- a/src/Models/Builders/NetworkTransactionReferenceBuilder.php
+++ b/src/Models/Builders/NetworkTransactionBuilder.php
@@ -11,33 +11,42 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
/**
- * Builder for model NetworkTransactionReference
+ * Builder for model NetworkTransaction
*
- * @see NetworkTransactionReference
+ * @see NetworkTransaction
*/
-class NetworkTransactionReferenceBuilder
+class NetworkTransactionBuilder
{
/**
- * @var NetworkTransactionReference
+ * @var NetworkTransaction
*/
private $instance;
- private function __construct(NetworkTransactionReference $instance)
+ private function __construct(NetworkTransaction $instance)
{
$this->instance = $instance;
}
/**
- * Initializes a new Network Transaction Reference Builder object.
- *
- * @param string $id
+ * Initializes a new Network Transaction Builder object.
*/
- public static function init(string $id): self
+ public static function init(): self
{
- return new self(new NetworkTransactionReference($id));
+ return new self(new NetworkTransaction());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
}
/**
@@ -74,9 +83,9 @@ class NetworkTransactionReferenceBuilder
}
/**
- * Initializes a new Network Transaction Reference object.
+ * Initializes a new Network Transaction object.
*/
- public function build(): NetworkTransactionReference
+ public function build(): NetworkTransaction
{
return CoreHelper::clone($this->instance);
}
diff --git a/src/Models/Builders/OrderUpdateCallbackErrorResponseBuilder.php b/src/Models/Builders/OrderUpdateCallbackErrorResponseBuilder.php
deleted file mode 100644
index 4b15b76..0000000
--- a/src/Models/Builders/OrderUpdateCallbackErrorResponseBuilder.php
+++ /dev/null
@@ -1,73 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Error Response Builder object.
- *
- * @param string $name
- */
- public static function init(string $name): self
- {
- return new self(new OrderUpdateCallbackErrorResponse($name));
- }
-
- /**
- * Sets message field.
- *
- * @param string|null $value
- */
- public function message(?string $value): self
- {
- $this->instance->setMessage($value);
- return $this;
- }
-
- /**
- * Sets details field.
- *
- * @param OrderUpdateCallbackErrorResponseDetails[]|null $value
- */
- public function details(?array $value): self
- {
- $this->instance->setDetails($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Error Response object.
- */
- public function build(): OrderUpdateCallbackErrorResponse
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrderUpdateCallbackErrorResponseDetailsBuilder.php b/src/Models/Builders/OrderUpdateCallbackErrorResponseDetailsBuilder.php
deleted file mode 100644
index f6ec918..0000000
--- a/src/Models/Builders/OrderUpdateCallbackErrorResponseDetailsBuilder.php
+++ /dev/null
@@ -1,72 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Error Response Details Builder object.
- *
- * @param string $issue
- */
- public static function init(string $issue): self
- {
- return new self(new OrderUpdateCallbackErrorResponseDetails($issue));
- }
-
- /**
- * Sets field field.
- *
- * @param string|null $value
- */
- public function field(?string $value): self
- {
- $this->instance->setField($value);
- return $this;
- }
-
- /**
- * Sets value field.
- *
- * @param string|null $value
- */
- public function value(?string $value): self
- {
- $this->instance->setValue($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Error Response Details object.
- */
- public function build(): OrderUpdateCallbackErrorResponseDetails
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrderUpdateCallbackRequestBuilder.php b/src/Models/Builders/OrderUpdateCallbackRequestBuilder.php
deleted file mode 100644
index bdba7e5..0000000
--- a/src/Models/Builders/OrderUpdateCallbackRequestBuilder.php
+++ /dev/null
@@ -1,76 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Request Builder object.
- *
- * @param OrderUpdateCallbackShippingAddress $shippingAddress
- * @param PurchaseUnitRequest[] $purchaseUnits
- */
- public static function init(OrderUpdateCallbackShippingAddress $shippingAddress, array $purchaseUnits): self
- {
- return new self(new OrderUpdateCallbackRequest($shippingAddress, $purchaseUnits));
- }
-
- /**
- * Sets id field.
- *
- * @param string|null $value
- */
- public function id(?string $value): self
- {
- $this->instance->setId($value);
- return $this;
- }
-
- /**
- * Sets shipping option field.
- *
- * @param OrderUpdateCallbackShippingOption|null $value
- */
- public function shippingOption(?OrderUpdateCallbackShippingOption $value): self
- {
- $this->instance->setShippingOption($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Request object.
- */
- public function build(): OrderUpdateCallbackRequest
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrderUpdateCallbackResponseBuilder.php b/src/Models/Builders/OrderUpdateCallbackResponseBuilder.php
deleted file mode 100644
index 24b7149..0000000
--- a/src/Models/Builders/OrderUpdateCallbackResponseBuilder.php
+++ /dev/null
@@ -1,71 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Response Builder object.
- */
- public static function init(): self
- {
- return new self(new OrderUpdateCallbackResponse());
- }
-
- /**
- * Sets id field.
- *
- * @param string|null $value
- */
- public function id(?string $value): self
- {
- $this->instance->setId($value);
- return $this;
- }
-
- /**
- * Sets purchase units field.
- *
- * @param ShippingOptionsPurchaseUnit|null $value
- */
- public function purchaseUnits(?ShippingOptionsPurchaseUnit $value): self
- {
- $this->instance->setPurchaseUnits($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Response object.
- */
- public function build(): OrderUpdateCallbackResponse
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrderUpdateCallbackShippingAddressBuilder.php b/src/Models/Builders/OrderUpdateCallbackShippingAddressBuilder.php
deleted file mode 100644
index c13a111..0000000
--- a/src/Models/Builders/OrderUpdateCallbackShippingAddressBuilder.php
+++ /dev/null
@@ -1,83 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Shipping Address Builder object.
- *
- * @param string $countryCode
- */
- public static function init(string $countryCode): self
- {
- return new self(new OrderUpdateCallbackShippingAddress($countryCode));
- }
-
- /**
- * Sets admin area 2 field.
- *
- * @param string|null $value
- */
- public function adminArea2(?string $value): self
- {
- $this->instance->setAdminArea2($value);
- return $this;
- }
-
- /**
- * Sets admin area 1 field.
- *
- * @param string|null $value
- */
- public function adminArea1(?string $value): self
- {
- $this->instance->setAdminArea1($value);
- return $this;
- }
-
- /**
- * Sets postal code field.
- *
- * @param string|null $value
- */
- public function postalCode(?string $value): self
- {
- $this->instance->setPostalCode($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Shipping Address object.
- */
- public function build(): OrderUpdateCallbackShippingAddress
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrderUpdateCallbackShippingOptionBuilder.php b/src/Models/Builders/OrderUpdateCallbackShippingOptionBuilder.php
deleted file mode 100644
index 9a8839d..0000000
--- a/src/Models/Builders/OrderUpdateCallbackShippingOptionBuilder.php
+++ /dev/null
@@ -1,74 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Order Update Callback Shipping Option Builder object.
- *
- * @param string $id
- * @param string $label
- */
- public static function init(string $id, string $label): self
- {
- return new self(new OrderUpdateCallbackShippingOption($id, $label));
- }
-
- /**
- * Sets type field.
- *
- * @param string|null $value
- */
- public function type(?string $value): self
- {
- $this->instance->setType($value);
- return $this;
- }
-
- /**
- * Sets amount field.
- *
- * @param Money|null $value
- */
- public function amount(?Money $value): self
- {
- $this->instance->setAmount($value);
- return $this;
- }
-
- /**
- * Initializes a new Order Update Callback Shipping Option object.
- */
- public function build(): OrderUpdateCallbackShippingOption
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/OrdersCaptureBuilder.php b/src/Models/Builders/OrdersCaptureBuilder.php
index c0ea159..6193380 100644
--- a/src/Models/Builders/OrdersCaptureBuilder.php
+++ b/src/Models/Builders/OrdersCaptureBuilder.php
@@ -14,7 +14,7 @@ use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\CaptureStatusDetails;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\OrdersCapture;
use PaypalServerSdkLib\Models\ProcessorResponse;
use PaypalServerSdkLib\Models\SellerProtection;
@@ -114,9 +114,9 @@ class OrdersCaptureBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/PayerInformationBuilder.php b/src/Models/Builders/PayerInformationBuilder.php
new file mode 100644
index 0000000..e227105
--- /dev/null
+++ b/src/Models/Builders/PayerInformationBuilder.php
@@ -0,0 +1,139 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Payer Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PayerInformation());
+ }
+
+ /**
+ * Sets account id field.
+ *
+ * @param string|null $value
+ */
+ public function accountId(?string $value): self
+ {
+ $this->instance->setAccountId($value);
+ return $this;
+ }
+
+ /**
+ * Sets email address field.
+ *
+ * @param string|null $value
+ */
+ public function emailAddress(?string $value): self
+ {
+ $this->instance->setEmailAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets phone number field.
+ *
+ * @param Phone|null $value
+ */
+ public function phoneNumber(?Phone $value): self
+ {
+ $this->instance->setPhoneNumber($value);
+ return $this;
+ }
+
+ /**
+ * Sets address status field.
+ *
+ * @param string|null $value
+ */
+ public function addressStatus(?string $value): self
+ {
+ $this->instance->setAddressStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets payer status field.
+ *
+ * @param string|null $value
+ */
+ public function payerStatus(?string $value): self
+ {
+ $this->instance->setPayerStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets payer name field.
+ *
+ * @param PayerName|null $value
+ */
+ public function payerName(?PayerName $value): self
+ {
+ $this->instance->setPayerName($value);
+ return $this;
+ }
+
+ /**
+ * Sets country code field.
+ *
+ * @param string|null $value
+ */
+ public function countryCode(?string $value): self
+ {
+ $this->instance->setCountryCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets address field.
+ *
+ * @param SimplePostalAddressCoarseGrained|null $value
+ */
+ public function address(?SimplePostalAddressCoarseGrained $value): self
+ {
+ $this->instance->setAddress($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Payer Information object.
+ */
+ public function build(): PayerInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PayerNameBuilder.php b/src/Models/Builders/PayerNameBuilder.php
new file mode 100644
index 0000000..6a5d90b
--- /dev/null
+++ b/src/Models/Builders/PayerNameBuilder.php
@@ -0,0 +1,125 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Payer Name Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PayerName());
+ }
+
+ /**
+ * Sets prefix field.
+ *
+ * @param string|null $value
+ */
+ public function prefix(?string $value): self
+ {
+ $this->instance->setPrefix($value);
+ return $this;
+ }
+
+ /**
+ * Sets given name field.
+ *
+ * @param string|null $value
+ */
+ public function givenName(?string $value): self
+ {
+ $this->instance->setGivenName($value);
+ return $this;
+ }
+
+ /**
+ * Sets surname field.
+ *
+ * @param string|null $value
+ */
+ public function surname(?string $value): self
+ {
+ $this->instance->setSurname($value);
+ return $this;
+ }
+
+ /**
+ * Sets middle name field.
+ *
+ * @param string|null $value
+ */
+ public function middleName(?string $value): self
+ {
+ $this->instance->setMiddleName($value);
+ return $this;
+ }
+
+ /**
+ * Sets suffix field.
+ *
+ * @param string|null $value
+ */
+ public function suffix(?string $value): self
+ {
+ $this->instance->setSuffix($value);
+ return $this;
+ }
+
+ /**
+ * Sets alternate full name field.
+ *
+ * @param string|null $value
+ */
+ public function alternateFullName(?string $value): self
+ {
+ $this->instance->setAlternateFullName($value);
+ return $this;
+ }
+
+ /**
+ * Sets full name field.
+ *
+ * @param string|null $value
+ */
+ public function fullName(?string $value): self
+ {
+ $this->instance->setFullName($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Payer Name object.
+ */
+ public function build(): PayerName
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PaymentAuthorizationBuilder.php b/src/Models/Builders/PaymentAuthorizationBuilder.php
index 0addd45..0cdbdcd 100644
--- a/src/Models/Builders/PaymentAuthorizationBuilder.php
+++ b/src/Models/Builders/PaymentAuthorizationBuilder.php
@@ -14,7 +14,7 @@ use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\AuthorizationStatusDetails;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\PayeeBase;
use PaypalServerSdkLib\Models\PaymentAuthorization;
use PaypalServerSdkLib\Models\PaymentSupplementaryData;
@@ -114,9 +114,9 @@ class PaymentAuthorizationBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/PaymentMethodBuilder.php b/src/Models/Builders/PaymentMethodBuilder.php
new file mode 100644
index 0000000..e04849f
--- /dev/null
+++ b/src/Models/Builders/PaymentMethodBuilder.php
@@ -0,0 +1,59 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Payment Method Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PaymentMethod());
+ }
+
+ /**
+ * Sets payee preferred field.
+ *
+ * @param string|null $value
+ */
+ public function payeePreferred(?string $value): self
+ {
+ $this->instance->setPayeePreferred($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Payment Method object.
+ */
+ public function build(): PaymentMethod
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PaymentPreferencesBuilder.php b/src/Models/Builders/PaymentPreferencesBuilder.php
new file mode 100644
index 0000000..d6f3cec
--- /dev/null
+++ b/src/Models/Builders/PaymentPreferencesBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Payment Preferences Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PaymentPreferences());
+ }
+
+ /**
+ * Sets auto bill outstanding field.
+ *
+ * @param bool|null $value
+ */
+ public function autoBillOutstanding(?bool $value): self
+ {
+ $this->instance->setAutoBillOutstanding($value);
+ return $this;
+ }
+
+ /**
+ * Sets setup fee field.
+ *
+ * @param Money|null $value
+ */
+ public function setupFee(?Money $value): self
+ {
+ $this->instance->setSetupFee($value);
+ return $this;
+ }
+
+ /**
+ * Sets setup fee failure action field.
+ *
+ * @param string|null $value
+ */
+ public function setupFeeFailureAction(?string $value): self
+ {
+ $this->instance->setSetupFeeFailureAction($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment failure threshold field.
+ *
+ * @param int|null $value
+ */
+ public function paymentFailureThreshold(?int $value): self
+ {
+ $this->instance->setPaymentFailureThreshold($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Payment Preferences object.
+ */
+ public function build(): PaymentPreferences
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PaymentPreferencesOverrideBuilder.php b/src/Models/Builders/PaymentPreferencesOverrideBuilder.php
new file mode 100644
index 0000000..0fa288c
--- /dev/null
+++ b/src/Models/Builders/PaymentPreferencesOverrideBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Payment Preferences Override Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PaymentPreferencesOverride());
+ }
+
+ /**
+ * Sets auto bill outstanding field.
+ *
+ * @param bool|null $value
+ */
+ public function autoBillOutstanding(?bool $value): self
+ {
+ $this->instance->setAutoBillOutstanding($value);
+ return $this;
+ }
+
+ /**
+ * Sets setup fee field.
+ *
+ * @param Money|null $value
+ */
+ public function setupFee(?Money $value): self
+ {
+ $this->instance->setSetupFee($value);
+ return $this;
+ }
+
+ /**
+ * Sets setup fee failure action field.
+ *
+ * @param string|null $value
+ */
+ public function setupFeeFailureAction(?string $value): self
+ {
+ $this->instance->setSetupFeeFailureAction($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment failure threshold field.
+ *
+ * @param int|null $value
+ */
+ public function paymentFailureThreshold(?int $value): self
+ {
+ $this->instance->setPaymentFailureThreshold($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Payment Preferences Override object.
+ */
+ public function build(): PaymentPreferencesOverride
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PaymentsCaptureBuilder.php b/src/Models/Builders/PaymentsCaptureBuilder.php
index 57f7f22..03ef2f0 100644
--- a/src/Models/Builders/PaymentsCaptureBuilder.php
+++ b/src/Models/Builders/PaymentsCaptureBuilder.php
@@ -14,9 +14,9 @@ use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\CaptureStatusDetails;
use PaypalServerSdkLib\Models\LinkDescription;
use PaypalServerSdkLib\Models\Money;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\PaymentsCapture;
-use PaypalServerSdkLib\Models\PaymentsProcessorResponse;
+use PaypalServerSdkLib\Models\ProcessorResponse;
use PaypalServerSdkLib\Models\SellerProtection;
use PaypalServerSdkLib\Models\SellerReceivableBreakdown;
@@ -114,9 +114,9 @@ class PaymentsCaptureBuilder
/**
* Sets network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function networkTransactionReference(?NetworkTransactionReference $value): self
+ public function networkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setNetworkTransactionReference($value);
return $this;
@@ -180,9 +180,9 @@ class PaymentsCaptureBuilder
/**
* Sets processor response field.
*
- * @param PaymentsProcessorResponse|null $value
+ * @param ProcessorResponse|null $value
*/
- public function processorResponse(?PaymentsProcessorResponse $value): self
+ public function processorResponse(?ProcessorResponse $value): self
{
$this->instance->setProcessorResponse($value);
return $this;
diff --git a/src/Models/Builders/PaymentsProcessorResponseBuilder.php b/src/Models/Builders/PaymentsProcessorResponseBuilder.php
deleted file mode 100644
index 38a249e..0000000
--- a/src/Models/Builders/PaymentsProcessorResponseBuilder.php
+++ /dev/null
@@ -1,92 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Payments Processor Response Builder object.
- */
- public static function init(): self
- {
- return new self(new PaymentsProcessorResponse());
- }
-
- /**
- * Sets avs code field.
- *
- * @param string|null $value
- */
- public function avsCode(?string $value): self
- {
- $this->instance->setAvsCode($value);
- return $this;
- }
-
- /**
- * Sets cvv code field.
- *
- * @param string|null $value
- */
- public function cvvCode(?string $value): self
- {
- $this->instance->setCvvCode($value);
- return $this;
- }
-
- /**
- * Sets response code field.
- *
- * @param string|null $value
- */
- public function responseCode(?string $value): self
- {
- $this->instance->setResponseCode($value);
- return $this;
- }
-
- /**
- * Sets payment advice code field.
- *
- * @param string|null $value
- */
- public function paymentAdviceCode(?string $value): self
- {
- $this->instance->setPaymentAdviceCode($value);
- return $this;
- }
-
- /**
- * Initializes a new Payments Processor Response object.
- */
- public function build(): PaymentsProcessorResponse
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/PaypalWalletExperienceContextBuilder.php b/src/Models/Builders/PaypalWalletExperienceContextBuilder.php
index 7c41be5..63158c1 100644
--- a/src/Models/Builders/PaypalWalletExperienceContextBuilder.php
+++ b/src/Models/Builders/PaypalWalletExperienceContextBuilder.php
@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
+use PaypalServerSdkLib\Models\AppSwitchContext;
use PaypalServerSdkLib\Models\CallbackConfiguration;
use PaypalServerSdkLib\Models\PaypalWalletExperienceContext;
@@ -105,6 +106,17 @@ class PaypalWalletExperienceContextBuilder
return $this;
}
+ /**
+ * Sets app switch context field.
+ *
+ * @param AppSwitchContext|null $value
+ */
+ public function appSwitchContext(?AppSwitchContext $value): self
+ {
+ $this->instance->setAppSwitchContext($value);
+ return $this;
+ }
+
/**
* Sets landing page field.
*
diff --git a/src/Models/Builders/PaypalWalletResponseBuilder.php b/src/Models/Builders/PaypalWalletResponseBuilder.php
index aa60fcc..9ccd24a 100644
--- a/src/Models/Builders/PaypalWalletResponseBuilder.php
+++ b/src/Models/Builders/PaypalWalletResponseBuilder.php
@@ -176,6 +176,17 @@ class PaypalWalletResponseBuilder
return $this;
}
+ /**
+ * Sets experience status field.
+ *
+ * @param string|null $value
+ */
+ public function experienceStatus(?string $value): self
+ {
+ $this->instance->setExperienceStatus($value);
+ return $this;
+ }
+
/**
* Initializes a new Paypal Wallet Response object.
*/
diff --git a/src/Models/Builders/PaypalWalletVaultInstructionBuilder.php b/src/Models/Builders/PaypalWalletVaultInstructionBuilder.php
index 0e95e17..06b375a 100644
--- a/src/Models/Builders/PaypalWalletVaultInstructionBuilder.php
+++ b/src/Models/Builders/PaypalWalletVaultInstructionBuilder.php
@@ -40,17 +40,6 @@ class PaypalWalletVaultInstructionBuilder
return new self(new PaypalWalletVaultInstruction($usageType));
}
- /**
- * Sets store in vault field.
- *
- * @param string|null $value
- */
- public function storeInVault(?string $value): self
- {
- $this->instance->setStoreInVault($value);
- return $this;
- }
-
/**
* Sets description field.
*
diff --git a/src/Models/Builders/PhoneNumberWithOptionalCountryCodeBuilder.php b/src/Models/Builders/PhoneNumberWithOptionalCountryCodeBuilder.php
new file mode 100644
index 0000000..524590a
--- /dev/null
+++ b/src/Models/Builders/PhoneNumberWithOptionalCountryCodeBuilder.php
@@ -0,0 +1,61 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Phone Number With Optional Country Code Builder object.
+ *
+ * @param string $nationalNumber
+ */
+ public static function init(string $nationalNumber): self
+ {
+ return new self(new PhoneNumberWithOptionalCountryCode($nationalNumber));
+ }
+
+ /**
+ * Sets country code field.
+ *
+ * @param string|null $value
+ */
+ public function countryCode(?string $value): self
+ {
+ $this->instance->setCountryCode($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Phone Number With Optional Country Code object.
+ */
+ public function build(): PhoneNumberWithOptionalCountryCode
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PlanBuilder.php b/src/Models/Builders/PlanBuilder.php
index 606ac78..3d3d6a8 100644
--- a/src/Models/Builders/PlanBuilder.php
+++ b/src/Models/Builders/PlanBuilder.php
@@ -43,17 +43,6 @@ class PlanBuilder
return new self(new Plan($billingCycles, $oneTimeCharges));
}
- /**
- * Sets product field.
- *
- * @param mixed $value
- */
- public function product($value): self
- {
- $this->instance->setProduct($value);
- return $this;
- }
-
/**
* Sets name field.
*
diff --git a/src/Models/Builders/PlanCollectionBuilder.php b/src/Models/Builders/PlanCollectionBuilder.php
new file mode 100644
index 0000000..8e9b5c9
--- /dev/null
+++ b/src/Models/Builders/PlanCollectionBuilder.php
@@ -0,0 +1,94 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Plan Collection Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PlanCollection());
+ }
+
+ /**
+ * Sets plans field.
+ *
+ * @param BillingPlan[]|null $value
+ */
+ public function plans(?array $value): self
+ {
+ $this->instance->setPlans($value);
+ return $this;
+ }
+
+ /**
+ * Sets total items field.
+ *
+ * @param int|null $value
+ */
+ public function totalItems(?int $value): self
+ {
+ $this->instance->setTotalItems($value);
+ return $this;
+ }
+
+ /**
+ * Sets total pages field.
+ *
+ * @param int|null $value
+ */
+ public function totalPages(?int $value): self
+ {
+ $this->instance->setTotalPages($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Plan Collection object.
+ */
+ public function build(): PlanCollection
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PlanDetailsBuilder.php b/src/Models/Builders/PlanDetailsBuilder.php
new file mode 100644
index 0000000..f92a45f
--- /dev/null
+++ b/src/Models/Builders/PlanDetailsBuilder.php
@@ -0,0 +1,140 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Plan Details Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PlanDetails());
+ }
+
+ /**
+ * Sets product id field.
+ *
+ * @param string|null $value
+ */
+ public function productId(?string $value): self
+ {
+ $this->instance->setProductId($value);
+ return $this;
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param string|null $value
+ */
+ public function name(?string $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets description field.
+ *
+ * @param string|null $value
+ */
+ public function description(?string $value): self
+ {
+ $this->instance->setDescription($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing cycles field.
+ *
+ * @param SubscriptionBillingCycle[]|null $value
+ */
+ public function billingCycles(?array $value): self
+ {
+ $this->instance->setBillingCycles($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment preferences field.
+ *
+ * @param PaymentPreferences|null $value
+ */
+ public function paymentPreferences(?PaymentPreferences $value): self
+ {
+ $this->instance->setPaymentPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets merchant preferences field.
+ *
+ * @param MerchantPreferences|null $value
+ */
+ public function merchantPreferences(?MerchantPreferences $value): self
+ {
+ $this->instance->setMerchantPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets taxes field.
+ *
+ * @param Taxes|null $value
+ */
+ public function taxes(?Taxes $value): self
+ {
+ $this->instance->setTaxes($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity supported field.
+ *
+ * @param bool|null $value
+ */
+ public function quantitySupported(?bool $value): self
+ {
+ $this->instance->setQuantitySupported($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Plan Details object.
+ */
+ public function build(): PlanDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PlanOverrideBuilder.php b/src/Models/Builders/PlanOverrideBuilder.php
new file mode 100644
index 0000000..bb3f9aa
--- /dev/null
+++ b/src/Models/Builders/PlanOverrideBuilder.php
@@ -0,0 +1,84 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Plan Override Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new PlanOverride());
+ }
+
+ /**
+ * Sets billing cycles field.
+ *
+ * @param BillingCycleOverride[]|null $value
+ */
+ public function billingCycles(?array $value): self
+ {
+ $this->instance->setBillingCycles($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment preferences field.
+ *
+ * @param PaymentPreferencesOverride|null $value
+ */
+ public function paymentPreferences(?PaymentPreferencesOverride $value): self
+ {
+ $this->instance->setPaymentPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets taxes field.
+ *
+ * @param TaxesOverride|null $value
+ */
+ public function taxes(?TaxesOverride $value): self
+ {
+ $this->instance->setTaxes($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Plan Override object.
+ */
+ public function build(): PlanOverride
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PlanRequestBuilder.php b/src/Models/Builders/PlanRequestBuilder.php
new file mode 100644
index 0000000..486df80
--- /dev/null
+++ b/src/Models/Builders/PlanRequestBuilder.php
@@ -0,0 +1,116 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Plan Request Builder object.
+ *
+ * @param string $productId
+ * @param string $name
+ * @param SubscriptionBillingCycle[] $billingCycles
+ * @param PaymentPreferences $paymentPreferences
+ */
+ public static function init(
+ string $productId,
+ string $name,
+ array $billingCycles,
+ PaymentPreferences $paymentPreferences
+ ): self {
+ return new self(new PlanRequest($productId, $name, $billingCycles, $paymentPreferences));
+ }
+
+ /**
+ * Sets status field.
+ *
+ * @param string|null $value
+ */
+ public function status(?string $value): self
+ {
+ $this->instance->setStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets description field.
+ *
+ * @param string|null $value
+ */
+ public function description(?string $value): self
+ {
+ $this->instance->setDescription($value);
+ return $this;
+ }
+
+ /**
+ * Sets merchant preferences field.
+ *
+ * @param MerchantPreferences|null $value
+ */
+ public function merchantPreferences(?MerchantPreferences $value): self
+ {
+ $this->instance->setMerchantPreferences($value);
+ return $this;
+ }
+
+ /**
+ * Sets taxes field.
+ *
+ * @param Taxes|null $value
+ */
+ public function taxes(?Taxes $value): self
+ {
+ $this->instance->setTaxes($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity supported field.
+ *
+ * @param bool|null $value
+ */
+ public function quantitySupported(?bool $value): self
+ {
+ $this->instance->setQuantitySupported($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Plan Request object.
+ */
+ public function build(): PlanRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PricingTierBuilder.php b/src/Models/Builders/PricingTierBuilder.php
new file mode 100644
index 0000000..f25b727
--- /dev/null
+++ b/src/Models/Builders/PricingTierBuilder.php
@@ -0,0 +1,63 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Pricing Tier Builder object.
+ *
+ * @param string $startingQuantity
+ * @param Money $amount
+ */
+ public static function init(string $startingQuantity, Money $amount): self
+ {
+ return new self(new PricingTier($startingQuantity, $amount));
+ }
+
+ /**
+ * Sets ending quantity field.
+ *
+ * @param string|null $value
+ */
+ public function endingQuantity(?string $value): self
+ {
+ $this->instance->setEndingQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Pricing Tier object.
+ */
+ public function build(): PricingTier
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/PurchaseUnitRequestBuilder.php b/src/Models/Builders/PurchaseUnitRequestBuilder.php
index 12387de..5a1e6b8 100644
--- a/src/Models/Builders/PurchaseUnitRequestBuilder.php
+++ b/src/Models/Builders/PurchaseUnitRequestBuilder.php
@@ -12,7 +12,7 @@ namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\AmountWithBreakdown;
-use PaypalServerSdkLib\Models\Item;
+use PaypalServerSdkLib\Models\ItemRequest;
use PaypalServerSdkLib\Models\PayeeBase;
use PaypalServerSdkLib\Models\PaymentInstruction;
use PaypalServerSdkLib\Models\PurchaseUnitRequest;
@@ -126,7 +126,7 @@ class PurchaseUnitRequestBuilder
/**
* Sets items field.
*
- * @param Item[]|null $value
+ * @param ItemRequest[]|null $value
*/
public function items(?array $value): self
{
diff --git a/src/Models/Builders/SearchResponseBuilder.php b/src/Models/Builders/SearchResponseBuilder.php
new file mode 100644
index 0000000..70032c3
--- /dev/null
+++ b/src/Models/Builders/SearchResponseBuilder.php
@@ -0,0 +1,149 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Search Response Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SearchResponse());
+ }
+
+ /**
+ * Sets transaction details field.
+ *
+ * @param TransactionDetails[]|null $value
+ */
+ public function transactionDetails(?array $value): self
+ {
+ $this->instance->setTransactionDetails($value);
+ return $this;
+ }
+
+ /**
+ * Sets account number field.
+ *
+ * @param string|null $value
+ */
+ public function accountNumber(?string $value): self
+ {
+ $this->instance->setAccountNumber($value);
+ return $this;
+ }
+
+ /**
+ * Sets start date field.
+ *
+ * @param string|null $value
+ */
+ public function startDate(?string $value): self
+ {
+ $this->instance->setStartDate($value);
+ return $this;
+ }
+
+ /**
+ * Sets end date field.
+ *
+ * @param string|null $value
+ */
+ public function endDate(?string $value): self
+ {
+ $this->instance->setEndDate($value);
+ return $this;
+ }
+
+ /**
+ * Sets last refreshed datetime field.
+ *
+ * @param string|null $value
+ */
+ public function lastRefreshedDatetime(?string $value): self
+ {
+ $this->instance->setLastRefreshedDatetime($value);
+ return $this;
+ }
+
+ /**
+ * Sets page field.
+ *
+ * @param int|null $value
+ */
+ public function page(?int $value): self
+ {
+ $this->instance->setPage($value);
+ return $this;
+ }
+
+ /**
+ * Sets total items field.
+ *
+ * @param int|null $value
+ */
+ public function totalItems(?int $value): self
+ {
+ $this->instance->setTotalItems($value);
+ return $this;
+ }
+
+ /**
+ * Sets total pages field.
+ *
+ * @param int|null $value
+ */
+ public function totalPages(?int $value): self
+ {
+ $this->instance->setTotalPages($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Search Response object.
+ */
+ public function build(): SearchResponse
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SepaDebitExperienceContextBuilder.php b/src/Models/Builders/SepaDebitExperienceContextBuilder.php
new file mode 100644
index 0000000..2cb2ddc
--- /dev/null
+++ b/src/Models/Builders/SepaDebitExperienceContextBuilder.php
@@ -0,0 +1,62 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Sepa Debit Experience Context Builder object.
+ *
+ * @param string $returnUrl
+ * @param string $cancelUrl
+ */
+ public static function init(string $returnUrl, string $cancelUrl): self
+ {
+ return new self(new SepaDebitExperienceContext($returnUrl, $cancelUrl));
+ }
+
+ /**
+ * Sets locale field.
+ *
+ * @param string|null $value
+ */
+ public function locale(?string $value): self
+ {
+ $this->instance->setLocale($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Sepa Debit Experience Context object.
+ */
+ public function build(): SepaDebitExperienceContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SepaDebitRequestBuilder.php b/src/Models/Builders/SepaDebitRequestBuilder.php
new file mode 100644
index 0000000..3774426
--- /dev/null
+++ b/src/Models/Builders/SepaDebitRequestBuilder.php
@@ -0,0 +1,60 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Sepa Debit Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SepaDebitRequest());
+ }
+
+ /**
+ * Sets experience context field.
+ *
+ * @param SepaDebitExperienceContext|null $value
+ */
+ public function experienceContext(?SepaDebitExperienceContext $value): self
+ {
+ $this->instance->setExperienceContext($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Sepa Debit Request object.
+ */
+ public function build(): SepaDebitRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SetupTokenRequestCardBuilder.php b/src/Models/Builders/SetupTokenRequestCardBuilder.php
index 8fffc34..cddd463 100644
--- a/src/Models/Builders/SetupTokenRequestCardBuilder.php
+++ b/src/Models/Builders/SetupTokenRequestCardBuilder.php
@@ -12,8 +12,8 @@ namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\Address;
-use PaypalServerSdkLib\Models\SetupTokenCardExperienceContext;
use PaypalServerSdkLib\Models\SetupTokenRequestCard;
+use PaypalServerSdkLib\Models\VaultCardExperienceContext;
/**
* Builder for model SetupTokenRequestCard
@@ -120,9 +120,9 @@ class SetupTokenRequestCardBuilder
/**
* Sets experience context field.
*
- * @param SetupTokenCardExperienceContext|null $value
+ * @param VaultCardExperienceContext|null $value
*/
- public function experienceContext(?SetupTokenCardExperienceContext $value): self
+ public function experienceContext(?VaultCardExperienceContext $value): self
{
$this->instance->setExperienceContext($value);
return $this;
diff --git a/src/Models/Builders/SetupTokenRequestPaymentSourceBuilder.php b/src/Models/Builders/SetupTokenRequestPaymentSourceBuilder.php
index d706d26..2e3ea6c 100644
--- a/src/Models/Builders/SetupTokenRequestPaymentSourceBuilder.php
+++ b/src/Models/Builders/SetupTokenRequestPaymentSourceBuilder.php
@@ -11,8 +11,10 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
+use PaypalServerSdkLib\Models\BankRequest;
use PaypalServerSdkLib\Models\SetupTokenRequestCard;
use PaypalServerSdkLib\Models\SetupTokenRequestPaymentSource;
+use PaypalServerSdkLib\Models\VaultApplePayRequest;
use PaypalServerSdkLib\Models\VaultPaypalWalletRequest;
use PaypalServerSdkLib\Models\VaultTokenRequest;
use PaypalServerSdkLib\Models\VaultVenmoRequest;
@@ -75,6 +77,17 @@ class SetupTokenRequestPaymentSourceBuilder
return $this;
}
+ /**
+ * Sets apple pay field.
+ *
+ * @param VaultApplePayRequest|null $value
+ */
+ public function applePay(?VaultApplePayRequest $value): self
+ {
+ $this->instance->setApplePay($value);
+ return $this;
+ }
+
/**
* Sets token field.
*
@@ -86,6 +99,17 @@ class SetupTokenRequestPaymentSourceBuilder
return $this;
}
+ /**
+ * Sets bank field.
+ *
+ * @param BankRequest|null $value
+ */
+ public function bank(?BankRequest $value): self
+ {
+ $this->instance->setBank($value);
+ return $this;
+ }
+
/**
* Initializes a new Setup Token Request Payment Source object.
*/
diff --git a/src/Models/Builders/ShippingInformationBuilder.php b/src/Models/Builders/ShippingInformationBuilder.php
new file mode 100644
index 0000000..c34a838
--- /dev/null
+++ b/src/Models/Builders/ShippingInformationBuilder.php
@@ -0,0 +1,93 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Shipping Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new ShippingInformation());
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param string|null $value
+ */
+ public function name(?string $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets method field.
+ *
+ * @param string|null $value
+ */
+ public function method(?string $value): self
+ {
+ $this->instance->setMethod($value);
+ return $this;
+ }
+
+ /**
+ * Sets address field.
+ *
+ * @param SimplePostalAddressCoarseGrained|null $value
+ */
+ public function address(?SimplePostalAddressCoarseGrained $value): self
+ {
+ $this->instance->setAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets secondary shipping address field.
+ *
+ * @param SimplePostalAddressCoarseGrained|null $value
+ */
+ public function secondaryShippingAddress(?SimplePostalAddressCoarseGrained $value): self
+ {
+ $this->instance->setSecondaryShippingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Shipping Information object.
+ */
+ public function build(): ShippingInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/ShippingOptionsPurchaseUnitBuilder.php b/src/Models/Builders/ShippingOptionsPurchaseUnitBuilder.php
deleted file mode 100644
index 7252811..0000000
--- a/src/Models/Builders/ShippingOptionsPurchaseUnitBuilder.php
+++ /dev/null
@@ -1,95 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Shipping Options Purchase Unit Builder object.
- */
- public static function init(): self
- {
- return new self(new ShippingOptionsPurchaseUnit());
- }
-
- /**
- * Sets reference id field.
- *
- * @param string|null $value
- */
- public function referenceId(?string $value): self
- {
- $this->instance->setReferenceId($value);
- return $this;
- }
-
- /**
- * Sets amount field.
- *
- * @param AmountWithBreakdown|null $value
- */
- public function amount(?AmountWithBreakdown $value): self
- {
- $this->instance->setAmount($value);
- return $this;
- }
-
- /**
- * Sets items field.
- *
- * @param Item[]|null $value
- */
- public function items(?array $value): self
- {
- $this->instance->setItems($value);
- return $this;
- }
-
- /**
- * Sets shipping options field.
- *
- * @param ShippingOption[]|null $value
- */
- public function shippingOptions(?array $value): self
- {
- $this->instance->setShippingOptions($value);
- return $this;
- }
-
- /**
- * Initializes a new Shipping Options Purchase Unit object.
- */
- public function build(): ShippingOptionsPurchaseUnit
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/ShippingWithTrackingDetailsBuilder.php b/src/Models/Builders/ShippingWithTrackingDetailsBuilder.php
index 08d692c..55e5665 100644
--- a/src/Models/Builders/ShippingWithTrackingDetailsBuilder.php
+++ b/src/Models/Builders/ShippingWithTrackingDetailsBuilder.php
@@ -13,7 +13,7 @@ namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\Address;
use PaypalServerSdkLib\Models\OrderTrackerResponse;
-use PaypalServerSdkLib\Models\PhoneNumberWithCountryCode;
+use PaypalServerSdkLib\Models\PhoneNumberWithOptionalCountryCode;
use PaypalServerSdkLib\Models\ShippingName;
use PaypalServerSdkLib\Models\ShippingOption;
use PaypalServerSdkLib\Models\ShippingWithTrackingDetails;
@@ -43,6 +43,17 @@ class ShippingWithTrackingDetailsBuilder
return new self(new ShippingWithTrackingDetails());
}
+ /**
+ * Sets trackers field.
+ *
+ * @param OrderTrackerResponse[]|null $value
+ */
+ public function trackers(?array $value): self
+ {
+ $this->instance->setTrackers($value);
+ return $this;
+ }
+
/**
* Sets name field.
*
@@ -68,9 +79,9 @@ class ShippingWithTrackingDetailsBuilder
/**
* Sets phone number field.
*
- * @param PhoneNumberWithCountryCode|null $value
+ * @param PhoneNumberWithOptionalCountryCode|null $value
*/
- public function phoneNumber(?PhoneNumberWithCountryCode $value): self
+ public function phoneNumber(?PhoneNumberWithOptionalCountryCode $value): self
{
$this->instance->setPhoneNumber($value);
return $this;
@@ -109,17 +120,6 @@ class ShippingWithTrackingDetailsBuilder
return $this;
}
- /**
- * Sets trackers field.
- *
- * @param OrderTrackerResponse[]|null $value
- */
- public function trackers(?array $value): self
- {
- $this->instance->setTrackers($value);
- return $this;
- }
-
/**
* Initializes a new Shipping With Tracking Details object.
*/
diff --git a/src/Models/Builders/SimplePostalAddressCoarseGrainedBuilder.php b/src/Models/Builders/SimplePostalAddressCoarseGrainedBuilder.php
new file mode 100644
index 0000000..5b84464
--- /dev/null
+++ b/src/Models/Builders/SimplePostalAddressCoarseGrainedBuilder.php
@@ -0,0 +1,85 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Simple Postal Address Coarse Grained Builder object.
+ *
+ * @param string $line1
+ * @param string $city
+ * @param string $countryCode
+ */
+ public static function init(string $line1, string $city, string $countryCode): self
+ {
+ return new self(new SimplePostalAddressCoarseGrained($line1, $city, $countryCode));
+ }
+
+ /**
+ * Sets line 2 field.
+ *
+ * @param string|null $value
+ */
+ public function line2(?string $value): self
+ {
+ $this->instance->setLine2($value);
+ return $this;
+ }
+
+ /**
+ * Sets state field.
+ *
+ * @param string|null $value
+ */
+ public function state(?string $value): self
+ {
+ $this->instance->setState($value);
+ return $this;
+ }
+
+ /**
+ * Sets postal code field.
+ *
+ * @param string|null $value
+ */
+ public function postalCode(?string $value): self
+ {
+ $this->instance->setPostalCode($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Simple Postal Address Coarse Grained object.
+ */
+ public function build(): SimplePostalAddressCoarseGrained
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/StoreInformationBuilder.php b/src/Models/Builders/StoreInformationBuilder.php
new file mode 100644
index 0000000..8927f91
--- /dev/null
+++ b/src/Models/Builders/StoreInformationBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Store Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new StoreInformation());
+ }
+
+ /**
+ * Sets store id field.
+ *
+ * @param string|null $value
+ */
+ public function storeId(?string $value): self
+ {
+ $this->instance->setStoreId($value);
+ return $this;
+ }
+
+ /**
+ * Sets terminal id field.
+ *
+ * @param string|null $value
+ */
+ public function terminalId(?string $value): self
+ {
+ $this->instance->setTerminalId($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Store Information object.
+ */
+ public function build(): StoreInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/StoredPaymentSourceBuilder.php b/src/Models/Builders/StoredPaymentSourceBuilder.php
index 15c7825..fea0fd7 100644
--- a/src/Models/Builders/StoredPaymentSourceBuilder.php
+++ b/src/Models/Builders/StoredPaymentSourceBuilder.php
@@ -11,7 +11,7 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
-use PaypalServerSdkLib\Models\NetworkTransactionReference;
+use PaypalServerSdkLib\Models\NetworkTransaction;
use PaypalServerSdkLib\Models\StoredPaymentSource;
/**
@@ -56,9 +56,9 @@ class StoredPaymentSourceBuilder
/**
* Sets previous network transaction reference field.
*
- * @param NetworkTransactionReference|null $value
+ * @param NetworkTransaction|null $value
*/
- public function previousNetworkTransactionReference(?NetworkTransactionReference $value): self
+ public function previousNetworkTransactionReference(?NetworkTransaction $value): self
{
$this->instance->setPreviousNetworkTransactionReference($value);
return $this;
diff --git a/src/Models/Builders/SubscriberBuilder.php b/src/Models/Builders/SubscriberBuilder.php
new file mode 100644
index 0000000..c536afe
--- /dev/null
+++ b/src/Models/Builders/SubscriberBuilder.php
@@ -0,0 +1,84 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscriber Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new Subscriber());
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param Name|null $value
+ */
+ public function name(?Name $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping address field.
+ *
+ * @param ShippingDetails|null $value
+ */
+ public function shippingAddress(?ShippingDetails $value): self
+ {
+ $this->instance->setShippingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment source field.
+ *
+ * @param SubscriptionPaymentSourceResponse|null $value
+ */
+ public function paymentSource(?SubscriptionPaymentSourceResponse $value): self
+ {
+ $this->instance->setPaymentSource($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscriber object.
+ */
+ public function build(): Subscriber
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriberRequestBuilder.php b/src/Models/Builders/SubscriberRequestBuilder.php
new file mode 100644
index 0000000..efa40a6
--- /dev/null
+++ b/src/Models/Builders/SubscriberRequestBuilder.php
@@ -0,0 +1,96 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscriber Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriberRequest());
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param Name|null $value
+ */
+ public function name(?Name $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets phone field.
+ *
+ * @param PhoneWithType|null $value
+ */
+ public function phone(?PhoneWithType $value): self
+ {
+ $this->instance->setPhone($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping address field.
+ *
+ * @param ShippingDetails|null $value
+ */
+ public function shippingAddress(?ShippingDetails $value): self
+ {
+ $this->instance->setShippingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment source field.
+ *
+ * @param SubscriptionPaymentSource|null $value
+ */
+ public function paymentSource(?SubscriptionPaymentSource $value): self
+ {
+ $this->instance->setPaymentSource($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscriber Request object.
+ */
+ public function build(): SubscriberRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionAmountWithBreakdownBuilder.php b/src/Models/Builders/SubscriptionAmountWithBreakdownBuilder.php
new file mode 100644
index 0000000..c208b27
--- /dev/null
+++ b/src/Models/Builders/SubscriptionAmountWithBreakdownBuilder.php
@@ -0,0 +1,106 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Amount With Breakdown Builder object.
+ *
+ * @param Money $grossAmount
+ */
+ public static function init(Money $grossAmount): self
+ {
+ return new self(new SubscriptionAmountWithBreakdown($grossAmount));
+ }
+
+ /**
+ * Sets total item amount field.
+ *
+ * @param Money|null $value
+ */
+ public function totalItemAmount(?Money $value): self
+ {
+ $this->instance->setTotalItemAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets fee amount field.
+ *
+ * @param Money|null $value
+ */
+ public function feeAmount(?Money $value): self
+ {
+ $this->instance->setFeeAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets tax amount field.
+ *
+ * @param Money|null $value
+ */
+ public function taxAmount(?Money $value): self
+ {
+ $this->instance->setTaxAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets net amount field.
+ *
+ * @param Money|null $value
+ */
+ public function netAmount(?Money $value): self
+ {
+ $this->instance->setNetAmount($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Amount With Breakdown object.
+ */
+ public function build(): SubscriptionAmountWithBreakdown
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionApplicationContextBuilder.php b/src/Models/Builders/SubscriptionApplicationContextBuilder.php
new file mode 100644
index 0000000..5360d0d
--- /dev/null
+++ b/src/Models/Builders/SubscriptionApplicationContextBuilder.php
@@ -0,0 +1,107 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Application Context Builder object.
+ *
+ * @param string $returnUrl
+ * @param string $cancelUrl
+ */
+ public static function init(string $returnUrl, string $cancelUrl): self
+ {
+ return new self(new SubscriptionApplicationContext($returnUrl, $cancelUrl));
+ }
+
+ /**
+ * Sets brand name field.
+ *
+ * @param string|null $value
+ */
+ public function brandName(?string $value): self
+ {
+ $this->instance->setBrandName($value);
+ return $this;
+ }
+
+ /**
+ * Sets locale field.
+ *
+ * @param string|null $value
+ */
+ public function locale(?string $value): self
+ {
+ $this->instance->setLocale($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping preference field.
+ *
+ * @param string|null $value
+ */
+ public function shippingPreference(?string $value): self
+ {
+ $this->instance->setShippingPreference($value);
+ return $this;
+ }
+
+ /**
+ * Sets user action field.
+ *
+ * @param string|null $value
+ */
+ public function userAction(?string $value): self
+ {
+ $this->instance->setUserAction($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment method field.
+ *
+ * @param PaymentMethod|null $value
+ */
+ public function paymentMethod(?PaymentMethod $value): self
+ {
+ $this->instance->setPaymentMethod($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Application Context object.
+ */
+ public function build(): SubscriptionApplicationContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionBillingCycleBuilder.php b/src/Models/Builders/SubscriptionBillingCycleBuilder.php
new file mode 100644
index 0000000..51bd1df
--- /dev/null
+++ b/src/Models/Builders/SubscriptionBillingCycleBuilder.php
@@ -0,0 +1,76 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Billing Cycle Builder object.
+ *
+ * @param Frequency $frequency
+ * @param string $tenureType
+ * @param int $sequence
+ */
+ public static function init(Frequency $frequency, string $tenureType, int $sequence): self
+ {
+ return new self(new SubscriptionBillingCycle($frequency, $tenureType, $sequence));
+ }
+
+ /**
+ * Sets pricing scheme field.
+ *
+ * @param SubscriptionPricingScheme|null $value
+ */
+ public function pricingScheme(?SubscriptionPricingScheme $value): self
+ {
+ $this->instance->setPricingScheme($value);
+ return $this;
+ }
+
+ /**
+ * Sets total cycles field.
+ *
+ * @param int|null $value
+ */
+ public function totalCycles(?int $value): self
+ {
+ $this->instance->setTotalCycles($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Billing Cycle object.
+ */
+ public function build(): SubscriptionBillingCycle
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionBillingInformationBuilder.php b/src/Models/Builders/SubscriptionBillingInformationBuilder.php
new file mode 100644
index 0000000..d3deca8
--- /dev/null
+++ b/src/Models/Builders/SubscriptionBillingInformationBuilder.php
@@ -0,0 +1,110 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Billing Information Builder object.
+ *
+ * @param Money $outstandingBalance
+ * @param int $failedPaymentsCount
+ */
+ public static function init(Money $outstandingBalance, int $failedPaymentsCount): self
+ {
+ return new self(new SubscriptionBillingInformation($outstandingBalance, $failedPaymentsCount));
+ }
+
+ /**
+ * Sets cycle executions field.
+ *
+ * @param CycleExecution[]|null $value
+ */
+ public function cycleExecutions(?array $value): self
+ {
+ $this->instance->setCycleExecutions($value);
+ return $this;
+ }
+
+ /**
+ * Sets last payment field.
+ *
+ * @param LastPaymentDetails|null $value
+ */
+ public function lastPayment(?LastPaymentDetails $value): self
+ {
+ $this->instance->setLastPayment($value);
+ return $this;
+ }
+
+ /**
+ * Sets next billing time field.
+ *
+ * @param string|null $value
+ */
+ public function nextBillingTime(?string $value): self
+ {
+ $this->instance->setNextBillingTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets final payment time field.
+ *
+ * @param string|null $value
+ */
+ public function finalPaymentTime(?string $value): self
+ {
+ $this->instance->setFinalPaymentTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets last failed payment field.
+ *
+ * @param FailedPaymentDetails|null $value
+ */
+ public function lastFailedPayment(?FailedPaymentDetails $value): self
+ {
+ $this->instance->setLastFailedPayment($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Billing Information object.
+ */
+ public function build(): SubscriptionBillingInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionBuilder.php b/src/Models/Builders/SubscriptionBuilder.php
new file mode 100644
index 0000000..e620b19
--- /dev/null
+++ b/src/Models/Builders/SubscriptionBuilder.php
@@ -0,0 +1,196 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new Subscription());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan id field.
+ *
+ * @param string|null $value
+ */
+ public function planId(?string $value): self
+ {
+ $this->instance->setPlanId($value);
+ return $this;
+ }
+
+ /**
+ * Sets start time field.
+ *
+ * @param string|null $value
+ */
+ public function startTime(?string $value): self
+ {
+ $this->instance->setStartTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets quantity field.
+ *
+ * @param string|null $value
+ */
+ public function quantity(?string $value): self
+ {
+ $this->instance->setQuantity($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets subscriber field.
+ *
+ * @param Subscriber|null $value
+ */
+ public function subscriber(?Subscriber $value): self
+ {
+ $this->instance->setSubscriber($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing info field.
+ *
+ * @param SubscriptionBillingInformation|null $value
+ */
+ public function billingInfo(?SubscriptionBillingInformation $value): self
+ {
+ $this->instance->setBillingInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets create time field.
+ *
+ * @param string|null $value
+ */
+ public function createTime(?string $value): self
+ {
+ $this->instance->setCreateTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets update time field.
+ *
+ * @param string|null $value
+ */
+ public function updateTime(?string $value): self
+ {
+ $this->instance->setUpdateTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets custom id field.
+ *
+ * @param string|null $value
+ */
+ public function customId(?string $value): self
+ {
+ $this->instance->setCustomId($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan overridden field.
+ *
+ * @param bool|null $value
+ */
+ public function planOverridden(?bool $value): self
+ {
+ $this->instance->setPlanOverridden($value);
+ return $this;
+ }
+
+ /**
+ * Sets plan field.
+ *
+ * @param PlanDetails|null $value
+ */
+ public function plan(?PlanDetails $value): self
+ {
+ $this->instance->setPlan($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription object.
+ */
+ public function build(): Subscription
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionCardRequestBuilder.php b/src/Models/Builders/SubscriptionCardRequestBuilder.php
new file mode 100644
index 0000000..a9e596e
--- /dev/null
+++ b/src/Models/Builders/SubscriptionCardRequestBuilder.php
@@ -0,0 +1,138 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Card Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionCardRequest());
+ }
+
+ /**
+ * Sets name field.
+ *
+ * @param string|null $value
+ */
+ public function name(?string $value): self
+ {
+ $this->instance->setName($value);
+ return $this;
+ }
+
+ /**
+ * Sets number field.
+ *
+ * @param string|null $value
+ */
+ public function number(?string $value): self
+ {
+ $this->instance->setNumber($value);
+ return $this;
+ }
+
+ /**
+ * Sets expiry field.
+ *
+ * @param string|null $value
+ */
+ public function expiry(?string $value): self
+ {
+ $this->instance->setExpiry($value);
+ return $this;
+ }
+
+ /**
+ * Sets security code field.
+ *
+ * @param string|null $value
+ */
+ public function securityCode(?string $value): self
+ {
+ $this->instance->setSecurityCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets type field.
+ *
+ * @param string|null $value
+ */
+ public function type(?string $value): self
+ {
+ $this->instance->setType($value);
+ return $this;
+ }
+
+ /**
+ * Sets brand field.
+ *
+ * @param string|null $value
+ */
+ public function brand(?string $value): self
+ {
+ $this->instance->setBrand($value);
+ return $this;
+ }
+
+ /**
+ * Sets billing address field.
+ *
+ * @param Address|null $value
+ */
+ public function billingAddress(?Address $value): self
+ {
+ $this->instance->setBillingAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets attributes field.
+ *
+ * @param SubscriptionsCardAttributes|null $value
+ */
+ public function attributes(?SubscriptionsCardAttributes $value): self
+ {
+ $this->instance->setAttributes($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Card Request object.
+ */
+ public function build(): SubscriptionCardRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionCollectionBuilder.php b/src/Models/Builders/SubscriptionCollectionBuilder.php
new file mode 100644
index 0000000..bb683ff
--- /dev/null
+++ b/src/Models/Builders/SubscriptionCollectionBuilder.php
@@ -0,0 +1,72 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Collection Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionCollection());
+ }
+
+ /**
+ * Sets subscriptions field.
+ *
+ * @param Subscription[]|null $value
+ */
+ public function subscriptions(?array $value): self
+ {
+ $this->instance->setSubscriptions($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Collection object.
+ */
+ public function build(): SubscriptionCollection
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionCustomerInformationBuilder.php b/src/Models/Builders/SubscriptionCustomerInformationBuilder.php
new file mode 100644
index 0000000..682568a
--- /dev/null
+++ b/src/Models/Builders/SubscriptionCustomerInformationBuilder.php
@@ -0,0 +1,82 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Customer Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionCustomerInformation());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
+ }
+
+ /**
+ * Sets email address field.
+ *
+ * @param string|null $value
+ */
+ public function emailAddress(?string $value): self
+ {
+ $this->instance->setEmailAddress($value);
+ return $this;
+ }
+
+ /**
+ * Sets phone field.
+ *
+ * @param PhoneWithType|null $value
+ */
+ public function phone(?PhoneWithType $value): self
+ {
+ $this->instance->setPhone($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Customer Information object.
+ */
+ public function build(): SubscriptionCustomerInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionPatchApplicationContextBuilder.php b/src/Models/Builders/SubscriptionPatchApplicationContextBuilder.php
new file mode 100644
index 0000000..1999320
--- /dev/null
+++ b/src/Models/Builders/SubscriptionPatchApplicationContextBuilder.php
@@ -0,0 +1,96 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Patch Application Context Builder object.
+ *
+ * @param string $returnUrl
+ * @param string $cancelUrl
+ */
+ public static function init(string $returnUrl, string $cancelUrl): self
+ {
+ return new self(new SubscriptionPatchApplicationContext($returnUrl, $cancelUrl));
+ }
+
+ /**
+ * Sets brand name field.
+ *
+ * @param string|null $value
+ */
+ public function brandName(?string $value): self
+ {
+ $this->instance->setBrandName($value);
+ return $this;
+ }
+
+ /**
+ * Sets locale field.
+ *
+ * @param string|null $value
+ */
+ public function locale(?string $value): self
+ {
+ $this->instance->setLocale($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping preference field.
+ *
+ * @param string|null $value
+ */
+ public function shippingPreference(?string $value): self
+ {
+ $this->instance->setShippingPreference($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment method field.
+ *
+ * @param PaymentMethod|null $value
+ */
+ public function paymentMethod(?PaymentMethod $value): self
+ {
+ $this->instance->setPaymentMethod($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Patch Application Context object.
+ */
+ public function build(): SubscriptionPatchApplicationContext
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionPayerNameBuilder.php b/src/Models/Builders/SubscriptionPayerNameBuilder.php
new file mode 100644
index 0000000..2079db9
--- /dev/null
+++ b/src/Models/Builders/SubscriptionPayerNameBuilder.php
@@ -0,0 +1,114 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Payer Name Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionPayerName());
+ }
+
+ /**
+ * Sets prefix field.
+ *
+ * @param string|null $value
+ */
+ public function prefix(?string $value): self
+ {
+ $this->instance->setPrefix($value);
+ return $this;
+ }
+
+ /**
+ * Sets given name field.
+ *
+ * @param string|null $value
+ */
+ public function givenName(?string $value): self
+ {
+ $this->instance->setGivenName($value);
+ return $this;
+ }
+
+ /**
+ * Sets surname field.
+ *
+ * @param string|null $value
+ */
+ public function surname(?string $value): self
+ {
+ $this->instance->setSurname($value);
+ return $this;
+ }
+
+ /**
+ * Sets middle name field.
+ *
+ * @param string|null $value
+ */
+ public function middleName(?string $value): self
+ {
+ $this->instance->setMiddleName($value);
+ return $this;
+ }
+
+ /**
+ * Sets suffix field.
+ *
+ * @param string|null $value
+ */
+ public function suffix(?string $value): self
+ {
+ $this->instance->setSuffix($value);
+ return $this;
+ }
+
+ /**
+ * Sets full name field.
+ *
+ * @param string|null $value
+ */
+ public function fullName(?string $value): self
+ {
+ $this->instance->setFullName($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Payer Name object.
+ */
+ public function build(): SubscriptionPayerName
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionPaymentSourceBuilder.php b/src/Models/Builders/SubscriptionPaymentSourceBuilder.php
new file mode 100644
index 0000000..222a944
--- /dev/null
+++ b/src/Models/Builders/SubscriptionPaymentSourceBuilder.php
@@ -0,0 +1,60 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Payment Source Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionPaymentSource());
+ }
+
+ /**
+ * Sets card field.
+ *
+ * @param SubscriptionCardRequest|null $value
+ */
+ public function card(?SubscriptionCardRequest $value): self
+ {
+ $this->instance->setCard($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Payment Source object.
+ */
+ public function build(): SubscriptionPaymentSource
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionPaymentSourceResponseBuilder.php b/src/Models/Builders/SubscriptionPaymentSourceResponseBuilder.php
new file mode 100644
index 0000000..eb684ee
--- /dev/null
+++ b/src/Models/Builders/SubscriptionPaymentSourceResponseBuilder.php
@@ -0,0 +1,60 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Payment Source Response Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionPaymentSourceResponse());
+ }
+
+ /**
+ * Sets card field.
+ *
+ * @param CardResponseWithBillingAddress|null $value
+ */
+ public function card(?CardResponseWithBillingAddress $value): self
+ {
+ $this->instance->setCard($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Payment Source Response object.
+ */
+ public function build(): SubscriptionPaymentSourceResponse
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionPricingSchemeBuilder.php b/src/Models/Builders/SubscriptionPricingSchemeBuilder.php
new file mode 100644
index 0000000..7b2c6bc
--- /dev/null
+++ b/src/Models/Builders/SubscriptionPricingSchemeBuilder.php
@@ -0,0 +1,116 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Pricing Scheme Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionPricingScheme());
+ }
+
+ /**
+ * Sets version field.
+ *
+ * @param int|null $value
+ */
+ public function version(?int $value): self
+ {
+ $this->instance->setVersion($value);
+ return $this;
+ }
+
+ /**
+ * Sets fixed price field.
+ *
+ * @param Money|null $value
+ */
+ public function fixedPrice(?Money $value): self
+ {
+ $this->instance->setFixedPrice($value);
+ return $this;
+ }
+
+ /**
+ * Sets pricing model field.
+ *
+ * @param string|null $value
+ */
+ public function pricingModel(?string $value): self
+ {
+ $this->instance->setPricingModel($value);
+ return $this;
+ }
+
+ /**
+ * Sets tiers field.
+ *
+ * @param PricingTier[]|null $value
+ */
+ public function tiers(?array $value): self
+ {
+ $this->instance->setTiers($value);
+ return $this;
+ }
+
+ /**
+ * Sets create time field.
+ *
+ * @param string|null $value
+ */
+ public function createTime(?string $value): self
+ {
+ $this->instance->setCreateTime($value);
+ return $this;
+ }
+
+ /**
+ * Sets update time field.
+ *
+ * @param string|null $value
+ */
+ public function updateTime(?string $value): self
+ {
+ $this->instance->setUpdateTime($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Pricing Scheme object.
+ */
+ public function build(): SubscriptionPricingScheme
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionTransactionDetailsBuilder.php b/src/Models/Builders/SubscriptionTransactionDetailsBuilder.php
new file mode 100644
index 0000000..cdf3c71
--- /dev/null
+++ b/src/Models/Builders/SubscriptionTransactionDetailsBuilder.php
@@ -0,0 +1,87 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscription Transaction Details Builder object.
+ *
+ * @param string $id
+ * @param SubscriptionAmountWithBreakdown $amountWithBreakdown
+ * @param string $time
+ */
+ public static function init(string $id, SubscriptionAmountWithBreakdown $amountWithBreakdown, string $time): self
+ {
+ return new self(new SubscriptionTransactionDetails($id, $amountWithBreakdown, $time));
+ }
+
+ /**
+ * Sets status field.
+ *
+ * @param string|null $value
+ */
+ public function status(?string $value): self
+ {
+ $this->instance->setStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets payer name field.
+ *
+ * @param SubscriptionPayerName|null $value
+ */
+ public function payerName(?SubscriptionPayerName $value): self
+ {
+ $this->instance->setPayerName($value);
+ return $this;
+ }
+
+ /**
+ * Sets payer email field.
+ *
+ * @param string|null $value
+ */
+ public function payerEmail(?string $value): self
+ {
+ $this->instance->setPayerEmail($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscription Transaction Details object.
+ */
+ public function build(): SubscriptionTransactionDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SubscriptionsCardAttributesBuilder.php b/src/Models/Builders/SubscriptionsCardAttributesBuilder.php
new file mode 100644
index 0000000..9109b4e
--- /dev/null
+++ b/src/Models/Builders/SubscriptionsCardAttributesBuilder.php
@@ -0,0 +1,84 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Subscriptions Card Attributes Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new SubscriptionsCardAttributes());
+ }
+
+ /**
+ * Sets customer field.
+ *
+ * @param CardCustomer|null $value
+ */
+ public function customer(?CardCustomer $value): self
+ {
+ $this->instance->setCustomer($value);
+ return $this;
+ }
+
+ /**
+ * Sets vault field.
+ *
+ * @param VaultInstructionBase|null $value
+ */
+ public function vault(?VaultInstructionBase $value): self
+ {
+ $this->instance->setVault($value);
+ return $this;
+ }
+
+ /**
+ * Sets verification field.
+ *
+ * @param CardVerification|null $value
+ */
+ public function verification(?CardVerification $value): self
+ {
+ $this->instance->setVerification($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Subscriptions Card Attributes object.
+ */
+ public function build(): SubscriptionsCardAttributes
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SupplementaryPurchaseDataBuilder.php b/src/Models/Builders/SupplementaryPurchaseDataBuilder.php
deleted file mode 100644
index 14aa074..0000000
--- a/src/Models/Builders/SupplementaryPurchaseDataBuilder.php
+++ /dev/null
@@ -1,70 +0,0 @@
-instance = $instance;
- }
-
- /**
- * Initializes a new Supplementary Purchase Data Builder object.
- */
- public static function init(): self
- {
- return new self(new SupplementaryPurchaseData());
- }
-
- /**
- * Sets invoice id field.
- *
- * @param string|null $value
- */
- public function invoiceId(?string $value): self
- {
- $this->instance->setInvoiceId($value);
- return $this;
- }
-
- /**
- * Sets note to payer field.
- *
- * @param string|null $value
- */
- public function noteToPayer(?string $value): self
- {
- $this->instance->setNoteToPayer($value);
- return $this;
- }
-
- /**
- * Initializes a new Supplementary Purchase Data object.
- */
- public function build(): SupplementaryPurchaseData
- {
- return CoreHelper::clone($this->instance);
- }
-}
diff --git a/src/Models/Builders/SuspendSubscriptionBuilder.php b/src/Models/Builders/SuspendSubscriptionBuilder.php
new file mode 100644
index 0000000..35ec08f
--- /dev/null
+++ b/src/Models/Builders/SuspendSubscriptionBuilder.php
@@ -0,0 +1,50 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Suspend Subscription Builder object.
+ *
+ * @param string $reason
+ */
+ public static function init(string $reason): self
+ {
+ return new self(new SuspendSubscription($reason));
+ }
+
+ /**
+ * Initializes a new Suspend Subscription object.
+ */
+ public function build(): SuspendSubscription
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TaxAmountBuilder.php b/src/Models/Builders/TaxAmountBuilder.php
new file mode 100644
index 0000000..fa8bd61
--- /dev/null
+++ b/src/Models/Builders/TaxAmountBuilder.php
@@ -0,0 +1,60 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Tax Amount Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new TaxAmount());
+ }
+
+ /**
+ * Sets tax amount field.
+ *
+ * @param Money|null $value
+ */
+ public function taxAmount(?Money $value): self
+ {
+ $this->instance->setTaxAmount($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Tax Amount object.
+ */
+ public function build(): TaxAmount
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TaxesBuilder.php b/src/Models/Builders/TaxesBuilder.php
new file mode 100644
index 0000000..f7030c5
--- /dev/null
+++ b/src/Models/Builders/TaxesBuilder.php
@@ -0,0 +1,61 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Taxes Builder object.
+ *
+ * @param string $percentage
+ */
+ public static function init(string $percentage): self
+ {
+ return new self(new Taxes($percentage));
+ }
+
+ /**
+ * Sets inclusive field.
+ *
+ * @param bool|null $value
+ */
+ public function inclusive(?bool $value): self
+ {
+ $this->instance->setInclusive($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Taxes object.
+ */
+ public function build(): Taxes
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TaxesOverrideBuilder.php b/src/Models/Builders/TaxesOverrideBuilder.php
new file mode 100644
index 0000000..36abff5
--- /dev/null
+++ b/src/Models/Builders/TaxesOverrideBuilder.php
@@ -0,0 +1,70 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Taxes Override Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new TaxesOverride());
+ }
+
+ /**
+ * Sets percentage field.
+ *
+ * @param string|null $value
+ */
+ public function percentage(?string $value): self
+ {
+ $this->instance->setPercentage($value);
+ return $this;
+ }
+
+ /**
+ * Sets inclusive field.
+ *
+ * @param bool|null $value
+ */
+ public function inclusive(?bool $value): self
+ {
+ $this->instance->setInclusive($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Taxes Override object.
+ */
+ public function build(): TaxesOverride
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TransactionDetailsBuilder.php b/src/Models/Builders/TransactionDetailsBuilder.php
new file mode 100644
index 0000000..a643839
--- /dev/null
+++ b/src/Models/Builders/TransactionDetailsBuilder.php
@@ -0,0 +1,132 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Transaction Details Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new TransactionDetails());
+ }
+
+ /**
+ * Sets transaction info field.
+ *
+ * @param TransactionInformation|null $value
+ */
+ public function transactionInfo(?TransactionInformation $value): self
+ {
+ $this->instance->setTransactionInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets payer info field.
+ *
+ * @param PayerInformation|null $value
+ */
+ public function payerInfo(?PayerInformation $value): self
+ {
+ $this->instance->setPayerInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping info field.
+ *
+ * @param ShippingInformation|null $value
+ */
+ public function shippingInfo(?ShippingInformation $value): self
+ {
+ $this->instance->setShippingInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets cart info field.
+ *
+ * @param CartInformation|null $value
+ */
+ public function cartInfo(?CartInformation $value): self
+ {
+ $this->instance->setCartInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets store info field.
+ *
+ * @param StoreInformation|null $value
+ */
+ public function storeInfo(?StoreInformation $value): self
+ {
+ $this->instance->setStoreInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets auction info field.
+ *
+ * @param AuctionInformation|null $value
+ */
+ public function auctionInfo(?AuctionInformation $value): self
+ {
+ $this->instance->setAuctionInfo($value);
+ return $this;
+ }
+
+ /**
+ * Sets incentive info field.
+ *
+ * @param IncentiveInformation|null $value
+ */
+ public function incentiveInfo(?IncentiveInformation $value): self
+ {
+ $this->instance->setIncentiveInfo($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Transaction Details object.
+ */
+ public function build(): TransactionDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TransactionInformationBuilder.php b/src/Models/Builders/TransactionInformationBuilder.php
new file mode 100644
index 0000000..e360df1
--- /dev/null
+++ b/src/Models/Builders/TransactionInformationBuilder.php
@@ -0,0 +1,423 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Transaction Information Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new TransactionInformation());
+ }
+
+ /**
+ * Sets paypal account id field.
+ *
+ * @param string|null $value
+ */
+ public function paypalAccountId(?string $value): self
+ {
+ $this->instance->setPaypalAccountId($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction id field.
+ *
+ * @param string|null $value
+ */
+ public function transactionId(?string $value): self
+ {
+ $this->instance->setTransactionId($value);
+ return $this;
+ }
+
+ /**
+ * Sets paypal reference id field.
+ *
+ * @param string|null $value
+ */
+ public function paypalReferenceId(?string $value): self
+ {
+ $this->instance->setPaypalReferenceId($value);
+ return $this;
+ }
+
+ /**
+ * Sets paypal reference id type field.
+ *
+ * @param string|null $value
+ */
+ public function paypalReferenceIdType(?string $value): self
+ {
+ $this->instance->setPaypalReferenceIdType($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction event code field.
+ *
+ * @param string|null $value
+ */
+ public function transactionEventCode(?string $value): self
+ {
+ $this->instance->setTransactionEventCode($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction initiation date field.
+ *
+ * @param string|null $value
+ */
+ public function transactionInitiationDate(?string $value): self
+ {
+ $this->instance->setTransactionInitiationDate($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction updated date field.
+ *
+ * @param string|null $value
+ */
+ public function transactionUpdatedDate(?string $value): self
+ {
+ $this->instance->setTransactionUpdatedDate($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction amount field.
+ *
+ * @param Money|null $value
+ */
+ public function transactionAmount(?Money $value): self
+ {
+ $this->instance->setTransactionAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets fee amount field.
+ *
+ * @param Money|null $value
+ */
+ public function feeAmount(?Money $value): self
+ {
+ $this->instance->setFeeAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets discount amount field.
+ *
+ * @param Money|null $value
+ */
+ public function discountAmount(?Money $value): self
+ {
+ $this->instance->setDiscountAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets insurance amount field.
+ *
+ * @param Money|null $value
+ */
+ public function insuranceAmount(?Money $value): self
+ {
+ $this->instance->setInsuranceAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets sales tax amount field.
+ *
+ * @param Money|null $value
+ */
+ public function salesTaxAmount(?Money $value): self
+ {
+ $this->instance->setSalesTaxAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingAmount(?Money $value): self
+ {
+ $this->instance->setShippingAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping discount amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingDiscountAmount(?Money $value): self
+ {
+ $this->instance->setShippingDiscountAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets shipping tax amount field.
+ *
+ * @param Money|null $value
+ */
+ public function shippingTaxAmount(?Money $value): self
+ {
+ $this->instance->setShippingTaxAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets other amount field.
+ *
+ * @param Money|null $value
+ */
+ public function otherAmount(?Money $value): self
+ {
+ $this->instance->setOtherAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets tip amount field.
+ *
+ * @param Money|null $value
+ */
+ public function tipAmount(?Money $value): self
+ {
+ $this->instance->setTipAmount($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction status field.
+ *
+ * @param string|null $value
+ */
+ public function transactionStatus(?string $value): self
+ {
+ $this->instance->setTransactionStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction subject field.
+ *
+ * @param string|null $value
+ */
+ public function transactionSubject(?string $value): self
+ {
+ $this->instance->setTransactionSubject($value);
+ return $this;
+ }
+
+ /**
+ * Sets transaction note field.
+ *
+ * @param string|null $value
+ */
+ public function transactionNote(?string $value): self
+ {
+ $this->instance->setTransactionNote($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment tracking id field.
+ *
+ * @param string|null $value
+ */
+ public function paymentTrackingId(?string $value): self
+ {
+ $this->instance->setPaymentTrackingId($value);
+ return $this;
+ }
+
+ /**
+ * Sets bank reference id field.
+ *
+ * @param string|null $value
+ */
+ public function bankReferenceId(?string $value): self
+ {
+ $this->instance->setBankReferenceId($value);
+ return $this;
+ }
+
+ /**
+ * Sets ending balance field.
+ *
+ * @param Money|null $value
+ */
+ public function endingBalance(?Money $value): self
+ {
+ $this->instance->setEndingBalance($value);
+ return $this;
+ }
+
+ /**
+ * Sets available balance field.
+ *
+ * @param Money|null $value
+ */
+ public function availableBalance(?Money $value): self
+ {
+ $this->instance->setAvailableBalance($value);
+ return $this;
+ }
+
+ /**
+ * Sets invoice id field.
+ *
+ * @param string|null $value
+ */
+ public function invoiceId(?string $value): self
+ {
+ $this->instance->setInvoiceId($value);
+ return $this;
+ }
+
+ /**
+ * Sets custom field field.
+ *
+ * @param string|null $value
+ */
+ public function customField(?string $value): self
+ {
+ $this->instance->setCustomField($value);
+ return $this;
+ }
+
+ /**
+ * Sets protection eligibility field.
+ *
+ * @param string|null $value
+ */
+ public function protectionEligibility(?string $value): self
+ {
+ $this->instance->setProtectionEligibility($value);
+ return $this;
+ }
+
+ /**
+ * Sets credit term field.
+ *
+ * @param string|null $value
+ */
+ public function creditTerm(?string $value): self
+ {
+ $this->instance->setCreditTerm($value);
+ return $this;
+ }
+
+ /**
+ * Sets credit transactional fee field.
+ *
+ * @param Money|null $value
+ */
+ public function creditTransactionalFee(?Money $value): self
+ {
+ $this->instance->setCreditTransactionalFee($value);
+ return $this;
+ }
+
+ /**
+ * Sets credit promotional fee field.
+ *
+ * @param Money|null $value
+ */
+ public function creditPromotionalFee(?Money $value): self
+ {
+ $this->instance->setCreditPromotionalFee($value);
+ return $this;
+ }
+
+ /**
+ * Sets annual percentage rate field.
+ *
+ * @param string|null $value
+ */
+ public function annualPercentageRate(?string $value): self
+ {
+ $this->instance->setAnnualPercentageRate($value);
+ return $this;
+ }
+
+ /**
+ * Sets payment method type field.
+ *
+ * @param string|null $value
+ */
+ public function paymentMethodType(?string $value): self
+ {
+ $this->instance->setPaymentMethodType($value);
+ return $this;
+ }
+
+ /**
+ * Sets instrument type field.
+ *
+ * @param string|null $value
+ */
+ public function instrumentType(?string $value): self
+ {
+ $this->instance->setInstrumentType($value);
+ return $this;
+ }
+
+ /**
+ * Sets instrument sub type field.
+ *
+ * @param string|null $value
+ */
+ public function instrumentSubType(?string $value): self
+ {
+ $this->instance->setInstrumentSubType($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Transaction Information object.
+ */
+ public function build(): TransactionInformation
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TransactionSearchErrorDetailsBuilder.php b/src/Models/Builders/TransactionSearchErrorDetailsBuilder.php
new file mode 100644
index 0000000..6b70782
--- /dev/null
+++ b/src/Models/Builders/TransactionSearchErrorDetailsBuilder.php
@@ -0,0 +1,94 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Transaction Search Error Details Builder object.
+ *
+ * @param string $issue
+ */
+ public static function init(string $issue): self
+ {
+ return new self(new TransactionSearchErrorDetails($issue));
+ }
+
+ /**
+ * Sets field field.
+ *
+ * @param string|null $value
+ */
+ public function field(?string $value): self
+ {
+ $this->instance->setField($value);
+ return $this;
+ }
+
+ /**
+ * Sets value field.
+ *
+ * @param string|null $value
+ */
+ public function value(?string $value): self
+ {
+ $this->instance->setValue($value);
+ return $this;
+ }
+
+ /**
+ * Sets location field.
+ *
+ * @param string|null $value
+ */
+ public function location(?string $value): self
+ {
+ $this->instance->setLocation($value);
+ return $this;
+ }
+
+ /**
+ * Sets description field.
+ *
+ * @param string|null $value
+ */
+ public function description(?string $value): self
+ {
+ $this->instance->setDescription($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Transaction Search Error Details object.
+ */
+ public function build(): TransactionSearchErrorDetails
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/TransactionsListBuilder.php b/src/Models/Builders/TransactionsListBuilder.php
new file mode 100644
index 0000000..9181186
--- /dev/null
+++ b/src/Models/Builders/TransactionsListBuilder.php
@@ -0,0 +1,94 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Transactions List Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new TransactionsList());
+ }
+
+ /**
+ * Sets transactions field.
+ *
+ * @param SubscriptionTransactionDetails[]|null $value
+ */
+ public function transactions(?array $value): self
+ {
+ $this->instance->setTransactions($value);
+ return $this;
+ }
+
+ /**
+ * Sets total items field.
+ *
+ * @param int|null $value
+ */
+ public function totalItems(?int $value): self
+ {
+ $this->instance->setTotalItems($value);
+ return $this;
+ }
+
+ /**
+ * Sets total pages field.
+ *
+ * @param int|null $value
+ */
+ public function totalPages(?int $value): self
+ {
+ $this->instance->setTotalPages($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Transactions List object.
+ */
+ public function build(): TransactionsList
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/UpdatePricingSchemeBuilder.php b/src/Models/Builders/UpdatePricingSchemeBuilder.php
new file mode 100644
index 0000000..e466c55
--- /dev/null
+++ b/src/Models/Builders/UpdatePricingSchemeBuilder.php
@@ -0,0 +1,52 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Update Pricing Scheme Builder object.
+ *
+ * @param int $billingCycleSequence
+ * @param SubscriptionPricingScheme $pricingScheme
+ */
+ public static function init(int $billingCycleSequence, SubscriptionPricingScheme $pricingScheme): self
+ {
+ return new self(new UpdatePricingScheme($billingCycleSequence, $pricingScheme));
+ }
+
+ /**
+ * Initializes a new Update Pricing Scheme object.
+ */
+ public function build(): UpdatePricingScheme
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/UpdatePricingSchemesRequestBuilder.php b/src/Models/Builders/UpdatePricingSchemesRequestBuilder.php
new file mode 100644
index 0000000..7ae2d7a
--- /dev/null
+++ b/src/Models/Builders/UpdatePricingSchemesRequestBuilder.php
@@ -0,0 +1,51 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Update Pricing Schemes Request Builder object.
+ *
+ * @param UpdatePricingScheme[] $pricingSchemes
+ */
+ public static function init(array $pricingSchemes): self
+ {
+ return new self(new UpdatePricingSchemesRequest($pricingSchemes));
+ }
+
+ /**
+ * Initializes a new Update Pricing Schemes Request object.
+ */
+ public function build(): UpdatePricingSchemesRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/VaultApplePayRequestBuilder.php b/src/Models/Builders/VaultApplePayRequestBuilder.php
new file mode 100644
index 0000000..8907ef0
--- /dev/null
+++ b/src/Models/Builders/VaultApplePayRequestBuilder.php
@@ -0,0 +1,71 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Vault Apple Pay Request Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new VaultApplePayRequest());
+ }
+
+ /**
+ * Sets token field.
+ *
+ * @param string|null $value
+ */
+ public function token(?string $value): self
+ {
+ $this->instance->setToken($value);
+ return $this;
+ }
+
+ /**
+ * Sets card field.
+ *
+ * @param ApplePayRequestCard|null $value
+ */
+ public function card(?ApplePayRequestCard $value): self
+ {
+ $this->instance->setCard($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Vault Apple Pay Request object.
+ */
+ public function build(): VaultApplePayRequest
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/SetupTokenCardExperienceContextBuilder.php b/src/Models/Builders/VaultCardExperienceContextBuilder.php
similarity index 67%
rename from src/Models/Builders/SetupTokenCardExperienceContextBuilder.php
rename to src/Models/Builders/VaultCardExperienceContextBuilder.php
index 21ac763..a6bc73f 100644
--- a/src/Models/Builders/SetupTokenCardExperienceContextBuilder.php
+++ b/src/Models/Builders/VaultCardExperienceContextBuilder.php
@@ -11,31 +11,31 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
-use PaypalServerSdkLib\Models\SetupTokenCardExperienceContext;
+use PaypalServerSdkLib\Models\VaultCardExperienceContext;
/**
- * Builder for model SetupTokenCardExperienceContext
+ * Builder for model VaultCardExperienceContext
*
- * @see SetupTokenCardExperienceContext
+ * @see VaultCardExperienceContext
*/
-class SetupTokenCardExperienceContextBuilder
+class VaultCardExperienceContextBuilder
{
/**
- * @var SetupTokenCardExperienceContext
+ * @var VaultCardExperienceContext
*/
private $instance;
- private function __construct(SetupTokenCardExperienceContext $instance)
+ private function __construct(VaultCardExperienceContext $instance)
{
$this->instance = $instance;
}
/**
- * Initializes a new Setup Token Card Experience Context Builder object.
+ * Initializes a new Vault Card Experience Context Builder object.
*/
public static function init(): self
{
- return new self(new SetupTokenCardExperienceContext());
+ return new self(new VaultCardExperienceContext());
}
/**
@@ -94,9 +94,20 @@ class SetupTokenCardExperienceContextBuilder
}
/**
- * Initializes a new Setup Token Card Experience Context object.
+ * Sets user action field.
+ *
+ * @param string|null $value
*/
- public function build(): SetupTokenCardExperienceContext
+ public function userAction(?string $value): self
+ {
+ $this->instance->setUserAction($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Vault Card Experience Context object.
+ */
+ public function build(): VaultCardExperienceContext
{
return CoreHelper::clone($this->instance);
}
diff --git a/src/Models/Builders/VaultExperienceContextBuilder.php b/src/Models/Builders/VaultExperienceContextBuilder.php
index a86fcbd..289420e 100644
--- a/src/Models/Builders/VaultExperienceContextBuilder.php
+++ b/src/Models/Builders/VaultExperienceContextBuilder.php
@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
+use PaypalServerSdkLib\Models\AppSwitchContext;
use PaypalServerSdkLib\Models\VaultExperienceContext;
/**
@@ -104,6 +105,28 @@ class VaultExperienceContextBuilder
return $this;
}
+ /**
+ * Sets app switch context field.
+ *
+ * @param AppSwitchContext|null $value
+ */
+ public function appSwitchContext(?AppSwitchContext $value): self
+ {
+ $this->instance->setAppSwitchContext($value);
+ return $this;
+ }
+
+ /**
+ * Sets user action field.
+ *
+ * @param string|null $value
+ */
+ public function userAction(?string $value): self
+ {
+ $this->instance->setUserAction($value);
+ return $this;
+ }
+
/**
* Initializes a new Vault Experience Context object.
*/
diff --git a/src/Models/Builders/VaultVenmoRequestBuilder.php b/src/Models/Builders/VaultVenmoRequestBuilder.php
index 1301cdc..1269d8f 100644
--- a/src/Models/Builders/VaultVenmoRequestBuilder.php
+++ b/src/Models/Builders/VaultVenmoRequestBuilder.php
@@ -12,8 +12,8 @@ namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\VaultedDigitalWalletShippingDetails;
-use PaypalServerSdkLib\Models\VaultVenmoExperienceContext;
use PaypalServerSdkLib\Models\VaultVenmoRequest;
+use PaypalServerSdkLib\Models\VenmoExperienceContext;
/**
* Builder for model VaultVenmoRequest
@@ -109,9 +109,9 @@ class VaultVenmoRequestBuilder
/**
* Sets experience context field.
*
- * @param VaultVenmoExperienceContext|null $value
+ * @param VenmoExperienceContext|null $value
*/
- public function experienceContext(?VaultVenmoExperienceContext $value): self
+ public function experienceContext(?VenmoExperienceContext $value): self
{
$this->instance->setExperienceContext($value);
return $this;
diff --git a/src/Models/Builders/VaultedDigitalWalletShippingDetailsBuilder.php b/src/Models/Builders/VaultedDigitalWalletShippingDetailsBuilder.php
index a77a2a3..43fdebc 100644
--- a/src/Models/Builders/VaultedDigitalWalletShippingDetailsBuilder.php
+++ b/src/Models/Builders/VaultedDigitalWalletShippingDetailsBuilder.php
@@ -52,6 +52,17 @@ class VaultedDigitalWalletShippingDetailsBuilder
return $this;
}
+ /**
+ * Sets email address field.
+ *
+ * @param string|null $value
+ */
+ public function emailAddress(?string $value): self
+ {
+ $this->instance->setEmailAddress($value);
+ return $this;
+ }
+
/**
* Sets phone number field.
*
diff --git a/src/Models/Builders/VaultVenmoExperienceContextBuilder.php b/src/Models/Builders/VenmoExperienceContextBuilder.php
similarity index 62%
rename from src/Models/Builders/VaultVenmoExperienceContextBuilder.php
rename to src/Models/Builders/VenmoExperienceContextBuilder.php
index b29fb5f..b4b9cc8 100644
--- a/src/Models/Builders/VaultVenmoExperienceContextBuilder.php
+++ b/src/Models/Builders/VenmoExperienceContextBuilder.php
@@ -11,31 +11,31 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
-use PaypalServerSdkLib\Models\VaultVenmoExperienceContext;
+use PaypalServerSdkLib\Models\VenmoExperienceContext;
/**
- * Builder for model VaultVenmoExperienceContext
+ * Builder for model VenmoExperienceContext
*
- * @see VaultVenmoExperienceContext
+ * @see VenmoExperienceContext
*/
-class VaultVenmoExperienceContextBuilder
+class VenmoExperienceContextBuilder
{
/**
- * @var VaultVenmoExperienceContext
+ * @var VenmoExperienceContext
*/
private $instance;
- private function __construct(VaultVenmoExperienceContext $instance)
+ private function __construct(VenmoExperienceContext $instance)
{
$this->instance = $instance;
}
/**
- * Initializes a new Vault Venmo Experience Context Builder object.
+ * Initializes a new Venmo Experience Context Builder object.
*/
public static function init(): self
{
- return new self(new VaultVenmoExperienceContext());
+ return new self(new VenmoExperienceContext());
}
/**
@@ -72,9 +72,20 @@ class VaultVenmoExperienceContextBuilder
}
/**
- * Initializes a new Vault Venmo Experience Context object.
+ * Sets user action field.
+ *
+ * @param string|null $value
*/
- public function build(): VaultVenmoExperienceContext
+ public function userAction(?string $value): self
+ {
+ $this->instance->setUserAction($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Venmo Experience Context object.
+ */
+ public function build(): VenmoExperienceContext
{
return CoreHelper::clone($this->instance);
}
diff --git a/src/Models/Builders/VenmoVaultResponseBuilder.php b/src/Models/Builders/VenmoVaultResponseBuilder.php
new file mode 100644
index 0000000..2f8c885
--- /dev/null
+++ b/src/Models/Builders/VenmoVaultResponseBuilder.php
@@ -0,0 +1,94 @@
+instance = $instance;
+ }
+
+ /**
+ * Initializes a new Venmo Vault Response Builder object.
+ */
+ public static function init(): self
+ {
+ return new self(new VenmoVaultResponse());
+ }
+
+ /**
+ * Sets id field.
+ *
+ * @param string|null $value
+ */
+ public function id(?string $value): self
+ {
+ $this->instance->setId($value);
+ return $this;
+ }
+
+ /**
+ * Sets status field.
+ *
+ * @param string|null $value
+ */
+ public function status(?string $value): self
+ {
+ $this->instance->setStatus($value);
+ return $this;
+ }
+
+ /**
+ * Sets links field.
+ *
+ * @param LinkDescription[]|null $value
+ */
+ public function links(?array $value): self
+ {
+ $this->instance->setLinks($value);
+ return $this;
+ }
+
+ /**
+ * Sets customer field.
+ *
+ * @param CustomerInformation|null $value
+ */
+ public function customer(?CustomerInformation $value): self
+ {
+ $this->instance->setCustomer($value);
+ return $this;
+ }
+
+ /**
+ * Initializes a new Venmo Vault Response object.
+ */
+ public function build(): VenmoVaultResponse
+ {
+ return CoreHelper::clone($this->instance);
+ }
+}
diff --git a/src/Models/Builders/VenmoWalletAttributesResponseBuilder.php b/src/Models/Builders/VenmoWalletAttributesResponseBuilder.php
index d97b177..47d990b 100644
--- a/src/Models/Builders/VenmoWalletAttributesResponseBuilder.php
+++ b/src/Models/Builders/VenmoWalletAttributesResponseBuilder.php
@@ -11,7 +11,7 @@ declare(strict_types=1);
namespace PaypalServerSdkLib\Models\Builders;
use Core\Utils\CoreHelper;
-use PaypalServerSdkLib\Models\VaultResponse;
+use PaypalServerSdkLib\Models\VenmoVaultResponse;
use PaypalServerSdkLib\Models\VenmoWalletAttributesResponse;
/**
@@ -42,9 +42,9 @@ class VenmoWalletAttributesResponseBuilder
/**
* Sets vault field.
*
- * @param VaultResponse|null $value
+ * @param VenmoVaultResponse|null $value
*/
- public function vault(?VaultResponse $value): self
+ public function vault(?VenmoVaultResponse $value): self
{
$this->instance->setVault($value);
return $this;
diff --git a/src/Models/Builders/VenmoWalletExperienceContextBuilder.php b/src/Models/Builders/VenmoWalletExperienceContextBuilder.php
index bd625f5..2b21a5b 100644
--- a/src/Models/Builders/VenmoWalletExperienceContextBuilder.php
+++ b/src/Models/Builders/VenmoWalletExperienceContextBuilder.php
@@ -72,6 +72,17 @@ class VenmoWalletExperienceContextBuilder
return $this;
}
+ /**
+ * Sets user action field.
+ *
+ * @param string|null $value
+ */
+ public function userAction(?string $value): self
+ {
+ $this->instance->setUserAction($value);
+ return $this;
+ }
+
/**
* Initializes a new Venmo Wallet Experience Context object.
*/
diff --git a/src/Models/Builders/VenmoWalletResponseBuilder.php b/src/Models/Builders/VenmoWalletResponseBuilder.php
index 8143fb8..8366fd8 100644
--- a/src/Models/Builders/VenmoWalletResponseBuilder.php
+++ b/src/Models/Builders/VenmoWalletResponseBuilder.php
@@ -108,6 +108,17 @@ class VenmoWalletResponseBuilder
return $this;
}
+ /**
+ * Sets return flow field.
+ *
+ * @param string|null $value
+ */
+ public function returnFlow(?string $value): self
+ {
+ $this->instance->setReturnFlow($value);
+ return $this;
+ }
+
/**
* Sets attributes field.
*
diff --git a/src/Models/CancelSubscriptionRequest.php b/src/Models/CancelSubscriptionRequest.php
new file mode 100644
index 0000000..ac1c6dd
--- /dev/null
+++ b/src/Models/CancelSubscriptionRequest.php
@@ -0,0 +1,81 @@
+reason = $reason;
+ }
+
+ /**
+ * Returns Reason.
+ * The reason for the cancellation of a subscription.
+ */
+ public function getReason(): string
+ {
+ return $this->reason;
+ }
+
+ /**
+ * Sets Reason.
+ * The reason for the cancellation of a subscription.
+ *
+ * @required
+ * @maps reason
+ */
+ public function setReason(string $reason): void
+ {
+ $this->reason = $reason;
+ }
+
+ /**
+ * Converts the CancelSubscriptionRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the CancelSubscriptionRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('CancelSubscriptionRequest', ['reason' => $this->reason]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['reason'] = $this->reason;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CaptureRequest.php b/src/Models/CaptureRequest.php
index 63846b3..a6681e2 100644
--- a/src/Models/CaptureRequest.php
+++ b/src/Models/CaptureRequest.php
@@ -13,23 +13,21 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
+/**
+ * Captures either a portion or the full authorized amount of an authorized payment.
+ */
class CaptureRequest implements \JsonSerializable
{
- /**
- * @var string|null
- */
- private $invoiceId;
-
- /**
- * @var string|null
- */
- private $noteToPayer;
-
/**
* @var Money|null
*/
private $amount;
+ /**
+ * @var string|null
+ */
+ private $invoiceId;
+
/**
* @var bool|null
*/
@@ -40,11 +38,36 @@ class CaptureRequest implements \JsonSerializable
*/
private $paymentInstruction;
+ /**
+ * @var string|null
+ */
+ private $noteToPayer;
+
/**
* @var string|null
*/
private $softDescriptor;
+ /**
+ * Returns Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAmount(): ?Money
+ {
+ return $this->amount;
+ }
+
+ /**
+ * Sets Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps amount
+ */
+ public function setAmount(?Money $amount): void
+ {
+ $this->amount = $amount;
+ }
+
/**
* Returns Invoice Id.
* The API caller-provided external invoice number for this order. Appears in both the payer's
@@ -67,48 +90,6 @@ class CaptureRequest implements \JsonSerializable
$this->invoiceId = $invoiceId;
}
- /**
- * Returns Note to Payer.
- * An informational note about this settlement. Appears in both the payer's transaction history and the
- * emails that the payer receives.
- */
- public function getNoteToPayer(): ?string
- {
- return $this->noteToPayer;
- }
-
- /**
- * Sets Note to Payer.
- * An informational note about this settlement. Appears in both the payer's transaction history and the
- * emails that the payer receives.
- *
- * @maps note_to_payer
- */
- public function setNoteToPayer(?string $noteToPayer): void
- {
- $this->noteToPayer = $noteToPayer;
- }
-
- /**
- * Returns Amount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
- */
- public function getAmount(): ?Money
- {
- return $this->amount;
- }
-
- /**
- * Sets Amount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
- *
- * @maps amount
- */
- public function setAmount(?Money $amount): void
- {
- $this->amount = $amount;
- }
-
/**
* Returns Final Capture.
* Indicates whether you can make additional captures against the authorized payment. Set to `true` if
@@ -155,6 +136,28 @@ class CaptureRequest implements \JsonSerializable
$this->paymentInstruction = $paymentInstruction;
}
+ /**
+ * Returns Note to Payer.
+ * An informational note about this settlement. Appears in both the payer's transaction history and the
+ * emails that the payer receives.
+ */
+ public function getNoteToPayer(): ?string
+ {
+ return $this->noteToPayer;
+ }
+
+ /**
+ * Sets Note to Payer.
+ * An informational note about this settlement. Appears in both the payer's transaction history and the
+ * emails that the payer receives.
+ *
+ * @maps note_to_payer
+ */
+ public function setNoteToPayer(?string $noteToPayer): void
+ {
+ $this->noteToPayer = $noteToPayer;
+ }
+
/**
* Returns Soft Descriptor.
* The payment descriptor on the payer's account statement.
@@ -185,11 +188,11 @@ class CaptureRequest implements \JsonSerializable
return ApiHelper::stringify(
'CaptureRequest',
[
- 'invoiceId' => $this->invoiceId,
- 'noteToPayer' => $this->noteToPayer,
'amount' => $this->amount,
+ 'invoiceId' => $this->invoiceId,
'finalCapture' => $this->finalCapture,
'paymentInstruction' => $this->paymentInstruction,
+ 'noteToPayer' => $this->noteToPayer,
'softDescriptor' => $this->softDescriptor
]
);
@@ -207,21 +210,21 @@ class CaptureRequest implements \JsonSerializable
public function jsonSerialize(bool $asArrayWhenEmpty = false)
{
$json = [];
- if (isset($this->invoiceId)) {
- $json['invoice_id'] = $this->invoiceId;
- }
- if (isset($this->noteToPayer)) {
- $json['note_to_payer'] = $this->noteToPayer;
- }
if (isset($this->amount)) {
$json['amount'] = $this->amount;
}
+ if (isset($this->invoiceId)) {
+ $json['invoice_id'] = $this->invoiceId;
+ }
if (isset($this->finalCapture)) {
$json['final_capture'] = $this->finalCapture;
}
if (isset($this->paymentInstruction)) {
$json['payment_instruction'] = $this->paymentInstruction;
}
+ if (isset($this->noteToPayer)) {
+ $json['note_to_payer'] = $this->noteToPayer;
+ }
if (isset($this->softDescriptor)) {
$json['soft_descriptor'] = $this->softDescriptor;
}
diff --git a/src/Models/CaptureSubscriptionRequest.php b/src/Models/CaptureSubscriptionRequest.php
new file mode 100644
index 0000000..230dfc6
--- /dev/null
+++ b/src/Models/CaptureSubscriptionRequest.php
@@ -0,0 +1,142 @@
+note = $note;
+ $this->captureType = $captureType;
+ $this->amount = $amount;
+ }
+
+ /**
+ * Returns Note.
+ * The reason or note for the subscription charge.
+ */
+ public function getNote(): string
+ {
+ return $this->note;
+ }
+
+ /**
+ * Sets Note.
+ * The reason or note for the subscription charge.
+ *
+ * @required
+ * @maps note
+ */
+ public function setNote(string $note): void
+ {
+ $this->note = $note;
+ }
+
+ /**
+ * Returns Capture Type.
+ * The type of capture.
+ */
+ public function getCaptureType(): string
+ {
+ return $this->captureType;
+ }
+
+ /**
+ * Sets Capture Type.
+ * The type of capture.
+ *
+ * @required
+ * @maps capture_type
+ */
+ public function setCaptureType(string $captureType): void
+ {
+ $this->captureType = $captureType;
+ }
+
+ /**
+ * Returns Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAmount(): Money
+ {
+ return $this->amount;
+ }
+
+ /**
+ * Sets Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps amount
+ */
+ public function setAmount(Money $amount): void
+ {
+ $this->amount = $amount;
+ }
+
+ /**
+ * Converts the CaptureSubscriptionRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the CaptureSubscriptionRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CaptureSubscriptionRequest',
+ ['note' => $this->note, 'captureType' => $this->captureType, 'amount' => $this->amount]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['note'] = $this->note;
+ $json['capture_type'] = $this->captureType;
+ $json['amount'] = $this->amount;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CaptureType.php b/src/Models/CaptureType.php
new file mode 100644
index 0000000..6206f79
--- /dev/null
+++ b/src/Models/CaptureType.php
@@ -0,0 +1,22 @@
+networkTransactionReference;
}
@@ -242,7 +242,7 @@ class CapturedPayment implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
@@ -363,7 +363,7 @@ class CapturedPayment implements \JsonSerializable
* Returns Processor Response.
* The processor response information for payment requests, such as direct credit card transactions.
*/
- public function getProcessorResponse(): ?PaymentsProcessorResponse
+ public function getProcessorResponse(): ?ProcessorResponse
{
return $this->processorResponse;
}
@@ -374,7 +374,7 @@ class CapturedPayment implements \JsonSerializable
*
* @maps processor_response
*/
- public function setProcessorResponse(?PaymentsProcessorResponse $processorResponse): void
+ public function setProcessorResponse(?ProcessorResponse $processorResponse): void
{
$this->processorResponse = $processorResponse;
}
diff --git a/src/Models/CardBrand.php b/src/Models/CardBrand.php
index c9c1557..36880ef 100644
--- a/src/Models/CardBrand.php
+++ b/src/Models/CardBrand.php
@@ -136,6 +136,31 @@ class CardBrand
*/
public const EFTPOS = 'EFTPOS';
+ /**
+ * The Carte Bancaire payment network.
+ */
+ public const CARTE_BANCAIRE = 'CARTE_BANCAIRE';
+
+ /**
+ * The Star Access payment network.
+ */
+ public const STAR_ACCESS = 'STAR_ACCESS';
+
+ /**
+ * The Pulse payment network.
+ */
+ public const PULSE = 'PULSE';
+
+ /**
+ * The NYCE payment network.
+ */
+ public const NYCE = 'NYCE';
+
+ /**
+ * The Accel payment network.
+ */
+ public const ACCEL = 'ACCEL';
+
/**
* UNKNOWN payment network.
*/
diff --git a/src/Models/CardCustomer.php b/src/Models/CardCustomer.php
new file mode 100644
index 0000000..72aaa23
--- /dev/null
+++ b/src/Models/CardCustomer.php
@@ -0,0 +1,174 @@
+id;
+ }
+
+ /**
+ * Sets Id.
+ * The unique ID for a customer generated by PayPal.
+ *
+ * @maps id
+ */
+ public function setId(?string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Email Address.
+ * 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.
+ */
+ public function getEmailAddress(): ?string
+ {
+ return $this->emailAddress;
+ }
+
+ /**
+ * Sets Email Address.
+ * 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.
+ *
+ * @maps email_address
+ */
+ public function setEmailAddress(?string $emailAddress): void
+ {
+ $this->emailAddress = $emailAddress;
+ }
+
+ /**
+ * Returns Phone.
+ * The phone information.
+ */
+ public function getPhone(): ?PhoneWithType
+ {
+ return $this->phone;
+ }
+
+ /**
+ * Sets Phone.
+ * The phone information.
+ *
+ * @maps phone
+ */
+ public function setPhone(?PhoneWithType $phone): void
+ {
+ $this->phone = $phone;
+ }
+
+ /**
+ * Returns Merchant Customer Id.
+ * 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.
+ */
+ public function getMerchantCustomerId(): ?string
+ {
+ return $this->merchantCustomerId;
+ }
+
+ /**
+ * Sets Merchant Customer Id.
+ * 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.
+ *
+ * @maps merchant_customer_id
+ */
+ public function setMerchantCustomerId(?string $merchantCustomerId): void
+ {
+ $this->merchantCustomerId = $merchantCustomerId;
+ }
+
+ /**
+ * Converts the CardCustomer object to a human-readable string representation.
+ *
+ * @return string The string representation of the CardCustomer object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CardCustomer',
+ [
+ 'id' => $this->id,
+ 'emailAddress' => $this->emailAddress,
+ 'phone' => $this->phone,
+ 'merchantCustomerId' => $this->merchantCustomerId
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
+ if (isset($this->emailAddress)) {
+ $json['email_address'] = $this->emailAddress;
+ }
+ if (isset($this->phone)) {
+ $json['phone'] = $this->phone;
+ }
+ if (isset($this->merchantCustomerId)) {
+ $json['merchant_customer_id'] = $this->merchantCustomerId;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CardResponseWithBillingAddress.php b/src/Models/CardResponseWithBillingAddress.php
new file mode 100644
index 0000000..974455b
--- /dev/null
+++ b/src/Models/CardResponseWithBillingAddress.php
@@ -0,0 +1,176 @@
+name;
+ }
+
+ /**
+ * Sets Name.
+ * The card holder's name as it appears on the card.
+ *
+ * @maps name
+ */
+ public function setName(?string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Billing Address.
+ * 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).
+ */
+ public function getBillingAddress(): ?Address
+ {
+ return $this->billingAddress;
+ }
+
+ /**
+ * Sets Billing Address.
+ * 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).
+ *
+ * @maps billing_address
+ */
+ public function setBillingAddress(?Address $billingAddress): void
+ {
+ $this->billingAddress = $billingAddress;
+ }
+
+ /**
+ * Returns Expiry.
+ * 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).
+ */
+ public function getExpiry(): ?string
+ {
+ return $this->expiry;
+ }
+
+ /**
+ * Sets Expiry.
+ * 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).
+ *
+ * @maps expiry
+ */
+ public function setExpiry(?string $expiry): void
+ {
+ $this->expiry = $expiry;
+ }
+
+ /**
+ * Returns Currency Code.
+ * The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies
+ * the currency.
+ */
+ public function getCurrencyCode(): ?string
+ {
+ return $this->currencyCode;
+ }
+
+ /**
+ * Sets Currency Code.
+ * The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies
+ * the currency.
+ *
+ * @maps currency_code
+ */
+ public function setCurrencyCode(?string $currencyCode): void
+ {
+ $this->currencyCode = $currencyCode;
+ }
+
+ /**
+ * Converts the CardResponseWithBillingAddress object to a human-readable string representation.
+ *
+ * @return string The string representation of the CardResponseWithBillingAddress object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CardResponseWithBillingAddress',
+ [
+ 'name' => $this->name,
+ 'billingAddress' => $this->billingAddress,
+ 'expiry' => $this->expiry,
+ 'currencyCode' => $this->currencyCode
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->billingAddress)) {
+ $json['billing_address'] = $this->billingAddress;
+ }
+ if (isset($this->expiry)) {
+ $json['expiry'] = $this->expiry;
+ }
+ if (isset($this->currencyCode)) {
+ $json['currency_code'] = $this->currencyCode;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CardStoredCredential.php b/src/Models/CardStoredCredential.php
index e9aff57..3839f79 100644
--- a/src/Models/CardStoredCredential.php
+++ b/src/Models/CardStoredCredential.php
@@ -40,7 +40,7 @@ class CardStoredCredential implements \JsonSerializable
private $usage = StoredPaymentSourceUsageType::DERIVED;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $previousNetworkTransactionReference;
@@ -122,7 +122,7 @@ class CardStoredCredential implements \JsonSerializable
* Returns Previous Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getPreviousNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getPreviousNetworkTransactionReference(): ?NetworkTransaction
{
return $this->previousNetworkTransactionReference;
}
@@ -134,7 +134,7 @@ class CardStoredCredential implements \JsonSerializable
* @maps previous_network_transaction_reference
*/
public function setPreviousNetworkTransactionReference(
- ?NetworkTransactionReference $previousNetworkTransactionReference
+ ?NetworkTransaction $previousNetworkTransactionReference
): void {
$this->previousNetworkTransactionReference = $previousNetworkTransactionReference;
}
diff --git a/src/Models/CardVerificationDetails.php b/src/Models/CardVerificationDetails.php
index 3ad31bb..2d3763c 100644
--- a/src/Models/CardVerificationDetails.php
+++ b/src/Models/CardVerificationDetails.php
@@ -99,7 +99,8 @@ class CardVerificationDetails implements \JsonSerializable
/**
* Returns Network.
- * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ * 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.
*/
public function getNetwork(): ?string
{
@@ -108,7 +109,8 @@ class CardVerificationDetails implements \JsonSerializable
/**
* Sets Network.
- * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ * 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.
*
* @maps network
*/
@@ -119,9 +121,8 @@ class CardVerificationDetails implements \JsonSerializable
/**
* Returns Time.
- * 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.
+ * 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.
*/
public function getTime(): ?string
{
@@ -130,9 +131,8 @@ class CardVerificationDetails implements \JsonSerializable
/**
* Sets Time.
- * 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.
+ * 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.
*
* @maps time
*/
diff --git a/src/Models/CartInformation.php b/src/Models/CartInformation.php
new file mode 100644
index 0000000..d923e97
--- /dev/null
+++ b/src/Models/CartInformation.php
@@ -0,0 +1,141 @@
+itemDetails;
+ }
+
+ /**
+ * Sets Item Details.
+ * An array of item details.
+ *
+ * @maps item_details
+ *
+ * @param ItemDetails[]|null $itemDetails
+ */
+ public function setItemDetails(?array $itemDetails): void
+ {
+ $this->itemDetails = $itemDetails;
+ }
+
+ /**
+ * Returns Tax Inclusive.
+ * Indicates whether the item amount or the shipping amount already includes tax.
+ */
+ public function getTaxInclusive(): ?bool
+ {
+ return $this->taxInclusive;
+ }
+
+ /**
+ * Sets Tax Inclusive.
+ * Indicates whether the item amount or the shipping amount already includes tax.
+ *
+ * @maps tax_inclusive
+ */
+ public function setTaxInclusive(?bool $taxInclusive): void
+ {
+ $this->taxInclusive = $taxInclusive;
+ }
+
+ /**
+ * Returns Paypal Invoice Id.
+ * The ID of the invoice. Appears for only PayPal-generated invoices.
+ */
+ public function getPaypalInvoiceId(): ?string
+ {
+ return $this->paypalInvoiceId;
+ }
+
+ /**
+ * Sets Paypal Invoice Id.
+ * The ID of the invoice. Appears for only PayPal-generated invoices.
+ *
+ * @maps paypal_invoice_id
+ */
+ public function setPaypalInvoiceId(?string $paypalInvoiceId): void
+ {
+ $this->paypalInvoiceId = $paypalInvoiceId;
+ }
+
+ /**
+ * Converts the CartInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the CartInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CartInformation',
+ [
+ 'itemDetails' => $this->itemDetails,
+ 'taxInclusive' => $this->taxInclusive,
+ 'paypalInvoiceId' => $this->paypalInvoiceId
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->itemDetails)) {
+ $json['item_details'] = $this->itemDetails;
+ }
+ if (isset($this->taxInclusive)) {
+ $json['tax_inclusive'] = $this->taxInclusive;
+ }
+ if (isset($this->paypalInvoiceId)) {
+ $json['paypal_invoice_id'] = $this->paypalInvoiceId;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CheckoutOption.php b/src/Models/CheckoutOption.php
new file mode 100644
index 0000000..8e2af5a
--- /dev/null
+++ b/src/Models/CheckoutOption.php
@@ -0,0 +1,110 @@
+checkoutOptionName;
+ }
+
+ /**
+ * Sets Checkout Option Name.
+ * The checkout option name, such as `color` or `texture`.
+ *
+ * @maps checkout_option_name
+ */
+ public function setCheckoutOptionName(?string $checkoutOptionName): void
+ {
+ $this->checkoutOptionName = $checkoutOptionName;
+ }
+
+ /**
+ * Returns Checkout Option Value.
+ * 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`.
+ */
+ public function getCheckoutOptionValue(): ?string
+ {
+ return $this->checkoutOptionValue;
+ }
+
+ /**
+ * Sets Checkout Option Value.
+ * 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`.
+ *
+ * @maps checkout_option_value
+ */
+ public function setCheckoutOptionValue(?string $checkoutOptionValue): void
+ {
+ $this->checkoutOptionValue = $checkoutOptionValue;
+ }
+
+ /**
+ * Converts the CheckoutOption object to a human-readable string representation.
+ *
+ * @return string The string representation of the CheckoutOption object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CheckoutOption',
+ [
+ 'checkoutOptionName' => $this->checkoutOptionName,
+ 'checkoutOptionValue' => $this->checkoutOptionValue
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->checkoutOptionName)) {
+ $json['checkout_option_name'] = $this->checkoutOptionName;
+ }
+ if (isset($this->checkoutOptionValue)) {
+ $json['checkout_option_value'] = $this->checkoutOptionValue;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CreateSubscriptionRequest.php b/src/Models/CreateSubscriptionRequest.php
new file mode 100644
index 0000000..4ce1d46
--- /dev/null
+++ b/src/Models/CreateSubscriptionRequest.php
@@ -0,0 +1,326 @@
+planId = $planId;
+ }
+
+ /**
+ * Returns Plan Id.
+ * The ID of the plan.
+ */
+ public function getPlanId(): string
+ {
+ return $this->planId;
+ }
+
+ /**
+ * Sets Plan Id.
+ * The ID of the plan.
+ *
+ * @required
+ * @maps plan_id
+ */
+ public function setPlanId(string $planId): void
+ {
+ $this->planId = $planId;
+ }
+
+ /**
+ * Returns Start Time.
+ * 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.
+ */
+ public function getStartTime(): ?string
+ {
+ return $this->startTime;
+ }
+
+ /**
+ * Sets Start Time.
+ * 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.
+ *
+ * @maps start_time
+ */
+ public function setStartTime(?string $startTime): void
+ {
+ $this->startTime = $startTime;
+ }
+
+ /**
+ * Returns Quantity.
+ * The quantity of the product in the subscription.
+ */
+ public function getQuantity(): ?string
+ {
+ return $this->quantity;
+ }
+
+ /**
+ * Sets Quantity.
+ * The quantity of the product in the subscription.
+ *
+ * @maps quantity
+ */
+ public function setQuantity(?string $quantity): void
+ {
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Subscriber.
+ * The subscriber request information .
+ */
+ public function getSubscriber(): ?SubscriberRequest
+ {
+ return $this->subscriber;
+ }
+
+ /**
+ * Sets Subscriber.
+ * The subscriber request information .
+ *
+ * @maps subscriber
+ */
+ public function setSubscriber(?SubscriberRequest $subscriber): void
+ {
+ $this->subscriber = $subscriber;
+ }
+
+ /**
+ * Returns Auto Renewal.
+ * DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete.
+ */
+ public function getAutoRenewal(): ?bool
+ {
+ return $this->autoRenewal;
+ }
+
+ /**
+ * Sets Auto Renewal.
+ * DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete.
+ *
+ * @maps auto_renewal
+ */
+ public function setAutoRenewal(?bool $autoRenewal): void
+ {
+ $this->autoRenewal = $autoRenewal;
+ }
+
+ /**
+ * Returns Application Context.
+ * DEPRECATED. The application context, which customizes the payer experience during the subscription
+ * approval process with PayPal.
+ */
+ public function getApplicationContext(): ?SubscriptionApplicationContext
+ {
+ return $this->applicationContext;
+ }
+
+ /**
+ * Sets Application Context.
+ * DEPRECATED. The application context, which customizes the payer experience during the subscription
+ * approval process with PayPal.
+ *
+ * @maps application_context
+ */
+ public function setApplicationContext(?SubscriptionApplicationContext $applicationContext): void
+ {
+ $this->applicationContext = $applicationContext;
+ }
+
+ /**
+ * Returns Custom Id.
+ * The custom id for the subscription. Can be invoice id.
+ */
+ public function getCustomId(): ?string
+ {
+ return $this->customId;
+ }
+
+ /**
+ * Sets Custom Id.
+ * The custom id for the subscription. Can be invoice id.
+ *
+ * @maps custom_id
+ */
+ public function setCustomId(?string $customId): void
+ {
+ $this->customId = $customId;
+ }
+
+ /**
+ * Returns Plan.
+ * 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.
+ */
+ public function getPlan(): ?PlanOverride
+ {
+ return $this->plan;
+ }
+
+ /**
+ * Sets Plan.
+ * 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.
+ *
+ * @maps plan
+ */
+ public function setPlan(?PlanOverride $plan): void
+ {
+ $this->plan = $plan;
+ }
+
+ /**
+ * Converts the CreateSubscriptionRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the CreateSubscriptionRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CreateSubscriptionRequest',
+ [
+ 'planId' => $this->planId,
+ 'startTime' => $this->startTime,
+ 'quantity' => $this->quantity,
+ 'shippingAmount' => $this->shippingAmount,
+ 'subscriber' => $this->subscriber,
+ 'autoRenewal' => $this->autoRenewal,
+ 'applicationContext' => $this->applicationContext,
+ 'customId' => $this->customId,
+ 'plan' => $this->plan
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['plan_id'] = $this->planId;
+ if (isset($this->startTime)) {
+ $json['start_time'] = $this->startTime;
+ }
+ if (isset($this->quantity)) {
+ $json['quantity'] = $this->quantity;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->subscriber)) {
+ $json['subscriber'] = $this->subscriber;
+ }
+ if (isset($this->autoRenewal)) {
+ $json['auto_renewal'] = $this->autoRenewal;
+ }
+ if (isset($this->applicationContext)) {
+ $json['application_context'] = $this->applicationContext;
+ }
+ if (isset($this->customId)) {
+ $json['custom_id'] = $this->customId;
+ }
+ if (isset($this->plan)) {
+ $json['plan'] = $this->plan;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/CycleExecution.php b/src/Models/CycleExecution.php
new file mode 100644
index 0000000..6ab9a47
--- /dev/null
+++ b/src/Models/CycleExecution.php
@@ -0,0 +1,241 @@
+tenureType = $tenureType;
+ $this->sequence = $sequence;
+ $this->cyclesCompleted = $cyclesCompleted;
+ }
+
+ /**
+ * Returns Tenure Type.
+ * The type of the billing cycle.
+ */
+ public function getTenureType(): string
+ {
+ return $this->tenureType;
+ }
+
+ /**
+ * Sets Tenure Type.
+ * The type of the billing cycle.
+ *
+ * @required
+ * @maps tenure_type
+ */
+ public function setTenureType(string $tenureType): void
+ {
+ $this->tenureType = $tenureType;
+ }
+
+ /**
+ * Returns Sequence.
+ * The order in which to run this cycle among other billing cycles.
+ */
+ public function getSequence(): int
+ {
+ return $this->sequence;
+ }
+
+ /**
+ * Sets Sequence.
+ * The order in which to run this cycle among other billing cycles.
+ *
+ * @required
+ * @maps sequence
+ */
+ public function setSequence(int $sequence): void
+ {
+ $this->sequence = $sequence;
+ }
+
+ /**
+ * Returns Cycles Completed.
+ * The number of billing cycles that have completed.
+ */
+ public function getCyclesCompleted(): int
+ {
+ return $this->cyclesCompleted;
+ }
+
+ /**
+ * Sets Cycles Completed.
+ * The number of billing cycles that have completed.
+ *
+ * @required
+ * @maps cycles_completed
+ */
+ public function setCyclesCompleted(int $cyclesCompleted): void
+ {
+ $this->cyclesCompleted = $cyclesCompleted;
+ }
+
+ /**
+ * Returns Cycles Remaining.
+ * For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite
+ * billing cycle, cycles_remaining is set as 0.
+ */
+ public function getCyclesRemaining(): ?int
+ {
+ return $this->cyclesRemaining;
+ }
+
+ /**
+ * Sets Cycles Remaining.
+ * For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite
+ * billing cycle, cycles_remaining is set as 0.
+ *
+ * @maps cycles_remaining
+ */
+ public function setCyclesRemaining(?int $cyclesRemaining): void
+ {
+ $this->cyclesRemaining = $cyclesRemaining;
+ }
+
+ /**
+ * Returns Current Pricing Scheme Version.
+ * The active pricing scheme version for the billing cycle.
+ */
+ public function getCurrentPricingSchemeVersion(): ?int
+ {
+ return $this->currentPricingSchemeVersion;
+ }
+
+ /**
+ * Sets Current Pricing Scheme Version.
+ * The active pricing scheme version for the billing cycle.
+ *
+ * @maps current_pricing_scheme_version
+ */
+ public function setCurrentPricingSchemeVersion(?int $currentPricingSchemeVersion): void
+ {
+ $this->currentPricingSchemeVersion = $currentPricingSchemeVersion;
+ }
+
+ /**
+ * Returns Total Cycles.
+ * 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).
+ */
+ public function getTotalCycles(): ?int
+ {
+ return $this->totalCycles;
+ }
+
+ /**
+ * Sets Total Cycles.
+ * 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).
+ *
+ * @maps total_cycles
+ */
+ public function setTotalCycles(?int $totalCycles): void
+ {
+ $this->totalCycles = $totalCycles;
+ }
+
+ /**
+ * Converts the CycleExecution object to a human-readable string representation.
+ *
+ * @return string The string representation of the CycleExecution object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'CycleExecution',
+ [
+ 'tenureType' => $this->tenureType,
+ 'sequence' => $this->sequence,
+ 'cyclesCompleted' => $this->cyclesCompleted,
+ 'cyclesRemaining' => $this->cyclesRemaining,
+ 'currentPricingSchemeVersion' => $this->currentPricingSchemeVersion,
+ 'totalCycles' => $this->totalCycles
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['tenure_type'] = $this->tenureType;
+ $json['sequence'] = $this->sequence;
+ $json['cycles_completed'] = $this->cyclesCompleted;
+ if (isset($this->cyclesRemaining)) {
+ $json['cycles_remaining'] = $this->cyclesRemaining;
+ }
+ if (isset($this->currentPricingSchemeVersion)) {
+ $json['current_pricing_scheme_version'] = $this->currentPricingSchemeVersion;
+ }
+ if (isset($this->totalCycles)) {
+ $json['total_cycles'] = $this->totalCycles;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ExperienceContext.php b/src/Models/ExperienceContext.php
index aa8fbfa..14d9fac 100644
--- a/src/Models/ExperienceContext.php
+++ b/src/Models/ExperienceContext.php
@@ -31,7 +31,7 @@ class ExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $shippingPreference = ShippingPreference::GET_FROM_FILE;
+ private $shippingPreference = ExperienceContextShippingPreference::GET_FROM_FILE;
/**
* @var string|null
diff --git a/src/Models/ExperienceContextShippingPreference.php b/src/Models/ExperienceContextShippingPreference.php
new file mode 100644
index 0000000..58029c3
--- /dev/null
+++ b/src/Models/ExperienceContextShippingPreference.php
@@ -0,0 +1,35 @@
+amount = $amount;
+ $this->time = $time;
+ }
+
+ /**
+ * Returns Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAmount(): Money
+ {
+ return $this->amount;
+ }
+
+ /**
+ * Sets Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps amount
+ */
+ public function setAmount(Money $amount): void
+ {
+ $this->amount = $amount;
+ }
+
+ /**
+ * Returns Time.
+ * 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.
+ */
+ public function getTime(): string
+ {
+ return $this->time;
+ }
+
+ /**
+ * Sets Time.
+ * 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.
+ *
+ * @required
+ * @maps time
+ */
+ public function setTime(string $time): void
+ {
+ $this->time = $time;
+ }
+
+ /**
+ * Returns Reason Code.
+ * The reason code for the payment failure.
+ */
+ public function getReasonCode(): ?string
+ {
+ return $this->reasonCode;
+ }
+
+ /**
+ * Sets Reason Code.
+ * The reason code for the payment failure.
+ *
+ * @maps reason_code
+ */
+ public function setReasonCode(?string $reasonCode): void
+ {
+ $this->reasonCode = $reasonCode;
+ }
+
+ /**
+ * Returns Next Payment Retry Time.
+ * 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.
+ */
+ public function getNextPaymentRetryTime(): ?string
+ {
+ return $this->nextPaymentRetryTime;
+ }
+
+ /**
+ * Sets Next Payment Retry Time.
+ * 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.
+ *
+ * @maps next_payment_retry_time
+ */
+ public function setNextPaymentRetryTime(?string $nextPaymentRetryTime): void
+ {
+ $this->nextPaymentRetryTime = $nextPaymentRetryTime;
+ }
+
+ /**
+ * Converts the FailedPaymentDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the FailedPaymentDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'FailedPaymentDetails',
+ [
+ 'amount' => $this->amount,
+ 'time' => $this->time,
+ 'reasonCode' => $this->reasonCode,
+ 'nextPaymentRetryTime' => $this->nextPaymentRetryTime
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['amount'] = $this->amount;
+ $json['time'] = $this->time;
+ if (isset($this->reasonCode)) {
+ $json['reason_code'] = $this->reasonCode;
+ }
+ if (isset($this->nextPaymentRetryTime)) {
+ $json['next_payment_retry_time'] = $this->nextPaymentRetryTime;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/Frequency.php b/src/Models/Frequency.php
new file mode 100644
index 0000000..8cd2b2f
--- /dev/null
+++ b/src/Models/Frequency.php
@@ -0,0 +1,118 @@
+intervalUnit = $intervalUnit;
+ }
+
+ /**
+ * Returns Interval Unit.
+ * The interval at which the subscription is charged or billed.
+ */
+ public function getIntervalUnit(): string
+ {
+ return $this->intervalUnit;
+ }
+
+ /**
+ * Sets Interval Unit.
+ * The interval at which the subscription is charged or billed.
+ *
+ * @required
+ * @maps interval_unit
+ */
+ public function setIntervalUnit(string $intervalUnit): void
+ {
+ $this->intervalUnit = $intervalUnit;
+ }
+
+ /**
+ * Returns Interval Count.
+ * 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
+ */
+ public function getIntervalCount(): ?int
+ {
+ return $this->intervalCount;
+ }
+
+ /**
+ * Sets Interval Count.
+ * 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
+ *
+ * @maps interval_count
+ */
+ public function setIntervalCount(?int $intervalCount): void
+ {
+ $this->intervalCount = $intervalCount;
+ }
+
+ /**
+ * Converts the Frequency object to a human-readable string representation.
+ *
+ * @return string The string representation of the Frequency object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'Frequency',
+ ['intervalUnit' => $this->intervalUnit, 'intervalCount' => $this->intervalCount]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['interval_unit'] = $this->intervalUnit;
+ if (isset($this->intervalCount)) {
+ $json['interval_count'] = $this->intervalCount;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/IncentiveDetails.php b/src/Models/IncentiveDetails.php
new file mode 100644
index 0000000..fc57398
--- /dev/null
+++ b/src/Models/IncentiveDetails.php
@@ -0,0 +1,166 @@
+incentiveType;
+ }
+
+ /**
+ * Sets Incentive Type.
+ * The type of incentive, such as a special offer or coupon.
+ *
+ * @maps incentive_type
+ */
+ public function setIncentiveType(?string $incentiveType): void
+ {
+ $this->incentiveType = $incentiveType;
+ }
+
+ /**
+ * Returns Incentive Code.
+ * The code that identifies an incentive, such as a coupon.
+ */
+ public function getIncentiveCode(): ?string
+ {
+ return $this->incentiveCode;
+ }
+
+ /**
+ * Sets Incentive Code.
+ * The code that identifies an incentive, such as a coupon.
+ *
+ * @maps incentive_code
+ */
+ public function setIncentiveCode(?string $incentiveCode): void
+ {
+ $this->incentiveCode = $incentiveCode;
+ }
+
+ /**
+ * Returns Incentive Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getIncentiveAmount(): ?Money
+ {
+ return $this->incentiveAmount;
+ }
+
+ /**
+ * Sets Incentive Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps incentive_amount
+ */
+ public function setIncentiveAmount(?Money $incentiveAmount): void
+ {
+ $this->incentiveAmount = $incentiveAmount;
+ }
+
+ /**
+ * Returns Incentive Program Code.
+ * The incentive program code that identifies a merchant loyalty or incentive program.
+ */
+ public function getIncentiveProgramCode(): ?string
+ {
+ return $this->incentiveProgramCode;
+ }
+
+ /**
+ * Sets Incentive Program Code.
+ * The incentive program code that identifies a merchant loyalty or incentive program.
+ *
+ * @maps incentive_program_code
+ */
+ public function setIncentiveProgramCode(?string $incentiveProgramCode): void
+ {
+ $this->incentiveProgramCode = $incentiveProgramCode;
+ }
+
+ /**
+ * Converts the IncentiveDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the IncentiveDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'IncentiveDetails',
+ [
+ 'incentiveType' => $this->incentiveType,
+ 'incentiveCode' => $this->incentiveCode,
+ 'incentiveAmount' => $this->incentiveAmount,
+ 'incentiveProgramCode' => $this->incentiveProgramCode
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->incentiveType)) {
+ $json['incentive_type'] = $this->incentiveType;
+ }
+ if (isset($this->incentiveCode)) {
+ $json['incentive_code'] = $this->incentiveCode;
+ }
+ if (isset($this->incentiveAmount)) {
+ $json['incentive_amount'] = $this->incentiveAmount;
+ }
+ if (isset($this->incentiveProgramCode)) {
+ $json['incentive_program_code'] = $this->incentiveProgramCode;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/IncentiveInformation.php b/src/Models/IncentiveInformation.php
new file mode 100644
index 0000000..ea78c27
--- /dev/null
+++ b/src/Models/IncentiveInformation.php
@@ -0,0 +1,78 @@
+incentiveDetails;
+ }
+
+ /**
+ * Sets Incentive Details.
+ * An array of incentive details.
+ *
+ * @maps incentive_details
+ *
+ * @param IncentiveDetails[]|null $incentiveDetails
+ */
+ public function setIncentiveDetails(?array $incentiveDetails): void
+ {
+ $this->incentiveDetails = $incentiveDetails;
+ }
+
+ /**
+ * Converts the IncentiveInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the IncentiveInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('IncentiveInformation', ['incentiveDetails' => $this->incentiveDetails]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->incentiveDetails)) {
+ $json['incentive_details'] = $this->incentiveDetails;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/IntervalUnit.php b/src/Models/IntervalUnit.php
new file mode 100644
index 0000000..fb4edca
--- /dev/null
+++ b/src/Models/IntervalUnit.php
@@ -0,0 +1,37 @@
+itemCode;
+ }
+
+ /**
+ * Sets Item Code.
+ * An item code that identifies a merchant's goods or service.
+ *
+ * @maps item_code
+ */
+ public function setItemCode(?string $itemCode): void
+ {
+ $this->itemCode = $itemCode;
+ }
+
+ /**
+ * Returns Item Name.
+ * The item name.
+ */
+ public function getItemName(): ?string
+ {
+ return $this->itemName;
+ }
+
+ /**
+ * Sets Item Name.
+ * The item name.
+ *
+ * @maps item_name
+ */
+ public function setItemName(?string $itemName): void
+ {
+ $this->itemName = $itemName;
+ }
+
+ /**
+ * Returns Item Description.
+ * The item description.
+ */
+ public function getItemDescription(): ?string
+ {
+ return $this->itemDescription;
+ }
+
+ /**
+ * Sets Item Description.
+ * The item description.
+ *
+ * @maps item_description
+ */
+ public function setItemDescription(?string $itemDescription): void
+ {
+ $this->itemDescription = $itemDescription;
+ }
+
+ /**
+ * Returns Item Options.
+ * The item options. Describes option choices on the purchase of the item in some detail.
+ */
+ public function getItemOptions(): ?string
+ {
+ return $this->itemOptions;
+ }
+
+ /**
+ * Sets Item Options.
+ * The item options. Describes option choices on the purchase of the item in some detail.
+ *
+ * @maps item_options
+ */
+ public function setItemOptions(?string $itemOptions): void
+ {
+ $this->itemOptions = $itemOptions;
+ }
+
+ /**
+ * Returns Item Quantity.
+ * The number of purchased units of goods or a service.
+ */
+ public function getItemQuantity(): ?string
+ {
+ return $this->itemQuantity;
+ }
+
+ /**
+ * Sets Item Quantity.
+ * The number of purchased units of goods or a service.
+ *
+ * @maps item_quantity
+ */
+ public function setItemQuantity(?string $itemQuantity): void
+ {
+ $this->itemQuantity = $itemQuantity;
+ }
+
+ /**
+ * Returns Item Unit Price.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getItemUnitPrice(): ?Money
+ {
+ return $this->itemUnitPrice;
+ }
+
+ /**
+ * Sets Item Unit Price.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps item_unit_price
+ */
+ public function setItemUnitPrice(?Money $itemUnitPrice): void
+ {
+ $this->itemUnitPrice = $itemUnitPrice;
+ }
+
+ /**
+ * Returns Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getItemAmount(): ?Money
+ {
+ return $this->itemAmount;
+ }
+
+ /**
+ * Sets Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps item_amount
+ */
+ public function setItemAmount(?Money $itemAmount): void
+ {
+ $this->itemAmount = $itemAmount;
+ }
+
+ /**
+ * Returns Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getDiscountAmount(): ?Money
+ {
+ return $this->discountAmount;
+ }
+
+ /**
+ * Sets Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps discount_amount
+ */
+ public function setDiscountAmount(?Money $discountAmount): void
+ {
+ $this->discountAmount = $discountAmount;
+ }
+
+ /**
+ * Returns Adjustment Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAdjustmentAmount(): ?Money
+ {
+ return $this->adjustmentAmount;
+ }
+
+ /**
+ * Sets Adjustment Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps adjustment_amount
+ */
+ public function setAdjustmentAmount(?Money $adjustmentAmount): void
+ {
+ $this->adjustmentAmount = $adjustmentAmount;
+ }
+
+ /**
+ * Returns Gift Wrap Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getGiftWrapAmount(): ?Money
+ {
+ return $this->giftWrapAmount;
+ }
+
+ /**
+ * Sets Gift Wrap Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps gift_wrap_amount
+ */
+ public function setGiftWrapAmount(?Money $giftWrapAmount): void
+ {
+ $this->giftWrapAmount = $giftWrapAmount;
+ }
+
+ /**
+ * Returns Tax Percentage.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ */
+ public function getTaxPercentage(): ?string
+ {
+ return $this->taxPercentage;
+ }
+
+ /**
+ * Sets Tax Percentage.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ *
+ * @maps tax_percentage
+ */
+ public function setTaxPercentage(?string $taxPercentage): void
+ {
+ $this->taxPercentage = $taxPercentage;
+ }
+
+ /**
+ * Returns Tax Amounts.
+ * An array of tax amounts levied by a government on the purchase of goods or services.
+ *
+ * @return TaxAmount[]|null
+ */
+ public function getTaxAmounts(): ?array
+ {
+ return $this->taxAmounts;
+ }
+
+ /**
+ * Sets Tax Amounts.
+ * An array of tax amounts levied by a government on the purchase of goods or services.
+ *
+ * @maps tax_amounts
+ *
+ * @param TaxAmount[]|null $taxAmounts
+ */
+ public function setTaxAmounts(?array $taxAmounts): void
+ {
+ $this->taxAmounts = $taxAmounts;
+ }
+
+ /**
+ * Returns Basic Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getBasicShippingAmount(): ?Money
+ {
+ return $this->basicShippingAmount;
+ }
+
+ /**
+ * Sets Basic Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps basic_shipping_amount
+ */
+ public function setBasicShippingAmount(?Money $basicShippingAmount): void
+ {
+ $this->basicShippingAmount = $basicShippingAmount;
+ }
+
+ /**
+ * Returns Extra Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getExtraShippingAmount(): ?Money
+ {
+ return $this->extraShippingAmount;
+ }
+
+ /**
+ * Sets Extra Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps extra_shipping_amount
+ */
+ public function setExtraShippingAmount(?Money $extraShippingAmount): void
+ {
+ $this->extraShippingAmount = $extraShippingAmount;
+ }
+
+ /**
+ * Returns Handling Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getHandlingAmount(): ?Money
+ {
+ return $this->handlingAmount;
+ }
+
+ /**
+ * Sets Handling Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps handling_amount
+ */
+ public function setHandlingAmount(?Money $handlingAmount): void
+ {
+ $this->handlingAmount = $handlingAmount;
+ }
+
+ /**
+ * Returns Insurance Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getInsuranceAmount(): ?Money
+ {
+ return $this->insuranceAmount;
+ }
+
+ /**
+ * Sets Insurance Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps insurance_amount
+ */
+ public function setInsuranceAmount(?Money $insuranceAmount): void
+ {
+ $this->insuranceAmount = $insuranceAmount;
+ }
+
+ /**
+ * Returns Total Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTotalItemAmount(): ?Money
+ {
+ return $this->totalItemAmount;
+ }
+
+ /**
+ * Sets Total Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps total_item_amount
+ */
+ public function setTotalItemAmount(?Money $totalItemAmount): void
+ {
+ $this->totalItemAmount = $totalItemAmount;
+ }
+
+ /**
+ * Returns Invoice Number.
+ * The invoice number. An alphanumeric string that identifies a billing for a merchant.
+ */
+ public function getInvoiceNumber(): ?string
+ {
+ return $this->invoiceNumber;
+ }
+
+ /**
+ * Sets Invoice Number.
+ * The invoice number. An alphanumeric string that identifies a billing for a merchant.
+ *
+ * @maps invoice_number
+ */
+ public function setInvoiceNumber(?string $invoiceNumber): void
+ {
+ $this->invoiceNumber = $invoiceNumber;
+ }
+
+ /**
+ * Returns Checkout Options.
+ * An array of checkout options. Each option has a name and value.
+ *
+ * @return CheckoutOption[]|null
+ */
+ public function getCheckoutOptions(): ?array
+ {
+ return $this->checkoutOptions;
+ }
+
+ /**
+ * Sets Checkout Options.
+ * An array of checkout options. Each option has a name and value.
+ *
+ * @maps checkout_options
+ *
+ * @param CheckoutOption[]|null $checkoutOptions
+ */
+ public function setCheckoutOptions(?array $checkoutOptions): void
+ {
+ $this->checkoutOptions = $checkoutOptions;
+ }
+
+ /**
+ * Converts the ItemDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the ItemDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ItemDetails',
+ [
+ 'itemCode' => $this->itemCode,
+ 'itemName' => $this->itemName,
+ 'itemDescription' => $this->itemDescription,
+ 'itemOptions' => $this->itemOptions,
+ 'itemQuantity' => $this->itemQuantity,
+ 'itemUnitPrice' => $this->itemUnitPrice,
+ 'itemAmount' => $this->itemAmount,
+ 'discountAmount' => $this->discountAmount,
+ 'adjustmentAmount' => $this->adjustmentAmount,
+ 'giftWrapAmount' => $this->giftWrapAmount,
+ 'taxPercentage' => $this->taxPercentage,
+ 'taxAmounts' => $this->taxAmounts,
+ 'basicShippingAmount' => $this->basicShippingAmount,
+ 'extraShippingAmount' => $this->extraShippingAmount,
+ 'handlingAmount' => $this->handlingAmount,
+ 'insuranceAmount' => $this->insuranceAmount,
+ 'totalItemAmount' => $this->totalItemAmount,
+ 'invoiceNumber' => $this->invoiceNumber,
+ 'checkoutOptions' => $this->checkoutOptions
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->itemCode)) {
+ $json['item_code'] = $this->itemCode;
+ }
+ if (isset($this->itemName)) {
+ $json['item_name'] = $this->itemName;
+ }
+ if (isset($this->itemDescription)) {
+ $json['item_description'] = $this->itemDescription;
+ }
+ if (isset($this->itemOptions)) {
+ $json['item_options'] = $this->itemOptions;
+ }
+ if (isset($this->itemQuantity)) {
+ $json['item_quantity'] = $this->itemQuantity;
+ }
+ if (isset($this->itemUnitPrice)) {
+ $json['item_unit_price'] = $this->itemUnitPrice;
+ }
+ if (isset($this->itemAmount)) {
+ $json['item_amount'] = $this->itemAmount;
+ }
+ if (isset($this->discountAmount)) {
+ $json['discount_amount'] = $this->discountAmount;
+ }
+ if (isset($this->adjustmentAmount)) {
+ $json['adjustment_amount'] = $this->adjustmentAmount;
+ }
+ if (isset($this->giftWrapAmount)) {
+ $json['gift_wrap_amount'] = $this->giftWrapAmount;
+ }
+ if (isset($this->taxPercentage)) {
+ $json['tax_percentage'] = $this->taxPercentage;
+ }
+ if (isset($this->taxAmounts)) {
+ $json['tax_amounts'] = $this->taxAmounts;
+ }
+ if (isset($this->basicShippingAmount)) {
+ $json['basic_shipping_amount'] = $this->basicShippingAmount;
+ }
+ if (isset($this->extraShippingAmount)) {
+ $json['extra_shipping_amount'] = $this->extraShippingAmount;
+ }
+ if (isset($this->handlingAmount)) {
+ $json['handling_amount'] = $this->handlingAmount;
+ }
+ if (isset($this->insuranceAmount)) {
+ $json['insurance_amount'] = $this->insuranceAmount;
+ }
+ if (isset($this->totalItemAmount)) {
+ $json['total_item_amount'] = $this->totalItemAmount;
+ }
+ if (isset($this->invoiceNumber)) {
+ $json['invoice_number'] = $this->invoiceNumber;
+ }
+ if (isset($this->checkoutOptions)) {
+ $json['checkout_options'] = $this->checkoutOptions;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ItemRequest.php b/src/Models/ItemRequest.php
new file mode 100644
index 0000000..d92eea1
--- /dev/null
+++ b/src/Models/ItemRequest.php
@@ -0,0 +1,386 @@
+name = $name;
+ $this->unitAmount = $unitAmount;
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Name.
+ * The item name or title.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The item name or title.
+ *
+ * @required
+ * @maps name
+ */
+ public function setName(string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Unit Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getUnitAmount(): Money
+ {
+ return $this->unitAmount;
+ }
+
+ /**
+ * Sets Unit Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps unit_amount
+ */
+ public function setUnitAmount(Money $unitAmount): void
+ {
+ $this->unitAmount = $unitAmount;
+ }
+
+ /**
+ * Returns Tax.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTax(): ?Money
+ {
+ return $this->tax;
+ }
+
+ /**
+ * Sets Tax.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps tax
+ */
+ public function setTax(?Money $tax): void
+ {
+ $this->tax = $tax;
+ }
+
+ /**
+ * Returns Quantity.
+ * The item quantity. Must be a whole number.
+ */
+ public function getQuantity(): string
+ {
+ return $this->quantity;
+ }
+
+ /**
+ * Sets Quantity.
+ * The item quantity. Must be a whole number.
+ *
+ * @required
+ * @maps quantity
+ */
+ public function setQuantity(string $quantity): void
+ {
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Description.
+ * 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.
+ */
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ /**
+ * Sets Description.
+ * 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.
+ *
+ * @maps description
+ */
+ public function setDescription(?string $description): void
+ {
+ $this->description = $description;
+ }
+
+ /**
+ * Returns Sku.
+ * The stock keeping unit (SKU) for the item.
+ */
+ public function getSku(): ?string
+ {
+ return $this->sku;
+ }
+
+ /**
+ * Sets Sku.
+ * The stock keeping unit (SKU) for the item.
+ *
+ * @maps sku
+ */
+ public function setSku(?string $sku): void
+ {
+ $this->sku = $sku;
+ }
+
+ /**
+ * Returns Url.
+ * The URL to the item being purchased. Visible to buyer and used in buyer experiences.
+ */
+ public function getUrl(): ?string
+ {
+ return $this->url;
+ }
+
+ /**
+ * Sets Url.
+ * The URL to the item being purchased. Visible to buyer and used in buyer experiences.
+ *
+ * @maps url
+ */
+ public function setUrl(?string $url): void
+ {
+ $this->url = $url;
+ }
+
+ /**
+ * Returns Category.
+ * The item category type.
+ */
+ public function getCategory(): ?string
+ {
+ return $this->category;
+ }
+
+ /**
+ * Sets Category.
+ * The item category type.
+ *
+ * @maps category
+ */
+ public function setCategory(?string $category): void
+ {
+ $this->category = $category;
+ }
+
+ /**
+ * Returns Image Url.
+ * The URL of the item's image. File type and size restrictions apply. An image that violates these
+ * restrictions will not be honored.
+ */
+ public function getImageUrl(): ?string
+ {
+ return $this->imageUrl;
+ }
+
+ /**
+ * Sets Image Url.
+ * The URL of the item's image. File type and size restrictions apply. An image that violates these
+ * restrictions will not be honored.
+ *
+ * @maps image_url
+ */
+ public function setImageUrl(?string $imageUrl): void
+ {
+ $this->imageUrl = $imageUrl;
+ }
+
+ /**
+ * Returns Upc.
+ * The Universal Product Code of the item.
+ */
+ public function getUpc(): ?UniversalProductCode
+ {
+ return $this->upc;
+ }
+
+ /**
+ * Sets Upc.
+ * The Universal Product Code of the item.
+ *
+ * @maps upc
+ */
+ public function setUpc(?UniversalProductCode $upc): void
+ {
+ $this->upc = $upc;
+ }
+
+ /**
+ * Returns Billing Plan.
+ * Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method
+ * token or billing agreement creation.
+ */
+ public function getBillingPlan(): ?OrderBillingPlan
+ {
+ return $this->billingPlan;
+ }
+
+ /**
+ * Sets Billing Plan.
+ * Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method
+ * token or billing agreement creation.
+ *
+ * @maps billing_plan
+ */
+ public function setBillingPlan(?OrderBillingPlan $billingPlan): void
+ {
+ $this->billingPlan = $billingPlan;
+ }
+
+ /**
+ * Converts the ItemRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the ItemRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ItemRequest',
+ [
+ 'name' => $this->name,
+ 'unitAmount' => $this->unitAmount,
+ 'tax' => $this->tax,
+ 'quantity' => $this->quantity,
+ 'description' => $this->description,
+ 'sku' => $this->sku,
+ 'url' => $this->url,
+ 'category' => $this->category,
+ 'imageUrl' => $this->imageUrl,
+ 'upc' => $this->upc,
+ 'billingPlan' => $this->billingPlan
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['name'] = $this->name;
+ $json['unit_amount'] = $this->unitAmount;
+ if (isset($this->tax)) {
+ $json['tax'] = $this->tax;
+ }
+ $json['quantity'] = $this->quantity;
+ if (isset($this->description)) {
+ $json['description'] = $this->description;
+ }
+ if (isset($this->sku)) {
+ $json['sku'] = $this->sku;
+ }
+ if (isset($this->url)) {
+ $json['url'] = $this->url;
+ }
+ if (isset($this->category)) {
+ $json['category'] = $this->category;
+ }
+ if (isset($this->imageUrl)) {
+ $json['image_url'] = $this->imageUrl;
+ }
+ if (isset($this->upc)) {
+ $json['upc'] = $this->upc;
+ }
+ if (isset($this->billingPlan)) {
+ $json['billing_plan'] = $this->billingPlan;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/LastPaymentDetails.php b/src/Models/LastPaymentDetails.php
new file mode 100644
index 0000000..364ff3e
--- /dev/null
+++ b/src/Models/LastPaymentDetails.php
@@ -0,0 +1,103 @@
+amount;
+ }
+
+ /**
+ * Sets Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps amount
+ */
+ public function setAmount(?Money $amount): void
+ {
+ $this->amount = $amount;
+ }
+
+ /**
+ * Returns Time.
+ * 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.
+ */
+ public function getTime(): ?string
+ {
+ return $this->time;
+ }
+
+ /**
+ * Sets Time.
+ * 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.
+ *
+ * @maps time
+ */
+ public function setTime(?string $time): void
+ {
+ $this->time = $time;
+ }
+
+ /**
+ * Converts the LastPaymentDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the LastPaymentDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('LastPaymentDetails', ['amount' => $this->amount, 'time' => $this->time]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->amount)) {
+ $json['amount'] = $this->amount;
+ }
+ if (isset($this->time)) {
+ $json['time'] = $this->time;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/LinkHttpMethod.php b/src/Models/LinkHttpMethod.php
index c8c6f7a..fb384f4 100644
--- a/src/Models/LinkHttpMethod.php
+++ b/src/Models/LinkHttpMethod.php
@@ -15,19 +15,43 @@ namespace PaypalServerSdkLib\Models;
*/
class LinkHttpMethod
{
+ /**
+ * The HTTP GET method.
+ */
public const GET = 'GET';
+ /**
+ * The HTTP POST method.
+ */
public const POST = 'POST';
+ /**
+ * The HTTP PUT method.
+ */
public const PUT = 'PUT';
+ /**
+ * The HTTP DELETE method.
+ */
public const DELETE = 'DELETE';
+ /**
+ * The HTTP HEAD method.
+ */
public const HEAD = 'HEAD';
+ /**
+ * The HTTP CONNECT method.
+ */
public const CONNECT = 'CONNECT';
+ /**
+ * The HTTP OPTIONS method.
+ */
public const OPTIONS = 'OPTIONS';
+ /**
+ * The HTTP PATCH method.
+ */
public const PATCH = 'PATCH';
}
diff --git a/src/Models/MerchantPreferences.php b/src/Models/MerchantPreferences.php
new file mode 100644
index 0000000..7a3554a
--- /dev/null
+++ b/src/Models/MerchantPreferences.php
@@ -0,0 +1,105 @@
+returnUrl;
+ }
+
+ /**
+ * Sets Return Url.
+ * The URL where the customer is redirected after the customer approves the payment.
+ *
+ * @maps return_url
+ */
+ public function setReturnUrl(?string $returnUrl): void
+ {
+ $this->returnUrl = $returnUrl;
+ }
+
+ /**
+ * Returns Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ */
+ public function getCancelUrl(): ?string
+ {
+ return $this->cancelUrl;
+ }
+
+ /**
+ * Sets Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ *
+ * @maps cancel_url
+ */
+ public function setCancelUrl(?string $cancelUrl): void
+ {
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Converts the MerchantPreferences object to a human-readable string representation.
+ *
+ * @return string The string representation of the MerchantPreferences object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'MerchantPreferences',
+ ['returnUrl' => $this->returnUrl, 'cancelUrl' => $this->cancelUrl]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->returnUrl)) {
+ $json['return_url'] = $this->returnUrl;
+ }
+ if (isset($this->cancelUrl)) {
+ $json['cancel_url'] = $this->cancelUrl;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/MobileReturnFlow.php b/src/Models/MobileReturnFlow.php
new file mode 100644
index 0000000..1a09999
--- /dev/null
+++ b/src/Models/MobileReturnFlow.php
@@ -0,0 +1,31 @@
+returnFlow;
+ }
+
+ /**
+ * Sets Return Flow.
+ * Merchant preference on how the buyer can navigate back to merchant website post approving the
+ * transaction on the PayPal App.
+ *
+ * @maps return_flow
+ */
+ public function setReturnFlow(?string $returnFlow): void
+ {
+ $this->returnFlow = $returnFlow;
+ }
+
+ /**
+ * Returns Buyer User Agent.
+ * 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.
+ */
+ public function getBuyerUserAgent(): ?string
+ {
+ return $this->buyerUserAgent;
+ }
+
+ /**
+ * Sets Buyer User Agent.
+ * 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.
+ *
+ * @maps buyer_user_agent
+ */
+ public function setBuyerUserAgent(?string $buyerUserAgent): void
+ {
+ $this->buyerUserAgent = $buyerUserAgent;
+ }
+
+ /**
+ * Converts the MobileWebContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the MobileWebContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'MobileWebContext',
+ ['returnFlow' => $this->returnFlow, 'buyerUserAgent' => $this->buyerUserAgent]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->returnFlow)) {
+ $json['return_flow'] = $this->returnFlow;
+ }
+ if (isset($this->buyerUserAgent)) {
+ $json['buyer_user_agent'] = $this->buyerUserAgent;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ModifySubscriptionRequest.php b/src/Models/ModifySubscriptionRequest.php
new file mode 100644
index 0000000..87168e6
--- /dev/null
+++ b/src/Models/ModifySubscriptionRequest.php
@@ -0,0 +1,230 @@
+planId;
+ }
+
+ /**
+ * Sets Plan Id.
+ * The unique PayPal-generated ID for the plan.
+ *
+ * @maps plan_id
+ */
+ public function setPlanId(?string $planId): void
+ {
+ $this->planId = $planId;
+ }
+
+ /**
+ * Returns Quantity.
+ * The quantity of the product or service in the subscription.
+ */
+ public function getQuantity(): ?string
+ {
+ return $this->quantity;
+ }
+
+ /**
+ * Sets Quantity.
+ * The quantity of the product or service in the subscription.
+ *
+ * @maps quantity
+ */
+ public function setQuantity(?string $quantity): void
+ {
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Shipping Address.
+ * The shipping details.
+ */
+ public function getShippingAddress(): ?ShippingDetails
+ {
+ return $this->shippingAddress;
+ }
+
+ /**
+ * Sets Shipping Address.
+ * The shipping details.
+ *
+ * @maps shipping_address
+ */
+ public function setShippingAddress(?ShippingDetails $shippingAddress): void
+ {
+ $this->shippingAddress = $shippingAddress;
+ }
+
+ /**
+ * Returns Application Context.
+ * The application context, which customizes the payer experience during the subscription approval
+ * process with PayPal.
+ */
+ public function getApplicationContext(): ?SubscriptionPatchApplicationContext
+ {
+ return $this->applicationContext;
+ }
+
+ /**
+ * Sets Application Context.
+ * The application context, which customizes the payer experience during the subscription approval
+ * process with PayPal.
+ *
+ * @maps application_context
+ */
+ public function setApplicationContext(?SubscriptionPatchApplicationContext $applicationContext): void
+ {
+ $this->applicationContext = $applicationContext;
+ }
+
+ /**
+ * Returns Plan.
+ * 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.
+ */
+ public function getPlan(): ?PlanOverride
+ {
+ return $this->plan;
+ }
+
+ /**
+ * Sets Plan.
+ * 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.
+ *
+ * @maps plan
+ */
+ public function setPlan(?PlanOverride $plan): void
+ {
+ $this->plan = $plan;
+ }
+
+ /**
+ * Converts the ModifySubscriptionRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the ModifySubscriptionRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ModifySubscriptionRequest',
+ [
+ 'planId' => $this->planId,
+ 'quantity' => $this->quantity,
+ 'shippingAmount' => $this->shippingAmount,
+ 'shippingAddress' => $this->shippingAddress,
+ 'applicationContext' => $this->applicationContext,
+ 'plan' => $this->plan
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->planId)) {
+ $json['plan_id'] = $this->planId;
+ }
+ if (isset($this->quantity)) {
+ $json['quantity'] = $this->quantity;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->shippingAddress)) {
+ $json['shipping_address'] = $this->shippingAddress;
+ }
+ if (isset($this->applicationContext)) {
+ $json['application_context'] = $this->applicationContext;
+ }
+ if (isset($this->plan)) {
+ $json['plan'] = $this->plan;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ModifySubscriptionResponse.php b/src/Models/ModifySubscriptionResponse.php
new file mode 100644
index 0000000..18a3690
--- /dev/null
+++ b/src/Models/ModifySubscriptionResponse.php
@@ -0,0 +1,261 @@
+planId;
+ }
+
+ /**
+ * Sets Plan Id.
+ * The unique PayPal-generated ID for the plan.
+ *
+ * @maps plan_id
+ */
+ public function setPlanId(?string $planId): void
+ {
+ $this->planId = $planId;
+ }
+
+ /**
+ * Returns Quantity.
+ * The quantity of the product or service in the subscription.
+ */
+ public function getQuantity(): ?string
+ {
+ return $this->quantity;
+ }
+
+ /**
+ * Sets Quantity.
+ * The quantity of the product or service in the subscription.
+ *
+ * @maps quantity
+ */
+ public function setQuantity(?string $quantity): void
+ {
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Shipping Address.
+ * The shipping details.
+ */
+ public function getShippingAddress(): ?ShippingDetails
+ {
+ return $this->shippingAddress;
+ }
+
+ /**
+ * Sets Shipping Address.
+ * The shipping details.
+ *
+ * @maps shipping_address
+ */
+ public function setShippingAddress(?ShippingDetails $shippingAddress): void
+ {
+ $this->shippingAddress = $shippingAddress;
+ }
+
+ /**
+ * Returns Plan.
+ * 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.
+ */
+ public function getPlan(): ?PlanOverride
+ {
+ return $this->plan;
+ }
+
+ /**
+ * Sets Plan.
+ * 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.
+ *
+ * @maps plan
+ */
+ public function setPlan(?PlanOverride $plan): void
+ {
+ $this->plan = $plan;
+ }
+
+ /**
+ * Returns Plan Overridden.
+ * Indicates whether the subscription has overridden any plan attributes.
+ */
+ public function getPlanOverridden(): ?bool
+ {
+ return $this->planOverridden;
+ }
+
+ /**
+ * Sets Plan Overridden.
+ * Indicates whether the subscription has overridden any plan attributes.
+ *
+ * @maps plan_overridden
+ */
+ public function setPlanOverridden(?bool $planOverridden): void
+ {
+ $this->planOverridden = $planOverridden;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the ModifySubscriptionResponse object to a human-readable string representation.
+ *
+ * @return string The string representation of the ModifySubscriptionResponse object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ModifySubscriptionResponse',
+ [
+ 'planId' => $this->planId,
+ 'quantity' => $this->quantity,
+ 'shippingAmount' => $this->shippingAmount,
+ 'shippingAddress' => $this->shippingAddress,
+ 'plan' => $this->plan,
+ 'planOverridden' => $this->planOverridden,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->planId)) {
+ $json['plan_id'] = $this->planId;
+ }
+ if (isset($this->quantity)) {
+ $json['quantity'] = $this->quantity;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->shippingAddress)) {
+ $json['shipping_address'] = $this->shippingAddress;
+ }
+ if (isset($this->plan)) {
+ $json['plan'] = $this->plan;
+ }
+ if (isset($this->planOverridden)) {
+ $json['plan_overridden'] = $this->planOverridden;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/NativeAppContext.php b/src/Models/NativeAppContext.php
new file mode 100644
index 0000000..d782352
--- /dev/null
+++ b/src/Models/NativeAppContext.php
@@ -0,0 +1,105 @@
+osType;
+ }
+
+ /**
+ * Sets Os Type.
+ * Operating System type of the device that the buyer is using.
+ *
+ * @maps os_type
+ */
+ public function setOsType(?string $osType): void
+ {
+ $this->osType = $osType;
+ }
+
+ /**
+ * Returns Os Version.
+ * Operating System version of the device that the buyer is using.
+ */
+ public function getOsVersion(): ?string
+ {
+ return $this->osVersion;
+ }
+
+ /**
+ * Sets Os Version.
+ * Operating System version of the device that the buyer is using.
+ *
+ * @maps os_version
+ */
+ public function setOsVersion(?string $osVersion): void
+ {
+ $this->osVersion = $osVersion;
+ }
+
+ /**
+ * Converts the NativeAppContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the NativeAppContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'NativeAppContext',
+ ['osType' => $this->osType, 'osVersion' => $this->osVersion]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->osType)) {
+ $json['os_type'] = $this->osType;
+ }
+ if (isset($this->osVersion)) {
+ $json['os_version'] = $this->osVersion;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/NetworkTransactionReference.php b/src/Models/NetworkTransaction.php
similarity index 85%
rename from src/Models/NetworkTransactionReference.php
rename to src/Models/NetworkTransaction.php
index 9957b89..abd3d24 100644
--- a/src/Models/NetworkTransactionReference.php
+++ b/src/Models/NetworkTransaction.php
@@ -16,10 +16,10 @@ use stdClass;
/**
* Reference values used by the card network to identify a transaction.
*/
-class NetworkTransactionReference implements \JsonSerializable
+class NetworkTransaction implements \JsonSerializable
{
/**
- * @var string
+ * @var string|null
*/
private $id;
@@ -38,14 +38,6 @@ class NetworkTransactionReference implements \JsonSerializable
*/
private $acquirerReferenceNumber;
- /**
- * @param string $id
- */
- public function __construct(string $id)
- {
- $this->id = $id;
- }
-
/**
* Returns Id.
* Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in
@@ -53,7 +45,7 @@ class NetworkTransactionReference implements \JsonSerializable
* 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 -.
*/
- public function getId(): string
+ public function getId(): ?string
{
return $this->id;
}
@@ -65,10 +57,9 @@ class NetworkTransactionReference implements \JsonSerializable
* 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 -.
*
- * @required
* @maps id
*/
- public function setId(string $id): void
+ public function setId(?string $id): void
{
$this->id = $id;
}
@@ -76,7 +67,9 @@ class NetworkTransactionReference implements \JsonSerializable
/**
* Returns Date.
* 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.
+ * 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.
*/
public function getDate(): ?string
{
@@ -86,7 +79,9 @@ class NetworkTransactionReference implements \JsonSerializable
/**
* Sets Date.
* 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.
+ * 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.
*
* @maps date
*/
@@ -138,14 +133,14 @@ class NetworkTransactionReference implements \JsonSerializable
}
/**
- * Converts the NetworkTransactionReference object to a human-readable string representation.
+ * Converts the NetworkTransaction object to a human-readable string representation.
*
- * @return string The string representation of the NetworkTransactionReference object.
+ * @return string The string representation of the NetworkTransaction object.
*/
public function __toString(): string
{
return ApiHelper::stringify(
- 'NetworkTransactionReference',
+ 'NetworkTransaction',
[
'id' => $this->id,
'date' => $this->date,
@@ -167,7 +162,9 @@ class NetworkTransactionReference implements \JsonSerializable
public function jsonSerialize(bool $asArrayWhenEmpty = false)
{
$json = [];
- $json['id'] = $this->id;
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
if (isset($this->date)) {
$json['date'] = $this->date;
}
diff --git a/src/Models/Order.php b/src/Models/Order.php
index 07c6b0c..d556637 100644
--- a/src/Models/Order.php
+++ b/src/Models/Order.php
@@ -175,6 +175,9 @@ class Order implements \JsonSerializable
/**
* Returns Payer.
+ * 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`.
*/
public function getPayer(): ?Payer
{
@@ -183,6 +186,9 @@ class Order implements \JsonSerializable
/**
* Sets Payer.
+ * 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`.
*
* @maps payer
*/
diff --git a/src/Models/OrderApplicationContext.php b/src/Models/OrderApplicationContext.php
index 7730d16..a820934 100644
--- a/src/Models/OrderApplicationContext.php
+++ b/src/Models/OrderApplicationContext.php
@@ -95,12 +95,12 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Returns Locale.
- * 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/).
+ * 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.
*/
public function getLocale(): ?string
{
@@ -109,12 +109,12 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Sets Locale.
- * 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/).
+ * 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.
*
* @maps locale
*/
@@ -209,7 +209,10 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Returns Payment Method.
- * The customer and merchant payment preferences.
+ * 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..
*/
public function getPaymentMethod(): ?PaymentMethodPreference
{
@@ -218,7 +221,10 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Sets Payment Method.
- * The customer and merchant payment preferences.
+ * 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..
*
* @maps payment_method
*/
@@ -285,13 +291,17 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Returns Stored Payment Source.
- * 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.
+ * 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.
*/
public function getStoredPaymentSource(): ?StoredPaymentSource
{
@@ -300,13 +310,17 @@ class OrderApplicationContext implements \JsonSerializable
/**
* Sets Stored Payment Source.
- * 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.
+ * 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.
*
* @maps stored_payment_source
*/
diff --git a/src/Models/OrderApplicationContextShippingPreference.php b/src/Models/OrderApplicationContextShippingPreference.php
index 5fbb698..b50cf1a 100644
--- a/src/Models/OrderApplicationContextShippingPreference.php
+++ b/src/Models/OrderApplicationContextShippingPreference.php
@@ -16,9 +16,7 @@ namespace PaypalServerSdkLib\Models;
* 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.
+ * `experience_context` object instead of the `application_context` object.
*/
class OrderApplicationContextShippingPreference
{
diff --git a/src/Models/OrderAuthorizeResponse.php b/src/Models/OrderAuthorizeResponse.php
index 58b0619..f7e208c 100644
--- a/src/Models/OrderAuthorizeResponse.php
+++ b/src/Models/OrderAuthorizeResponse.php
@@ -13,6 +13,9 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
+/**
+ * The order authorize response.
+ */
class OrderAuthorizeResponse implements \JsonSerializable
{
/**
@@ -172,6 +175,7 @@ class OrderAuthorizeResponse implements \JsonSerializable
/**
* Returns Payer.
+ * The customer who approves and pays for the order. The customer is also known as the payer.
*/
public function getPayer(): ?Payer
{
@@ -180,6 +184,7 @@ class OrderAuthorizeResponse implements \JsonSerializable
/**
* Sets Payer.
+ * The customer who approves and pays for the order. The customer is also known as the payer.
*
* @maps payer
*/
@@ -238,8 +243,14 @@ class OrderAuthorizeResponse implements \JsonSerializable
/**
* Returns Links.
- * 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.
+ * 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.
*
* @return LinkDescription[]|null
*/
@@ -250,8 +261,14 @@ class OrderAuthorizeResponse implements \JsonSerializable
/**
* Sets Links.
- * 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.
+ * 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.
*
* @maps links
*
diff --git a/src/Models/OrderRequest.php b/src/Models/OrderRequest.php
index 54c35ce..da2f164 100644
--- a/src/Models/OrderRequest.php
+++ b/src/Models/OrderRequest.php
@@ -78,6 +78,9 @@ class OrderRequest implements \JsonSerializable
/**
* Returns Payer.
+ * 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`.
*/
public function getPayer(): ?Payer
{
@@ -86,6 +89,9 @@ class OrderRequest implements \JsonSerializable
/**
* Sets Payer.
+ * 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`.
*
* @maps payer
*/
diff --git a/src/Models/OrderUpdateCallbackErrorResponse.php b/src/Models/OrderUpdateCallbackErrorResponse.php
deleted file mode 100644
index 2d77610..0000000
--- a/src/Models/OrderUpdateCallbackErrorResponse.php
+++ /dev/null
@@ -1,144 +0,0 @@
-name = $name;
- }
-
- /**
- * Returns Name.
- * The human-readable, unique name of the error.
- */
- public function getName(): string
- {
- return $this->name;
- }
-
- /**
- * Sets Name.
- * The human-readable, unique name of the error.
- *
- * @required
- * @maps name
- */
- public function setName(string $name): void
- {
- $this->name = $name;
- }
-
- /**
- * Returns Message.
- * The message that describes the error.
- */
- public function getMessage(): ?string
- {
- return $this->message;
- }
-
- /**
- * Sets Message.
- * The message that describes the error.
- *
- * @maps message
- */
- public function setMessage(?string $message): void
- {
- $this->message = $message;
- }
-
- /**
- * Returns Details.
- * An array of additional details about the error.
- *
- * @return OrderUpdateCallbackErrorResponseDetails[]|null
- */
- public function getDetails(): ?array
- {
- return $this->details;
- }
-
- /**
- * Sets Details.
- * An array of additional details about the error.
- *
- * @maps details
- *
- * @param OrderUpdateCallbackErrorResponseDetails[]|null $details
- */
- public function setDetails(?array $details): void
- {
- $this->details = $details;
- }
-
- /**
- * Converts the OrderUpdateCallbackErrorResponse object to a human-readable string representation.
- *
- * @return string The string representation of the OrderUpdateCallbackErrorResponse object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'OrderUpdateCallbackErrorResponse',
- ['name' => $this->name, 'message' => $this->message, 'details' => $this->details]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- $json['name'] = $this->name;
- if (isset($this->message)) {
- $json['message'] = $this->message;
- }
- if (isset($this->details)) {
- $json['details'] = $this->details;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/OrderUpdateCallbackRequest.php b/src/Models/OrderUpdateCallbackRequest.php
deleted file mode 100644
index b0b44d1..0000000
--- a/src/Models/OrderUpdateCallbackRequest.php
+++ /dev/null
@@ -1,188 +0,0 @@
-shippingAddress = $shippingAddress;
- $this->purchaseUnits = $purchaseUnits;
- }
-
- /**
- * Returns Id.
- * The ID of the order.
- */
- public function getId(): ?string
- {
- return $this->id;
- }
-
- /**
- * Sets Id.
- * The ID of the order.
- *
- * @maps id
- */
- public function setId(?string $id): void
- {
- $this->id = $id;
- }
-
- /**
- * Returns Shipping Address.
- * 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).
- */
- public function getShippingAddress(): OrderUpdateCallbackShippingAddress
- {
- return $this->shippingAddress;
- }
-
- /**
- * Sets Shipping Address.
- * 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).
- *
- * @required
- * @maps shipping_address
- */
- public function setShippingAddress(OrderUpdateCallbackShippingAddress $shippingAddress): void
- {
- $this->shippingAddress = $shippingAddress;
- }
-
- /**
- * Returns Shipping Option.
- * The options that the payee or merchant offers to the payer to ship or pick up their items.
- */
- public function getShippingOption(): ?OrderUpdateCallbackShippingOption
- {
- return $this->shippingOption;
- }
-
- /**
- * Sets Shipping Option.
- * The options that the payee or merchant offers to the payer to ship or pick up their items.
- *
- * @maps shipping_option
- */
- public function setShippingOption(?OrderUpdateCallbackShippingOption $shippingOption): void
- {
- $this->shippingOption = $shippingOption;
- }
-
- /**
- * Returns Purchase Units.
- * 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.
- *
- * @return PurchaseUnitRequest[]
- */
- public function getPurchaseUnits(): array
- {
- return $this->purchaseUnits;
- }
-
- /**
- * Sets Purchase Units.
- * 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.
- *
- * @required
- * @maps purchase_units
- *
- * @param PurchaseUnitRequest[] $purchaseUnits
- */
- public function setPurchaseUnits(array $purchaseUnits): void
- {
- $this->purchaseUnits = $purchaseUnits;
- }
-
- /**
- * Converts the OrderUpdateCallbackRequest object to a human-readable string representation.
- *
- * @return string The string representation of the OrderUpdateCallbackRequest object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'OrderUpdateCallbackRequest',
- [
- 'id' => $this->id,
- 'shippingAddress' => $this->shippingAddress,
- 'shippingOption' => $this->shippingOption,
- 'purchaseUnits' => $this->purchaseUnits
- ]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->id)) {
- $json['id'] = $this->id;
- }
- $json['shipping_address'] = $this->shippingAddress;
- if (isset($this->shippingOption)) {
- $json['shipping_option'] = $this->shippingOption;
- }
- $json['purchase_units'] = $this->purchaseUnits;
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/OrderUpdateCallbackResponse.php b/src/Models/OrderUpdateCallbackResponse.php
deleted file mode 100644
index 509e127..0000000
--- a/src/Models/OrderUpdateCallbackResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-id;
- }
-
- /**
- * Sets Id.
- * The ID of the order.
- *
- * @maps id
- */
- public function setId(?string $id): void
- {
- $this->id = $id;
- }
-
- /**
- * Returns Purchase Units.
- * This would contain shipping option and amount data at purchase unit level.
- */
- public function getPurchaseUnits(): ?ShippingOptionsPurchaseUnit
- {
- return $this->purchaseUnits;
- }
-
- /**
- * Sets Purchase Units.
- * This would contain shipping option and amount data at purchase unit level.
- *
- * @maps purchase_units
- */
- public function setPurchaseUnits(?ShippingOptionsPurchaseUnit $purchaseUnits): void
- {
- $this->purchaseUnits = $purchaseUnits;
- }
-
- /**
- * Converts the OrderUpdateCallbackResponse object to a human-readable string representation.
- *
- * @return string The string representation of the OrderUpdateCallbackResponse object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'OrderUpdateCallbackResponse',
- ['id' => $this->id, 'purchaseUnits' => $this->purchaseUnits]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->id)) {
- $json['id'] = $this->id;
- }
- if (isset($this->purchaseUnits)) {
- $json['purchase_units'] = $this->purchaseUnits;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/OrderUpdateCallbackShippingAddress.php b/src/Models/OrderUpdateCallbackShippingAddress.php
deleted file mode 100644
index 44602b2..0000000
--- a/src/Models/OrderUpdateCallbackShippingAddress.php
+++ /dev/null
@@ -1,190 +0,0 @@
-countryCode = $countryCode;
- }
-
- /**
- * Returns Admin Area 2.
- * A city, town, or village. Smaller than `admin_area_level_1`.
- */
- public function getAdminArea2(): ?string
- {
- return $this->adminArea2;
- }
-
- /**
- * Sets Admin Area 2.
- * A city, town, or village. Smaller than `admin_area_level_1`.
- *
- * @maps admin_area_2
- */
- public function setAdminArea2(?string $adminArea2): void
- {
- $this->adminArea2 = $adminArea2;
- }
-
- /**
- * Returns Admin Area 1.
- * 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*.
- */
- public function getAdminArea1(): ?string
- {
- return $this->adminArea1;
- }
-
- /**
- * Sets Admin Area 1.
- * 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*.
- *
- * @maps admin_area_1
- */
- public function setAdminArea1(?string $adminArea1): void
- {
- $this->adminArea1 = $adminArea1;
- }
-
- /**
- * Returns Postal Code.
- * 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).
- */
- public function getPostalCode(): ?string
- {
- return $this->postalCode;
- }
-
- /**
- * Sets Postal Code.
- * 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).
- *
- * @maps postal_code
- */
- public function setPostalCode(?string $postalCode): void
- {
- $this->postalCode = $postalCode;
- }
-
- /**
- * Returns Country Code.
- * 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.
- */
- public function getCountryCode(): string
- {
- return $this->countryCode;
- }
-
- /**
- * Sets Country Code.
- * 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.
- *
- * @required
- * @maps country_code
- */
- public function setCountryCode(string $countryCode): void
- {
- $this->countryCode = $countryCode;
- }
-
- /**
- * Converts the OrderUpdateCallbackShippingAddress object to a human-readable string representation.
- *
- * @return string The string representation of the OrderUpdateCallbackShippingAddress object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'OrderUpdateCallbackShippingAddress',
- [
- 'adminArea2' => $this->adminArea2,
- 'adminArea1' => $this->adminArea1,
- 'postalCode' => $this->postalCode,
- 'countryCode' => $this->countryCode
- ]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->adminArea2)) {
- $json['admin_area_2'] = $this->adminArea2;
- }
- if (isset($this->adminArea1)) {
- $json['admin_area_1'] = $this->adminArea1;
- }
- if (isset($this->postalCode)) {
- $json['postal_code'] = $this->postalCode;
- }
- $json['country_code'] = $this->countryCode;
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/OrderUpdateCallbackShippingOption.php b/src/Models/OrderUpdateCallbackShippingOption.php
deleted file mode 100644
index 8fd8c68..0000000
--- a/src/Models/OrderUpdateCallbackShippingOption.php
+++ /dev/null
@@ -1,173 +0,0 @@
-id = $id;
- $this->label = $label;
- }
-
- /**
- * Returns Id.
- * A unique ID that identifies a payer-selected shipping option.
- */
- public function getId(): string
- {
- return $this->id;
- }
-
- /**
- * Sets Id.
- * A unique ID that identifies a payer-selected shipping option.
- *
- * @required
- * @maps id
- */
- public function setId(string $id): void
- {
- $this->id = $id;
- }
-
- /**
- * Returns Label.
- * 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.
- */
- public function getLabel(): string
- {
- return $this->label;
- }
-
- /**
- * Sets Label.
- * 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.
- *
- * @required
- * @maps label
- */
- public function setLabel(string $label): void
- {
- $this->label = $label;
- }
-
- /**
- * Returns Type.
- * A classification for the method of purchase fulfillment.
- */
- public function getType(): ?string
- {
- return $this->type;
- }
-
- /**
- * Sets Type.
- * A classification for the method of purchase fulfillment.
- *
- * @maps type
- */
- public function setType(?string $type): void
- {
- $this->type = $type;
- }
-
- /**
- * Returns Amount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
- */
- public function getAmount(): ?Money
- {
- return $this->amount;
- }
-
- /**
- * Sets Amount.
- * The currency and amount for a financial transaction, such as a balance or payment due.
- *
- * @maps amount
- */
- public function setAmount(?Money $amount): void
- {
- $this->amount = $amount;
- }
-
- /**
- * Converts the OrderUpdateCallbackShippingOption object to a human-readable string representation.
- *
- * @return string The string representation of the OrderUpdateCallbackShippingOption object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'OrderUpdateCallbackShippingOption',
- ['id' => $this->id, 'label' => $this->label, 'type' => $this->type, 'amount' => $this->amount]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- $json['id'] = $this->id;
- $json['label'] = $this->label;
- if (isset($this->type)) {
- $json['type'] = $this->type;
- }
- if (isset($this->amount)) {
- $json['amount'] = $this->amount;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/OrdersCapture.php b/src/Models/OrdersCapture.php
index 7172746..cda0509 100644
--- a/src/Models/OrdersCapture.php
+++ b/src/Models/OrdersCapture.php
@@ -49,7 +49,7 @@ class OrdersCapture implements \JsonSerializable
private $customId;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $networkTransactionReference;
@@ -221,7 +221,7 @@ class OrdersCapture implements \JsonSerializable
* Returns Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getNetworkTransactionReference(): ?NetworkTransaction
{
return $this->networkTransactionReference;
}
@@ -232,7 +232,7 @@ class OrdersCapture implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
diff --git a/src/Models/OsType.php b/src/Models/OsType.php
new file mode 100644
index 0000000..1b27b5c
--- /dev/null
+++ b/src/Models/OsType.php
@@ -0,0 +1,32 @@
+accountId;
+ }
+
+ /**
+ * Sets Account Id.
+ * The PayPal` customer account ID.
+ *
+ * @maps account_id
+ */
+ public function setAccountId(?string $accountId): void
+ {
+ $this->accountId = $accountId;
+ }
+
+ /**
+ * Returns Email Address.
+ * 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.
+ */
+ public function getEmailAddress(): ?string
+ {
+ return $this->emailAddress;
+ }
+
+ /**
+ * Sets Email Address.
+ * 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.
+ *
+ * @maps email_address
+ */
+ public function setEmailAddress(?string $emailAddress): void
+ {
+ $this->emailAddress = $emailAddress;
+ }
+
+ /**
+ * Returns Phone Number.
+ * The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.
+ * int/rec/T-REC-E.164/en).
+ */
+ public function getPhoneNumber(): ?Phone
+ {
+ return $this->phoneNumber;
+ }
+
+ /**
+ * Sets Phone Number.
+ * The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.
+ * int/rec/T-REC-E.164/en).
+ *
+ * @maps phone_number
+ */
+ public function setPhoneNumber(?Phone $phoneNumber): void
+ {
+ $this->phoneNumber = $phoneNumber;
+ }
+
+ /**
+ * Returns Address Status.
+ * The address status of the payer. Value is either: Y. Verified. N. Not verified.
+ */
+ public function getAddressStatus(): ?string
+ {
+ return $this->addressStatus;
+ }
+
+ /**
+ * Sets Address Status.
+ * The address status of the payer. Value is either: Y. Verified. N. Not verified.
+ *
+ * @maps address_status
+ */
+ public function setAddressStatus(?string $addressStatus): void
+ {
+ $this->addressStatus = $addressStatus;
+ }
+
+ /**
+ * Returns Payer Status.
+ * The status of the payer. Value is `Y` or `N`.
+ */
+ public function getPayerStatus(): ?string
+ {
+ return $this->payerStatus;
+ }
+
+ /**
+ * Sets Payer Status.
+ * The status of the payer. Value is `Y` or `N`.
+ *
+ * @maps payer_status
+ */
+ public function setPayerStatus(?string $payerStatus): void
+ {
+ $this->payerStatus = $payerStatus;
+ }
+
+ /**
+ * Returns Payer Name.
+ * The name of the party.
+ */
+ public function getPayerName(): ?PayerName
+ {
+ return $this->payerName;
+ }
+
+ /**
+ * Sets Payer Name.
+ * The name of the party.
+ *
+ * @maps payer_name
+ */
+ public function setPayerName(?PayerName $payerName): void
+ {
+ $this->payerName = $payerName;
+ }
+
+ /**
+ * Returns Country Code.
+ * 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.
+ */
+ public function getCountryCode(): ?string
+ {
+ return $this->countryCode;
+ }
+
+ /**
+ * Sets Country Code.
+ * 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.
+ *
+ * @maps country_code
+ */
+ public function setCountryCode(?string $countryCode): void
+ {
+ $this->countryCode = $countryCode;
+ }
+
+ /**
+ * Returns Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ */
+ public function getAddress(): ?SimplePostalAddressCoarseGrained
+ {
+ return $this->address;
+ }
+
+ /**
+ * Sets Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ *
+ * @maps address
+ */
+ public function setAddress(?SimplePostalAddressCoarseGrained $address): void
+ {
+ $this->address = $address;
+ }
+
+ /**
+ * Converts the PayerInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the PayerInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PayerInformation',
+ [
+ 'accountId' => $this->accountId,
+ 'emailAddress' => $this->emailAddress,
+ 'phoneNumber' => $this->phoneNumber,
+ 'addressStatus' => $this->addressStatus,
+ 'payerStatus' => $this->payerStatus,
+ 'payerName' => $this->payerName,
+ 'countryCode' => $this->countryCode,
+ 'address' => $this->address
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->accountId)) {
+ $json['account_id'] = $this->accountId;
+ }
+ if (isset($this->emailAddress)) {
+ $json['email_address'] = $this->emailAddress;
+ }
+ if (isset($this->phoneNumber)) {
+ $json['phone_number'] = $this->phoneNumber;
+ }
+ if (isset($this->addressStatus)) {
+ $json['address_status'] = $this->addressStatus;
+ }
+ if (isset($this->payerStatus)) {
+ $json['payer_status'] = $this->payerStatus;
+ }
+ if (isset($this->payerName)) {
+ $json['payer_name'] = $this->payerName;
+ }
+ if (isset($this->countryCode)) {
+ $json['country_code'] = $this->countryCode;
+ }
+ if (isset($this->address)) {
+ $json['address'] = $this->address;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PayerName.php b/src/Models/PayerName.php
new file mode 100644
index 0000000..f66ddae
--- /dev/null
+++ b/src/Models/PayerName.php
@@ -0,0 +1,261 @@
+prefix;
+ }
+
+ /**
+ * Sets Prefix.
+ * The prefix, or title, to the party's name.
+ *
+ * @maps prefix
+ */
+ public function setPrefix(?string $prefix): void
+ {
+ $this->prefix = $prefix;
+ }
+
+ /**
+ * Returns Given Name.
+ * When the party is a person, the party's given, or first, name.
+ */
+ public function getGivenName(): ?string
+ {
+ return $this->givenName;
+ }
+
+ /**
+ * Sets Given Name.
+ * When the party is a person, the party's given, or first, name.
+ *
+ * @maps given_name
+ */
+ public function setGivenName(?string $givenName): void
+ {
+ $this->givenName = $givenName;
+ }
+
+ /**
+ * Returns Surname.
+ * 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.
+ */
+ public function getSurname(): ?string
+ {
+ return $this->surname;
+ }
+
+ /**
+ * Sets Surname.
+ * 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.
+ *
+ * @maps surname
+ */
+ public function setSurname(?string $surname): void
+ {
+ $this->surname = $surname;
+ }
+
+ /**
+ * Returns Middle Name.
+ * 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.
+ */
+ public function getMiddleName(): ?string
+ {
+ return $this->middleName;
+ }
+
+ /**
+ * Sets Middle Name.
+ * 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.
+ *
+ * @maps middle_name
+ */
+ public function setMiddleName(?string $middleName): void
+ {
+ $this->middleName = $middleName;
+ }
+
+ /**
+ * Returns Suffix.
+ * The suffix for the party's name.
+ */
+ public function getSuffix(): ?string
+ {
+ return $this->suffix;
+ }
+
+ /**
+ * Sets Suffix.
+ * The suffix for the party's name.
+ *
+ * @maps suffix
+ */
+ public function setSuffix(?string $suffix): void
+ {
+ $this->suffix = $suffix;
+ }
+
+ /**
+ * Returns Alternate Full Name.
+ * 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.
+ */
+ public function getAlternateFullName(): ?string
+ {
+ return $this->alternateFullName;
+ }
+
+ /**
+ * Sets Alternate Full Name.
+ * 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.
+ *
+ * @maps alternate_full_name
+ */
+ public function setAlternateFullName(?string $alternateFullName): void
+ {
+ $this->alternateFullName = $alternateFullName;
+ }
+
+ /**
+ * Returns Full Name.
+ * When the party is a person, the party's full name.
+ */
+ public function getFullName(): ?string
+ {
+ return $this->fullName;
+ }
+
+ /**
+ * Sets Full Name.
+ * When the party is a person, the party's full name.
+ *
+ * @maps full_name
+ */
+ public function setFullName(?string $fullName): void
+ {
+ $this->fullName = $fullName;
+ }
+
+ /**
+ * Converts the PayerName object to a human-readable string representation.
+ *
+ * @return string The string representation of the PayerName object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PayerName',
+ [
+ 'prefix' => $this->prefix,
+ 'givenName' => $this->givenName,
+ 'surname' => $this->surname,
+ 'middleName' => $this->middleName,
+ 'suffix' => $this->suffix,
+ 'alternateFullName' => $this->alternateFullName,
+ 'fullName' => $this->fullName
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->prefix)) {
+ $json['prefix'] = $this->prefix;
+ }
+ if (isset($this->givenName)) {
+ $json['given_name'] = $this->givenName;
+ }
+ if (isset($this->surname)) {
+ $json['surname'] = $this->surname;
+ }
+ if (isset($this->middleName)) {
+ $json['middle_name'] = $this->middleName;
+ }
+ if (isset($this->suffix)) {
+ $json['suffix'] = $this->suffix;
+ }
+ if (isset($this->alternateFullName)) {
+ $json['alternate_full_name'] = $this->alternateFullName;
+ }
+ if (isset($this->fullName)) {
+ $json['full_name'] = $this->fullName;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PaymentAuthorization.php b/src/Models/PaymentAuthorization.php
index f193360..94ae7bf 100644
--- a/src/Models/PaymentAuthorization.php
+++ b/src/Models/PaymentAuthorization.php
@@ -49,7 +49,7 @@ class PaymentAuthorization implements \JsonSerializable
private $customId;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $networkTransactionReference;
@@ -216,7 +216,7 @@ class PaymentAuthorization implements \JsonSerializable
* Returns Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getNetworkTransactionReference(): ?NetworkTransaction
{
return $this->networkTransactionReference;
}
@@ -227,7 +227,7 @@ class PaymentAuthorization implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
diff --git a/src/Models/PaymentMethod.php b/src/Models/PaymentMethod.php
new file mode 100644
index 0000000..0b678d1
--- /dev/null
+++ b/src/Models/PaymentMethod.php
@@ -0,0 +1,74 @@
+payeePreferred;
+ }
+
+ /**
+ * Sets Payee Preferred.
+ * The merchant-preferred payment methods.
+ *
+ * @maps payee_preferred
+ */
+ public function setPayeePreferred(?string $payeePreferred): void
+ {
+ $this->payeePreferred = $payeePreferred;
+ }
+
+ /**
+ * Converts the PaymentMethod object to a human-readable string representation.
+ *
+ * @return string The string representation of the PaymentMethod object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('PaymentMethod', ['payeePreferred' => $this->payeePreferred]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->payeePreferred)) {
+ $json['payee_preferred'] = $this->payeePreferred;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PaymentPreferences.php b/src/Models/PaymentPreferences.php
new file mode 100644
index 0000000..d4410e1
--- /dev/null
+++ b/src/Models/PaymentPreferences.php
@@ -0,0 +1,170 @@
+autoBillOutstanding;
+ }
+
+ /**
+ * Sets Auto Bill Outstanding.
+ * Indicates whether to automatically bill the outstanding amount in the next billing cycle.
+ *
+ * @maps auto_bill_outstanding
+ */
+ public function setAutoBillOutstanding(?bool $autoBillOutstanding): void
+ {
+ $this->autoBillOutstanding = $autoBillOutstanding;
+ }
+
+ /**
+ * Returns Setup Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getSetupFee(): ?Money
+ {
+ return $this->setupFee;
+ }
+
+ /**
+ * Sets Setup Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps setup_fee
+ */
+ public function setSetupFee(?Money $setupFee): void
+ {
+ $this->setupFee = $setupFee;
+ }
+
+ /**
+ * Returns Setup Fee Failure Action.
+ * The action to take on the subscription if the initial payment for the setup fails.
+ */
+ public function getSetupFeeFailureAction(): ?string
+ {
+ return $this->setupFeeFailureAction;
+ }
+
+ /**
+ * Sets Setup Fee Failure Action.
+ * The action to take on the subscription if the initial payment for the setup fails.
+ *
+ * @maps setup_fee_failure_action
+ */
+ public function setSetupFeeFailureAction(?string $setupFeeFailureAction): void
+ {
+ $this->setupFeeFailureAction = $setupFeeFailureAction;
+ }
+
+ /**
+ * Returns Payment Failure Threshold.
+ * 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.
+ */
+ public function getPaymentFailureThreshold(): ?int
+ {
+ return $this->paymentFailureThreshold;
+ }
+
+ /**
+ * Sets Payment Failure Threshold.
+ * 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.
+ *
+ * @maps payment_failure_threshold
+ */
+ public function setPaymentFailureThreshold(?int $paymentFailureThreshold): void
+ {
+ $this->paymentFailureThreshold = $paymentFailureThreshold;
+ }
+
+ /**
+ * Converts the PaymentPreferences object to a human-readable string representation.
+ *
+ * @return string The string representation of the PaymentPreferences object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PaymentPreferences',
+ [
+ 'autoBillOutstanding' => $this->autoBillOutstanding,
+ 'setupFee' => $this->setupFee,
+ 'setupFeeFailureAction' => $this->setupFeeFailureAction,
+ 'paymentFailureThreshold' => $this->paymentFailureThreshold
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->autoBillOutstanding)) {
+ $json['auto_bill_outstanding'] = $this->autoBillOutstanding;
+ }
+ if (isset($this->setupFee)) {
+ $json['setup_fee'] = $this->setupFee;
+ }
+ if (isset($this->setupFeeFailureAction)) {
+ $json['setup_fee_failure_action'] = $this->setupFeeFailureAction;
+ }
+ if (isset($this->paymentFailureThreshold)) {
+ $json['payment_failure_threshold'] = $this->paymentFailureThreshold;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PaymentPreferencesOverride.php b/src/Models/PaymentPreferencesOverride.php
new file mode 100644
index 0000000..22f1ac6
--- /dev/null
+++ b/src/Models/PaymentPreferencesOverride.php
@@ -0,0 +1,170 @@
+autoBillOutstanding;
+ }
+
+ /**
+ * Sets Auto Bill Outstanding.
+ * Indicates whether to automatically bill the outstanding amount in the next billing cycle.
+ *
+ * @maps auto_bill_outstanding
+ */
+ public function setAutoBillOutstanding(?bool $autoBillOutstanding): void
+ {
+ $this->autoBillOutstanding = $autoBillOutstanding;
+ }
+
+ /**
+ * Returns Setup Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getSetupFee(): ?Money
+ {
+ return $this->setupFee;
+ }
+
+ /**
+ * Sets Setup Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps setup_fee
+ */
+ public function setSetupFee(?Money $setupFee): void
+ {
+ $this->setupFee = $setupFee;
+ }
+
+ /**
+ * Returns Setup Fee Failure Action.
+ * The action to take on the subscription if the initial payment for the setup fails.
+ */
+ public function getSetupFeeFailureAction(): ?string
+ {
+ return $this->setupFeeFailureAction;
+ }
+
+ /**
+ * Sets Setup Fee Failure Action.
+ * The action to take on the subscription if the initial payment for the setup fails.
+ *
+ * @maps setup_fee_failure_action
+ */
+ public function setSetupFeeFailureAction(?string $setupFeeFailureAction): void
+ {
+ $this->setupFeeFailureAction = $setupFeeFailureAction;
+ }
+
+ /**
+ * Returns Payment Failure Threshold.
+ * 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.
+ */
+ public function getPaymentFailureThreshold(): ?int
+ {
+ return $this->paymentFailureThreshold;
+ }
+
+ /**
+ * Sets Payment Failure Threshold.
+ * 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.
+ *
+ * @maps payment_failure_threshold
+ */
+ public function setPaymentFailureThreshold(?int $paymentFailureThreshold): void
+ {
+ $this->paymentFailureThreshold = $paymentFailureThreshold;
+ }
+
+ /**
+ * Converts the PaymentPreferencesOverride object to a human-readable string representation.
+ *
+ * @return string The string representation of the PaymentPreferencesOverride object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PaymentPreferencesOverride',
+ [
+ 'autoBillOutstanding' => $this->autoBillOutstanding,
+ 'setupFee' => $this->setupFee,
+ 'setupFeeFailureAction' => $this->setupFeeFailureAction,
+ 'paymentFailureThreshold' => $this->paymentFailureThreshold
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->autoBillOutstanding)) {
+ $json['auto_bill_outstanding'] = $this->autoBillOutstanding;
+ }
+ if (isset($this->setupFee)) {
+ $json['setup_fee'] = $this->setupFee;
+ }
+ if (isset($this->setupFeeFailureAction)) {
+ $json['setup_fee_failure_action'] = $this->setupFeeFailureAction;
+ }
+ if (isset($this->paymentFailureThreshold)) {
+ $json['payment_failure_threshold'] = $this->paymentFailureThreshold;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PaymentTokenResponse.php b/src/Models/PaymentTokenResponse.php
index b868529..c27380e 100644
--- a/src/Models/PaymentTokenResponse.php
+++ b/src/Models/PaymentTokenResponse.php
@@ -40,7 +40,8 @@ class PaymentTokenResponse implements \JsonSerializable
/**
* Returns Id.
- * The PayPal-generated ID for the vault token.
+ * 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.
*/
public function getId(): ?string
{
@@ -49,7 +50,8 @@ class PaymentTokenResponse implements \JsonSerializable
/**
* Sets Id.
- * The PayPal-generated ID for the vault token.
+ * 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.
*
* @maps id
*/
diff --git a/src/Models/PaymentTokenResponsePaymentSource.php b/src/Models/PaymentTokenResponsePaymentSource.php
index 2c9e3f9..aa696ad 100644
--- a/src/Models/PaymentTokenResponsePaymentSource.php
+++ b/src/Models/PaymentTokenResponsePaymentSource.php
@@ -60,6 +60,7 @@ class PaymentTokenResponsePaymentSource implements \JsonSerializable
/**
* Returns Paypal.
+ * Full representation of a PayPal Payment Token.
*/
public function getPaypal(): ?PaypalPaymentToken
{
@@ -68,6 +69,7 @@ class PaymentTokenResponsePaymentSource implements \JsonSerializable
/**
* Sets Paypal.
+ * Full representation of a PayPal Payment Token.
*
* @maps paypal
*/
@@ -78,6 +80,7 @@ class PaymentTokenResponsePaymentSource implements \JsonSerializable
/**
* Returns Venmo.
+ * Full representation of a Venmo Payment Token.
*/
public function getVenmo(): ?VenmoPaymentToken
{
@@ -86,6 +89,7 @@ class PaymentTokenResponsePaymentSource implements \JsonSerializable
/**
* Sets Venmo.
+ * Full representation of a Venmo Payment Token.
*
* @maps venmo
*/
diff --git a/src/Models/PaymentTokenStatus.php b/src/Models/PaymentTokenStatus.php
index 59cf0f0..d9cdffa 100644
--- a/src/Models/PaymentTokenStatus.php
+++ b/src/Models/PaymentTokenStatus.php
@@ -22,7 +22,7 @@ class PaymentTokenStatus
public const CREATED = 'CREATED';
/**
- * A contingecy on payer approval is required before the payment method can be saved.
+ * A contingency on payer approval is required before the payment method can be saved.
*/
public const PAYER_ACTION_REQUIRED = 'PAYER_ACTION_REQUIRED';
diff --git a/src/Models/PaymentsCapture.php b/src/Models/PaymentsCapture.php
index 1aa3058..117fda9 100644
--- a/src/Models/PaymentsCapture.php
+++ b/src/Models/PaymentsCapture.php
@@ -49,7 +49,7 @@ class PaymentsCapture implements \JsonSerializable
private $customId;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $networkTransactionReference;
@@ -79,7 +79,7 @@ class PaymentsCapture implements \JsonSerializable
private $links;
/**
- * @var PaymentsProcessorResponse|null
+ * @var ProcessorResponse|null
*/
private $processorResponse;
@@ -221,7 +221,7 @@ class PaymentsCapture implements \JsonSerializable
* Returns Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getNetworkTransactionReference(): ?NetworkTransaction
{
return $this->networkTransactionReference;
}
@@ -232,7 +232,7 @@ class PaymentsCapture implements \JsonSerializable
*
* @maps network_transaction_reference
*/
- public function setNetworkTransactionReference(?NetworkTransactionReference $networkTransactionReference): void
+ public function setNetworkTransactionReference(?NetworkTransaction $networkTransactionReference): void
{
$this->networkTransactionReference = $networkTransactionReference;
}
@@ -353,7 +353,7 @@ class PaymentsCapture implements \JsonSerializable
* Returns Processor Response.
* The processor response information for payment requests, such as direct credit card transactions.
*/
- public function getProcessorResponse(): ?PaymentsProcessorResponse
+ public function getProcessorResponse(): ?ProcessorResponse
{
return $this->processorResponse;
}
@@ -364,7 +364,7 @@ class PaymentsCapture implements \JsonSerializable
*
* @maps processor_response
*/
- public function setProcessorResponse(?PaymentsProcessorResponse $processorResponse): void
+ public function setProcessorResponse(?ProcessorResponse $processorResponse): void
{
$this->processorResponse = $processorResponse;
}
diff --git a/src/Models/PaymentsPaymentAdviceCode.php b/src/Models/PaymentsPaymentAdviceCode.php
deleted file mode 100644
index 1d44dc9..0000000
--- a/src/Models/PaymentsPaymentAdviceCode.php
+++ /dev/null
@@ -1,47 +0,0 @@
-avsCode;
- }
-
- /**
- * Sets Avs Code.
- * The address verification code for Visa, Discover, Mastercard, or American Express transactions.
- *
- * @maps avs_code
- */
- public function setAvsCode(?string $avsCode): void
- {
- $this->avsCode = $avsCode;
- }
-
- /**
- * Returns Cvv Code.
- * The card verification value code for for Visa, Discover, Mastercard, or American Express.
- */
- public function getCvvCode(): ?string
- {
- return $this->cvvCode;
- }
-
- /**
- * Sets Cvv Code.
- * The card verification value code for for Visa, Discover, Mastercard, or American Express.
- *
- * @maps cvv_code
- */
- public function setCvvCode(?string $cvvCode): void
- {
- $this->cvvCode = $cvvCode;
- }
-
- /**
- * Returns Response Code.
- * Processor response code for the non-PayPal payment processor errors.
- */
- public function getResponseCode(): ?string
- {
- return $this->responseCode;
- }
-
- /**
- * Sets Response Code.
- * Processor response code for the non-PayPal payment processor errors.
- *
- * @maps response_code
- */
- public function setResponseCode(?string $responseCode): void
- {
- $this->responseCode = $responseCode;
- }
-
- /**
- * Returns Payment Advice Code.
- * The declined payment transactions might have payment advice codes. The card networks, like Visa and
- * Mastercard, return payment advice codes.
- */
- public function getPaymentAdviceCode(): ?string
- {
- return $this->paymentAdviceCode;
- }
-
- /**
- * Sets Payment Advice Code.
- * The declined payment transactions might have payment advice codes. The card networks, like Visa and
- * Mastercard, return payment advice codes.
- *
- * @maps payment_advice_code
- */
- public function setPaymentAdviceCode(?string $paymentAdviceCode): void
- {
- $this->paymentAdviceCode = $paymentAdviceCode;
- }
-
- /**
- * Converts the PaymentsProcessorResponse object to a human-readable string representation.
- *
- * @return string The string representation of the PaymentsProcessorResponse object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'PaymentsProcessorResponse',
- [
- 'avsCode' => $this->avsCode,
- 'cvvCode' => $this->cvvCode,
- 'responseCode' => $this->responseCode,
- 'paymentAdviceCode' => $this->paymentAdviceCode
- ]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->avsCode)) {
- $json['avs_code'] = $this->avsCode;
- }
- if (isset($this->cvvCode)) {
- $json['cvv_code'] = $this->cvvCode;
- }
- if (isset($this->responseCode)) {
- $json['response_code'] = $this->responseCode;
- }
- if (isset($this->paymentAdviceCode)) {
- $json['payment_advice_code'] = $this->paymentAdviceCode;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/PaypalExperienceLandingPage.php b/src/Models/PaypalExperienceLandingPage.php
index 1ad56e7..a99e899 100644
--- a/src/Models/PaypalExperienceLandingPage.php
+++ b/src/Models/PaypalExperienceLandingPage.php
@@ -34,4 +34,11 @@ class PaypalExperienceLandingPage
* information required to complete the purchase, depending on their previous interaction with PayPal.
*/
public const NO_PREFERENCE = 'NO_PREFERENCE';
+
+ /**
+ * 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.
+ */
+ public const BILLING = 'BILLING';
}
diff --git a/src/Models/PaypalPaymentToken.php b/src/Models/PaypalPaymentToken.php
index 2b13b05..09b76da 100644
--- a/src/Models/PaypalPaymentToken.php
+++ b/src/Models/PaypalPaymentToken.php
@@ -13,6 +13,9 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
+/**
+ * Full representation of a PayPal Payment Token.
+ */
class PaypalPaymentToken implements \JsonSerializable
{
/**
@@ -216,9 +219,10 @@ class PaypalPaymentToken implements \JsonSerializable
/**
* Returns Email Address.
- * 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.
+ * 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.
*/
public function getEmailAddress(): ?string
{
@@ -227,9 +231,10 @@ class PaypalPaymentToken implements \JsonSerializable
/**
* Sets Email Address.
- * 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.
+ * 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.
*
* @maps email_address
*/
diff --git a/src/Models/PaypalReferenceIdType.php b/src/Models/PaypalReferenceIdType.php
new file mode 100644
index 0000000..fe26d18
--- /dev/null
+++ b/src/Models/PaypalReferenceIdType.php
@@ -0,0 +1,37 @@
+cancelUrl = $cancelUrl;
}
+ /**
+ * Returns 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.
+ */
+ public function getAppSwitchContext(): ?AppSwitchContext
+ {
+ return $this->appSwitchContext;
+ }
+
+ /**
+ * Sets 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.
+ *
+ * @maps app_switch_context
+ */
+ public function setAppSwitchContext(?AppSwitchContext $appSwitchContext): void
+ {
+ $this->appSwitchContext = $appSwitchContext;
+ }
+
/**
* Returns Landing Page.
* The type of landing page to show on the PayPal site for customer checkout.
@@ -300,6 +327,7 @@ class PaypalWalletExperienceContext implements \JsonSerializable
'contactPreference' => $this->contactPreference,
'returnUrl' => $this->returnUrl,
'cancelUrl' => $this->cancelUrl,
+ 'appSwitchContext' => $this->appSwitchContext,
'landingPage' => $this->landingPage,
'userAction' => $this->userAction,
'paymentMethodPreference' => $this->paymentMethodPreference,
@@ -338,6 +366,9 @@ class PaypalWalletExperienceContext implements \JsonSerializable
if (isset($this->cancelUrl)) {
$json['cancel_url'] = $this->cancelUrl;
}
+ if (isset($this->appSwitchContext)) {
+ $json['app_switch_context'] = $this->appSwitchContext;
+ }
if (isset($this->landingPage)) {
$json['landing_page'] = $this->landingPage;
}
diff --git a/src/Models/PaypalWalletResponse.php b/src/Models/PaypalWalletResponse.php
index 7d3e76a..634d1df 100644
--- a/src/Models/PaypalWalletResponse.php
+++ b/src/Models/PaypalWalletResponse.php
@@ -78,6 +78,11 @@ class PaypalWalletResponse implements \JsonSerializable
*/
private $storedCredential;
+ /**
+ * @var string|null
+ */
+ private $experienceStatus;
+
/**
* Returns Email Address.
* The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters
@@ -348,6 +353,28 @@ class PaypalWalletResponse implements \JsonSerializable
$this->storedCredential = $storedCredential;
}
+ /**
+ * Returns 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.
+ */
+ public function getExperienceStatus(): ?string
+ {
+ return $this->experienceStatus;
+ }
+
+ /**
+ * Sets 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.
+ *
+ * @maps experience_status
+ */
+ public function setExperienceStatus(?string $experienceStatus): void
+ {
+ $this->experienceStatus = $experienceStatus;
+ }
+
/**
* Converts the PaypalWalletResponse object to a human-readable string representation.
*
@@ -369,7 +396,8 @@ class PaypalWalletResponse implements \JsonSerializable
'taxInfo' => $this->taxInfo,
'address' => $this->address,
'attributes' => $this->attributes,
- 'storedCredential' => $this->storedCredential
+ 'storedCredential' => $this->storedCredential,
+ 'experienceStatus' => $this->experienceStatus
]
);
}
@@ -422,6 +450,9 @@ class PaypalWalletResponse implements \JsonSerializable
if (isset($this->storedCredential)) {
$json['stored_credential'] = $this->storedCredential;
}
+ if (isset($this->experienceStatus)) {
+ $json['experience_status'] = $this->experienceStatus;
+ }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/PaypalWalletStoredCredential.php b/src/Models/PaypalWalletStoredCredential.php
index 2cd172b..04cbb63 100644
--- a/src/Models/PaypalWalletStoredCredential.php
+++ b/src/Models/PaypalWalletStoredCredential.php
@@ -70,7 +70,8 @@ class PaypalWalletStoredCredential implements \JsonSerializable
/**
* Returns Charge Pattern.
- * Expected business/pricing model for the billing agreement.
+ * DEPRECATED. Expected business/pricing model for the billing agreement, Please use usage_pattern
+ * instead.
*/
public function getChargePattern(): ?string
{
@@ -79,7 +80,8 @@ class PaypalWalletStoredCredential implements \JsonSerializable
/**
* Sets Charge Pattern.
- * Expected business/pricing model for the billing agreement.
+ * DEPRECATED. Expected business/pricing model for the billing agreement, Please use usage_pattern
+ * instead.
*
* @maps charge_pattern
*/
diff --git a/src/Models/PaypalWalletVaultInstruction.php b/src/Models/PaypalWalletVaultInstruction.php
index ae2681a..1bb1c43 100644
--- a/src/Models/PaypalWalletVaultInstruction.php
+++ b/src/Models/PaypalWalletVaultInstruction.php
@@ -13,13 +13,11 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
+/**
+ * Resource consolidating common request and response attributes for vaulting PayPal Wallet.
+ */
class PaypalWalletVaultInstruction implements \JsonSerializable
{
- /**
- * @var string|null
- */
- private $storeInVault;
-
/**
* @var string|null
*/
@@ -53,26 +51,6 @@ class PaypalWalletVaultInstruction implements \JsonSerializable
$this->usageType = $usageType;
}
- /**
- * Returns Store in Vault.
- * Defines how and when the payment source gets vaulted.
- */
- public function getStoreInVault(): ?string
- {
- return $this->storeInVault;
- }
-
- /**
- * Sets Store in Vault.
- * Defines how and when the payment source gets vaulted.
- *
- * @maps store_in_vault
- */
- public function setStoreInVault(?string $storeInVault): void
- {
- $this->storeInVault = $storeInVault;
- }
-
/**
* Returns Description.
* The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the
@@ -198,7 +176,6 @@ class PaypalWalletVaultInstruction implements \JsonSerializable
return ApiHelper::stringify(
'PaypalWalletVaultInstruction',
[
- 'storeInVault' => $this->storeInVault,
'description' => $this->description,
'usagePattern' => $this->usagePattern,
'usageType' => $this->usageType,
@@ -220,9 +197,6 @@ class PaypalWalletVaultInstruction implements \JsonSerializable
public function jsonSerialize(bool $asArrayWhenEmpty = false)
{
$json = [];
- if (isset($this->storeInVault)) {
- $json['store_in_vault'] = $this->storeInVault;
- }
if (isset($this->description)) {
$json['description'] = $this->description;
}
diff --git a/src/Models/PhoneNumber.php b/src/Models/PhoneNumber.php
index 165d336..5acda65 100644
--- a/src/Models/PhoneNumber.php
+++ b/src/Models/PhoneNumber.php
@@ -15,7 +15,8 @@ use stdClass;
/**
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
- * int/rec/T-REC-E.164/en).
+ * 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).
*/
class PhoneNumber implements \JsonSerializable
{
diff --git a/src/Models/PhoneNumberWithCountryCode.php b/src/Models/PhoneNumberWithCountryCode.php
index f5b76b3..176aa8b 100644
--- a/src/Models/PhoneNumberWithCountryCode.php
+++ b/src/Models/PhoneNumberWithCountryCode.php
@@ -16,7 +16,8 @@ use stdClass;
/**
* 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).
+ * 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).
*/
class PhoneNumberWithCountryCode implements \JsonSerializable
{
diff --git a/src/Models/PhoneNumberWithOptionalCountryCode.php b/src/Models/PhoneNumberWithOptionalCountryCode.php
new file mode 100644
index 0000000..0775a64
--- /dev/null
+++ b/src/Models/PhoneNumberWithOptionalCountryCode.php
@@ -0,0 +1,125 @@
+nationalNumber = $nationalNumber;
+ }
+
+ /**
+ * Returns Country Code.
+ * 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).
+ */
+ public function getCountryCode(): ?string
+ {
+ return $this->countryCode;
+ }
+
+ /**
+ * Sets Country Code.
+ * 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).
+ *
+ * @maps country_code
+ */
+ public function setCountryCode(?string $countryCode): void
+ {
+ $this->countryCode = $countryCode;
+ }
+
+ /**
+ * Returns National Number.
+ * 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).
+ */
+ public function getNationalNumber(): string
+ {
+ return $this->nationalNumber;
+ }
+
+ /**
+ * Sets National Number.
+ * 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).
+ *
+ * @required
+ * @maps national_number
+ */
+ public function setNationalNumber(string $nationalNumber): void
+ {
+ $this->nationalNumber = $nationalNumber;
+ }
+
+ /**
+ * Converts the PhoneNumberWithOptionalCountryCode object to a human-readable string representation.
+ *
+ * @return string The string representation of the PhoneNumberWithOptionalCountryCode object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PhoneNumberWithOptionalCountryCode',
+ ['countryCode' => $this->countryCode, 'nationalNumber' => $this->nationalNumber]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->countryCode)) {
+ $json['country_code'] = $this->countryCode;
+ }
+ $json['national_number'] = $this->nationalNumber;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PhoneType.php b/src/Models/PhoneType.php
index 851dad8..0ce7b66 100644
--- a/src/Models/PhoneType.php
+++ b/src/Models/PhoneType.php
@@ -15,13 +15,28 @@ namespace PaypalServerSdkLib\Models;
*/
class PhoneType
{
+ /**
+ * Fax number.
+ */
public const FAX = 'FAX';
+ /**
+ * Home phone number.
+ */
public const HOME = 'HOME';
+ /**
+ * Mobile phone number.
+ */
public const MOBILE = 'MOBILE';
+ /**
+ * Other phone number.
+ */
public const OTHER = 'OTHER';
+ /**
+ * Pager number.
+ */
public const PAGER = 'PAGER';
}
diff --git a/src/Models/Plan.php b/src/Models/Plan.php
index 2091380..2ea2c8e 100644
--- a/src/Models/Plan.php
+++ b/src/Models/Plan.php
@@ -23,11 +23,6 @@ class Plan implements \JsonSerializable
*/
private $billingCycles;
- /**
- * @var mixed
- */
- private $product;
-
/**
* @var OneTimeCharge
*/
@@ -75,30 +70,6 @@ class Plan implements \JsonSerializable
$this->billingCycles = $billingCycles;
}
- /**
- * Returns Product.
- * Product details associated with any one-time product purchase.
- *
- * @return mixed
- */
- public function getProduct()
- {
- return $this->product;
- }
-
- /**
- * Sets Product.
- * Product details associated with any one-time product purchase.
- *
- * @maps product
- *
- * @param mixed $product
- */
- public function setProduct($product): void
- {
- $this->product = $product;
- }
-
/**
* Returns One Time Charges.
* The one-time charge info at the time of checkout.
@@ -151,7 +122,6 @@ class Plan implements \JsonSerializable
'Plan',
[
'billingCycles' => $this->billingCycles,
- 'product' => $this->product,
'oneTimeCharges' => $this->oneTimeCharges,
'name' => $this->name
]
@@ -171,9 +141,6 @@ class Plan implements \JsonSerializable
{
$json = [];
$json['billing_cycles'] = $this->billingCycles;
- if (isset($this->product)) {
- $json['product'] = $this->product;
- }
$json['one_time_charges'] = $this->oneTimeCharges;
if (isset($this->name)) {
$json['name'] = $this->name;
diff --git a/src/Models/PlanCollection.php b/src/Models/PlanCollection.php
new file mode 100644
index 0000000..869c313
--- /dev/null
+++ b/src/Models/PlanCollection.php
@@ -0,0 +1,174 @@
+plans;
+ }
+
+ /**
+ * Sets Plans.
+ * An array of plans.
+ *
+ * @maps plans
+ *
+ * @param BillingPlan[]|null $plans
+ */
+ public function setPlans(?array $plans): void
+ {
+ $this->plans = $plans;
+ }
+
+ /**
+ * Returns Total Items.
+ * The total number of items.
+ */
+ public function getTotalItems(): ?int
+ {
+ return $this->totalItems;
+ }
+
+ /**
+ * Sets Total Items.
+ * The total number of items.
+ *
+ * @maps total_items
+ */
+ public function setTotalItems(?int $totalItems): void
+ {
+ $this->totalItems = $totalItems;
+ }
+
+ /**
+ * Returns Total Pages.
+ * The total number of pages.
+ */
+ public function getTotalPages(): ?int
+ {
+ return $this->totalPages;
+ }
+
+ /**
+ * Sets Total Pages.
+ * The total number of pages.
+ *
+ * @maps total_pages
+ */
+ public function setTotalPages(?int $totalPages): void
+ {
+ $this->totalPages = $totalPages;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the PlanCollection object to a human-readable string representation.
+ *
+ * @return string The string representation of the PlanCollection object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PlanCollection',
+ [
+ 'plans' => $this->plans,
+ 'totalItems' => $this->totalItems,
+ 'totalPages' => $this->totalPages,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->plans)) {
+ $json['plans'] = $this->plans;
+ }
+ if (isset($this->totalItems)) {
+ $json['total_items'] = $this->totalItems;
+ }
+ if (isset($this->totalPages)) {
+ $json['total_pages'] = $this->totalPages;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PlanDetails.php b/src/Models/PlanDetails.php
new file mode 100644
index 0000000..977153d
--- /dev/null
+++ b/src/Models/PlanDetails.php
@@ -0,0 +1,288 @@
+productId;
+ }
+
+ /**
+ * Sets Product Id.
+ * The ID for the product.
+ *
+ * @maps product_id
+ */
+ public function setProductId(?string $productId): void
+ {
+ $this->productId = $productId;
+ }
+
+ /**
+ * Returns Name.
+ * The plan name.
+ */
+ public function getName(): ?string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The plan name.
+ *
+ * @maps name
+ */
+ public function setName(?string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Description.
+ * The detailed description of the plan.
+ */
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ /**
+ * Sets Description.
+ * The detailed description of the plan.
+ *
+ * @maps description
+ */
+ public function setDescription(?string $description): void
+ {
+ $this->description = $description;
+ }
+
+ /**
+ * Returns Billing Cycles.
+ * 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.
+ *
+ * @return SubscriptionBillingCycle[]|null
+ */
+ public function getBillingCycles(): ?array
+ {
+ return $this->billingCycles;
+ }
+
+ /**
+ * Sets Billing Cycles.
+ * 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.
+ *
+ * @maps billing_cycles
+ *
+ * @param SubscriptionBillingCycle[]|null $billingCycles
+ */
+ public function setBillingCycles(?array $billingCycles): void
+ {
+ $this->billingCycles = $billingCycles;
+ }
+
+ /**
+ * Returns Payment Preferences.
+ * The payment preferences for a subscription.
+ */
+ public function getPaymentPreferences(): ?PaymentPreferences
+ {
+ return $this->paymentPreferences;
+ }
+
+ /**
+ * Sets Payment Preferences.
+ * The payment preferences for a subscription.
+ *
+ * @maps payment_preferences
+ */
+ public function setPaymentPreferences(?PaymentPreferences $paymentPreferences): void
+ {
+ $this->paymentPreferences = $paymentPreferences;
+ }
+
+ /**
+ * Returns Merchant Preferences.
+ * The merchant preferences for a subscription.
+ */
+ public function getMerchantPreferences(): ?MerchantPreferences
+ {
+ return $this->merchantPreferences;
+ }
+
+ /**
+ * Sets Merchant Preferences.
+ * The merchant preferences for a subscription.
+ *
+ * @maps merchant_preferences
+ */
+ public function setMerchantPreferences(?MerchantPreferences $merchantPreferences): void
+ {
+ $this->merchantPreferences = $merchantPreferences;
+ }
+
+ /**
+ * Returns Taxes.
+ * The tax details.
+ */
+ public function getTaxes(): ?Taxes
+ {
+ return $this->taxes;
+ }
+
+ /**
+ * Sets Taxes.
+ * The tax details.
+ *
+ * @maps taxes
+ */
+ public function setTaxes(?Taxes $taxes): void
+ {
+ $this->taxes = $taxes;
+ }
+
+ /**
+ * Returns Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ */
+ public function getQuantitySupported(): ?bool
+ {
+ return $this->quantitySupported;
+ }
+
+ /**
+ * Sets Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ *
+ * @maps quantity_supported
+ */
+ public function setQuantitySupported(?bool $quantitySupported): void
+ {
+ $this->quantitySupported = $quantitySupported;
+ }
+
+ /**
+ * Converts the PlanDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the PlanDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PlanDetails',
+ [
+ 'productId' => $this->productId,
+ 'name' => $this->name,
+ 'description' => $this->description,
+ 'billingCycles' => $this->billingCycles,
+ 'paymentPreferences' => $this->paymentPreferences,
+ 'merchantPreferences' => $this->merchantPreferences,
+ 'taxes' => $this->taxes,
+ 'quantitySupported' => $this->quantitySupported
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->productId)) {
+ $json['product_id'] = $this->productId;
+ }
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->description)) {
+ $json['description'] = $this->description;
+ }
+ if (isset($this->billingCycles)) {
+ $json['billing_cycles'] = $this->billingCycles;
+ }
+ if (isset($this->paymentPreferences)) {
+ $json['payment_preferences'] = $this->paymentPreferences;
+ }
+ if (isset($this->merchantPreferences)) {
+ $json['merchant_preferences'] = $this->merchantPreferences;
+ }
+ if (isset($this->taxes)) {
+ $json['taxes'] = $this->taxes;
+ }
+ if (isset($this->quantitySupported)) {
+ $json['quantity_supported'] = $this->quantitySupported;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PlanOverride.php b/src/Models/PlanOverride.php
new file mode 100644
index 0000000..4df629f
--- /dev/null
+++ b/src/Models/PlanOverride.php
@@ -0,0 +1,144 @@
+billingCycles;
+ }
+
+ /**
+ * Sets Billing Cycles.
+ * An array of billing cycles for trial billing and regular billing. The subscription billing cycle
+ * definition has to adhere to the plan billing cycle definition.
+ *
+ * @maps billing_cycles
+ *
+ * @param BillingCycleOverride[]|null $billingCycles
+ */
+ public function setBillingCycles(?array $billingCycles): void
+ {
+ $this->billingCycles = $billingCycles;
+ }
+
+ /**
+ * Returns Payment Preferences.
+ * The payment preferences to override at subscription level.
+ */
+ public function getPaymentPreferences(): ?PaymentPreferencesOverride
+ {
+ return $this->paymentPreferences;
+ }
+
+ /**
+ * Sets Payment Preferences.
+ * The payment preferences to override at subscription level.
+ *
+ * @maps payment_preferences
+ */
+ public function setPaymentPreferences(?PaymentPreferencesOverride $paymentPreferences): void
+ {
+ $this->paymentPreferences = $paymentPreferences;
+ }
+
+ /**
+ * Returns Taxes.
+ * The tax details.
+ */
+ public function getTaxes(): ?TaxesOverride
+ {
+ return $this->taxes;
+ }
+
+ /**
+ * Sets Taxes.
+ * The tax details.
+ *
+ * @maps taxes
+ */
+ public function setTaxes(?TaxesOverride $taxes): void
+ {
+ $this->taxes = $taxes;
+ }
+
+ /**
+ * Converts the PlanOverride object to a human-readable string representation.
+ *
+ * @return string The string representation of the PlanOverride object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PlanOverride',
+ [
+ 'billingCycles' => $this->billingCycles,
+ 'paymentPreferences' => $this->paymentPreferences,
+ 'taxes' => $this->taxes
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->billingCycles)) {
+ $json['billing_cycles'] = $this->billingCycles;
+ }
+ if (isset($this->paymentPreferences)) {
+ $json['payment_preferences'] = $this->paymentPreferences;
+ }
+ if (isset($this->taxes)) {
+ $json['taxes'] = $this->taxes;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PlanRequest.php b/src/Models/PlanRequest.php
new file mode 100644
index 0000000..2587f2e
--- /dev/null
+++ b/src/Models/PlanRequest.php
@@ -0,0 +1,331 @@
+productId = $productId;
+ $this->name = $name;
+ $this->billingCycles = $billingCycles;
+ $this->paymentPreferences = $paymentPreferences;
+ }
+
+ /**
+ * Returns Product Id.
+ * The ID of the product created through Catalog Products API.
+ */
+ public function getProductId(): string
+ {
+ return $this->productId;
+ }
+
+ /**
+ * Sets Product Id.
+ * The ID of the product created through Catalog Products API.
+ *
+ * @required
+ * @maps product_id
+ */
+ public function setProductId(string $productId): void
+ {
+ $this->productId = $productId;
+ }
+
+ /**
+ * Returns Name.
+ * The plan name.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets Name.
+ * The plan name.
+ *
+ * @required
+ * @maps name
+ */
+ public function setName(string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Status.
+ * The initial state of the plan. Allowed input values are CREATED and ACTIVE.
+ */
+ public function getStatus(): ?string
+ {
+ return $this->status;
+ }
+
+ /**
+ * Sets Status.
+ * The initial state of the plan. Allowed input values are CREATED and ACTIVE.
+ *
+ * @maps status
+ */
+ public function setStatus(?string $status): void
+ {
+ $this->status = $status;
+ }
+
+ /**
+ * Returns Description.
+ * The detailed description of the plan.
+ */
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ /**
+ * Sets Description.
+ * The detailed description of the plan.
+ *
+ * @maps description
+ */
+ public function setDescription(?string $description): void
+ {
+ $this->description = $description;
+ }
+
+ /**
+ * Returns Billing Cycles.
+ * 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.
+ *
+ * @return SubscriptionBillingCycle[]
+ */
+ public function getBillingCycles(): array
+ {
+ return $this->billingCycles;
+ }
+
+ /**
+ * Sets Billing Cycles.
+ * 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.
+ *
+ * @required
+ * @maps billing_cycles
+ *
+ * @param SubscriptionBillingCycle[] $billingCycles
+ */
+ public function setBillingCycles(array $billingCycles): void
+ {
+ $this->billingCycles = $billingCycles;
+ }
+
+ /**
+ * Returns Payment Preferences.
+ * The payment preferences for a subscription.
+ */
+ public function getPaymentPreferences(): PaymentPreferences
+ {
+ return $this->paymentPreferences;
+ }
+
+ /**
+ * Sets Payment Preferences.
+ * The payment preferences for a subscription.
+ *
+ * @required
+ * @maps payment_preferences
+ */
+ public function setPaymentPreferences(PaymentPreferences $paymentPreferences): void
+ {
+ $this->paymentPreferences = $paymentPreferences;
+ }
+
+ /**
+ * Returns Merchant Preferences.
+ * The merchant preferences for a subscription.
+ */
+ public function getMerchantPreferences(): ?MerchantPreferences
+ {
+ return $this->merchantPreferences;
+ }
+
+ /**
+ * Sets Merchant Preferences.
+ * The merchant preferences for a subscription.
+ *
+ * @maps merchant_preferences
+ */
+ public function setMerchantPreferences(?MerchantPreferences $merchantPreferences): void
+ {
+ $this->merchantPreferences = $merchantPreferences;
+ }
+
+ /**
+ * Returns Taxes.
+ * The tax details.
+ */
+ public function getTaxes(): ?Taxes
+ {
+ return $this->taxes;
+ }
+
+ /**
+ * Sets Taxes.
+ * The tax details.
+ *
+ * @maps taxes
+ */
+ public function setTaxes(?Taxes $taxes): void
+ {
+ $this->taxes = $taxes;
+ }
+
+ /**
+ * Returns Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ */
+ public function getQuantitySupported(): ?bool
+ {
+ return $this->quantitySupported;
+ }
+
+ /**
+ * Sets Quantity Supported.
+ * Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
+ *
+ * @maps quantity_supported
+ */
+ public function setQuantitySupported(?bool $quantitySupported): void
+ {
+ $this->quantitySupported = $quantitySupported;
+ }
+
+ /**
+ * Converts the PlanRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the PlanRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PlanRequest',
+ [
+ 'productId' => $this->productId,
+ 'name' => $this->name,
+ 'status' => $this->status,
+ 'description' => $this->description,
+ 'billingCycles' => $this->billingCycles,
+ 'paymentPreferences' => $this->paymentPreferences,
+ 'merchantPreferences' => $this->merchantPreferences,
+ 'taxes' => $this->taxes,
+ 'quantitySupported' => $this->quantitySupported
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['product_id'] = $this->productId;
+ $json['name'] = $this->name;
+ if (isset($this->status)) {
+ $json['status'] = $this->status;
+ }
+ if (isset($this->description)) {
+ $json['description'] = $this->description;
+ }
+ $json['billing_cycles'] = $this->billingCycles;
+ $json['payment_preferences'] = $this->paymentPreferences;
+ if (isset($this->merchantPreferences)) {
+ $json['merchant_preferences'] = $this->merchantPreferences;
+ }
+ if (isset($this->taxes)) {
+ $json['taxes'] = $this->taxes;
+ }
+ if (isset($this->quantitySupported)) {
+ $json['quantity_supported'] = $this->quantitySupported;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PlanRequestStatus.php b/src/Models/PlanRequestStatus.php
new file mode 100644
index 0000000..18326db
--- /dev/null
+++ b/src/Models/PlanRequestStatus.php
@@ -0,0 +1,32 @@
+startingQuantity = $startingQuantity;
+ $this->amount = $amount;
+ }
+
+ /**
+ * Returns Starting Quantity.
+ * The starting quantity for the tier.
+ */
+ public function getStartingQuantity(): string
+ {
+ return $this->startingQuantity;
+ }
+
+ /**
+ * Sets Starting Quantity.
+ * The starting quantity for the tier.
+ *
+ * @required
+ * @maps starting_quantity
+ */
+ public function setStartingQuantity(string $startingQuantity): void
+ {
+ $this->startingQuantity = $startingQuantity;
+ }
+
+ /**
+ * Returns Ending Quantity.
+ * The ending quantity for the tier. Optional for the last tier.
+ */
+ public function getEndingQuantity(): ?string
+ {
+ return $this->endingQuantity;
+ }
+
+ /**
+ * Sets Ending Quantity.
+ * The ending quantity for the tier. Optional for the last tier.
+ *
+ * @maps ending_quantity
+ */
+ public function setEndingQuantity(?string $endingQuantity): void
+ {
+ $this->endingQuantity = $endingQuantity;
+ }
+
+ /**
+ * Returns Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAmount(): Money
+ {
+ return $this->amount;
+ }
+
+ /**
+ * Sets Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps amount
+ */
+ public function setAmount(Money $amount): void
+ {
+ $this->amount = $amount;
+ }
+
+ /**
+ * Converts the PricingTier object to a human-readable string representation.
+ *
+ * @return string The string representation of the PricingTier object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'PricingTier',
+ [
+ 'startingQuantity' => $this->startingQuantity,
+ 'endingQuantity' => $this->endingQuantity,
+ 'amount' => $this->amount
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['starting_quantity'] = $this->startingQuantity;
+ if (isset($this->endingQuantity)) {
+ $json['ending_quantity'] = $this->endingQuantity;
+ }
+ $json['amount'] = $this->amount;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/PurchaseUnitRequest.php b/src/Models/PurchaseUnitRequest.php
index 4e52f09..68e2d70 100644
--- a/src/Models/PurchaseUnitRequest.php
+++ b/src/Models/PurchaseUnitRequest.php
@@ -59,7 +59,7 @@ class PurchaseUnitRequest implements \JsonSerializable
private $softDescriptor;
/**
- * @var Item[]|null
+ * @var ItemRequest[]|null
*/
private $items;
@@ -178,10 +178,12 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Returns Description.
- * 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.
+ * 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.
*/
public function getDescription(): ?string
{
@@ -190,10 +192,12 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Sets Description.
- * 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.
+ * 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.
*
* @maps description
*/
@@ -227,7 +231,10 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Returns Invoice Id.
* 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.
+ * 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.
*/
public function getInvoiceId(): ?string
{
@@ -237,7 +244,10 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Sets Invoice Id.
* 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.
+ * 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.
*
* @maps invoice_id
*/
@@ -248,6 +258,8 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Returns Soft Descriptor.
+ * 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:
@@ -265,6 +277,8 @@ class PurchaseUnitRequest implements \JsonSerializable
/**
* Sets Soft Descriptor.
+ * 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:
@@ -286,7 +300,7 @@ class PurchaseUnitRequest implements \JsonSerializable
* Returns Items.
* An array of items that the customer purchases from the merchant.
*
- * @return Item[]|null
+ * @return ItemRequest[]|null
*/
public function getItems(): ?array
{
@@ -299,7 +313,7 @@ class PurchaseUnitRequest implements \JsonSerializable
*
* @maps items
*
- * @param Item[]|null $items
+ * @param ItemRequest[]|null $items
*/
public function setItems(?array $items): void
{
diff --git a/src/Models/ReasonCode.php b/src/Models/ReasonCode.php
new file mode 100644
index 0000000..cc266e2
--- /dev/null
+++ b/src/Models/ReasonCode.php
@@ -0,0 +1,57 @@
+transactionDetails;
+ }
+
+ /**
+ * Sets Transaction Details.
+ * An array of transaction detail objects.
+ *
+ * @maps transaction_details
+ *
+ * @param TransactionDetails[]|null $transactionDetails
+ */
+ public function setTransactionDetails(?array $transactionDetails): void
+ {
+ $this->transactionDetails = $transactionDetails;
+ }
+
+ /**
+ * Returns Account Number.
+ * The merchant account number.
+ */
+ public function getAccountNumber(): ?string
+ {
+ return $this->accountNumber;
+ }
+
+ /**
+ * Sets Account Number.
+ * The merchant account number.
+ *
+ * @maps account_number
+ */
+ public function setAccountNumber(?string $accountNumber): void
+ {
+ $this->accountNumber = $accountNumber;
+ }
+
+ /**
+ * Returns Start Date.
+ * 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.
+ */
+ public function getStartDate(): ?string
+ {
+ return $this->startDate;
+ }
+
+ /**
+ * Sets Start Date.
+ * 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.
+ *
+ * @maps start_date
+ */
+ public function setStartDate(?string $startDate): void
+ {
+ $this->startDate = $startDate;
+ }
+
+ /**
+ * Returns End Date.
+ * 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.
+ */
+ public function getEndDate(): ?string
+ {
+ return $this->endDate;
+ }
+
+ /**
+ * Sets End Date.
+ * 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.
+ *
+ * @maps end_date
+ */
+ public function setEndDate(?string $endDate): void
+ {
+ $this->endDate = $endDate;
+ }
+
+ /**
+ * Returns Last Refreshed Datetime.
+ * 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.
+ */
+ public function getLastRefreshedDatetime(): ?string
+ {
+ return $this->lastRefreshedDatetime;
+ }
+
+ /**
+ * Sets Last Refreshed Datetime.
+ * 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.
+ *
+ * @maps last_refreshed_datetime
+ */
+ public function setLastRefreshedDatetime(?string $lastRefreshedDatetime): void
+ {
+ $this->lastRefreshedDatetime = $lastRefreshedDatetime;
+ }
+
+ /**
+ * Returns Page.
+ * A zero-relative index of transactions.
+ */
+ public function getPage(): ?int
+ {
+ return $this->page;
+ }
+
+ /**
+ * Sets Page.
+ * A zero-relative index of transactions.
+ *
+ * @maps page
+ */
+ public function setPage(?int $page): void
+ {
+ $this->page = $page;
+ }
+
+ /**
+ * Returns Total Items.
+ * The total number of transactions as an integer beginning with the specified `page` in the full
+ * result and not just in this response.
+ */
+ public function getTotalItems(): ?int
+ {
+ return $this->totalItems;
+ }
+
+ /**
+ * Sets Total Items.
+ * The total number of transactions as an integer beginning with the specified `page` in the full
+ * result and not just in this response.
+ *
+ * @maps total_items
+ */
+ public function setTotalItems(?int $totalItems): void
+ {
+ $this->totalItems = $totalItems;
+ }
+
+ /**
+ * Returns Total Pages.
+ * The total number of pages, as an `integer`, when the `total_items` is divided into pages of the
+ * specified `page_size`.
+ */
+ public function getTotalPages(): ?int
+ {
+ return $this->totalPages;
+ }
+
+ /**
+ * Sets Total Pages.
+ * The total number of pages, as an `integer`, when the `total_items` is divided into pages of the
+ * specified `page_size`.
+ *
+ * @maps total_pages
+ */
+ public function setTotalPages(?int $totalPages): void
+ {
+ $this->totalPages = $totalPages;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the SearchResponse object to a human-readable string representation.
+ *
+ * @return string The string representation of the SearchResponse object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SearchResponse',
+ [
+ 'transactionDetails' => $this->transactionDetails,
+ 'accountNumber' => $this->accountNumber,
+ 'startDate' => $this->startDate,
+ 'endDate' => $this->endDate,
+ 'lastRefreshedDatetime' => $this->lastRefreshedDatetime,
+ 'page' => $this->page,
+ 'totalItems' => $this->totalItems,
+ 'totalPages' => $this->totalPages,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->transactionDetails)) {
+ $json['transaction_details'] = $this->transactionDetails;
+ }
+ if (isset($this->accountNumber)) {
+ $json['account_number'] = $this->accountNumber;
+ }
+ if (isset($this->startDate)) {
+ $json['start_date'] = $this->startDate;
+ }
+ if (isset($this->endDate)) {
+ $json['end_date'] = $this->endDate;
+ }
+ if (isset($this->lastRefreshedDatetime)) {
+ $json['last_refreshed_datetime'] = $this->lastRefreshedDatetime;
+ }
+ if (isset($this->page)) {
+ $json['page'] = $this->page;
+ }
+ if (isset($this->totalItems)) {
+ $json['total_items'] = $this->totalItems;
+ }
+ if (isset($this->totalPages)) {
+ $json['total_pages'] = $this->totalPages;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SepaDebitExperienceContext.php b/src/Models/SepaDebitExperienceContext.php
new file mode 100644
index 0000000..a231a43
--- /dev/null
+++ b/src/Models/SepaDebitExperienceContext.php
@@ -0,0 +1,151 @@
+returnUrl = $returnUrl;
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Returns Locale.
+ * 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/).
+ */
+ public function getLocale(): ?string
+ {
+ return $this->locale;
+ }
+
+ /**
+ * Sets Locale.
+ * 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/).
+ *
+ * @maps locale
+ */
+ public function setLocale(?string $locale): void
+ {
+ $this->locale = $locale;
+ }
+
+ /**
+ * Returns Return Url.
+ * Describes the URL.
+ */
+ public function getReturnUrl(): string
+ {
+ return $this->returnUrl;
+ }
+
+ /**
+ * Sets Return Url.
+ * Describes the URL.
+ *
+ * @required
+ * @maps return_url
+ */
+ public function setReturnUrl(string $returnUrl): void
+ {
+ $this->returnUrl = $returnUrl;
+ }
+
+ /**
+ * Returns Cancel Url.
+ * Describes the URL.
+ */
+ public function getCancelUrl(): string
+ {
+ return $this->cancelUrl;
+ }
+
+ /**
+ * Sets Cancel Url.
+ * Describes the URL.
+ *
+ * @required
+ * @maps cancel_url
+ */
+ public function setCancelUrl(string $cancelUrl): void
+ {
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Converts the SepaDebitExperienceContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the SepaDebitExperienceContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SepaDebitExperienceContext',
+ ['locale' => $this->locale, 'returnUrl' => $this->returnUrl, 'cancelUrl' => $this->cancelUrl]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->locale)) {
+ $json['locale'] = $this->locale;
+ }
+ $json['return_url'] = $this->returnUrl;
+ $json['cancel_url'] = $this->cancelUrl;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SepaDebitRequest.php b/src/Models/SepaDebitRequest.php
new file mode 100644
index 0000000..f59dd26
--- /dev/null
+++ b/src/Models/SepaDebitRequest.php
@@ -0,0 +1,74 @@
+experienceContext;
+ }
+
+ /**
+ * Sets Experience Context.
+ * Customizes the payer experience during the approval process for the SEPA Debit payment.
+ *
+ * @maps experience_context
+ */
+ public function setExperienceContext(?SepaDebitExperienceContext $experienceContext): void
+ {
+ $this->experienceContext = $experienceContext;
+ }
+
+ /**
+ * Converts the SepaDebitRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the SepaDebitRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('SepaDebitRequest', ['experienceContext' => $this->experienceContext]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->experienceContext)) {
+ $json['experience_context'] = $this->experienceContext;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SetupFeeFailureAction.php b/src/Models/SetupFeeFailureAction.php
new file mode 100644
index 0000000..edd469d
--- /dev/null
+++ b/src/Models/SetupFeeFailureAction.php
@@ -0,0 +1,27 @@
+experienceContext;
}
/**
* Sets Experience Context.
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault a card.
*
* @maps experience_context
*/
- public function setExperienceContext(?SetupTokenCardExperienceContext $experienceContext): void
+ public function setExperienceContext(?VaultCardExperienceContext $experienceContext): void
{
$this->experienceContext = $experienceContext;
}
diff --git a/src/Models/SetupTokenRequestPaymentSource.php b/src/Models/SetupTokenRequestPaymentSource.php
index a50faa8..3d9de23 100644
--- a/src/Models/SetupTokenRequestPaymentSource.php
+++ b/src/Models/SetupTokenRequestPaymentSource.php
@@ -33,11 +33,21 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
*/
private $venmo;
+ /**
+ * @var VaultApplePayRequest|null
+ */
+ private $applePay;
+
/**
* @var VaultTokenRequest|null
*/
private $token;
+ /**
+ * @var BankRequest|null
+ */
+ private $bank;
+
/**
* Returns Card.
* A Resource representing a request to vault a Card.
@@ -80,6 +90,7 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
/**
* Returns Venmo.
+ * A resource representing a request to vault Venmo.
*/
public function getVenmo(): ?VaultVenmoRequest
{
@@ -88,6 +99,7 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
/**
* Sets Venmo.
+ * A resource representing a request to vault Venmo.
*
* @maps venmo
*/
@@ -96,6 +108,26 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
$this->venmo = $venmo;
}
+ /**
+ * Returns Apple Pay.
+ * A resource representing a request to vault Apple Pay.
+ */
+ public function getApplePay(): ?VaultApplePayRequest
+ {
+ return $this->applePay;
+ }
+
+ /**
+ * Sets Apple Pay.
+ * A resource representing a request to vault Apple Pay.
+ *
+ * @maps apple_pay
+ */
+ public function setApplePay(?VaultApplePayRequest $applePay): void
+ {
+ $this->applePay = $applePay;
+ }
+
/**
* Returns Token.
* The Tokenized Payment Source representing a Request to Vault a Token.
@@ -116,6 +148,26 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
$this->token = $token;
}
+ /**
+ * Returns Bank.
+ * A Resource representing a request to vault a Bank used for ACH Debit.
+ */
+ public function getBank(): ?BankRequest
+ {
+ return $this->bank;
+ }
+
+ /**
+ * Sets Bank.
+ * A Resource representing a request to vault a Bank used for ACH Debit.
+ *
+ * @maps bank
+ */
+ public function setBank(?BankRequest $bank): void
+ {
+ $this->bank = $bank;
+ }
+
/**
* Converts the SetupTokenRequestPaymentSource object to a human-readable string representation.
*
@@ -125,7 +177,14 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
{
return ApiHelper::stringify(
'SetupTokenRequestPaymentSource',
- ['card' => $this->card, 'paypal' => $this->paypal, 'venmo' => $this->venmo, 'token' => $this->token]
+ [
+ 'card' => $this->card,
+ 'paypal' => $this->paypal,
+ 'venmo' => $this->venmo,
+ 'applePay' => $this->applePay,
+ 'token' => $this->token,
+ 'bank' => $this->bank
+ ]
);
}
@@ -142,16 +201,22 @@ class SetupTokenRequestPaymentSource implements \JsonSerializable
{
$json = [];
if (isset($this->card)) {
- $json['card'] = $this->card;
+ $json['card'] = $this->card;
}
if (isset($this->paypal)) {
- $json['paypal'] = $this->paypal;
+ $json['paypal'] = $this->paypal;
}
if (isset($this->venmo)) {
- $json['venmo'] = $this->venmo;
+ $json['venmo'] = $this->venmo;
+ }
+ if (isset($this->applePay)) {
+ $json['apple_pay'] = $this->applePay;
}
if (isset($this->token)) {
- $json['token'] = $this->token;
+ $json['token'] = $this->token;
+ }
+ if (isset($this->bank)) {
+ $json['bank'] = $this->bank;
}
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
diff --git a/src/Models/SetupTokenResponse.php b/src/Models/SetupTokenResponse.php
index 693eb3d..fd44e7f 100644
--- a/src/Models/SetupTokenResponse.php
+++ b/src/Models/SetupTokenResponse.php
@@ -45,7 +45,8 @@ class SetupTokenResponse implements \JsonSerializable
/**
* Returns Id.
- * The PayPal-generated ID for the vault token.
+ * 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.
*/
public function getId(): ?string
{
@@ -54,7 +55,8 @@ class SetupTokenResponse implements \JsonSerializable
/**
* Sets Id.
- * The PayPal-generated ID for the vault token.
+ * 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.
*
* @maps id
*/
diff --git a/src/Models/SetupTokenResponsePaymentSource.php b/src/Models/SetupTokenResponsePaymentSource.php
index d07cadc..789271d 100644
--- a/src/Models/SetupTokenResponsePaymentSource.php
+++ b/src/Models/SetupTokenResponsePaymentSource.php
@@ -53,6 +53,7 @@ class SetupTokenResponsePaymentSource implements \JsonSerializable
/**
* Returns Paypal.
+ * Full representation of a PayPal Payment Token.
*/
public function getPaypal(): ?PaypalPaymentToken
{
@@ -61,6 +62,7 @@ class SetupTokenResponsePaymentSource implements \JsonSerializable
/**
* Sets Paypal.
+ * Full representation of a PayPal Payment Token.
*
* @maps paypal
*/
@@ -71,6 +73,7 @@ class SetupTokenResponsePaymentSource implements \JsonSerializable
/**
* Returns Venmo.
+ * Full representation of a Venmo Payment Token.
*/
public function getVenmo(): ?VenmoPaymentToken
{
@@ -79,6 +82,7 @@ class SetupTokenResponsePaymentSource implements \JsonSerializable
/**
* Sets Venmo.
+ * Full representation of a Venmo Payment Token.
*
* @maps venmo
*/
diff --git a/src/Models/ShipmentCarrier.php b/src/Models/ShipmentCarrier.php
index a4f6f96..ba38dcd 100644
--- a/src/Models/ShipmentCarrier.php
+++ b/src/Models/ShipmentCarrier.php
@@ -6898,4 +6898,184 @@ class ShipmentCarrier
* Spedisci online.
*/
public const SPEDISCI = 'SPEDISCI';
+
+ /**
+ * Fourkites.
+ */
+ public const FOURKITES = 'FOURKITES';
+
+ /**
+ * Etonas.
+ */
+ public const ETONAS = 'ETONAS';
+
+ /**
+ * Fin Mile.
+ */
+ public const FINMILE = 'FINMILE';
+
+ /**
+ * Uniuni.
+ */
+ public const UNIUNI = 'UNIUNI';
+
+ /**
+ * Rodonaves.
+ */
+ public const RODONAVES = 'RODONAVES';
+
+ /**
+ * Inpost Italy.
+ */
+ public const INPOST_IT = 'INPOST_IT';
+
+ /**
+ * Tforce Freight.
+ */
+ public const TFORCE_FREIGHT = 'TFORCE_FREIGHT';
+
+ /**
+ * Rich Mom.
+ */
+ public const RICHMOM = 'RICHMOM';
+
+ /**
+ * Corriere Franco.
+ */
+ public const FRANCO = 'FRANCO';
+
+ /**
+ * Ecparcel.
+ */
+ public const ECPARCEL = 'ECPARCEL';
+
+ /**
+ * Fedex China.
+ */
+ public const FEDEX_CHINA = 'FEDEX_CHINA';
+
+ /**
+ * Gofo Express.
+ */
+ public const GOFO_EXPRESS = 'GOFO_EXPRESS';
+
+ /**
+ * Shipbob.
+ */
+ public const SHIPBOB = 'SHIPBOB';
+
+ /**
+ * Jersey Post Group.
+ */
+ public const JERSEYPOST_ATLAS = 'JERSEYPOST_ATLAS';
+
+ /**
+ * Coretrails.
+ */
+ public const CORETRAILS = 'CORETRAILS';
+
+ /**
+ * Rhenus Logistics Italy.
+ */
+ public const RHENUS_ITALY = 'RHENUS_ITALY';
+
+ /**
+ * Jadlog.
+ */
+ public const JADLOG = 'JADLOG';
+
+ /**
+ * Jitsu.
+ */
+ public const JITSU = 'JITSU';
+
+ /**
+ * Yanwen Express.
+ */
+ public const YANWEN_EXPRESS = 'YANWEN_EXPRESS';
+
+ /**
+ * Dashlink.
+ */
+ public const DASHLINK = 'DASHLINK';
+
+ /**
+ * Seino Super Express.
+ */
+ public const SEINO_SUPER_EXPRESS = 'SEINO_SUPER_EXPRESS';
+
+ /**
+ * Floship.
+ */
+ public const FLOSHIP = 'FLOSHIP';
+
+ /**
+ * Metro Supply Chain.
+ */
+ public const METROSCG = 'METROSCG';
+
+ /**
+ * Sendparcel.
+ */
+ public const SENDPARCEL = 'SENDPARCEL';
+
+ /**
+ * P2p.
+ */
+ public const P2P = 'P2P';
+
+ /**
+ * Cn Express.
+ */
+ public const CN_EXPRESS = 'CN_EXPRESS';
+
+ /**
+ * Cirro Track.
+ */
+ public const CIRROTRACK = 'CIRROTRACK';
+
+ /**
+ * Land Logistics.
+ */
+ public const LAND_LOGISTICS = 'LAND_LOGISTICS';
+
+ /**
+ * Veho.
+ */
+ public const VEHO = 'VEHO';
+
+ /**
+ * Medline.
+ */
+ public const MEDLINE = 'MEDLINE';
+
+ /**
+ * Vdtrack.
+ */
+ public const VDTRACK = 'VDTRACK';
+
+ /**
+ * Sino Scm.
+ */
+ public const SINO_SCM = 'SINO_SCM';
+
+ /**
+ * 3pe Express.
+ */
+ public const ENUM_3PE_EXPRESS = '3PE_EXPRESS';
+
+ /**
+ * Swiftx.
+ */
+ public const SWIFTX = 'SWIFTX';
+
+ /**
+ * Sfyd Express.
+ */
+ public const SFYDEXPRESS = 'SFYDEXPRESS';
+
+ /**
+ * Toptrans.
+ */
+ public const TOPTRANS = 'TOPTRANS';
}
diff --git a/src/Models/ShippingInformation.php b/src/Models/ShippingInformation.php
new file mode 100644
index 0000000..1e2f357
--- /dev/null
+++ b/src/Models/ShippingInformation.php
@@ -0,0 +1,170 @@
+name;
+ }
+
+ /**
+ * Sets Name.
+ * The recipient's name.
+ *
+ * @maps name
+ */
+ public function setName(?string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Method.
+ * The shipping method that is associated with this order.
+ */
+ public function getMethod(): ?string
+ {
+ return $this->method;
+ }
+
+ /**
+ * Sets Method.
+ * The shipping method that is associated with this order.
+ *
+ * @maps method
+ */
+ public function setMethod(?string $method): void
+ {
+ $this->method = $method;
+ }
+
+ /**
+ * Returns Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ */
+ public function getAddress(): ?SimplePostalAddressCoarseGrained
+ {
+ return $this->address;
+ }
+
+ /**
+ * Sets Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ *
+ * @maps address
+ */
+ public function setAddress(?SimplePostalAddressCoarseGrained $address): void
+ {
+ $this->address = $address;
+ }
+
+ /**
+ * Returns Secondary Shipping Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ */
+ public function getSecondaryShippingAddress(): ?SimplePostalAddressCoarseGrained
+ {
+ return $this->secondaryShippingAddress;
+ }
+
+ /**
+ * Sets Secondary Shipping Address.
+ * A simple postal address with coarse-grained fields. Do not use for an international address. Use for
+ * backward compatibility only. Does not contain phone.
+ *
+ * @maps secondary_shipping_address
+ */
+ public function setSecondaryShippingAddress(?SimplePostalAddressCoarseGrained $secondaryShippingAddress): void
+ {
+ $this->secondaryShippingAddress = $secondaryShippingAddress;
+ }
+
+ /**
+ * Converts the ShippingInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the ShippingInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'ShippingInformation',
+ [
+ 'name' => $this->name,
+ 'method' => $this->method,
+ 'address' => $this->address,
+ 'secondaryShippingAddress' => $this->secondaryShippingAddress
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->method)) {
+ $json['method'] = $this->method;
+ }
+ if (isset($this->address)) {
+ $json['address'] = $this->address;
+ }
+ if (isset($this->secondaryShippingAddress)) {
+ $json['secondary_shipping_address'] = $this->secondaryShippingAddress;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/ShippingOptionsPurchaseUnit.php b/src/Models/ShippingOptionsPurchaseUnit.php
deleted file mode 100644
index dcf3cf2..0000000
--- a/src/Models/ShippingOptionsPurchaseUnit.php
+++ /dev/null
@@ -1,190 +0,0 @@
-referenceId;
- }
-
- /**
- * Sets Reference Id.
- * The API caller-provided external ID for the purchase unit. Required for multiple purchase units when
- * you must update the order through `PATCH`. If you omit this value and the order contains only one
- * purchase unit, PayPal sets this value to `default`. Note: If there are multiple purchase units,
- * reference_id is required for each purchase unit.
- *
- * @maps reference_id
- */
- public function setReferenceId(?string $referenceId): void
- {
- $this->referenceId = $referenceId;
- }
-
- /**
- * Returns Amount.
- * 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.
- */
- public function getAmount(): ?AmountWithBreakdown
- {
- return $this->amount;
- }
-
- /**
- * Sets Amount.
- * 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.
- *
- * @maps amount
- */
- public function setAmount(?AmountWithBreakdown $amount): void
- {
- $this->amount = $amount;
- }
-
- /**
- * Returns Items.
- * An array of items that the customer purchases from the merchant.
- *
- * @return Item[]|null
- */
- public function getItems(): ?array
- {
- return $this->items;
- }
-
- /**
- * Sets Items.
- * An array of items that the customer purchases from the merchant.
- *
- * @maps items
- *
- * @param Item[]|null $items
- */
- public function setItems(?array $items): void
- {
- $this->items = $items;
- }
-
- /**
- * Returns Shipping Options.
- * An array of shipping options that the payee or merchant offers to the payer to ship or pick up their
- * items.
- *
- * @return ShippingOption[]|null
- */
- public function getShippingOptions(): ?array
- {
- return $this->shippingOptions;
- }
-
- /**
- * Sets Shipping Options.
- * An array of shipping options that the payee or merchant offers to the payer to ship or pick up their
- * items.
- *
- * @maps shipping_options
- *
- * @param ShippingOption[]|null $shippingOptions
- */
- public function setShippingOptions(?array $shippingOptions): void
- {
- $this->shippingOptions = $shippingOptions;
- }
-
- /**
- * Converts the ShippingOptionsPurchaseUnit object to a human-readable string representation.
- *
- * @return string The string representation of the ShippingOptionsPurchaseUnit object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'ShippingOptionsPurchaseUnit',
- [
- 'referenceId' => $this->referenceId,
- 'amount' => $this->amount,
- 'items' => $this->items,
- 'shippingOptions' => $this->shippingOptions
- ]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->referenceId)) {
- $json['reference_id'] = $this->referenceId;
- }
- if (isset($this->amount)) {
- $json['amount'] = $this->amount;
- }
- if (isset($this->items)) {
- $json['items'] = $this->items;
- }
- if (isset($this->shippingOptions)) {
- $json['shipping_options'] = $this->shippingOptions;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/ShippingWithTrackingDetails.php b/src/Models/ShippingWithTrackingDetails.php
index 025ada7..07f26d5 100644
--- a/src/Models/ShippingWithTrackingDetails.php
+++ b/src/Models/ShippingWithTrackingDetails.php
@@ -13,11 +13,13 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
-/**
- * The order shipping details.
- */
class ShippingWithTrackingDetails implements \JsonSerializable
{
+ /**
+ * @var OrderTrackerResponse[]|null
+ */
+ private $trackers;
+
/**
* @var ShippingName|null
*/
@@ -29,7 +31,7 @@ class ShippingWithTrackingDetails implements \JsonSerializable
private $emailAddress;
/**
- * @var PhoneNumberWithCountryCode|null
+ * @var PhoneNumberWithOptionalCountryCode|null
*/
private $phoneNumber;
@@ -49,9 +51,28 @@ class ShippingWithTrackingDetails implements \JsonSerializable
private $address;
/**
- * @var OrderTrackerResponse[]|null
+ * Returns Trackers.
+ * An array of trackers for a transaction.
+ *
+ * @return OrderTrackerResponse[]|null
*/
- private $trackers;
+ public function getTrackers(): ?array
+ {
+ return $this->trackers;
+ }
+
+ /**
+ * Sets Trackers.
+ * An array of trackers for a transaction.
+ *
+ * @maps trackers
+ *
+ * @param OrderTrackerResponse[]|null $trackers
+ */
+ public function setTrackers(?array $trackers): void
+ {
+ $this->trackers = $trackers;
+ }
/**
* Returns Name.
@@ -102,7 +123,7 @@ class ShippingWithTrackingDetails implements \JsonSerializable
* The phone number in its canonical international [E.164 numbering plan format](https://www.itu.
* int/rec/T-REC-E.164/en).
*/
- public function getPhoneNumber(): ?PhoneNumberWithCountryCode
+ public function getPhoneNumber(): ?PhoneNumberWithOptionalCountryCode
{
return $this->phoneNumber;
}
@@ -114,7 +135,7 @@ class ShippingWithTrackingDetails implements \JsonSerializable
*
* @maps phone_number
*/
- public function setPhoneNumber(?PhoneNumberWithCountryCode $phoneNumber): void
+ public function setPhoneNumber(?PhoneNumberWithOptionalCountryCode $phoneNumber): void
{
$this->phoneNumber = $phoneNumber;
}
@@ -193,30 +214,6 @@ class ShippingWithTrackingDetails implements \JsonSerializable
$this->address = $address;
}
- /**
- * Returns Trackers.
- * An array of trackers for a transaction.
- *
- * @return OrderTrackerResponse[]|null
- */
- public function getTrackers(): ?array
- {
- return $this->trackers;
- }
-
- /**
- * Sets Trackers.
- * An array of trackers for a transaction.
- *
- * @maps trackers
- *
- * @param OrderTrackerResponse[]|null $trackers
- */
- public function setTrackers(?array $trackers): void
- {
- $this->trackers = $trackers;
- }
-
/**
* Converts the ShippingWithTrackingDetails object to a human-readable string representation.
*
@@ -227,13 +224,13 @@ class ShippingWithTrackingDetails implements \JsonSerializable
return ApiHelper::stringify(
'ShippingWithTrackingDetails',
[
+ 'trackers' => $this->trackers,
'name' => $this->name,
'emailAddress' => $this->emailAddress,
'phoneNumber' => $this->phoneNumber,
'type' => $this->type,
'options' => $this->options,
- 'address' => $this->address,
- 'trackers' => $this->trackers
+ 'address' => $this->address
]
);
}
@@ -250,6 +247,9 @@ class ShippingWithTrackingDetails implements \JsonSerializable
public function jsonSerialize(bool $asArrayWhenEmpty = false)
{
$json = [];
+ if (isset($this->trackers)) {
+ $json['trackers'] = $this->trackers;
+ }
if (isset($this->name)) {
$json['name'] = $this->name;
}
@@ -268,9 +268,6 @@ class ShippingWithTrackingDetails implements \JsonSerializable
if (isset($this->address)) {
$json['address'] = $this->address;
}
- if (isset($this->trackers)) {
- $json['trackers'] = $this->trackers;
- }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/SimplePostalAddressCoarseGrained.php b/src/Models/SimplePostalAddressCoarseGrained.php
new file mode 100644
index 0000000..95903e9
--- /dev/null
+++ b/src/Models/SimplePostalAddressCoarseGrained.php
@@ -0,0 +1,256 @@
+line1 = $line1;
+ $this->city = $city;
+ $this->countryCode = $countryCode;
+ }
+
+ /**
+ * Returns Line 1.
+ * The first line of the address. For example, number or street.
+ */
+ public function getLine1(): string
+ {
+ return $this->line1;
+ }
+
+ /**
+ * Sets Line 1.
+ * The first line of the address. For example, number or street.
+ *
+ * @required
+ * @maps line1
+ */
+ public function setLine1(string $line1): void
+ {
+ $this->line1 = $line1;
+ }
+
+ /**
+ * Returns Line 2.
+ * The second line of the address. For example, suite or apartment number.
+ */
+ public function getLine2(): ?string
+ {
+ return $this->line2;
+ }
+
+ /**
+ * Sets Line 2.
+ * The second line of the address. For example, suite or apartment number.
+ *
+ * @maps line2
+ */
+ public function setLine2(?string $line2): void
+ {
+ $this->line2 = $line2;
+ }
+
+ /**
+ * Returns City.
+ * The city name.
+ */
+ public function getCity(): string
+ {
+ return $this->city;
+ }
+
+ /**
+ * Sets City.
+ * The city name.
+ *
+ * @required
+ * @maps city
+ */
+ public function setCity(string $city): void
+ {
+ $this->city = $city;
+ }
+
+ /**
+ * Returns State.
+ * The [code](/docs/api/reference/state-codes/) for a US state or the equivalent for other countries.
+ * Required for transactions if the address is in one of these countries:
+ * [Argentina](/docs/api/reference/state-codes/#argentina), [Brazil](/docs/api/reference/state-
+ * codes/#brazil), [Canada](/docs/api/reference/state-codes/#canada), [China](/docs/api/reference/state-
+ * codes/#china), [India](/docs/api/reference/state-codes/#india), [Italy](/docs/api/reference/state-
+ * codes/#italy), [Japan](/docs/api/reference/state-codes/#japan), [Mexico](/docs/api/reference/state-
+ * codes/#mexico), [Thailand](/docs/api/reference/state-codes/#thailand), or [United
+ * States](/docs/api/reference/state-codes/#usa). Maximum length is 40 single-byte characters.
+ */
+ public function getState(): ?string
+ {
+ return $this->state;
+ }
+
+ /**
+ * Sets State.
+ * The [code](/docs/api/reference/state-codes/) for a US state or the equivalent for other countries.
+ * Required for transactions if the address is in one of these countries:
+ * [Argentina](/docs/api/reference/state-codes/#argentina), [Brazil](/docs/api/reference/state-
+ * codes/#brazil), [Canada](/docs/api/reference/state-codes/#canada), [China](/docs/api/reference/state-
+ * codes/#china), [India](/docs/api/reference/state-codes/#india), [Italy](/docs/api/reference/state-
+ * codes/#italy), [Japan](/docs/api/reference/state-codes/#japan), [Mexico](/docs/api/reference/state-
+ * codes/#mexico), [Thailand](/docs/api/reference/state-codes/#thailand), or [United
+ * States](/docs/api/reference/state-codes/#usa). Maximum length is 40 single-byte characters.
+ *
+ * @maps state
+ */
+ public function setState(?string $state): void
+ {
+ $this->state = $state;
+ }
+
+ /**
+ * Returns Country Code.
+ * 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.
+ */
+ public function getCountryCode(): string
+ {
+ return $this->countryCode;
+ }
+
+ /**
+ * Sets Country Code.
+ * 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.
+ *
+ * @required
+ * @maps country_code
+ */
+ public function setCountryCode(string $countryCode): void
+ {
+ $this->countryCode = $countryCode;
+ }
+
+ /**
+ * Returns Postal Code.
+ * 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).
+ */
+ public function getPostalCode(): ?string
+ {
+ return $this->postalCode;
+ }
+
+ /**
+ * Sets Postal Code.
+ * 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).
+ *
+ * @maps postal_code
+ */
+ public function setPostalCode(?string $postalCode): void
+ {
+ $this->postalCode = $postalCode;
+ }
+
+ /**
+ * Converts the SimplePostalAddressCoarseGrained object to a human-readable string representation.
+ *
+ * @return string The string representation of the SimplePostalAddressCoarseGrained object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SimplePostalAddressCoarseGrained',
+ [
+ 'line1' => $this->line1,
+ 'line2' => $this->line2,
+ 'city' => $this->city,
+ 'state' => $this->state,
+ 'countryCode' => $this->countryCode,
+ 'postalCode' => $this->postalCode
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['line1'] = $this->line1;
+ if (isset($this->line2)) {
+ $json['line2'] = $this->line2;
+ }
+ $json['city'] = $this->city;
+ if (isset($this->state)) {
+ $json['state'] = $this->state;
+ }
+ $json['country_code'] = $this->countryCode;
+ if (isset($this->postalCode)) {
+ $json['postal_code'] = $this->postalCode;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/StoreInformation.php b/src/Models/StoreInformation.php
new file mode 100644
index 0000000..a792ea3
--- /dev/null
+++ b/src/Models/StoreInformation.php
@@ -0,0 +1,105 @@
+storeId;
+ }
+
+ /**
+ * Sets Store Id.
+ * The ID of a store for a merchant in the system of record.
+ *
+ * @maps store_id
+ */
+ public function setStoreId(?string $storeId): void
+ {
+ $this->storeId = $storeId;
+ }
+
+ /**
+ * Returns Terminal Id.
+ * The terminal ID for the checkout stand in a merchant store.
+ */
+ public function getTerminalId(): ?string
+ {
+ return $this->terminalId;
+ }
+
+ /**
+ * Sets Terminal Id.
+ * The terminal ID for the checkout stand in a merchant store.
+ *
+ * @maps terminal_id
+ */
+ public function setTerminalId(?string $terminalId): void
+ {
+ $this->terminalId = $terminalId;
+ }
+
+ /**
+ * Converts the StoreInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the StoreInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'StoreInformation',
+ ['storeId' => $this->storeId, 'terminalId' => $this->terminalId]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->storeId)) {
+ $json['store_id'] = $this->storeId;
+ }
+ if (isset($this->terminalId)) {
+ $json['terminal_id'] = $this->terminalId;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/StoredPaymentSource.php b/src/Models/StoredPaymentSource.php
index 502b905..ea51587 100644
--- a/src/Models/StoredPaymentSource.php
+++ b/src/Models/StoredPaymentSource.php
@@ -40,7 +40,7 @@ class StoredPaymentSource implements \JsonSerializable
private $usage = StoredPaymentSourceUsageType::DERIVED;
/**
- * @var NetworkTransactionReference|null
+ * @var NetworkTransaction|null
*/
private $previousNetworkTransactionReference;
@@ -122,7 +122,7 @@ class StoredPaymentSource implements \JsonSerializable
* Returns Previous Network Transaction Reference.
* Reference values used by the card network to identify a transaction.
*/
- public function getPreviousNetworkTransactionReference(): ?NetworkTransactionReference
+ public function getPreviousNetworkTransactionReference(): ?NetworkTransaction
{
return $this->previousNetworkTransactionReference;
}
@@ -134,7 +134,7 @@ class StoredPaymentSource implements \JsonSerializable
* @maps previous_network_transaction_reference
*/
public function setPreviousNetworkTransactionReference(
- ?NetworkTransactionReference $previousNetworkTransactionReference
+ ?NetworkTransaction $previousNetworkTransactionReference
): void {
$this->previousNetworkTransactionReference = $previousNetworkTransactionReference;
}
diff --git a/src/Models/Subscriber.php b/src/Models/Subscriber.php
new file mode 100644
index 0000000..725e5ce
--- /dev/null
+++ b/src/Models/Subscriber.php
@@ -0,0 +1,137 @@
+name;
+ }
+
+ /**
+ * Sets Name.
+ * The name of the party.
+ *
+ * @maps name
+ */
+ public function setName(?Name $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Shipping Address.
+ * The shipping details.
+ */
+ public function getShippingAddress(): ?ShippingDetails
+ {
+ return $this->shippingAddress;
+ }
+
+ /**
+ * Sets Shipping Address.
+ * The shipping details.
+ *
+ * @maps shipping_address
+ */
+ public function setShippingAddress(?ShippingDetails $shippingAddress): void
+ {
+ $this->shippingAddress = $shippingAddress;
+ }
+
+ /**
+ * Returns Payment Source.
+ * The payment source used to fund the payment.
+ */
+ public function getPaymentSource(): ?SubscriptionPaymentSourceResponse
+ {
+ return $this->paymentSource;
+ }
+
+ /**
+ * Sets Payment Source.
+ * The payment source used to fund the payment.
+ *
+ * @maps payment_source
+ */
+ public function setPaymentSource(?SubscriptionPaymentSourceResponse $paymentSource): void
+ {
+ $this->paymentSource = $paymentSource;
+ }
+
+ /**
+ * Converts the Subscriber object to a human-readable string representation.
+ *
+ * @return string The string representation of the Subscriber object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'Subscriber',
+ [
+ 'name' => $this->name,
+ 'shippingAddress' => $this->shippingAddress,
+ 'paymentSource' => $this->paymentSource
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->shippingAddress)) {
+ $json['shipping_address'] = $this->shippingAddress;
+ }
+ if (isset($this->paymentSource)) {
+ $json['payment_source'] = $this->paymentSource;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriberRequest.php b/src/Models/SubscriberRequest.php
new file mode 100644
index 0000000..eea093a
--- /dev/null
+++ b/src/Models/SubscriberRequest.php
@@ -0,0 +1,170 @@
+name;
+ }
+
+ /**
+ * Sets Name.
+ * The name of the party.
+ *
+ * @maps name
+ */
+ public function setName(?Name $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Phone.
+ * The phone information.
+ */
+ public function getPhone(): ?PhoneWithType
+ {
+ return $this->phone;
+ }
+
+ /**
+ * Sets Phone.
+ * The phone information.
+ *
+ * @maps phone
+ */
+ public function setPhone(?PhoneWithType $phone): void
+ {
+ $this->phone = $phone;
+ }
+
+ /**
+ * Returns Shipping Address.
+ * The shipping details.
+ */
+ public function getShippingAddress(): ?ShippingDetails
+ {
+ return $this->shippingAddress;
+ }
+
+ /**
+ * Sets Shipping Address.
+ * The shipping details.
+ *
+ * @maps shipping_address
+ */
+ public function setShippingAddress(?ShippingDetails $shippingAddress): void
+ {
+ $this->shippingAddress = $shippingAddress;
+ }
+
+ /**
+ * Returns Payment Source.
+ * The payment source definition. To be eligible to create subscription using debit or credit card, you
+ * will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its
+ * available only for non-3DS cards and for merchants in US and AU regions.
+ */
+ public function getPaymentSource(): ?SubscriptionPaymentSource
+ {
+ return $this->paymentSource;
+ }
+
+ /**
+ * Sets Payment Source.
+ * The payment source definition. To be eligible to create subscription using debit or credit card, you
+ * will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its
+ * available only for non-3DS cards and for merchants in US and AU regions.
+ *
+ * @maps payment_source
+ */
+ public function setPaymentSource(?SubscriptionPaymentSource $paymentSource): void
+ {
+ $this->paymentSource = $paymentSource;
+ }
+
+ /**
+ * Converts the SubscriberRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriberRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriberRequest',
+ [
+ 'name' => $this->name,
+ 'phone' => $this->phone,
+ 'shippingAddress' => $this->shippingAddress,
+ 'paymentSource' => $this->paymentSource
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->phone)) {
+ $json['phone'] = $this->phone;
+ }
+ if (isset($this->shippingAddress)) {
+ $json['shipping_address'] = $this->shippingAddress;
+ }
+ if (isset($this->paymentSource)) {
+ $json['payment_source'] = $this->paymentSource;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/Subscription.php b/src/Models/Subscription.php
new file mode 100644
index 0000000..f62f2b4
--- /dev/null
+++ b/src/Models/Subscription.php
@@ -0,0 +1,445 @@
+id;
+ }
+
+ /**
+ * Sets Id.
+ * The PayPal-generated ID for the subscription.
+ *
+ * @maps id
+ */
+ public function setId(?string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Plan Id.
+ * The ID of the plan.
+ */
+ public function getPlanId(): ?string
+ {
+ return $this->planId;
+ }
+
+ /**
+ * Sets Plan Id.
+ * The ID of the plan.
+ *
+ * @maps plan_id
+ */
+ public function setPlanId(?string $planId): void
+ {
+ $this->planId = $planId;
+ }
+
+ /**
+ * Returns Start Time.
+ * 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.
+ */
+ public function getStartTime(): ?string
+ {
+ return $this->startTime;
+ }
+
+ /**
+ * Sets Start Time.
+ * 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.
+ *
+ * @maps start_time
+ */
+ public function setStartTime(?string $startTime): void
+ {
+ $this->startTime = $startTime;
+ }
+
+ /**
+ * Returns Quantity.
+ * The quantity of the product in the subscription.
+ */
+ public function getQuantity(): ?string
+ {
+ return $this->quantity;
+ }
+
+ /**
+ * Sets Quantity.
+ * The quantity of the product in the subscription.
+ *
+ * @maps quantity
+ */
+ public function setQuantity(?string $quantity): void
+ {
+ $this->quantity = $quantity;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Subscriber.
+ * The subscriber response information.
+ */
+ public function getSubscriber(): ?Subscriber
+ {
+ return $this->subscriber;
+ }
+
+ /**
+ * Sets Subscriber.
+ * The subscriber response information.
+ *
+ * @maps subscriber
+ */
+ public function setSubscriber(?Subscriber $subscriber): void
+ {
+ $this->subscriber = $subscriber;
+ }
+
+ /**
+ * Returns Billing Info.
+ * The billing details for the subscription. If the subscription was or is active, these fields are
+ * populated.
+ */
+ public function getBillingInfo(): ?SubscriptionBillingInformation
+ {
+ return $this->billingInfo;
+ }
+
+ /**
+ * Sets Billing Info.
+ * The billing details for the subscription. If the subscription was or is active, these fields are
+ * populated.
+ *
+ * @maps billing_info
+ */
+ public function setBillingInfo(?SubscriptionBillingInformation $billingInfo): void
+ {
+ $this->billingInfo = $billingInfo;
+ }
+
+ /**
+ * Returns Create Time.
+ * 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.
+ */
+ public function getCreateTime(): ?string
+ {
+ return $this->createTime;
+ }
+
+ /**
+ * Sets Create Time.
+ * 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.
+ *
+ * @maps create_time
+ */
+ public function setCreateTime(?string $createTime): void
+ {
+ $this->createTime = $createTime;
+ }
+
+ /**
+ * Returns Update Time.
+ * 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.
+ */
+ public function getUpdateTime(): ?string
+ {
+ return $this->updateTime;
+ }
+
+ /**
+ * Sets Update Time.
+ * 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.
+ *
+ * @maps update_time
+ */
+ public function setUpdateTime(?string $updateTime): void
+ {
+ $this->updateTime = $updateTime;
+ }
+
+ /**
+ * Returns Custom Id.
+ * The custom id for the subscription. Can be invoice id.
+ */
+ public function getCustomId(): ?string
+ {
+ return $this->customId;
+ }
+
+ /**
+ * Sets Custom Id.
+ * The custom id for the subscription. Can be invoice id.
+ *
+ * @maps custom_id
+ */
+ public function setCustomId(?string $customId): void
+ {
+ $this->customId = $customId;
+ }
+
+ /**
+ * Returns Plan Overridden.
+ * Indicates whether the subscription has overridden any plan attributes.
+ */
+ public function getPlanOverridden(): ?bool
+ {
+ return $this->planOverridden;
+ }
+
+ /**
+ * Sets Plan Overridden.
+ * Indicates whether the subscription has overridden any plan attributes.
+ *
+ * @maps plan_overridden
+ */
+ public function setPlanOverridden(?bool $planOverridden): void
+ {
+ $this->planOverridden = $planOverridden;
+ }
+
+ /**
+ * Returns Plan.
+ * The plan details.
+ */
+ public function getPlan(): ?PlanDetails
+ {
+ return $this->plan;
+ }
+
+ /**
+ * Sets Plan.
+ * The plan details.
+ *
+ * @maps plan
+ */
+ public function setPlan(?PlanDetails $plan): void
+ {
+ $this->plan = $plan;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the Subscription object to a human-readable string representation.
+ *
+ * @return string The string representation of the Subscription object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'Subscription',
+ [
+ 'id' => $this->id,
+ 'planId' => $this->planId,
+ 'startTime' => $this->startTime,
+ 'quantity' => $this->quantity,
+ 'shippingAmount' => $this->shippingAmount,
+ 'subscriber' => $this->subscriber,
+ 'billingInfo' => $this->billingInfo,
+ 'createTime' => $this->createTime,
+ 'updateTime' => $this->updateTime,
+ 'customId' => $this->customId,
+ 'planOverridden' => $this->planOverridden,
+ 'plan' => $this->plan,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
+ if (isset($this->planId)) {
+ $json['plan_id'] = $this->planId;
+ }
+ if (isset($this->startTime)) {
+ $json['start_time'] = $this->startTime;
+ }
+ if (isset($this->quantity)) {
+ $json['quantity'] = $this->quantity;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->subscriber)) {
+ $json['subscriber'] = $this->subscriber;
+ }
+ if (isset($this->billingInfo)) {
+ $json['billing_info'] = $this->billingInfo;
+ }
+ if (isset($this->createTime)) {
+ $json['create_time'] = $this->createTime;
+ }
+ if (isset($this->updateTime)) {
+ $json['update_time'] = $this->updateTime;
+ }
+ if (isset($this->customId)) {
+ $json['custom_id'] = $this->customId;
+ }
+ if (isset($this->planOverridden)) {
+ $json['plan_overridden'] = $this->planOverridden;
+ }
+ if (isset($this->plan)) {
+ $json['plan'] = $this->plan;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionAmountWithBreakdown.php b/src/Models/SubscriptionAmountWithBreakdown.php
new file mode 100644
index 0000000..05b9b72
--- /dev/null
+++ b/src/Models/SubscriptionAmountWithBreakdown.php
@@ -0,0 +1,231 @@
+grossAmount = $grossAmount;
+ }
+
+ /**
+ * Returns Gross Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getGrossAmount(): Money
+ {
+ return $this->grossAmount;
+ }
+
+ /**
+ * Sets Gross Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps gross_amount
+ */
+ public function setGrossAmount(Money $grossAmount): void
+ {
+ $this->grossAmount = $grossAmount;
+ }
+
+ /**
+ * Returns Total Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTotalItemAmount(): ?Money
+ {
+ return $this->totalItemAmount;
+ }
+
+ /**
+ * Sets Total Item Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps total_item_amount
+ */
+ public function setTotalItemAmount(?Money $totalItemAmount): void
+ {
+ $this->totalItemAmount = $totalItemAmount;
+ }
+
+ /**
+ * Returns Fee Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getFeeAmount(): ?Money
+ {
+ return $this->feeAmount;
+ }
+
+ /**
+ * Sets Fee Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps fee_amount
+ */
+ public function setFeeAmount(?Money $feeAmount): void
+ {
+ $this->feeAmount = $feeAmount;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTaxAmount(): ?Money
+ {
+ return $this->taxAmount;
+ }
+
+ /**
+ * Sets Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps tax_amount
+ */
+ public function setTaxAmount(?Money $taxAmount): void
+ {
+ $this->taxAmount = $taxAmount;
+ }
+
+ /**
+ * Returns Net Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getNetAmount(): ?Money
+ {
+ return $this->netAmount;
+ }
+
+ /**
+ * Sets Net Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps net_amount
+ */
+ public function setNetAmount(?Money $netAmount): void
+ {
+ $this->netAmount = $netAmount;
+ }
+
+ /**
+ * Converts the SubscriptionAmountWithBreakdown object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionAmountWithBreakdown object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionAmountWithBreakdown',
+ [
+ 'grossAmount' => $this->grossAmount,
+ 'totalItemAmount' => $this->totalItemAmount,
+ 'feeAmount' => $this->feeAmount,
+ 'shippingAmount' => $this->shippingAmount,
+ 'taxAmount' => $this->taxAmount,
+ 'netAmount' => $this->netAmount
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['gross_amount'] = $this->grossAmount;
+ if (isset($this->totalItemAmount)) {
+ $json['total_item_amount'] = $this->totalItemAmount;
+ }
+ if (isset($this->feeAmount)) {
+ $json['fee_amount'] = $this->feeAmount;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->taxAmount)) {
+ $json['tax_amount'] = $this->taxAmount;
+ }
+ if (isset($this->netAmount)) {
+ $json['net_amount'] = $this->netAmount;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionApplicationContext.php b/src/Models/SubscriptionApplicationContext.php
new file mode 100644
index 0000000..357efb3
--- /dev/null
+++ b/src/Models/SubscriptionApplicationContext.php
@@ -0,0 +1,266 @@
+returnUrl = $returnUrl;
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Returns Brand Name.
+ * The label that overrides the business name in the PayPal account on the PayPal site.
+ */
+ public function getBrandName(): ?string
+ {
+ return $this->brandName;
+ }
+
+ /**
+ * Sets Brand Name.
+ * The label that overrides the business name in the PayPal account on the PayPal site.
+ *
+ * @maps brand_name
+ */
+ public function setBrandName(?string $brandName): void
+ {
+ $this->brandName = $brandName;
+ }
+
+ /**
+ * Returns Locale.
+ * 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`.
+ */
+ public function getLocale(): ?string
+ {
+ return $this->locale;
+ }
+
+ /**
+ * Sets Locale.
+ * 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`.
+ *
+ * @maps locale
+ */
+ public function setLocale(?string $locale): void
+ {
+ $this->locale = $locale;
+ }
+
+ /**
+ * Returns Shipping Preference.
+ * The location from which the shipping address is derived.
+ */
+ public function getShippingPreference(): ?string
+ {
+ return $this->shippingPreference;
+ }
+
+ /**
+ * Sets Shipping Preference.
+ * The location from which the shipping address is derived.
+ *
+ * @maps shipping_preference
+ */
+ public function setShippingPreference(?string $shippingPreference): void
+ {
+ $this->shippingPreference = $shippingPreference;
+ }
+
+ /**
+ * Returns User Action.
+ * Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience.
+ */
+ public function getUserAction(): ?string
+ {
+ return $this->userAction;
+ }
+
+ /**
+ * Sets User Action.
+ * Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience.
+ *
+ * @maps user_action
+ */
+ public function setUserAction(?string $userAction): void
+ {
+ $this->userAction = $userAction;
+ }
+
+ /**
+ * Returns Payment Method.
+ * The customer and merchant payment preferences.
+ */
+ public function getPaymentMethod(): ?PaymentMethod
+ {
+ return $this->paymentMethod;
+ }
+
+ /**
+ * Sets Payment Method.
+ * The customer and merchant payment preferences.
+ *
+ * @maps payment_method
+ */
+ public function setPaymentMethod(?PaymentMethod $paymentMethod): void
+ {
+ $this->paymentMethod = $paymentMethod;
+ }
+
+ /**
+ * Returns Return Url.
+ * The URL where the customer is redirected after the customer approves the payment.
+ */
+ public function getReturnUrl(): string
+ {
+ return $this->returnUrl;
+ }
+
+ /**
+ * Sets Return Url.
+ * The URL where the customer is redirected after the customer approves the payment.
+ *
+ * @required
+ * @maps return_url
+ */
+ public function setReturnUrl(string $returnUrl): void
+ {
+ $this->returnUrl = $returnUrl;
+ }
+
+ /**
+ * Returns Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ */
+ public function getCancelUrl(): string
+ {
+ return $this->cancelUrl;
+ }
+
+ /**
+ * Sets Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ *
+ * @required
+ * @maps cancel_url
+ */
+ public function setCancelUrl(string $cancelUrl): void
+ {
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Converts the SubscriptionApplicationContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionApplicationContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionApplicationContext',
+ [
+ 'brandName' => $this->brandName,
+ 'locale' => $this->locale,
+ 'shippingPreference' => $this->shippingPreference,
+ 'userAction' => $this->userAction,
+ 'paymentMethod' => $this->paymentMethod,
+ 'returnUrl' => $this->returnUrl,
+ 'cancelUrl' => $this->cancelUrl
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->brandName)) {
+ $json['brand_name'] = $this->brandName;
+ }
+ if (isset($this->locale)) {
+ $json['locale'] = $this->locale;
+ }
+ if (isset($this->shippingPreference)) {
+ $json['shipping_preference'] = $this->shippingPreference;
+ }
+ if (isset($this->userAction)) {
+ $json['user_action'] = $this->userAction;
+ }
+ if (isset($this->paymentMethod)) {
+ $json['payment_method'] = $this->paymentMethod;
+ }
+ $json['return_url'] = $this->returnUrl;
+ $json['cancel_url'] = $this->cancelUrl;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionBillingCycle.php b/src/Models/SubscriptionBillingCycle.php
new file mode 100644
index 0000000..3f2c46c
--- /dev/null
+++ b/src/Models/SubscriptionBillingCycle.php
@@ -0,0 +1,216 @@
+frequency = $frequency;
+ $this->tenureType = $tenureType;
+ $this->sequence = $sequence;
+ }
+
+ /**
+ * Returns Pricing Scheme.
+ * The pricing scheme details.
+ */
+ public function getPricingScheme(): ?SubscriptionPricingScheme
+ {
+ return $this->pricingScheme;
+ }
+
+ /**
+ * Sets Pricing Scheme.
+ * The pricing scheme details.
+ *
+ * @maps pricing_scheme
+ */
+ public function setPricingScheme(?SubscriptionPricingScheme $pricingScheme): void
+ {
+ $this->pricingScheme = $pricingScheme;
+ }
+
+ /**
+ * Returns Frequency.
+ * The frequency of the billing cycle.
+ */
+ public function getFrequency(): Frequency
+ {
+ return $this->frequency;
+ }
+
+ /**
+ * Sets Frequency.
+ * The frequency of the billing cycle.
+ *
+ * @required
+ * @maps frequency
+ */
+ public function setFrequency(Frequency $frequency): void
+ {
+ $this->frequency = $frequency;
+ }
+
+ /**
+ * Returns Tenure Type.
+ * The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are
+ * allowed per plan.
+ */
+ public function getTenureType(): string
+ {
+ return $this->tenureType;
+ }
+
+ /**
+ * Sets Tenure Type.
+ * The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are
+ * allowed per plan.
+ *
+ * @required
+ * @maps tenure_type
+ */
+ public function setTenureType(string $tenureType): void
+ {
+ $this->tenureType = $tenureType;
+ }
+
+ /**
+ * Returns Sequence.
+ * 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.
+ */
+ public function getSequence(): int
+ {
+ return $this->sequence;
+ }
+
+ /**
+ * Sets Sequence.
+ * 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.
+ *
+ * @required
+ * @maps sequence
+ */
+ public function setSequence(int $sequence): void
+ {
+ $this->sequence = $sequence;
+ }
+
+ /**
+ * Returns Total Cycles.
+ * 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).
+ */
+ public function getTotalCycles(): ?int
+ {
+ return $this->totalCycles;
+ }
+
+ /**
+ * Sets Total Cycles.
+ * 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).
+ *
+ * @maps total_cycles
+ */
+ public function setTotalCycles(?int $totalCycles): void
+ {
+ $this->totalCycles = $totalCycles;
+ }
+
+ /**
+ * Converts the SubscriptionBillingCycle object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionBillingCycle object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionBillingCycle',
+ [
+ 'pricingScheme' => $this->pricingScheme,
+ 'frequency' => $this->frequency,
+ 'tenureType' => $this->tenureType,
+ 'sequence' => $this->sequence,
+ 'totalCycles' => $this->totalCycles
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->pricingScheme)) {
+ $json['pricing_scheme'] = $this->pricingScheme;
+ }
+ $json['frequency'] = $this->frequency;
+ $json['tenure_type'] = $this->tenureType;
+ $json['sequence'] = $this->sequence;
+ if (isset($this->totalCycles)) {
+ $json['total_cycles'] = $this->totalCycles;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionBillingInformation.php b/src/Models/SubscriptionBillingInformation.php
new file mode 100644
index 0000000..e243eca
--- /dev/null
+++ b/src/Models/SubscriptionBillingInformation.php
@@ -0,0 +1,276 @@
+outstandingBalance = $outstandingBalance;
+ $this->failedPaymentsCount = $failedPaymentsCount;
+ }
+
+ /**
+ * Returns Outstanding Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getOutstandingBalance(): Money
+ {
+ return $this->outstandingBalance;
+ }
+
+ /**
+ * Sets Outstanding Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @required
+ * @maps outstanding_balance
+ */
+ public function setOutstandingBalance(Money $outstandingBalance): void
+ {
+ $this->outstandingBalance = $outstandingBalance;
+ }
+
+ /**
+ * Returns Cycle Executions.
+ * The trial and regular billing executions.
+ *
+ * @return CycleExecution[]|null
+ */
+ public function getCycleExecutions(): ?array
+ {
+ return $this->cycleExecutions;
+ }
+
+ /**
+ * Sets Cycle Executions.
+ * The trial and regular billing executions.
+ *
+ * @maps cycle_executions
+ *
+ * @param CycleExecution[]|null $cycleExecutions
+ */
+ public function setCycleExecutions(?array $cycleExecutions): void
+ {
+ $this->cycleExecutions = $cycleExecutions;
+ }
+
+ /**
+ * Returns Last Payment.
+ * The details for the last payment.
+ */
+ public function getLastPayment(): ?LastPaymentDetails
+ {
+ return $this->lastPayment;
+ }
+
+ /**
+ * Sets Last Payment.
+ * The details for the last payment.
+ *
+ * @maps last_payment
+ */
+ public function setLastPayment(?LastPaymentDetails $lastPayment): void
+ {
+ $this->lastPayment = $lastPayment;
+ }
+
+ /**
+ * Returns Next Billing Time.
+ * 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.
+ */
+ public function getNextBillingTime(): ?string
+ {
+ return $this->nextBillingTime;
+ }
+
+ /**
+ * Sets Next Billing Time.
+ * 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.
+ *
+ * @maps next_billing_time
+ */
+ public function setNextBillingTime(?string $nextBillingTime): void
+ {
+ $this->nextBillingTime = $nextBillingTime;
+ }
+
+ /**
+ * Returns Final Payment Time.
+ * 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.
+ */
+ public function getFinalPaymentTime(): ?string
+ {
+ return $this->finalPaymentTime;
+ }
+
+ /**
+ * Sets Final Payment Time.
+ * 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.
+ *
+ * @maps final_payment_time
+ */
+ public function setFinalPaymentTime(?string $finalPaymentTime): void
+ {
+ $this->finalPaymentTime = $finalPaymentTime;
+ }
+
+ /**
+ * Returns Failed Payments Count.
+ * The number of consecutive payment failures. Resets to `0` after a successful payment. If this
+ * reaches the `payment_failure_threshold` value, the subscription updates to the `SUSPENDED` state.
+ */
+ public function getFailedPaymentsCount(): int
+ {
+ return $this->failedPaymentsCount;
+ }
+
+ /**
+ * Sets Failed Payments Count.
+ * The number of consecutive payment failures. Resets to `0` after a successful payment. If this
+ * reaches the `payment_failure_threshold` value, the subscription updates to the `SUSPENDED` state.
+ *
+ * @required
+ * @maps failed_payments_count
+ */
+ public function setFailedPaymentsCount(int $failedPaymentsCount): void
+ {
+ $this->failedPaymentsCount = $failedPaymentsCount;
+ }
+
+ /**
+ * Returns Last Failed Payment.
+ * The details for the failed payment of the subscription.
+ */
+ public function getLastFailedPayment(): ?FailedPaymentDetails
+ {
+ return $this->lastFailedPayment;
+ }
+
+ /**
+ * Sets Last Failed Payment.
+ * The details for the failed payment of the subscription.
+ *
+ * @maps last_failed_payment
+ */
+ public function setLastFailedPayment(?FailedPaymentDetails $lastFailedPayment): void
+ {
+ $this->lastFailedPayment = $lastFailedPayment;
+ }
+
+ /**
+ * Converts the SubscriptionBillingInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionBillingInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionBillingInformation',
+ [
+ 'outstandingBalance' => $this->outstandingBalance,
+ 'cycleExecutions' => $this->cycleExecutions,
+ 'lastPayment' => $this->lastPayment,
+ 'nextBillingTime' => $this->nextBillingTime,
+ 'finalPaymentTime' => $this->finalPaymentTime,
+ 'failedPaymentsCount' => $this->failedPaymentsCount,
+ 'lastFailedPayment' => $this->lastFailedPayment
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['outstanding_balance'] = $this->outstandingBalance;
+ if (isset($this->cycleExecutions)) {
+ $json['cycle_executions'] = $this->cycleExecutions;
+ }
+ if (isset($this->lastPayment)) {
+ $json['last_payment'] = $this->lastPayment;
+ }
+ if (isset($this->nextBillingTime)) {
+ $json['next_billing_time'] = $this->nextBillingTime;
+ }
+ if (isset($this->finalPaymentTime)) {
+ $json['final_payment_time'] = $this->finalPaymentTime;
+ }
+ $json['failed_payments_count'] = $this->failedPaymentsCount;
+ if (isset($this->lastFailedPayment)) {
+ $json['last_failed_payment'] = $this->lastFailedPayment;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionCardRequest.php b/src/Models/SubscriptionCardRequest.php
new file mode 100644
index 0000000..2fca8aa
--- /dev/null
+++ b/src/Models/SubscriptionCardRequest.php
@@ -0,0 +1,292 @@
+name;
+ }
+
+ /**
+ * Sets Name.
+ * The card holder's name as it appears on the card.
+ *
+ * @maps name
+ */
+ public function setName(?string $name): void
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns Number.
+ * The primary account number (PAN) for the payment card.
+ */
+ public function getNumber(): ?string
+ {
+ return $this->number;
+ }
+
+ /**
+ * Sets Number.
+ * The primary account number (PAN) for the payment card.
+ *
+ * @maps number
+ */
+ public function setNumber(?string $number): void
+ {
+ $this->number = $number;
+ }
+
+ /**
+ * Returns Expiry.
+ * 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).
+ */
+ public function getExpiry(): ?string
+ {
+ return $this->expiry;
+ }
+
+ /**
+ * Sets Expiry.
+ * 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).
+ *
+ * @maps expiry
+ */
+ public function setExpiry(?string $expiry): void
+ {
+ $this->expiry = $expiry;
+ }
+
+ /**
+ * Returns Security Code.
+ * The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID.
+ * This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
+ */
+ public function getSecurityCode(): ?string
+ {
+ return $this->securityCode;
+ }
+
+ /**
+ * Sets Security Code.
+ * The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID.
+ * This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
+ *
+ * @maps security_code
+ */
+ public function setSecurityCode(?string $securityCode): void
+ {
+ $this->securityCode = $securityCode;
+ }
+
+ /**
+ * Returns Type.
+ * Type of card. i.e Credit, Debit and so on.
+ */
+ public function getType(): ?string
+ {
+ return $this->type;
+ }
+
+ /**
+ * Sets Type.
+ * Type of card. i.e Credit, Debit and so on.
+ *
+ * @maps type
+ */
+ public function setType(?string $type): void
+ {
+ $this->type = $type;
+ }
+
+ /**
+ * Returns Brand.
+ * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ */
+ public function getBrand(): ?string
+ {
+ return $this->brand;
+ }
+
+ /**
+ * Sets Brand.
+ * The card network or brand. Applies to credit, debit, gift, and payment cards.
+ *
+ * @maps brand
+ */
+ public function setBrand(?string $brand): void
+ {
+ $this->brand = $brand;
+ }
+
+ /**
+ * Returns Billing Address.
+ * 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).
+ */
+ public function getBillingAddress(): ?Address
+ {
+ return $this->billingAddress;
+ }
+
+ /**
+ * Sets Billing Address.
+ * 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).
+ *
+ * @maps billing_address
+ */
+ public function setBillingAddress(?Address $billingAddress): void
+ {
+ $this->billingAddress = $billingAddress;
+ }
+
+ /**
+ * Returns Attributes.
+ * Additional attributes associated with the use of this card.
+ */
+ public function getAttributes(): ?SubscriptionsCardAttributes
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Sets Attributes.
+ * Additional attributes associated with the use of this card.
+ *
+ * @maps attributes
+ */
+ public function setAttributes(?SubscriptionsCardAttributes $attributes): void
+ {
+ $this->attributes = $attributes;
+ }
+
+ /**
+ * Converts the SubscriptionCardRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionCardRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionCardRequest',
+ [
+ 'name' => $this->name,
+ 'number' => $this->number,
+ 'expiry' => $this->expiry,
+ 'securityCode' => $this->securityCode,
+ 'type' => $this->type,
+ 'brand' => $this->brand,
+ 'billingAddress' => $this->billingAddress,
+ 'attributes' => $this->attributes
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->name)) {
+ $json['name'] = $this->name;
+ }
+ if (isset($this->number)) {
+ $json['number'] = $this->number;
+ }
+ if (isset($this->expiry)) {
+ $json['expiry'] = $this->expiry;
+ }
+ if (isset($this->securityCode)) {
+ $json['security_code'] = $this->securityCode;
+ }
+ if (isset($this->type)) {
+ $json['type'] = $this->type;
+ }
+ if (isset($this->brand)) {
+ $json['brand'] = $this->brand;
+ }
+ if (isset($this->billingAddress)) {
+ $json['billing_address'] = $this->billingAddress;
+ }
+ if (isset($this->attributes)) {
+ $json['attributes'] = $this->attributes;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionCollection.php b/src/Models/SubscriptionCollection.php
new file mode 100644
index 0000000..cfa4a49
--- /dev/null
+++ b/src/Models/SubscriptionCollection.php
@@ -0,0 +1,113 @@
+subscriptions;
+ }
+
+ /**
+ * Sets Subscriptions.
+ * An array of subscriptions.
+ *
+ * @maps subscriptions
+ *
+ * @param Subscription[]|null $subscriptions
+ */
+ public function setSubscriptions(?array $subscriptions): void
+ {
+ $this->subscriptions = $subscriptions;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the SubscriptionCollection object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionCollection object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionCollection',
+ ['subscriptions' => $this->subscriptions, 'links' => $this->links]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->subscriptions)) {
+ $json['subscriptions'] = $this->subscriptions;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionCustomerInformation.php b/src/Models/SubscriptionCustomerInformation.php
new file mode 100644
index 0000000..4bba2f6
--- /dev/null
+++ b/src/Models/SubscriptionCustomerInformation.php
@@ -0,0 +1,137 @@
+id;
+ }
+
+ /**
+ * Sets Id.
+ * The unique ID for a customer generated by PayPal.
+ *
+ * @maps id
+ */
+ public function setId(?string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Email Address.
+ * 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.
+ */
+ public function getEmailAddress(): ?string
+ {
+ return $this->emailAddress;
+ }
+
+ /**
+ * Sets Email Address.
+ * 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.
+ *
+ * @maps email_address
+ */
+ public function setEmailAddress(?string $emailAddress): void
+ {
+ $this->emailAddress = $emailAddress;
+ }
+
+ /**
+ * Returns Phone.
+ * The phone information.
+ */
+ public function getPhone(): ?PhoneWithType
+ {
+ return $this->phone;
+ }
+
+ /**
+ * Sets Phone.
+ * The phone information.
+ *
+ * @maps phone
+ */
+ public function setPhone(?PhoneWithType $phone): void
+ {
+ $this->phone = $phone;
+ }
+
+ /**
+ * Converts the SubscriptionCustomerInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionCustomerInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionCustomerInformation',
+ ['id' => $this->id, 'emailAddress' => $this->emailAddress, 'phone' => $this->phone]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
+ if (isset($this->emailAddress)) {
+ $json['email_address'] = $this->emailAddress;
+ }
+ if (isset($this->phone)) {
+ $json['phone'] = $this->phone;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionPatchApplicationContext.php b/src/Models/SubscriptionPatchApplicationContext.php
new file mode 100644
index 0000000..0f32ab5
--- /dev/null
+++ b/src/Models/SubscriptionPatchApplicationContext.php
@@ -0,0 +1,237 @@
+returnUrl = $returnUrl;
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Returns Brand Name.
+ * The label that overrides the business name in the PayPal account on the PayPal site.
+ */
+ public function getBrandName(): ?string
+ {
+ return $this->brandName;
+ }
+
+ /**
+ * Sets Brand Name.
+ * The label that overrides the business name in the PayPal account on the PayPal site.
+ *
+ * @maps brand_name
+ */
+ public function setBrandName(?string $brandName): void
+ {
+ $this->brandName = $brandName;
+ }
+
+ /**
+ * Returns Locale.
+ * 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`.
+ */
+ public function getLocale(): ?string
+ {
+ return $this->locale;
+ }
+
+ /**
+ * Sets Locale.
+ * 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`.
+ *
+ * @maps locale
+ */
+ public function setLocale(?string $locale): void
+ {
+ $this->locale = $locale;
+ }
+
+ /**
+ * Returns Shipping Preference.
+ * The location from which the shipping address is derived.
+ */
+ public function getShippingPreference(): ?string
+ {
+ return $this->shippingPreference;
+ }
+
+ /**
+ * Sets Shipping Preference.
+ * The location from which the shipping address is derived.
+ *
+ * @maps shipping_preference
+ */
+ public function setShippingPreference(?string $shippingPreference): void
+ {
+ $this->shippingPreference = $shippingPreference;
+ }
+
+ /**
+ * Returns Payment Method.
+ * The customer and merchant payment preferences.
+ */
+ public function getPaymentMethod(): ?PaymentMethod
+ {
+ return $this->paymentMethod;
+ }
+
+ /**
+ * Sets Payment Method.
+ * The customer and merchant payment preferences.
+ *
+ * @maps payment_method
+ */
+ public function setPaymentMethod(?PaymentMethod $paymentMethod): void
+ {
+ $this->paymentMethod = $paymentMethod;
+ }
+
+ /**
+ * Returns Return Url.
+ * The URL where the customer is redirected after the customer approves the payment.
+ */
+ public function getReturnUrl(): string
+ {
+ return $this->returnUrl;
+ }
+
+ /**
+ * Sets Return Url.
+ * The URL where the customer is redirected after the customer approves the payment.
+ *
+ * @required
+ * @maps return_url
+ */
+ public function setReturnUrl(string $returnUrl): void
+ {
+ $this->returnUrl = $returnUrl;
+ }
+
+ /**
+ * Returns Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ */
+ public function getCancelUrl(): string
+ {
+ return $this->cancelUrl;
+ }
+
+ /**
+ * Sets Cancel Url.
+ * The URL where the customer is redirected after the customer cancels the payment.
+ *
+ * @required
+ * @maps cancel_url
+ */
+ public function setCancelUrl(string $cancelUrl): void
+ {
+ $this->cancelUrl = $cancelUrl;
+ }
+
+ /**
+ * Converts the SubscriptionPatchApplicationContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionPatchApplicationContext object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionPatchApplicationContext',
+ [
+ 'brandName' => $this->brandName,
+ 'locale' => $this->locale,
+ 'shippingPreference' => $this->shippingPreference,
+ 'paymentMethod' => $this->paymentMethod,
+ 'returnUrl' => $this->returnUrl,
+ 'cancelUrl' => $this->cancelUrl
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->brandName)) {
+ $json['brand_name'] = $this->brandName;
+ }
+ if (isset($this->locale)) {
+ $json['locale'] = $this->locale;
+ }
+ if (isset($this->shippingPreference)) {
+ $json['shipping_preference'] = $this->shippingPreference;
+ }
+ if (isset($this->paymentMethod)) {
+ $json['payment_method'] = $this->paymentMethod;
+ }
+ $json['return_url'] = $this->returnUrl;
+ $json['cancel_url'] = $this->cancelUrl;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionPayerName.php b/src/Models/SubscriptionPayerName.php
new file mode 100644
index 0000000..7f2c952
--- /dev/null
+++ b/src/Models/SubscriptionPayerName.php
@@ -0,0 +1,230 @@
+prefix;
+ }
+
+ /**
+ * Sets Prefix.
+ * The prefix, or title, to the party's name.
+ *
+ * @maps prefix
+ */
+ public function setPrefix(?string $prefix): void
+ {
+ $this->prefix = $prefix;
+ }
+
+ /**
+ * Returns Given Name.
+ * When the party is a person, the party's given, or first, name.
+ */
+ public function getGivenName(): ?string
+ {
+ return $this->givenName;
+ }
+
+ /**
+ * Sets Given Name.
+ * When the party is a person, the party's given, or first, name.
+ *
+ * @maps given_name
+ */
+ public function setGivenName(?string $givenName): void
+ {
+ $this->givenName = $givenName;
+ }
+
+ /**
+ * Returns Surname.
+ * 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.
+ */
+ public function getSurname(): ?string
+ {
+ return $this->surname;
+ }
+
+ /**
+ * Sets Surname.
+ * 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.
+ *
+ * @maps surname
+ */
+ public function setSurname(?string $surname): void
+ {
+ $this->surname = $surname;
+ }
+
+ /**
+ * Returns Middle Name.
+ * 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.
+ */
+ public function getMiddleName(): ?string
+ {
+ return $this->middleName;
+ }
+
+ /**
+ * Sets Middle Name.
+ * 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.
+ *
+ * @maps middle_name
+ */
+ public function setMiddleName(?string $middleName): void
+ {
+ $this->middleName = $middleName;
+ }
+
+ /**
+ * Returns Suffix.
+ * The suffix for the party's name.
+ */
+ public function getSuffix(): ?string
+ {
+ return $this->suffix;
+ }
+
+ /**
+ * Sets Suffix.
+ * The suffix for the party's name.
+ *
+ * @maps suffix
+ */
+ public function setSuffix(?string $suffix): void
+ {
+ $this->suffix = $suffix;
+ }
+
+ /**
+ * Returns Full Name.
+ * When the party is a person, the party's full name.
+ */
+ public function getFullName(): ?string
+ {
+ return $this->fullName;
+ }
+
+ /**
+ * Sets Full Name.
+ * When the party is a person, the party's full name.
+ *
+ * @maps full_name
+ */
+ public function setFullName(?string $fullName): void
+ {
+ $this->fullName = $fullName;
+ }
+
+ /**
+ * Converts the SubscriptionPayerName object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionPayerName object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionPayerName',
+ [
+ 'prefix' => $this->prefix,
+ 'givenName' => $this->givenName,
+ 'surname' => $this->surname,
+ 'middleName' => $this->middleName,
+ 'suffix' => $this->suffix,
+ 'fullName' => $this->fullName
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->prefix)) {
+ $json['prefix'] = $this->prefix;
+ }
+ if (isset($this->givenName)) {
+ $json['given_name'] = $this->givenName;
+ }
+ if (isset($this->surname)) {
+ $json['surname'] = $this->surname;
+ }
+ if (isset($this->middleName)) {
+ $json['middle_name'] = $this->middleName;
+ }
+ if (isset($this->suffix)) {
+ $json['suffix'] = $this->suffix;
+ }
+ if (isset($this->fullName)) {
+ $json['full_name'] = $this->fullName;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionPaymentSource.php b/src/Models/SubscriptionPaymentSource.php
new file mode 100644
index 0000000..8458ce9
--- /dev/null
+++ b/src/Models/SubscriptionPaymentSource.php
@@ -0,0 +1,76 @@
+card;
+ }
+
+ /**
+ * Sets Card.
+ * The payment card to use to fund a payment. Can be a credit or debit card.
+ *
+ * @maps card
+ */
+ public function setCard(?SubscriptionCardRequest $card): void
+ {
+ $this->card = $card;
+ }
+
+ /**
+ * Converts the SubscriptionPaymentSource object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionPaymentSource object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('SubscriptionPaymentSource', ['card' => $this->card]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->card)) {
+ $json['card'] = $this->card;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionPaymentSourceResponse.php b/src/Models/SubscriptionPaymentSourceResponse.php
new file mode 100644
index 0000000..c4e15ac
--- /dev/null
+++ b/src/Models/SubscriptionPaymentSourceResponse.php
@@ -0,0 +1,74 @@
+card;
+ }
+
+ /**
+ * Sets Card.
+ * The payment card used to fund the payment. Card can be a credit or debit card.
+ *
+ * @maps card
+ */
+ public function setCard(?CardResponseWithBillingAddress $card): void
+ {
+ $this->card = $card;
+ }
+
+ /**
+ * Converts the SubscriptionPaymentSourceResponse object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionPaymentSourceResponse object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('SubscriptionPaymentSourceResponse', ['card' => $this->card]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->card)) {
+ $json['card'] = $this->card;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionPlanStatus.php b/src/Models/SubscriptionPlanStatus.php
new file mode 100644
index 0000000..fa8710f
--- /dev/null
+++ b/src/Models/SubscriptionPlanStatus.php
@@ -0,0 +1,32 @@
+version;
+ }
+
+ /**
+ * Sets Version.
+ * The version of the pricing scheme.
+ *
+ * @maps version
+ */
+ public function setVersion(?int $version): void
+ {
+ $this->version = $version;
+ }
+
+ /**
+ * Returns Fixed Price.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getFixedPrice(): ?Money
+ {
+ return $this->fixedPrice;
+ }
+
+ /**
+ * Sets Fixed Price.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps fixed_price
+ */
+ public function setFixedPrice(?Money $fixedPrice): void
+ {
+ $this->fixedPrice = $fixedPrice;
+ }
+
+ /**
+ * Returns Pricing Model.
+ * The pricing model for tiered plan. The `tiers` parameter is required.
+ */
+ public function getPricingModel(): ?string
+ {
+ return $this->pricingModel;
+ }
+
+ /**
+ * Sets Pricing Model.
+ * The pricing model for tiered plan. The `tiers` parameter is required.
+ *
+ * @maps pricing_model
+ */
+ public function setPricingModel(?string $pricingModel): void
+ {
+ $this->pricingModel = $pricingModel;
+ }
+
+ /**
+ * Returns Tiers.
+ * An array of pricing tiers which are used for billing volume/tiered plans. pricing_model field has to
+ * be specified.
+ *
+ * @return PricingTier[]|null
+ */
+ public function getTiers(): ?array
+ {
+ return $this->tiers;
+ }
+
+ /**
+ * Sets Tiers.
+ * An array of pricing tiers which are used for billing volume/tiered plans. pricing_model field has to
+ * be specified.
+ *
+ * @maps tiers
+ *
+ * @param PricingTier[]|null $tiers
+ */
+ public function setTiers(?array $tiers): void
+ {
+ $this->tiers = $tiers;
+ }
+
+ /**
+ * Returns Create Time.
+ * 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.
+ */
+ public function getCreateTime(): ?string
+ {
+ return $this->createTime;
+ }
+
+ /**
+ * Sets Create Time.
+ * 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.
+ *
+ * @maps create_time
+ */
+ public function setCreateTime(?string $createTime): void
+ {
+ $this->createTime = $createTime;
+ }
+
+ /**
+ * Returns Update Time.
+ * 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.
+ */
+ public function getUpdateTime(): ?string
+ {
+ return $this->updateTime;
+ }
+
+ /**
+ * Sets Update Time.
+ * 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.
+ *
+ * @maps update_time
+ */
+ public function setUpdateTime(?string $updateTime): void
+ {
+ $this->updateTime = $updateTime;
+ }
+
+ /**
+ * Converts the SubscriptionPricingScheme object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionPricingScheme object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionPricingScheme',
+ [
+ 'version' => $this->version,
+ 'fixedPrice' => $this->fixedPrice,
+ 'pricingModel' => $this->pricingModel,
+ 'tiers' => $this->tiers,
+ 'createTime' => $this->createTime,
+ 'updateTime' => $this->updateTime
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->version)) {
+ $json['version'] = $this->version;
+ }
+ if (isset($this->fixedPrice)) {
+ $json['fixed_price'] = $this->fixedPrice;
+ }
+ if (isset($this->pricingModel)) {
+ $json['pricing_model'] = $this->pricingModel;
+ }
+ if (isset($this->tiers)) {
+ $json['tiers'] = $this->tiers;
+ }
+ if (isset($this->createTime)) {
+ $json['create_time'] = $this->createTime;
+ }
+ if (isset($this->updateTime)) {
+ $json['update_time'] = $this->updateTime;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionTransactionDetails.php b/src/Models/SubscriptionTransactionDetails.php
new file mode 100644
index 0000000..b6abfb2
--- /dev/null
+++ b/src/Models/SubscriptionTransactionDetails.php
@@ -0,0 +1,241 @@
+id = $id;
+ $this->amountWithBreakdown = $amountWithBreakdown;
+ $this->time = $time;
+ }
+
+ /**
+ * Returns Status.
+ * The status of the captured payment.
+ */
+ public function getStatus(): ?string
+ {
+ return $this->status;
+ }
+
+ /**
+ * Sets Status.
+ * The status of the captured payment.
+ *
+ * @maps status
+ */
+ public function setStatus(?string $status): void
+ {
+ $this->status = $status;
+ }
+
+ /**
+ * Returns Id.
+ * The PayPal-generated transaction ID.
+ */
+ public function getId(): string
+ {
+ return $this->id;
+ }
+
+ /**
+ * Sets Id.
+ * The PayPal-generated transaction ID.
+ *
+ * @required
+ * @maps id
+ */
+ public function setId(string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Amount With Breakdown.
+ * The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts.
+ */
+ public function getAmountWithBreakdown(): SubscriptionAmountWithBreakdown
+ {
+ return $this->amountWithBreakdown;
+ }
+
+ /**
+ * Sets Amount With Breakdown.
+ * The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts.
+ *
+ * @required
+ * @maps amount_with_breakdown
+ */
+ public function setAmountWithBreakdown(SubscriptionAmountWithBreakdown $amountWithBreakdown): void
+ {
+ $this->amountWithBreakdown = $amountWithBreakdown;
+ }
+
+ /**
+ * Returns Payer Name.
+ * The name of the party.
+ */
+ public function getPayerName(): ?SubscriptionPayerName
+ {
+ return $this->payerName;
+ }
+
+ /**
+ * Sets Payer Name.
+ * The name of the party.
+ *
+ * @maps payer_name
+ */
+ public function setPayerName(?SubscriptionPayerName $payerName): void
+ {
+ $this->payerName = $payerName;
+ }
+
+ /**
+ * Returns Payer Email.
+ * 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.
+ */
+ public function getPayerEmail(): ?string
+ {
+ return $this->payerEmail;
+ }
+
+ /**
+ * Sets Payer Email.
+ * 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.
+ *
+ * @maps payer_email
+ */
+ public function setPayerEmail(?string $payerEmail): void
+ {
+ $this->payerEmail = $payerEmail;
+ }
+
+ /**
+ * Returns Time.
+ * 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.
+ */
+ public function getTime(): string
+ {
+ return $this->time;
+ }
+
+ /**
+ * Sets Time.
+ * 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.
+ *
+ * @required
+ * @maps time
+ */
+ public function setTime(string $time): void
+ {
+ $this->time = $time;
+ }
+
+ /**
+ * Converts the SubscriptionTransactionDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionTransactionDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionTransactionDetails',
+ [
+ 'status' => $this->status,
+ 'id' => $this->id,
+ 'amountWithBreakdown' => $this->amountWithBreakdown,
+ 'payerName' => $this->payerName,
+ 'payerEmail' => $this->payerEmail,
+ 'time' => $this->time
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->status)) {
+ $json['status'] = $this->status;
+ }
+ $json['id'] = $this->id;
+ $json['amount_with_breakdown'] = $this->amountWithBreakdown;
+ if (isset($this->payerName)) {
+ $json['payer_name'] = $this->payerName;
+ }
+ if (isset($this->payerEmail)) {
+ $json['payer_email'] = $this->payerEmail;
+ }
+ $json['time'] = $this->time;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionsCardAttributes.php b/src/Models/SubscriptionsCardAttributes.php
new file mode 100644
index 0000000..65e67b8
--- /dev/null
+++ b/src/Models/SubscriptionsCardAttributes.php
@@ -0,0 +1,137 @@
+customer;
+ }
+
+ /**
+ * Sets Customer.
+ * The details about a customer in PayPal's system of record.
+ *
+ * @maps customer
+ */
+ public function setCustomer(?CardCustomer $customer): void
+ {
+ $this->customer = $customer;
+ }
+
+ /**
+ * Returns Vault.
+ * Basic vault instruction specification that can be extended by specific payment sources that supports
+ * vaulting.
+ */
+ public function getVault(): ?VaultInstructionBase
+ {
+ return $this->vault;
+ }
+
+ /**
+ * Sets Vault.
+ * Basic vault instruction specification that can be extended by specific payment sources that supports
+ * vaulting.
+ *
+ * @maps vault
+ */
+ public function setVault(?VaultInstructionBase $vault): void
+ {
+ $this->vault = $vault;
+ }
+
+ /**
+ * Returns Verification.
+ * The API caller can opt in to verify the card through PayPal offered verification services (e.g.
+ * Smart Dollar Auth, 3DS).
+ */
+ public function getVerification(): ?CardVerification
+ {
+ return $this->verification;
+ }
+
+ /**
+ * Sets Verification.
+ * The API caller can opt in to verify the card through PayPal offered verification services (e.g.
+ * Smart Dollar Auth, 3DS).
+ *
+ * @maps verification
+ */
+ public function setVerification(?CardVerification $verification): void
+ {
+ $this->verification = $verification;
+ }
+
+ /**
+ * Converts the SubscriptionsCardAttributes object to a human-readable string representation.
+ *
+ * @return string The string representation of the SubscriptionsCardAttributes object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'SubscriptionsCardAttributes',
+ ['customer' => $this->customer, 'vault' => $this->vault, 'verification' => $this->verification]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->customer)) {
+ $json['customer'] = $this->customer;
+ }
+ if (isset($this->vault)) {
+ $json['vault'] = $this->vault;
+ }
+ if (isset($this->verification)) {
+ $json['verification'] = $this->verification;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SubscriptionsCardBrand.php b/src/Models/SubscriptionsCardBrand.php
new file mode 100644
index 0000000..d52d9d4
--- /dev/null
+++ b/src/Models/SubscriptionsCardBrand.php
@@ -0,0 +1,143 @@
+invoiceId;
- }
-
- /**
- * Sets Invoice Id.
- * 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.
- *
- * @maps invoice_id
- */
- public function setInvoiceId(?string $invoiceId): void
- {
- $this->invoiceId = $invoiceId;
- }
-
- /**
- * Returns Note to Payer.
- * An informational note about this settlement. Appears in both the payer's transaction history and the
- * emails that the payer receives.
- */
- public function getNoteToPayer(): ?string
- {
- return $this->noteToPayer;
- }
-
- /**
- * Sets Note to Payer.
- * An informational note about this settlement. Appears in both the payer's transaction history and the
- * emails that the payer receives.
- *
- * @maps note_to_payer
- */
- public function setNoteToPayer(?string $noteToPayer): void
- {
- $this->noteToPayer = $noteToPayer;
- }
-
- /**
- * Converts the SupplementaryPurchaseData object to a human-readable string representation.
- *
- * @return string The string representation of the SupplementaryPurchaseData object.
- */
- public function __toString(): string
- {
- return ApiHelper::stringify(
- 'SupplementaryPurchaseData',
- ['invoiceId' => $this->invoiceId, 'noteToPayer' => $this->noteToPayer]
- );
- }
-
- /**
- * Encode this object to JSON
- *
- * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
- * are set. (default: false)
- *
- * @return array|stdClass
- */
- #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
- public function jsonSerialize(bool $asArrayWhenEmpty = false)
- {
- $json = [];
- if (isset($this->invoiceId)) {
- $json['invoice_id'] = $this->invoiceId;
- }
- if (isset($this->noteToPayer)) {
- $json['note_to_payer'] = $this->noteToPayer;
- }
-
- return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
- }
-}
diff --git a/src/Models/SuspendSubscription.php b/src/Models/SuspendSubscription.php
new file mode 100644
index 0000000..f19fa0a
--- /dev/null
+++ b/src/Models/SuspendSubscription.php
@@ -0,0 +1,81 @@
+reason = $reason;
+ }
+
+ /**
+ * Returns Reason.
+ * The reason for suspension of the Subscription.
+ */
+ public function getReason(): string
+ {
+ return $this->reason;
+ }
+
+ /**
+ * Sets Reason.
+ * The reason for suspension of the Subscription.
+ *
+ * @required
+ * @maps reason
+ */
+ public function setReason(string $reason): void
+ {
+ $this->reason = $reason;
+ }
+
+ /**
+ * Converts the SuspendSubscription object to a human-readable string representation.
+ *
+ * @return string The string representation of the SuspendSubscription object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('SuspendSubscription', ['reason' => $this->reason]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['reason'] = $this->reason;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/TaxAmount.php b/src/Models/TaxAmount.php
new file mode 100644
index 0000000..b20e1bb
--- /dev/null
+++ b/src/Models/TaxAmount.php
@@ -0,0 +1,74 @@
+taxAmount;
+ }
+
+ /**
+ * Sets Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps tax_amount
+ */
+ public function setTaxAmount(?Money $taxAmount): void
+ {
+ $this->taxAmount = $taxAmount;
+ }
+
+ /**
+ * Converts the TaxAmount object to a human-readable string representation.
+ *
+ * @return string The string representation of the TaxAmount object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('TaxAmount', ['taxAmount' => $this->taxAmount]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->taxAmount)) {
+ $json['tax_amount'] = $this->taxAmount;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/Taxes.php b/src/Models/Taxes.php
new file mode 100644
index 0000000..f53625d
--- /dev/null
+++ b/src/Models/Taxes.php
@@ -0,0 +1,111 @@
+percentage = $percentage;
+ }
+
+ /**
+ * Returns Percentage.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ */
+ public function getPercentage(): string
+ {
+ return $this->percentage;
+ }
+
+ /**
+ * Sets Percentage.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ *
+ * @required
+ * @maps percentage
+ */
+ public function setPercentage(string $percentage): void
+ {
+ $this->percentage = $percentage;
+ }
+
+ /**
+ * Returns Inclusive.
+ * Indicates whether the tax was already included in the billing amount.
+ */
+ public function getInclusive(): ?bool
+ {
+ return $this->inclusive;
+ }
+
+ /**
+ * Sets Inclusive.
+ * Indicates whether the tax was already included in the billing amount.
+ *
+ * @maps inclusive
+ */
+ public function setInclusive(?bool $inclusive): void
+ {
+ $this->inclusive = $inclusive;
+ }
+
+ /**
+ * Converts the Taxes object to a human-readable string representation.
+ *
+ * @return string The string representation of the Taxes object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('Taxes', ['percentage' => $this->percentage, 'inclusive' => $this->inclusive]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['percentage'] = $this->percentage;
+ if (isset($this->inclusive)) {
+ $json['inclusive'] = $this->inclusive;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/TaxesOverride.php b/src/Models/TaxesOverride.php
new file mode 100644
index 0000000..c243939
--- /dev/null
+++ b/src/Models/TaxesOverride.php
@@ -0,0 +1,107 @@
+percentage;
+ }
+
+ /**
+ * Sets Percentage.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ *
+ * @maps percentage
+ */
+ public function setPercentage(?string $percentage): void
+ {
+ $this->percentage = $percentage;
+ }
+
+ /**
+ * Returns Inclusive.
+ * Indicates whether the tax was already included in the billing amount.
+ */
+ public function getInclusive(): ?bool
+ {
+ return $this->inclusive;
+ }
+
+ /**
+ * Sets Inclusive.
+ * Indicates whether the tax was already included in the billing amount.
+ *
+ * @maps inclusive
+ */
+ public function setInclusive(?bool $inclusive): void
+ {
+ $this->inclusive = $inclusive;
+ }
+
+ /**
+ * Converts the TaxesOverride object to a human-readable string representation.
+ *
+ * @return string The string representation of the TaxesOverride object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'TaxesOverride',
+ ['percentage' => $this->percentage, 'inclusive' => $this->inclusive]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->percentage)) {
+ $json['percentage'] = $this->percentage;
+ }
+ if (isset($this->inclusive)) {
+ $json['inclusive'] = $this->inclusive;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/TenureType.php b/src/Models/TenureType.php
index 5454a91..aaf32cc 100644
--- a/src/Models/TenureType.php
+++ b/src/Models/TenureType.php
@@ -12,7 +12,8 @@ namespace PaypalServerSdkLib\Models;
/**
* The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted)
- * or regular billing cycle.
+ * or regular billing cycle., The tenure type of the billing cycle. In case of a plan having trial
+ * cycle, only 2 trial cycles are allowed per plan., The type of the billing cycle.
*/
class TenureType
{
diff --git a/src/Models/TransactionDetails.php b/src/Models/TransactionDetails.php
new file mode 100644
index 0000000..0e79aaf
--- /dev/null
+++ b/src/Models/TransactionDetails.php
@@ -0,0 +1,253 @@
+transactionInfo;
+ }
+
+ /**
+ * Sets Transaction Info.
+ * The transaction information.
+ *
+ * @maps transaction_info
+ */
+ public function setTransactionInfo(?TransactionInformation $transactionInfo): void
+ {
+ $this->transactionInfo = $transactionInfo;
+ }
+
+ /**
+ * Returns Payer Info.
+ * The payer information.
+ */
+ public function getPayerInfo(): ?PayerInformation
+ {
+ return $this->payerInfo;
+ }
+
+ /**
+ * Sets Payer Info.
+ * The payer information.
+ *
+ * @maps payer_info
+ */
+ public function setPayerInfo(?PayerInformation $payerInfo): void
+ {
+ $this->payerInfo = $payerInfo;
+ }
+
+ /**
+ * Returns Shipping Info.
+ * The shipping information.
+ */
+ public function getShippingInfo(): ?ShippingInformation
+ {
+ return $this->shippingInfo;
+ }
+
+ /**
+ * Sets Shipping Info.
+ * The shipping information.
+ *
+ * @maps shipping_info
+ */
+ public function setShippingInfo(?ShippingInformation $shippingInfo): void
+ {
+ $this->shippingInfo = $shippingInfo;
+ }
+
+ /**
+ * Returns Cart Info.
+ * The cart information.
+ */
+ public function getCartInfo(): ?CartInformation
+ {
+ return $this->cartInfo;
+ }
+
+ /**
+ * Sets Cart Info.
+ * The cart information.
+ *
+ * @maps cart_info
+ */
+ public function setCartInfo(?CartInformation $cartInfo): void
+ {
+ $this->cartInfo = $cartInfo;
+ }
+
+ /**
+ * Returns Store Info.
+ * The store information.
+ */
+ public function getStoreInfo(): ?StoreInformation
+ {
+ return $this->storeInfo;
+ }
+
+ /**
+ * Sets Store Info.
+ * The store information.
+ *
+ * @maps store_info
+ */
+ public function setStoreInfo(?StoreInformation $storeInfo): void
+ {
+ $this->storeInfo = $storeInfo;
+ }
+
+ /**
+ * Returns Auction Info.
+ * The auction information.
+ */
+ public function getAuctionInfo(): ?AuctionInformation
+ {
+ return $this->auctionInfo;
+ }
+
+ /**
+ * Sets Auction Info.
+ * The auction information.
+ *
+ * @maps auction_info
+ */
+ public function setAuctionInfo(?AuctionInformation $auctionInfo): void
+ {
+ $this->auctionInfo = $auctionInfo;
+ }
+
+ /**
+ * Returns Incentive Info.
+ * The incentive details.
+ */
+ public function getIncentiveInfo(): ?IncentiveInformation
+ {
+ return $this->incentiveInfo;
+ }
+
+ /**
+ * Sets Incentive Info.
+ * The incentive details.
+ *
+ * @maps incentive_info
+ */
+ public function setIncentiveInfo(?IncentiveInformation $incentiveInfo): void
+ {
+ $this->incentiveInfo = $incentiveInfo;
+ }
+
+ /**
+ * Converts the TransactionDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the TransactionDetails object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'TransactionDetails',
+ [
+ 'transactionInfo' => $this->transactionInfo,
+ 'payerInfo' => $this->payerInfo,
+ 'shippingInfo' => $this->shippingInfo,
+ 'cartInfo' => $this->cartInfo,
+ 'storeInfo' => $this->storeInfo,
+ 'auctionInfo' => $this->auctionInfo,
+ 'incentiveInfo' => $this->incentiveInfo
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->transactionInfo)) {
+ $json['transaction_info'] = $this->transactionInfo;
+ }
+ if (isset($this->payerInfo)) {
+ $json['payer_info'] = $this->payerInfo;
+ }
+ if (isset($this->shippingInfo)) {
+ $json['shipping_info'] = $this->shippingInfo;
+ }
+ if (isset($this->cartInfo)) {
+ $json['cart_info'] = $this->cartInfo;
+ }
+ if (isset($this->storeInfo)) {
+ $json['store_info'] = $this->storeInfo;
+ }
+ if (isset($this->auctionInfo)) {
+ $json['auction_info'] = $this->auctionInfo;
+ }
+ if (isset($this->incentiveInfo)) {
+ $json['incentive_info'] = $this->incentiveInfo;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/TransactionInformation.php b/src/Models/TransactionInformation.php
new file mode 100644
index 0000000..2374437
--- /dev/null
+++ b/src/Models/TransactionInformation.php
@@ -0,0 +1,1090 @@
+paypalAccountId;
+ }
+
+ /**
+ * Sets Paypal Account Id.
+ * The ID of the PayPal account of the counterparty.
+ *
+ * @maps paypal_account_id
+ */
+ public function setPaypalAccountId(?string $paypalAccountId): void
+ {
+ $this->paypalAccountId = $paypalAccountId;
+ }
+
+ /**
+ * Returns Transaction Id.
+ * The PayPal-generated transaction ID.
+ */
+ public function getTransactionId(): ?string
+ {
+ return $this->transactionId;
+ }
+
+ /**
+ * Sets Transaction Id.
+ * The PayPal-generated transaction ID.
+ *
+ * @maps transaction_id
+ */
+ public function setTransactionId(?string $transactionId): void
+ {
+ $this->transactionId = $transactionId;
+ }
+
+ /**
+ * Returns Paypal Reference Id.
+ * The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-
+ * existing transaction or event.
+ */
+ public function getPaypalReferenceId(): ?string
+ {
+ return $this->paypalReferenceId;
+ }
+
+ /**
+ * Sets Paypal Reference Id.
+ * The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-
+ * existing transaction or event.
+ *
+ * @maps paypal_reference_id
+ */
+ public function setPaypalReferenceId(?string $paypalReferenceId): void
+ {
+ $this->paypalReferenceId = $paypalReferenceId;
+ }
+
+ /**
+ * Returns Paypal Reference Id Type.
+ * The PayPal reference ID type.
+ */
+ public function getPaypalReferenceIdType(): ?string
+ {
+ return $this->paypalReferenceIdType;
+ }
+
+ /**
+ * Sets Paypal Reference Id Type.
+ * The PayPal reference ID type.
+ *
+ * @maps paypal_reference_id_type
+ */
+ public function setPaypalReferenceIdType(?string $paypalReferenceIdType): void
+ {
+ $this->paypalReferenceIdType = $paypalReferenceIdType;
+ }
+
+ /**
+ * Returns Transaction Event Code.
+ * A five-digit transaction event code that classifies the transaction type based on money movement and
+ * debit or credit. For example, T0001. See [Transaction event
+ * codes](/docs/integration/direct/transaction-search/transaction-event-codes/).
+ */
+ public function getTransactionEventCode(): ?string
+ {
+ return $this->transactionEventCode;
+ }
+
+ /**
+ * Sets Transaction Event Code.
+ * A five-digit transaction event code that classifies the transaction type based on money movement and
+ * debit or credit. For example, T0001. See [Transaction event
+ * codes](/docs/integration/direct/transaction-search/transaction-event-codes/).
+ *
+ * @maps transaction_event_code
+ */
+ public function setTransactionEventCode(?string $transactionEventCode): void
+ {
+ $this->transactionEventCode = $transactionEventCode;
+ }
+
+ /**
+ * Returns Transaction Initiation Date.
+ * 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.
+ */
+ public function getTransactionInitiationDate(): ?string
+ {
+ return $this->transactionInitiationDate;
+ }
+
+ /**
+ * Sets Transaction Initiation Date.
+ * 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.
+ *
+ * @maps transaction_initiation_date
+ */
+ public function setTransactionInitiationDate(?string $transactionInitiationDate): void
+ {
+ $this->transactionInitiationDate = $transactionInitiationDate;
+ }
+
+ /**
+ * Returns Transaction Updated Date.
+ * 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.
+ */
+ public function getTransactionUpdatedDate(): ?string
+ {
+ return $this->transactionUpdatedDate;
+ }
+
+ /**
+ * Sets Transaction Updated Date.
+ * 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.
+ *
+ * @maps transaction_updated_date
+ */
+ public function setTransactionUpdatedDate(?string $transactionUpdatedDate): void
+ {
+ $this->transactionUpdatedDate = $transactionUpdatedDate;
+ }
+
+ /**
+ * Returns Transaction Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTransactionAmount(): ?Money
+ {
+ return $this->transactionAmount;
+ }
+
+ /**
+ * Sets Transaction Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps transaction_amount
+ */
+ public function setTransactionAmount(?Money $transactionAmount): void
+ {
+ $this->transactionAmount = $transactionAmount;
+ }
+
+ /**
+ * Returns Fee Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getFeeAmount(): ?Money
+ {
+ return $this->feeAmount;
+ }
+
+ /**
+ * Sets Fee Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps fee_amount
+ */
+ public function setFeeAmount(?Money $feeAmount): void
+ {
+ $this->feeAmount = $feeAmount;
+ }
+
+ /**
+ * Returns Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getDiscountAmount(): ?Money
+ {
+ return $this->discountAmount;
+ }
+
+ /**
+ * Sets Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps discount_amount
+ */
+ public function setDiscountAmount(?Money $discountAmount): void
+ {
+ $this->discountAmount = $discountAmount;
+ }
+
+ /**
+ * Returns Insurance Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getInsuranceAmount(): ?Money
+ {
+ return $this->insuranceAmount;
+ }
+
+ /**
+ * Sets Insurance Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps insurance_amount
+ */
+ public function setInsuranceAmount(?Money $insuranceAmount): void
+ {
+ $this->insuranceAmount = $insuranceAmount;
+ }
+
+ /**
+ * Returns Sales Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getSalesTaxAmount(): ?Money
+ {
+ return $this->salesTaxAmount;
+ }
+
+ /**
+ * Sets Sales Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps sales_tax_amount
+ */
+ public function setSalesTaxAmount(?Money $salesTaxAmount): void
+ {
+ $this->salesTaxAmount = $salesTaxAmount;
+ }
+
+ /**
+ * Returns Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingAmount(): ?Money
+ {
+ return $this->shippingAmount;
+ }
+
+ /**
+ * Sets Shipping Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_amount
+ */
+ public function setShippingAmount(?Money $shippingAmount): void
+ {
+ $this->shippingAmount = $shippingAmount;
+ }
+
+ /**
+ * Returns Shipping Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingDiscountAmount(): ?Money
+ {
+ return $this->shippingDiscountAmount;
+ }
+
+ /**
+ * Sets Shipping Discount Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_discount_amount
+ */
+ public function setShippingDiscountAmount(?Money $shippingDiscountAmount): void
+ {
+ $this->shippingDiscountAmount = $shippingDiscountAmount;
+ }
+
+ /**
+ * Returns Shipping Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getShippingTaxAmount(): ?Money
+ {
+ return $this->shippingTaxAmount;
+ }
+
+ /**
+ * Sets Shipping Tax Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps shipping_tax_amount
+ */
+ public function setShippingTaxAmount(?Money $shippingTaxAmount): void
+ {
+ $this->shippingTaxAmount = $shippingTaxAmount;
+ }
+
+ /**
+ * Returns Other Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getOtherAmount(): ?Money
+ {
+ return $this->otherAmount;
+ }
+
+ /**
+ * Sets Other Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps other_amount
+ */
+ public function setOtherAmount(?Money $otherAmount): void
+ {
+ $this->otherAmount = $otherAmount;
+ }
+
+ /**
+ * Returns Tip Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getTipAmount(): ?Money
+ {
+ return $this->tipAmount;
+ }
+
+ /**
+ * Sets Tip Amount.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps tip_amount
+ */
+ public function setTipAmount(?Money $tipAmount): void
+ {
+ $this->tipAmount = $tipAmount;
+ }
+
+ /**
+ * Returns Transaction Status.
+ * A code that indicates the transaction status. 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 fully reversed and funds were refunded to the original sender.
+ */
+ public function getTransactionStatus(): ?string
+ {
+ return $this->transactionStatus;
+ }
+
+ /**
+ * Sets Transaction Status.
+ * A code that indicates the transaction status. 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 fully reversed and funds were refunded to the original sender.
+ *
+ * @maps transaction_status
+ */
+ public function setTransactionStatus(?string $transactionStatus): void
+ {
+ $this->transactionStatus = $transactionStatus;
+ }
+
+ /**
+ * Returns Transaction Subject.
+ * The subject of payment. The payer passes this value to the payee. The payer controls this data
+ * through the interface through which he or she sends the data.
+ */
+ public function getTransactionSubject(): ?string
+ {
+ return $this->transactionSubject;
+ }
+
+ /**
+ * Sets Transaction Subject.
+ * The subject of payment. The payer passes this value to the payee. The payer controls this data
+ * through the interface through which he or she sends the data.
+ *
+ * @maps transaction_subject
+ */
+ public function setTransactionSubject(?string $transactionSubject): void
+ {
+ $this->transactionSubject = $transactionSubject;
+ }
+
+ /**
+ * Returns Transaction Note.
+ * A special note that the payer passes to the payee. Might contain special customer requests, such as
+ * shipping instructions.
+ */
+ public function getTransactionNote(): ?string
+ {
+ return $this->transactionNote;
+ }
+
+ /**
+ * Sets Transaction Note.
+ * A special note that the payer passes to the payee. Might contain special customer requests, such as
+ * shipping instructions.
+ *
+ * @maps transaction_note
+ */
+ public function setTransactionNote(?string $transactionNote): void
+ {
+ $this->transactionNote = $transactionNote;
+ }
+
+ /**
+ * Returns Payment Tracking Id.
+ * The payment tracking ID, which is a unique ID that partners specify to either get information about
+ * a payment or request a refund.
+ */
+ public function getPaymentTrackingId(): ?string
+ {
+ return $this->paymentTrackingId;
+ }
+
+ /**
+ * Sets Payment Tracking Id.
+ * The payment tracking ID, which is a unique ID that partners specify to either get information about
+ * a payment or request a refund.
+ *
+ * @maps payment_tracking_id
+ */
+ public function setPaymentTrackingId(?string $paymentTrackingId): void
+ {
+ $this->paymentTrackingId = $paymentTrackingId;
+ }
+
+ /**
+ * Returns Bank Reference Id.
+ * The bank reference ID. The bank provides this value for an ACH transaction.
+ */
+ public function getBankReferenceId(): ?string
+ {
+ return $this->bankReferenceId;
+ }
+
+ /**
+ * Sets Bank Reference Id.
+ * The bank reference ID. The bank provides this value for an ACH transaction.
+ *
+ * @maps bank_reference_id
+ */
+ public function setBankReferenceId(?string $bankReferenceId): void
+ {
+ $this->bankReferenceId = $bankReferenceId;
+ }
+
+ /**
+ * Returns Ending Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getEndingBalance(): ?Money
+ {
+ return $this->endingBalance;
+ }
+
+ /**
+ * Sets Ending Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps ending_balance
+ */
+ public function setEndingBalance(?Money $endingBalance): void
+ {
+ $this->endingBalance = $endingBalance;
+ }
+
+ /**
+ * Returns Available Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getAvailableBalance(): ?Money
+ {
+ return $this->availableBalance;
+ }
+
+ /**
+ * Sets Available Balance.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps available_balance
+ */
+ public function setAvailableBalance(?Money $availableBalance): void
+ {
+ $this->availableBalance = $availableBalance;
+ }
+
+ /**
+ * Returns Invoice Id.
+ * The invoice ID that is sent by the merchant with the transaction. Note: If an invoice ID was sent
+ * with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing
+ * transaction is reported.
+ */
+ public function getInvoiceId(): ?string
+ {
+ return $this->invoiceId;
+ }
+
+ /**
+ * Sets Invoice Id.
+ * The invoice ID that is sent by the merchant with the transaction. Note: If an invoice ID was sent
+ * with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing
+ * transaction is reported.
+ *
+ * @maps invoice_id
+ */
+ public function setInvoiceId(?string $invoiceId): void
+ {
+ $this->invoiceId = $invoiceId;
+ }
+
+ /**
+ * Returns Custom Field.
+ * The merchant-provided custom text. Note: Usually, this field includes the unique ID for payments
+ * made with MassPay type transaction.
+ */
+ public function getCustomField(): ?string
+ {
+ return $this->customField;
+ }
+
+ /**
+ * Sets Custom Field.
+ * The merchant-provided custom text. Note: Usually, this field includes the unique ID for payments
+ * made with MassPay type transaction.
+ *
+ * @maps custom_field
+ */
+ public function setCustomField(?string $customField): void
+ {
+ $this->customField = $customField;
+ }
+
+ /**
+ * Returns Protection Eligibility.
+ * Indicates whether the transaction is eligible for protection. Value is: 01. Eligible. 02. Not
+ * eligible 03. Partially eligible.
+ */
+ public function getProtectionEligibility(): ?string
+ {
+ return $this->protectionEligibility;
+ }
+
+ /**
+ * Sets Protection Eligibility.
+ * Indicates whether the transaction is eligible for protection. Value is: 01. Eligible. 02. Not
+ * eligible 03. Partially eligible.
+ *
+ * @maps protection_eligibility
+ */
+ public function setProtectionEligibility(?string $protectionEligibility): void
+ {
+ $this->protectionEligibility = $protectionEligibility;
+ }
+
+ /**
+ * Returns Credit Term.
+ * The credit term. The time span covered by the installment payments as expressed in the term length
+ * plus the length time unit code.
+ */
+ public function getCreditTerm(): ?string
+ {
+ return $this->creditTerm;
+ }
+
+ /**
+ * Sets Credit Term.
+ * The credit term. The time span covered by the installment payments as expressed in the term length
+ * plus the length time unit code.
+ *
+ * @maps credit_term
+ */
+ public function setCreditTerm(?string $creditTerm): void
+ {
+ $this->creditTerm = $creditTerm;
+ }
+
+ /**
+ * Returns Credit Transactional Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getCreditTransactionalFee(): ?Money
+ {
+ return $this->creditTransactionalFee;
+ }
+
+ /**
+ * Sets Credit Transactional Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps credit_transactional_fee
+ */
+ public function setCreditTransactionalFee(?Money $creditTransactionalFee): void
+ {
+ $this->creditTransactionalFee = $creditTransactionalFee;
+ }
+
+ /**
+ * Returns Credit Promotional Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ */
+ public function getCreditPromotionalFee(): ?Money
+ {
+ return $this->creditPromotionalFee;
+ }
+
+ /**
+ * Sets Credit Promotional Fee.
+ * The currency and amount for a financial transaction, such as a balance or payment due.
+ *
+ * @maps credit_promotional_fee
+ */
+ public function setCreditPromotionalFee(?Money $creditPromotionalFee): void
+ {
+ $this->creditPromotionalFee = $creditPromotionalFee;
+ }
+
+ /**
+ * Returns Annual Percentage Rate.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ */
+ public function getAnnualPercentageRate(): ?string
+ {
+ return $this->annualPercentageRate;
+ }
+
+ /**
+ * Sets Annual Percentage Rate.
+ * The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate
+ * as `19.99`.
+ *
+ * @maps annual_percentage_rate
+ */
+ public function setAnnualPercentageRate(?string $annualPercentageRate): void
+ {
+ $this->annualPercentageRate = $annualPercentageRate;
+ }
+
+ /**
+ * Returns Payment Method Type.
+ * The payment method that was used for a transaction. Value is PUI, installment, or mEFT. Note:
+ * Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners
+ * in the EMEA region can use this attribute to note transactions that attract turn-over tax.
+ */
+ public function getPaymentMethodType(): ?string
+ {
+ return $this->paymentMethodType;
+ }
+
+ /**
+ * Sets Payment Method Type.
+ * The payment method that was used for a transaction. Value is PUI, installment, or mEFT. Note:
+ * Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners
+ * in the EMEA region can use this attribute to note transactions that attract turn-over tax.
+ *
+ * @maps payment_method_type
+ */
+ public function setPaymentMethodType(?string $paymentMethodType): void
+ {
+ $this->paymentMethodType = $paymentMethodType;
+ }
+
+ /**
+ * Returns Instrument Type.
+ * A high-level classification of the type of financial instrument that was used to fund a payment. The
+ * pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD,
+ * DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods
+ * (APM).
+ */
+ public function getInstrumentType(): ?string
+ {
+ return $this->instrumentType;
+ }
+
+ /**
+ * Sets Instrument Type.
+ * A high-level classification of the type of financial instrument that was used to fund a payment. The
+ * pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD,
+ * DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods
+ * (APM).
+ *
+ * @maps instrument_type
+ */
+ public function setInstrumentType(?string $instrumentType): void
+ {
+ $this->instrumentType = $instrumentType;
+ }
+
+ /**
+ * Returns Instrument Sub Type.
+ * A finer-grained classification of the financial instrument that was used to fund a payment. For
+ * example, `Visa card` or a `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is not
+ * provided because the value is defined by an external party.
+ */
+ public function getInstrumentSubType(): ?string
+ {
+ return $this->instrumentSubType;
+ }
+
+ /**
+ * Sets Instrument Sub Type.
+ * A finer-grained classification of the financial instrument that was used to fund a payment. For
+ * example, `Visa card` or a `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is not
+ * provided because the value is defined by an external party.
+ *
+ * @maps instrument_sub_type
+ */
+ public function setInstrumentSubType(?string $instrumentSubType): void
+ {
+ $this->instrumentSubType = $instrumentSubType;
+ }
+
+ /**
+ * Converts the TransactionInformation object to a human-readable string representation.
+ *
+ * @return string The string representation of the TransactionInformation object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'TransactionInformation',
+ [
+ 'paypalAccountId' => $this->paypalAccountId,
+ 'transactionId' => $this->transactionId,
+ 'paypalReferenceId' => $this->paypalReferenceId,
+ 'paypalReferenceIdType' => $this->paypalReferenceIdType,
+ 'transactionEventCode' => $this->transactionEventCode,
+ 'transactionInitiationDate' => $this->transactionInitiationDate,
+ 'transactionUpdatedDate' => $this->transactionUpdatedDate,
+ 'transactionAmount' => $this->transactionAmount,
+ 'feeAmount' => $this->feeAmount,
+ 'discountAmount' => $this->discountAmount,
+ 'insuranceAmount' => $this->insuranceAmount,
+ 'salesTaxAmount' => $this->salesTaxAmount,
+ 'shippingAmount' => $this->shippingAmount,
+ 'shippingDiscountAmount' => $this->shippingDiscountAmount,
+ 'shippingTaxAmount' => $this->shippingTaxAmount,
+ 'otherAmount' => $this->otherAmount,
+ 'tipAmount' => $this->tipAmount,
+ 'transactionStatus' => $this->transactionStatus,
+ 'transactionSubject' => $this->transactionSubject,
+ 'transactionNote' => $this->transactionNote,
+ 'paymentTrackingId' => $this->paymentTrackingId,
+ 'bankReferenceId' => $this->bankReferenceId,
+ 'endingBalance' => $this->endingBalance,
+ 'availableBalance' => $this->availableBalance,
+ 'invoiceId' => $this->invoiceId,
+ 'customField' => $this->customField,
+ 'protectionEligibility' => $this->protectionEligibility,
+ 'creditTerm' => $this->creditTerm,
+ 'creditTransactionalFee' => $this->creditTransactionalFee,
+ 'creditPromotionalFee' => $this->creditPromotionalFee,
+ 'annualPercentageRate' => $this->annualPercentageRate,
+ 'paymentMethodType' => $this->paymentMethodType,
+ 'instrumentType' => $this->instrumentType,
+ 'instrumentSubType' => $this->instrumentSubType
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->paypalAccountId)) {
+ $json['paypal_account_id'] = $this->paypalAccountId;
+ }
+ if (isset($this->transactionId)) {
+ $json['transaction_id'] = $this->transactionId;
+ }
+ if (isset($this->paypalReferenceId)) {
+ $json['paypal_reference_id'] = $this->paypalReferenceId;
+ }
+ if (isset($this->paypalReferenceIdType)) {
+ $json['paypal_reference_id_type'] = $this->paypalReferenceIdType;
+ }
+ if (isset($this->transactionEventCode)) {
+ $json['transaction_event_code'] = $this->transactionEventCode;
+ }
+ if (isset($this->transactionInitiationDate)) {
+ $json['transaction_initiation_date'] = $this->transactionInitiationDate;
+ }
+ if (isset($this->transactionUpdatedDate)) {
+ $json['transaction_updated_date'] = $this->transactionUpdatedDate;
+ }
+ if (isset($this->transactionAmount)) {
+ $json['transaction_amount'] = $this->transactionAmount;
+ }
+ if (isset($this->feeAmount)) {
+ $json['fee_amount'] = $this->feeAmount;
+ }
+ if (isset($this->discountAmount)) {
+ $json['discount_amount'] = $this->discountAmount;
+ }
+ if (isset($this->insuranceAmount)) {
+ $json['insurance_amount'] = $this->insuranceAmount;
+ }
+ if (isset($this->salesTaxAmount)) {
+ $json['sales_tax_amount'] = $this->salesTaxAmount;
+ }
+ if (isset($this->shippingAmount)) {
+ $json['shipping_amount'] = $this->shippingAmount;
+ }
+ if (isset($this->shippingDiscountAmount)) {
+ $json['shipping_discount_amount'] = $this->shippingDiscountAmount;
+ }
+ if (isset($this->shippingTaxAmount)) {
+ $json['shipping_tax_amount'] = $this->shippingTaxAmount;
+ }
+ if (isset($this->otherAmount)) {
+ $json['other_amount'] = $this->otherAmount;
+ }
+ if (isset($this->tipAmount)) {
+ $json['tip_amount'] = $this->tipAmount;
+ }
+ if (isset($this->transactionStatus)) {
+ $json['transaction_status'] = $this->transactionStatus;
+ }
+ if (isset($this->transactionSubject)) {
+ $json['transaction_subject'] = $this->transactionSubject;
+ }
+ if (isset($this->transactionNote)) {
+ $json['transaction_note'] = $this->transactionNote;
+ }
+ if (isset($this->paymentTrackingId)) {
+ $json['payment_tracking_id'] = $this->paymentTrackingId;
+ }
+ if (isset($this->bankReferenceId)) {
+ $json['bank_reference_id'] = $this->bankReferenceId;
+ }
+ if (isset($this->endingBalance)) {
+ $json['ending_balance'] = $this->endingBalance;
+ }
+ if (isset($this->availableBalance)) {
+ $json['available_balance'] = $this->availableBalance;
+ }
+ if (isset($this->invoiceId)) {
+ $json['invoice_id'] = $this->invoiceId;
+ }
+ if (isset($this->customField)) {
+ $json['custom_field'] = $this->customField;
+ }
+ if (isset($this->protectionEligibility)) {
+ $json['protection_eligibility'] = $this->protectionEligibility;
+ }
+ if (isset($this->creditTerm)) {
+ $json['credit_term'] = $this->creditTerm;
+ }
+ if (isset($this->creditTransactionalFee)) {
+ $json['credit_transactional_fee'] = $this->creditTransactionalFee;
+ }
+ if (isset($this->creditPromotionalFee)) {
+ $json['credit_promotional_fee'] = $this->creditPromotionalFee;
+ }
+ if (isset($this->annualPercentageRate)) {
+ $json['annual_percentage_rate'] = $this->annualPercentageRate;
+ }
+ if (isset($this->paymentMethodType)) {
+ $json['payment_method_type'] = $this->paymentMethodType;
+ }
+ if (isset($this->instrumentType)) {
+ $json['instrument_type'] = $this->instrumentType;
+ }
+ if (isset($this->instrumentSubType)) {
+ $json['instrument_sub_type'] = $this->instrumentSubType;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/OrderUpdateCallbackErrorResponseDetails.php b/src/Models/TransactionSearchErrorDetails.php
similarity index 55%
rename from src/Models/OrderUpdateCallbackErrorResponseDetails.php
rename to src/Models/TransactionSearchErrorDetails.php
index 8f28fff..569a80d 100644
--- a/src/Models/OrderUpdateCallbackErrorResponseDetails.php
+++ b/src/Models/TransactionSearchErrorDetails.php
@@ -16,7 +16,7 @@ use stdClass;
/**
* The error details. Required for client-side `4XX` errors.
*/
-class OrderUpdateCallbackErrorResponseDetails implements \JsonSerializable
+class TransactionSearchErrorDetails implements \JsonSerializable
{
/**
* @var string|null
@@ -28,11 +28,21 @@ class OrderUpdateCallbackErrorResponseDetails implements \JsonSerializable
*/
private $value;
+ /**
+ * @var string|null
+ */
+ private $location = 'body';
+
/**
* @var string
*/
private $issue;
+ /**
+ * @var string|null
+ */
+ private $description;
+
/**
* @param string $issue
*/
@@ -83,6 +93,26 @@ class OrderUpdateCallbackErrorResponseDetails implements \JsonSerializable
$this->value = $value;
}
+ /**
+ * Returns Location.
+ * The location of the field that caused the error. Value is `body`, `path`, or `query`.
+ */
+ public function getLocation(): ?string
+ {
+ return $this->location;
+ }
+
+ /**
+ * Sets Location.
+ * The location of the field that caused the error. Value is `body`, `path`, or `query`.
+ *
+ * @maps location
+ */
+ public function setLocation(?string $location): void
+ {
+ $this->location = $location;
+ }
+
/**
* Returns Issue.
* The unique, fine-grained application-level error code.
@@ -105,16 +135,43 @@ class OrderUpdateCallbackErrorResponseDetails implements \JsonSerializable
}
/**
- * Converts the OrderUpdateCallbackErrorResponseDetails object to a human-readable string
- * representation.
+ * Returns Description.
+ * 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.
+ */
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ /**
+ * Sets Description.
+ * 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.
*
- * @return string The string representation of the OrderUpdateCallbackErrorResponseDetails object.
+ * @maps description
+ */
+ public function setDescription(?string $description): void
+ {
+ $this->description = $description;
+ }
+
+ /**
+ * Converts the TransactionSearchErrorDetails object to a human-readable string representation.
+ *
+ * @return string The string representation of the TransactionSearchErrorDetails object.
*/
public function __toString(): string
{
return ApiHelper::stringify(
- 'OrderUpdateCallbackErrorResponseDetails',
- ['field' => $this->field, 'value' => $this->value, 'issue' => $this->issue]
+ 'TransactionSearchErrorDetails',
+ [
+ 'field' => $this->field,
+ 'value' => $this->value,
+ 'location' => $this->location,
+ 'issue' => $this->issue,
+ 'description' => $this->description
+ ]
);
}
@@ -131,12 +188,18 @@ class OrderUpdateCallbackErrorResponseDetails implements \JsonSerializable
{
$json = [];
if (isset($this->field)) {
- $json['field'] = $this->field;
+ $json['field'] = $this->field;
}
if (isset($this->value)) {
- $json['value'] = $this->value;
+ $json['value'] = $this->value;
+ }
+ if (isset($this->location)) {
+ $json['location'] = $this->location;
+ }
+ $json['issue'] = $this->issue;
+ if (isset($this->description)) {
+ $json['description'] = $this->description;
}
- $json['issue'] = $this->issue;
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/TransactionsList.php b/src/Models/TransactionsList.php
new file mode 100644
index 0000000..b08f667
--- /dev/null
+++ b/src/Models/TransactionsList.php
@@ -0,0 +1,174 @@
+transactions;
+ }
+
+ /**
+ * Sets Transactions.
+ * An array of transactions.
+ *
+ * @maps transactions
+ *
+ * @param SubscriptionTransactionDetails[]|null $transactions
+ */
+ public function setTransactions(?array $transactions): void
+ {
+ $this->transactions = $transactions;
+ }
+
+ /**
+ * Returns Total Items.
+ * The total number of items.
+ */
+ public function getTotalItems(): ?int
+ {
+ return $this->totalItems;
+ }
+
+ /**
+ * Sets Total Items.
+ * The total number of items.
+ *
+ * @maps total_items
+ */
+ public function setTotalItems(?int $totalItems): void
+ {
+ $this->totalItems = $totalItems;
+ }
+
+ /**
+ * Returns Total Pages.
+ * The total number of pages.
+ */
+ public function getTotalPages(): ?int
+ {
+ return $this->totalPages;
+ }
+
+ /**
+ * Sets Total Pages.
+ * The total number of pages.
+ *
+ * @maps total_pages
+ */
+ public function setTotalPages(?int $totalPages): void
+ {
+ $this->totalPages = $totalPages;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Converts the TransactionsList object to a human-readable string representation.
+ *
+ * @return string The string representation of the TransactionsList object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'TransactionsList',
+ [
+ 'transactions' => $this->transactions,
+ 'totalItems' => $this->totalItems,
+ 'totalPages' => $this->totalPages,
+ 'links' => $this->links
+ ]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->transactions)) {
+ $json['transactions'] = $this->transactions;
+ }
+ if (isset($this->totalItems)) {
+ $json['total_items'] = $this->totalItems;
+ }
+ if (isset($this->totalPages)) {
+ $json['total_pages'] = $this->totalPages;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/UpdatePricingScheme.php b/src/Models/UpdatePricingScheme.php
new file mode 100644
index 0000000..a3c494c
--- /dev/null
+++ b/src/Models/UpdatePricingScheme.php
@@ -0,0 +1,113 @@
+billingCycleSequence = $billingCycleSequence;
+ $this->pricingScheme = $pricingScheme;
+ }
+
+ /**
+ * Returns Billing Cycle Sequence.
+ * The billing cycle sequence.
+ */
+ public function getBillingCycleSequence(): int
+ {
+ return $this->billingCycleSequence;
+ }
+
+ /**
+ * Sets Billing Cycle Sequence.
+ * The billing cycle sequence.
+ *
+ * @required
+ * @maps billing_cycle_sequence
+ */
+ public function setBillingCycleSequence(int $billingCycleSequence): void
+ {
+ $this->billingCycleSequence = $billingCycleSequence;
+ }
+
+ /**
+ * Returns Pricing Scheme.
+ * The pricing scheme details.
+ */
+ public function getPricingScheme(): SubscriptionPricingScheme
+ {
+ return $this->pricingScheme;
+ }
+
+ /**
+ * Sets Pricing Scheme.
+ * The pricing scheme details.
+ *
+ * @required
+ * @maps pricing_scheme
+ */
+ public function setPricingScheme(SubscriptionPricingScheme $pricingScheme): void
+ {
+ $this->pricingScheme = $pricingScheme;
+ }
+
+ /**
+ * Converts the UpdatePricingScheme object to a human-readable string representation.
+ *
+ * @return string The string representation of the UpdatePricingScheme object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'UpdatePricingScheme',
+ ['billingCycleSequence' => $this->billingCycleSequence, 'pricingScheme' => $this->pricingScheme]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['billing_cycle_sequence'] = $this->billingCycleSequence;
+ $json['pricing_scheme'] = $this->pricingScheme;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/UpdatePricingSchemesRequest.php b/src/Models/UpdatePricingSchemesRequest.php
new file mode 100644
index 0000000..b464faf
--- /dev/null
+++ b/src/Models/UpdatePricingSchemesRequest.php
@@ -0,0 +1,85 @@
+pricingSchemes = $pricingSchemes;
+ }
+
+ /**
+ * Returns Pricing Schemes.
+ * An array of pricing schemes.
+ *
+ * @return UpdatePricingScheme[]
+ */
+ public function getPricingSchemes(): array
+ {
+ return $this->pricingSchemes;
+ }
+
+ /**
+ * Sets Pricing Schemes.
+ * An array of pricing schemes.
+ *
+ * @required
+ * @maps pricing_schemes
+ *
+ * @param UpdatePricingScheme[] $pricingSchemes
+ */
+ public function setPricingSchemes(array $pricingSchemes): void
+ {
+ $this->pricingSchemes = $pricingSchemes;
+ }
+
+ /**
+ * Converts the UpdatePricingSchemesRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the UpdatePricingSchemesRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('UpdatePricingSchemesRequest', ['pricingSchemes' => $this->pricingSchemes]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ $json['pricing_schemes'] = $this->pricingSchemes;
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/VaultApplePayRequest.php b/src/Models/VaultApplePayRequest.php
new file mode 100644
index 0000000..076d77b
--- /dev/null
+++ b/src/Models/VaultApplePayRequest.php
@@ -0,0 +1,102 @@
+token;
+ }
+
+ /**
+ * Sets Token.
+ * Encrypted Apple Pay token, containing card information. This token would be base64 encoded.
+ *
+ * @maps token
+ */
+ public function setToken(?string $token): void
+ {
+ $this->token = $token;
+ }
+
+ /**
+ * Returns Card.
+ * The payment card to be used to fund a payment. Can be a credit or debit card.
+ */
+ public function getCard(): ?ApplePayRequestCard
+ {
+ return $this->card;
+ }
+
+ /**
+ * Sets Card.
+ * The payment card to be used to fund a payment. Can be a credit or debit card.
+ *
+ * @maps card
+ */
+ public function setCard(?ApplePayRequestCard $card): void
+ {
+ $this->card = $card;
+ }
+
+ /**
+ * Converts the VaultApplePayRequest object to a human-readable string representation.
+ *
+ * @return string The string representation of the VaultApplePayRequest object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify('VaultApplePayRequest', ['token' => $this->token, 'card' => $this->card]);
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->token)) {
+ $json['token'] = $this->token;
+ }
+ if (isset($this->card)) {
+ $json['card'] = $this->card;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/SetupTokenCardExperienceContext.php b/src/Models/VaultCardExperienceContext.php
similarity index 80%
rename from src/Models/SetupTokenCardExperienceContext.php
rename to src/Models/VaultCardExperienceContext.php
index 99ed247..355c8f2 100644
--- a/src/Models/SetupTokenCardExperienceContext.php
+++ b/src/Models/VaultCardExperienceContext.php
@@ -14,9 +14,9 @@ use PaypalServerSdkLib\ApiHelper;
use stdClass;
/**
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault a card.
*/
-class SetupTokenCardExperienceContext implements \JsonSerializable
+class VaultCardExperienceContext implements \JsonSerializable
{
/**
* @var string|null
@@ -41,7 +41,12 @@ class SetupTokenCardExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $vaultInstruction = VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS;
+ private $vaultInstruction;
+
+ /**
+ * @var string|null
+ */
+ private $userAction = VaultUserAction::CONTINUE_;
/**
* Returns Brand Name.
@@ -141,7 +146,7 @@ class SetupTokenCardExperienceContext implements \JsonSerializable
/**
* Returns Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*/
public function getVaultInstruction(): ?string
{
@@ -150,7 +155,7 @@ class SetupTokenCardExperienceContext implements \JsonSerializable
/**
* Sets Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*
* @maps vault_instruction
*/
@@ -160,20 +165,41 @@ class SetupTokenCardExperienceContext implements \JsonSerializable
}
/**
- * Converts the SetupTokenCardExperienceContext object to a human-readable string representation.
+ * Returns User Action.
+ * User Action on action to be performed after a successful payer approval.
+ */
+ public function getUserAction(): ?string
+ {
+ return $this->userAction;
+ }
+
+ /**
+ * Sets User Action.
+ * User Action on action to be performed after a successful payer approval.
*
- * @return string The string representation of the SetupTokenCardExperienceContext object.
+ * @maps user_action
+ */
+ public function setUserAction(?string $userAction): void
+ {
+ $this->userAction = $userAction;
+ }
+
+ /**
+ * Converts the VaultCardExperienceContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the VaultCardExperienceContext object.
*/
public function __toString(): string
{
return ApiHelper::stringify(
- 'SetupTokenCardExperienceContext',
+ 'VaultCardExperienceContext',
[
'brandName' => $this->brandName,
'locale' => $this->locale,
'returnUrl' => $this->returnUrl,
'cancelUrl' => $this->cancelUrl,
- 'vaultInstruction' => $this->vaultInstruction
+ 'vaultInstruction' => $this->vaultInstruction,
+ 'userAction' => $this->userAction
]
);
}
@@ -205,6 +231,9 @@ class SetupTokenCardExperienceContext implements \JsonSerializable
if (isset($this->vaultInstruction)) {
$json['vault_instruction'] = $this->vaultInstruction;
}
+ if (isset($this->userAction)) {
+ $json['user_action'] = $this->userAction;
+ }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/VaultExperienceContext.php b/src/Models/VaultExperienceContext.php
index 748ce3c..b26ce85 100644
--- a/src/Models/VaultExperienceContext.php
+++ b/src/Models/VaultExperienceContext.php
@@ -41,12 +41,22 @@ class VaultExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $shippingPreference = OrderApplicationContextShippingPreference::GET_FROM_FILE;
+ private $shippingPreference = ExperienceContextShippingPreference::GET_FROM_FILE;
/**
* @var string|null
*/
- private $vaultInstruction = VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS;
+ private $vaultInstruction;
+
+ /**
+ * @var AppSwitchContext|null
+ */
+ private $appSwitchContext;
+
+ /**
+ * @var string|null
+ */
+ private $userAction = VaultUserAction::CONTINUE_;
/**
* Returns Brand Name.
@@ -166,7 +176,7 @@ class VaultExperienceContext implements \JsonSerializable
/**
* Returns Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*/
public function getVaultInstruction(): ?string
{
@@ -175,7 +185,7 @@ class VaultExperienceContext implements \JsonSerializable
/**
* Sets Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*
* @maps vault_instruction
*/
@@ -184,6 +194,48 @@ class VaultExperienceContext implements \JsonSerializable
$this->vaultInstruction = $vaultInstruction;
}
+ /**
+ * Returns 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.
+ */
+ public function getAppSwitchContext(): ?AppSwitchContext
+ {
+ return $this->appSwitchContext;
+ }
+
+ /**
+ * Sets 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.
+ *
+ * @maps app_switch_context
+ */
+ public function setAppSwitchContext(?AppSwitchContext $appSwitchContext): void
+ {
+ $this->appSwitchContext = $appSwitchContext;
+ }
+
+ /**
+ * Returns User Action.
+ * User Action on action to be performed after a successful payer approval.
+ */
+ public function getUserAction(): ?string
+ {
+ return $this->userAction;
+ }
+
+ /**
+ * Sets User Action.
+ * User Action on action to be performed after a successful payer approval.
+ *
+ * @maps user_action
+ */
+ public function setUserAction(?string $userAction): void
+ {
+ $this->userAction = $userAction;
+ }
+
/**
* Converts the VaultExperienceContext object to a human-readable string representation.
*
@@ -199,7 +251,9 @@ class VaultExperienceContext implements \JsonSerializable
'returnUrl' => $this->returnUrl,
'cancelUrl' => $this->cancelUrl,
'shippingPreference' => $this->shippingPreference,
- 'vaultInstruction' => $this->vaultInstruction
+ 'vaultInstruction' => $this->vaultInstruction,
+ 'appSwitchContext' => $this->appSwitchContext,
+ 'userAction' => $this->userAction
]
);
}
@@ -234,6 +288,12 @@ class VaultExperienceContext implements \JsonSerializable
if (isset($this->vaultInstruction)) {
$json['vault_instruction'] = $this->vaultInstruction;
}
+ if (isset($this->appSwitchContext)) {
+ $json['app_switch_context'] = $this->appSwitchContext;
+ }
+ if (isset($this->userAction)) {
+ $json['user_action'] = $this->userAction;
+ }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/VaultPaypalWalletRequest.php b/src/Models/VaultPaypalWalletRequest.php
index f66554d..aeda4de 100644
--- a/src/Models/VaultPaypalWalletRequest.php
+++ b/src/Models/VaultPaypalWalletRequest.php
@@ -214,7 +214,7 @@ class VaultPaypalWalletRequest implements \JsonSerializable
/**
* Returns Experience Context.
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault PayPal Wallet.
*/
public function getExperienceContext(): ?VaultExperienceContext
{
@@ -223,7 +223,7 @@ class VaultPaypalWalletRequest implements \JsonSerializable
/**
* Sets Experience Context.
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault PayPal Wallet.
*
* @maps experience_context
*/
diff --git a/src/Models/VaultUserAction.php b/src/Models/VaultUserAction.php
new file mode 100644
index 0000000..463ae47
--- /dev/null
+++ b/src/Models/VaultUserAction.php
@@ -0,0 +1,31 @@
+experienceContext;
}
/**
* Sets Experience Context.
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault a venmo account.
*
* @maps experience_context
*/
- public function setExperienceContext(?VaultVenmoExperienceContext $experienceContext): void
+ public function setExperienceContext(?VenmoExperienceContext $experienceContext): void
{
$this->experienceContext = $experienceContext;
}
diff --git a/src/Models/VaultedDigitalWalletShippingDetails.php b/src/Models/VaultedDigitalWalletShippingDetails.php
index 1433a9d..5403dea 100644
--- a/src/Models/VaultedDigitalWalletShippingDetails.php
+++ b/src/Models/VaultedDigitalWalletShippingDetails.php
@@ -23,6 +23,11 @@ class VaultedDigitalWalletShippingDetails implements \JsonSerializable
*/
private $name;
+ /**
+ * @var string|null
+ */
+ private $emailAddress;
+
/**
* @var PhoneNumberWithCountryCode|null
*/
@@ -58,6 +63,30 @@ class VaultedDigitalWalletShippingDetails implements \JsonSerializable
$this->name = $name;
}
+ /**
+ * Returns Email Address.
+ * 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.
+ */
+ public function getEmailAddress(): ?string
+ {
+ return $this->emailAddress;
+ }
+
+ /**
+ * Sets Email Address.
+ * 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.
+ *
+ * @maps email_address
+ */
+ public function setEmailAddress(?string $emailAddress): void
+ {
+ $this->emailAddress = $emailAddress;
+ }
+
/**
* Returns Phone Number.
* The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.
@@ -139,6 +168,7 @@ class VaultedDigitalWalletShippingDetails implements \JsonSerializable
'VaultedDigitalWalletShippingDetails',
[
'name' => $this->name,
+ 'emailAddress' => $this->emailAddress,
'phoneNumber' => $this->phoneNumber,
'type' => $this->type,
'address' => $this->address
@@ -159,16 +189,19 @@ class VaultedDigitalWalletShippingDetails implements \JsonSerializable
{
$json = [];
if (isset($this->name)) {
- $json['name'] = $this->name;
+ $json['name'] = $this->name;
+ }
+ if (isset($this->emailAddress)) {
+ $json['email_address'] = $this->emailAddress;
}
if (isset($this->phoneNumber)) {
- $json['phone_number'] = $this->phoneNumber;
+ $json['phone_number'] = $this->phoneNumber;
}
if (isset($this->type)) {
- $json['type'] = $this->type;
+ $json['type'] = $this->type;
}
if (isset($this->address)) {
- $json['address'] = $this->address;
+ $json['address'] = $this->address;
}
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
diff --git a/src/Models/VaultVenmoExperienceContext.php b/src/Models/VenmoExperienceContext.php
similarity index 67%
rename from src/Models/VaultVenmoExperienceContext.php
rename to src/Models/VenmoExperienceContext.php
index 1d62855..faf69c9 100644
--- a/src/Models/VaultVenmoExperienceContext.php
+++ b/src/Models/VenmoExperienceContext.php
@@ -14,9 +14,9 @@ use PaypalServerSdkLib\ApiHelper;
use stdClass;
/**
- * Customizes the Vault creation flow experience for your customers.
+ * A resource representing an experience context of vault a venmo account.
*/
-class VaultVenmoExperienceContext implements \JsonSerializable
+class VenmoExperienceContext implements \JsonSerializable
{
/**
* @var string|null
@@ -26,12 +26,17 @@ class VaultVenmoExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $shippingPreference = OrderApplicationContextShippingPreference::GET_FROM_FILE;
+ private $shippingPreference = ExperienceContextShippingPreference::GET_FROM_FILE;
/**
* @var string|null
*/
- private $vaultInstruction = VaultInstructionAction::ON_CREATE_PAYMENT_TOKENS;
+ private $vaultInstruction;
+
+ /**
+ * @var string|null
+ */
+ private $userAction = VaultUserAction::CONTINUE_;
/**
* Returns Brand Name.
@@ -77,7 +82,7 @@ class VaultVenmoExperienceContext implements \JsonSerializable
/**
* Returns Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*/
public function getVaultInstruction(): ?string
{
@@ -86,7 +91,7 @@ class VaultVenmoExperienceContext implements \JsonSerializable
/**
* Sets Vault Instruction.
- * Vault Instruction on action to be performed after a successful payer approval.
+ * DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
*
* @maps vault_instruction
*/
@@ -96,18 +101,39 @@ class VaultVenmoExperienceContext implements \JsonSerializable
}
/**
- * Converts the VaultVenmoExperienceContext object to a human-readable string representation.
+ * Returns User Action.
+ * User Action on action to be performed after a successful payer approval.
+ */
+ public function getUserAction(): ?string
+ {
+ return $this->userAction;
+ }
+
+ /**
+ * Sets User Action.
+ * User Action on action to be performed after a successful payer approval.
*
- * @return string The string representation of the VaultVenmoExperienceContext object.
+ * @maps user_action
+ */
+ public function setUserAction(?string $userAction): void
+ {
+ $this->userAction = $userAction;
+ }
+
+ /**
+ * Converts the VenmoExperienceContext object to a human-readable string representation.
+ *
+ * @return string The string representation of the VenmoExperienceContext object.
*/
public function __toString(): string
{
return ApiHelper::stringify(
- 'VaultVenmoExperienceContext',
+ 'VenmoExperienceContext',
[
'brandName' => $this->brandName,
'shippingPreference' => $this->shippingPreference,
- 'vaultInstruction' => $this->vaultInstruction
+ 'vaultInstruction' => $this->vaultInstruction,
+ 'userAction' => $this->userAction
]
);
}
@@ -133,6 +159,9 @@ class VaultVenmoExperienceContext implements \JsonSerializable
if (isset($this->vaultInstruction)) {
$json['vault_instruction'] = $this->vaultInstruction;
}
+ if (isset($this->userAction)) {
+ $json['user_action'] = $this->userAction;
+ }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/VenmoPaymentToken.php b/src/Models/VenmoPaymentToken.php
index eea8533..5cf4685 100644
--- a/src/Models/VenmoPaymentToken.php
+++ b/src/Models/VenmoPaymentToken.php
@@ -13,6 +13,9 @@ namespace PaypalServerSdkLib\Models;
use PaypalServerSdkLib\ApiHelper;
use stdClass;
+/**
+ * Full representation of a Venmo Payment Token.
+ */
class VenmoPaymentToken implements \JsonSerializable
{
/**
@@ -211,9 +214,10 @@ class VenmoPaymentToken implements \JsonSerializable
/**
* Returns Email Address.
- * 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.
+ * 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.
*/
public function getEmailAddress(): ?string
{
@@ -222,9 +226,10 @@ class VenmoPaymentToken implements \JsonSerializable
/**
* Sets Email Address.
- * 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.
+ * 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.
*
* @maps email_address
*/
diff --git a/src/Models/VenmoVaultResponse.php b/src/Models/VenmoVaultResponse.php
new file mode 100644
index 0000000..c8b6760
--- /dev/null
+++ b/src/Models/VenmoVaultResponse.php
@@ -0,0 +1,167 @@
+id;
+ }
+
+ /**
+ * Sets Id.
+ * The PayPal-generated ID for the saved payment source.
+ *
+ * @maps id
+ */
+ public function setId(?string $id): void
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * Returns Status.
+ * The vault status.
+ */
+ public function getStatus(): ?string
+ {
+ return $this->status;
+ }
+
+ /**
+ * Sets Status.
+ * The vault status.
+ *
+ * @maps status
+ */
+ public function setStatus(?string $status): void
+ {
+ $this->status = $status;
+ }
+
+ /**
+ * Returns Links.
+ * An array of request-related HATEOAS links.
+ *
+ * @return LinkDescription[]|null
+ */
+ public function getLinks(): ?array
+ {
+ return $this->links;
+ }
+
+ /**
+ * Sets Links.
+ * An array of request-related HATEOAS links.
+ *
+ * @maps links
+ *
+ * @param LinkDescription[]|null $links
+ */
+ public function setLinks(?array $links): void
+ {
+ $this->links = $links;
+ }
+
+ /**
+ * Returns Customer.
+ * This object represents a merchant’s customer, allowing them to store contact details, and track all
+ * payments associated with the same customer.
+ */
+ public function getCustomer(): ?CustomerInformation
+ {
+ return $this->customer;
+ }
+
+ /**
+ * Sets Customer.
+ * This object represents a merchant’s customer, allowing them to store contact details, and track all
+ * payments associated with the same customer.
+ *
+ * @maps customer
+ */
+ public function setCustomer(?CustomerInformation $customer): void
+ {
+ $this->customer = $customer;
+ }
+
+ /**
+ * Converts the VenmoVaultResponse object to a human-readable string representation.
+ *
+ * @return string The string representation of the VenmoVaultResponse object.
+ */
+ public function __toString(): string
+ {
+ return ApiHelper::stringify(
+ 'VenmoVaultResponse',
+ ['id' => $this->id, 'status' => $this->status, 'links' => $this->links, 'customer' => $this->customer]
+ );
+ }
+
+ /**
+ * Encode this object to JSON
+ *
+ * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
+ * are set. (default: false)
+ *
+ * @return array|stdClass
+ */
+ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
+ public function jsonSerialize(bool $asArrayWhenEmpty = false)
+ {
+ $json = [];
+ if (isset($this->id)) {
+ $json['id'] = $this->id;
+ }
+ if (isset($this->status)) {
+ $json['status'] = $this->status;
+ }
+ if (isset($this->links)) {
+ $json['links'] = $this->links;
+ }
+ if (isset($this->customer)) {
+ $json['customer'] = $this->customer;
+ }
+
+ return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
+ }
+}
diff --git a/src/Models/VenmoVaultResponseStatus.php b/src/Models/VenmoVaultResponseStatus.php
new file mode 100644
index 0000000..607c98c
--- /dev/null
+++ b/src/Models/VenmoVaultResponseStatus.php
@@ -0,0 +1,35 @@
+vault;
}
/**
* Sets Vault.
- * The details about a saved payment source.
+ * The details about a saved venmo payment source.
*
* @maps vault
*/
- public function setVault(?VaultResponse $vault): void
+ public function setVault(?VenmoVaultResponse $vault): void
{
$this->vault = $vault;
}
diff --git a/src/Models/VenmoWalletExperienceContext.php b/src/Models/VenmoWalletExperienceContext.php
index ef67722..e02a994 100644
--- a/src/Models/VenmoWalletExperienceContext.php
+++ b/src/Models/VenmoWalletExperienceContext.php
@@ -28,13 +28,18 @@ class VenmoWalletExperienceContext implements \JsonSerializable
/**
* @var string|null
*/
- private $shippingPreference = ShippingPreference::GET_FROM_FILE;
+ private $shippingPreference = VenmoWalletExperienceContextShippingPreference::GET_FROM_FILE;
/**
* @var CallbackConfiguration|null
*/
private $orderUpdateCallbackConfig;
+ /**
+ * @var string|null
+ */
+ private $userAction = VenmoWalletExperienceContextUserAction::CONTINUE_;
+
/**
* Returns Brand Name.
* The business name of the merchant. The pattern is defined by an external party and supports Unicode.
@@ -95,6 +100,26 @@ class VenmoWalletExperienceContext implements \JsonSerializable
$this->orderUpdateCallbackConfig = $orderUpdateCallbackConfig;
}
+ /**
+ * Returns User Action.
+ * Configures a Continue or Pay Now checkout flow.
+ */
+ public function getUserAction(): ?string
+ {
+ return $this->userAction;
+ }
+
+ /**
+ * Sets User Action.
+ * Configures a Continue or Pay Now checkout flow.
+ *
+ * @maps user_action
+ */
+ public function setUserAction(?string $userAction): void
+ {
+ $this->userAction = $userAction;
+ }
+
/**
* Converts the VenmoWalletExperienceContext object to a human-readable string representation.
*
@@ -107,7 +132,8 @@ class VenmoWalletExperienceContext implements \JsonSerializable
[
'brandName' => $this->brandName,
'shippingPreference' => $this->shippingPreference,
- 'orderUpdateCallbackConfig' => $this->orderUpdateCallbackConfig
+ 'orderUpdateCallbackConfig' => $this->orderUpdateCallbackConfig,
+ 'userAction' => $this->userAction
]
);
}
@@ -133,6 +159,9 @@ class VenmoWalletExperienceContext implements \JsonSerializable
if (isset($this->orderUpdateCallbackConfig)) {
$json['order_update_callback_config'] = $this->orderUpdateCallbackConfig;
}
+ if (isset($this->userAction)) {
+ $json['user_action'] = $this->userAction;
+ }
return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
}
diff --git a/src/Models/ShippingPreference.php b/src/Models/VenmoWalletExperienceContextShippingPreference.php
similarity index 93%
rename from src/Models/ShippingPreference.php
rename to src/Models/VenmoWalletExperienceContextShippingPreference.php
index c645c60..c57a5a6 100644
--- a/src/Models/ShippingPreference.php
+++ b/src/Models/VenmoWalletExperienceContextShippingPreference.php
@@ -13,7 +13,7 @@ namespace PaypalServerSdkLib\Models;
/**
* The location from which the shipping address is derived.
*/
-class ShippingPreference
+class VenmoWalletExperienceContextShippingPreference
{
/**
* Get the customer-provided shipping address on the PayPal site.
diff --git a/src/Models/VenmoWalletExperienceContextUserAction.php b/src/Models/VenmoWalletExperienceContextUserAction.php
new file mode 100644
index 0000000..cb01d80
--- /dev/null
+++ b/src/Models/VenmoWalletExperienceContextUserAction.php
@@ -0,0 +1,31 @@
+address = $address;
}
+ /**
+ * Returns Return Flow.
+ * Merchant preference on how the buyer can navigate back to merchant website post approving the
+ * transaction on the Venmo App.
+ */
+ public function getReturnFlow(): ?string
+ {
+ return $this->returnFlow;
+ }
+
+ /**
+ * Sets Return Flow.
+ * Merchant preference on how the buyer can navigate back to merchant website post approving the
+ * transaction on the Venmo App.
+ *
+ * @maps return_flow
+ */
+ public function setReturnFlow(?string $returnFlow): void
+ {
+ $this->returnFlow = $returnFlow;
+ }
+
/**
* Returns Attributes.
* Additional attributes associated with the use of a Venmo Wallet.
@@ -225,6 +252,7 @@ class VenmoWalletResponse implements \JsonSerializable
'name' => $this->name,
'phoneNumber' => $this->phoneNumber,
'address' => $this->address,
+ 'returnFlow' => $this->returnFlow,
'attributes' => $this->attributes
]
);
@@ -260,6 +288,9 @@ class VenmoWalletResponse implements \JsonSerializable
if (isset($this->address)) {
$json['address'] = $this->address;
}
+ if (isset($this->returnFlow)) {
+ $json['return_flow'] = $this->returnFlow;
+ }
if (isset($this->attributes)) {
$json['attributes'] = $this->attributes;
}
diff --git a/src/PaypalServerSdkClient.php b/src/PaypalServerSdkClient.php
index 09e7caf..cf7c601 100644
--- a/src/PaypalServerSdkClient.php
+++ b/src/PaypalServerSdkClient.php
@@ -17,6 +17,8 @@ use PaypalServerSdkLib\Authentication\ClientCredentialsAuthManager;
use PaypalServerSdkLib\Controllers\OAuthAuthorizationController;
use PaypalServerSdkLib\Controllers\OrdersController;
use PaypalServerSdkLib\Controllers\PaymentsController;
+use PaypalServerSdkLib\Controllers\SubscriptionsController;
+use PaypalServerSdkLib\Controllers\TransactionSearchController;
use PaypalServerSdkLib\Controllers\VaultController;
use PaypalServerSdkLib\Logging\LoggingConfigurationBuilder;
use PaypalServerSdkLib\Logging\RequestLoggingConfigurationBuilder;
@@ -34,6 +36,10 @@ class PaypalServerSdkClient implements ConfigurationInterface
private $vault;
+ private $transactionSearch;
+
+ private $subscriptions;
+
private $oAuthAuthorization;
private $clientCredentialsAuthManager;
@@ -68,7 +74,7 @@ class PaypalServerSdkClient implements ConfigurationInterface
->converter(new CompatibilityConverter())
->jsonHelper(ApiHelper::getJsonHelper())
->apiCallback($this->config['httpCallback'] ?? null)
- ->userAgent('PayPal REST API PHP SDK, Version: 1.1.0, on OS {os-info}')
+ ->userAgent('PayPal REST API PHP SDK, Version: 2.0.0, on OS {os-info}')
->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::DEFAULT_)
->authManagers(['Oauth2' => $this->clientCredentialsAuthManager])
->loggingConfiguration($loggingConfiguration)
@@ -279,6 +285,28 @@ class PaypalServerSdkClient implements ConfigurationInterface
return $this->vault;
}
+ /**
+ * Returns Transaction Search Controller
+ */
+ public function getTransactionSearchController(): TransactionSearchController
+ {
+ if ($this->transactionSearch == null) {
+ $this->transactionSearch = new TransactionSearchController($this->client);
+ }
+ return $this->transactionSearch;
+ }
+
+ /**
+ * Returns Subscriptions Controller
+ */
+ public function getSubscriptionsController(): SubscriptionsController
+ {
+ if ($this->subscriptions == null) {
+ $this->subscriptions = new SubscriptionsController($this->client);
+ }
+ return $this->subscriptions;
+ }
+
/**
* Returns O Auth Authorization Controller
*/
diff --git a/src/Proxy/ProxyConfigurationBuilder.php b/src/Proxy/ProxyConfigurationBuilder.php
index af46a73..b29e623 100644
--- a/src/Proxy/ProxyConfigurationBuilder.php
+++ b/src/Proxy/ProxyConfigurationBuilder.php
@@ -2,6 +2,12 @@
declare(strict_types=1);
+/*
+ * PaypalServerSdkLib
+ *
+ * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
+ */
+
namespace PaypalServerSdkLib\Proxy;
use PaypalServerSdkLib\ConfigurationDefaults;
@@ -63,7 +69,7 @@ class ProxyConfigurationBuilder
/**
* Set proxy authentication method
*/
- public function authMethod(string $authMethod): self
+ public function authMethod(int $authMethod): self
{
$this->authMethod = $authMethod;
return $this;
@@ -85,7 +91,7 @@ class ProxyConfigurationBuilder
'port' => $this->port,
'tunnel' => $this->tunnel,
'address' => $this->address,
- 'auth' => ['user' => '$this->user', 'pass' => '$this->pass', 'method' => $this->authMethod]
+ 'auth' => ['user' => $this->user, 'pass' => $this->pass, 'method' => $this->authMethod]
];
}
}