diff --git a/README.md b/README.md index 1d7f316..558ef27 100644 --- a/README.md +++ b/README.md @@ -28,15 +28,15 @@ The package is compatible with Python versions `3 >=3.7, <= 3.11`. Install the package from PyPi using the following pip command: ```python -pip install paypal-server-sdk==0.6.0 +pip install paypal-server-sdk==0.6.1 ``` You can also view the package at: -https://pypi.python.org/pypi/paypal-server-sdk/0.6.0 +https://pypi.python.org/pypi/paypal-server-sdk/0.6.1 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/client.md) The following parameters are configurable for the API Client: @@ -51,8 +51,8 @@ The following parameters are configurable for the API Client: | `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try.
**Default: 2** | | `retry_statuses` | `Array of int` | The http statuses on which retry is to be done.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | | `retry_methods` | `Array of string` | The http methods on which retry is to be done.
**Default: ['GET', 'PUT']** | -| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/logging-configuration.md) | The SDK logging configuration for API calls | -| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | +| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/logging-configuration.md) | The SDK logging configuration for API calls | +| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | The API client can be initialized as follows: @@ -102,21 +102,21 @@ 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-Python-Server-SDK/tree/0.6.0/doc/auth/oauth-2-client-credentials-grant.md) +* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md) ## List of APIs -* [Orders](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/controllers/orders.md) -* [Payments](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/controllers/payments.md) -* [Vault](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/controllers/vault.md) +* [Orders](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/controllers/orders.md) +* [Payments](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/controllers/payments.md) +* [Vault](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/controllers/vault.md) ## Classes Documentation -* [Utility Classes](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/utility-classes.md) -* [HttpResponse](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/http-response.md) -* [HttpRequest](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/http-request.md) -* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/logging-configuration.md) -* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/request-logging-configuration.md) -* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/response-logging-configuration.md) -* [AbstractLogger](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.0/doc/abstract-logger.md) +* [Utility Classes](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/utility-classes.md) +* [HttpResponse](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/http-response.md) +* [HttpRequest](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/http-request.md) +* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/logging-configuration.md) +* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/request-logging-configuration.md) +* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/response-logging-configuration.md) +* [AbstractLogger](https://www.github.com/paypal/PayPal-Python-Server-SDK/tree/0.6.1/doc/abstract-logger.md) diff --git a/doc/controllers/orders.md b/doc/controllers/orders.md index 7c2c447..224756b 100644 --- a/doc/controllers/orders.md +++ b/doc/controllers/orders.md @@ -12,48 +12,58 @@ orders_controller = client.orders ## Methods -* [Orders Authorize](../../doc/controllers/orders.md#orders-authorize) -* [Orders Track Create](../../doc/controllers/orders.md#orders-track-create) * [Orders Create](../../doc/controllers/orders.md#orders-create) -* [Orders Patch](../../doc/controllers/orders.md#orders-patch) -* [Orders Capture](../../doc/controllers/orders.md#orders-capture) * [Orders Get](../../doc/controllers/orders.md#orders-get) +* [Orders Patch](../../doc/controllers/orders.md#orders-patch) * [Orders Confirm](../../doc/controllers/orders.md#orders-confirm) +* [Orders Authorize](../../doc/controllers/orders.md#orders-authorize) +* [Orders Capture](../../doc/controllers/orders.md#orders-capture) +* [Orders Track Create](../../doc/controllers/orders.md#orders-track-create) * [Orders Trackers Patch](../../doc/controllers/orders.md#orders-trackers-patch) -# Orders Authorize +# Orders Create -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.
+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.
```python -def orders_authorize(self, - options=dict()) +def orders_create(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order for which to authorize.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `paypal_request_id` | `str` | 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.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` | -| `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` | +| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - | +| `paypal_request_id` | `str` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` | +| `paypal_partner_attribution_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | +| `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` | | `paypal_auth_assertion` | `str` | 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 a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md). +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md). ## Example Usage ```python collect = { - 'id': 'id0', + 'body': OrderRequest( + intent=CheckoutPaymentIntent.CAPTURE, + purchase_units=[ + PurchaseUnitRequest( + amount=AmountWithBreakdown( + currency_code='currency_code6', + value='value0' + ) + ) + ] + ), 'prefer': 'return=minimal' } -result = orders_controller.orders_authorize(collect) +result = orders_controller.orders_create(collect) ``` ## Errors @@ -62,29 +72,26 @@ result = orders_controller.orders_authorize(collect) | --- | --- | --- | | 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | | 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | | 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Orders Track Create +# Orders Get -Adds tracking information for an Order. +Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
```python -def orders_track_create(self, - options=dict()) +def orders_get(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - | +| `id` | `str` | Template, Required | The ID of the order for which to show details.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | | `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `fields` | `str` | 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 @@ -94,68 +101,53 @@ This method returns a `ApiResponse` instance. The `body` property of this instan ```python collect = { - 'id': 'id0', - 'body': OrderTrackerRequest( - capture_id='capture_id8', - notify_payer=False - ) + 'id': 'id0' } -result = orders_controller.orders_track_create(collect) +result = orders_controller.orders_get(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) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | | 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Orders Create +# Orders Patch -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.
+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:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.email_addressreplace, add
purchase_units[].shipping.phone_numberreplace, add
purchase_units[].shipping.optionsreplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.payee_receivable_fx_rate_idreplace, add, remove
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add
```python -def orders_create(self, - options=dict()) +def orders_patch(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - | -| `paypal_request_id` | `str` | 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.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` | -| `paypal_partner_attribution_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | -| `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | -| `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` | +| `id` | `str` | Template, Required | The ID of the order to update.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `body` | [`List[Patch]`](../../doc/models/patch.md) | Body, Optional | - | ## Response Type -This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md). +This method returns a `ApiResponse` instance. ## Example Usage ```python collect = { - 'body': OrderRequest( - intent=CheckoutPaymentIntent.CAPTURE, - purchase_units=[ - PurchaseUnitRequest( - amount=AmountWithBreakdown( - currency_code='currency_code6', - value='value0' - ) - ) - ] - ), - 'prefer': 'return=minimal' + 'id': 'id0', + 'body': [ + Patch( + op=PatchOp.ADD + ) + ] } -result = orders_controller.orders_create(collect) +result = orders_controller.orders_patch(collect) ``` ## Errors @@ -164,42 +156,42 @@ result = orders_controller.orders_create(collect) | --- | --- | --- | | 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | | 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | | 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Orders Patch +# Orders Confirm -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:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.email_addressreplace, add
purchase_units[].shipping.phone_numberreplace, add
purchase_units[].shipping.optionsreplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.payee_receivable_fx_rate_idreplace, add, remove
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add
+Payer confirms their intent to pay for the the Order with the given payment source. ```python -def orders_patch(self, - options=dict()) +def orders_confirm(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order to update.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `body` | [`List[Patch]`](../../doc/models/patch.md) | Body, Optional | - | +| `id` | `str` | Template, Required | The ID of the order for which the payer confirms their intent to pay.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**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 a `ApiResponse` instance. +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md). ## Example Usage ```python collect = { 'id': 'id0', - 'body': [ - Patch( - op=PatchOp.ADD - ) - ] + 'prefer': 'return=minimal' } -result = orders_controller.orders_patch(collect) +result = orders_controller.orders_confirm(collect) ``` ## Errors @@ -207,35 +199,35 @@ result = orders_controller.orders_patch(collect) | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 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) | +| 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) | -# Orders Capture +# Orders Authorize -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.
+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.
```python -def orders_capture(self, - options=dict()) +def orders_authorize(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order for which to capture a payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `paypal_request_id` | `str` | 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.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` | +| `id` | `str` | Template, Required | The ID of the order for which to authorize.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `paypal_request_id` | `str` | 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` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` | | `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | | `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | -| `body` | [`OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - | +| `body` | [`OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - | ## Response Type -This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Order`](../../doc/models/order.md). +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md). ## Example Usage @@ -244,7 +236,7 @@ collect = { 'id': 'id0', 'prefer': 'return=minimal' } -result = orders_controller.orders_capture(collect) +result = orders_controller.orders_authorize(collect) ``` ## Errors @@ -260,21 +252,25 @@ result = orders_controller.orders_capture(collect) | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Orders Get +# Orders Capture -Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
+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.
```python -def orders_get(self, - options=dict()) +def orders_capture(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order for which to show details.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `fields` | `str` | 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_]*$` | +| `id` | `str` | Template, Required | The ID of the order for which to capture a payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `paypal_request_id` | `str` | 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` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` | +| `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `body` | [`OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - | ## Response Type @@ -284,37 +280,41 @@ This method returns a `ApiResponse` instance. The `body` property of this instan ```python collect = { - 'id': 'id0' + 'id': 'id0', + 'prefer': 'return=minimal' } -result = orders_controller.orders_get(collect) +result = orders_controller.orders_capture(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) | -# Orders Confirm +# Orders Track Create -Payer confirms their intent to pay for the the Order with the given payment source. +Adds tracking information for an Order. ```python -def orders_confirm(self, - options=dict()) +def orders_track_create(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `id` | `str` | Template, Required | The ID of the order for which the payer confirms their intent to pay.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | -| `paypal_client_metadata_id` | `str` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | -| `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=]*$` | -| `body` | [`ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - | +| `id` | `str` | Template, Required | The ID of the order that the tracking information is associated with.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | ## Response Type @@ -325,13 +325,12 @@ This method returns a `ApiResponse` instance. The `body` property of this instan ```python collect = { 'id': 'id0', - 'prefer': 'return=minimal', - 'body': ConfirmOrderRequest( - payment_source=PaymentSource(), - processing_instruction=ProcessingInstruction.NO_INSTRUCTION + 'body': OrderTrackerRequest( + capture_id='capture_id8', + notify_payer=False ) } -result = orders_controller.orders_confirm(collect) +result = orders_controller.orders_track_create(collect) ``` ## Errors @@ -340,6 +339,7 @@ result = orders_controller.orders_confirm(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) | @@ -360,6 +360,7 @@ def orders_trackers_patch(self, | --- | --- | --- | --- | | `id` | `str` | 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]+$` | | `tracker_id` | `str` | Template, Required | The order tracking ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | | `body` | [`List[Patch]`](../../doc/models/patch.md) | Body, Optional | - | ## Response Type diff --git a/doc/controllers/payments.md b/doc/controllers/payments.md index 8703737..05c4fb7 100644 --- a/doc/controllers/payments.md +++ b/doc/controllers/payments.md @@ -14,8 +14,8 @@ payments_controller = client.payments * [Authorizations Get](../../doc/controllers/payments.md#authorizations-get) * [Authorizations Capture](../../doc/controllers/payments.md#authorizations-capture) -* [Authorizations Void](../../doc/controllers/payments.md#authorizations-void) * [Authorizations Reauthorize](../../doc/controllers/payments.md#authorizations-reauthorize) +* [Authorizations Void](../../doc/controllers/payments.md#authorizations-void) * [Captures Get](../../doc/controllers/payments.md#captures-get) * [Captures Refund](../../doc/controllers/payments.md#captures-refund) * [Refunds Get](../../doc/controllers/payments.md#refunds-get) @@ -27,7 +27,7 @@ Shows details for an authorized payment, by ID. ```python def authorizations_get(self, - authorization_id) + options=dict()) ``` ## Parameters @@ -35,6 +35,7 @@ def authorizations_get(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `authorization_id` | `str` | Template, Required | The ID of the authorized payment for which to show details. | +| `paypal_auth_assertion` | `str` | 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 @@ -43,9 +44,10 @@ This method returns a `ApiResponse` instance. The `body` property of this instan ## Example Usage ```python -authorization_id = 'authorization_id8' - -result = payments_controller.authorizations_get(authorization_id) +collect = { + 'authorization_id': 'authorization_id8' +} +result = payments_controller.authorizations_get(collect) ``` ## Errors @@ -53,7 +55,6 @@ result = payments_controller.authorizations_get(authorization_id) | 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) | @@ -75,6 +76,7 @@ def authorizations_capture(self, | `authorization_id` | `str` | Template, Required | The PayPal-generated ID for the authorized payment to capture. | | `paypal_request_id` | `str` | Header, Optional | The server stores keys for 45 days. | | `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| | `body` | [`CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - | ## Response Type @@ -108,22 +110,24 @@ result = payments_controller.authorizations_capture(collect) | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Authorizations Void +# Authorizations Reauthorize -Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. +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.
```python -def authorizations_void(self, - options=dict()) +def authorizations_reauthorize(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `authorization_id` | `str` | Template, Required | The PayPal-generated ID for the authorized payment to void. | -| `paypal_auth_assertion` | `str` | 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.
| +| `authorization_id` | `str` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. | +| `paypal_request_id` | `str` | Header, Optional | The server stores keys for 45 days. | | `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'` | +| `paypal_auth_assertion` | `str` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| +| `body` | [`ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - | ## Response Type @@ -136,7 +140,7 @@ collect = { 'authorization_id': 'authorization_id8', 'prefer': 'return=minimal' } -result = payments_controller.authorizations_void(collect) +result = payments_controller.authorizations_reauthorize(collect) ``` ## Errors @@ -145,31 +149,29 @@ result = payments_controller.authorizations_void(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) | -| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | | 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | | 500 | The request failed because an internal server error occurred. | `ApiException` | | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | -# Authorizations Reauthorize +# Authorizations Void -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.
+Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. ```python -def authorizations_reauthorize(self, - options=dict()) +def authorizations_void(self, + options=dict()) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `authorization_id` | `str` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. | +| `authorization_id` | `str` | Template, Required | The PayPal-generated ID for the authorized payment to void. | +| `paypal_auth_assertion` | `str` | 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.
| | `paypal_request_id` | `str` | Header, Optional | The server stores keys for 45 days. | | `prefer` | `str` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
**Default**: `'return=minimal'` | -| `body` | [`ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - | ## Response Type @@ -182,17 +184,17 @@ collect = { 'authorization_id': 'authorization_id8', 'prefer': 'return=minimal' } -result = payments_controller.authorizations_reauthorize(collect) +result = payments_controller.authorizations_void(collect) ``` ## Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | -| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | | 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | | 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | | 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | | 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | | 500 | The request failed because an internal server error occurred. | `ApiException` | | Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | @@ -289,7 +291,7 @@ Shows details for a refund, by ID. ```python def refunds_get(self, - refund_id) + options=dict()) ``` ## Parameters @@ -297,6 +299,7 @@ def refunds_get(self, | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `refund_id` | `str` | Template, Required | The PayPal-generated ID for the refund for which to show details. | +| `paypal_auth_assertion` | `str` | 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 @@ -305,9 +308,10 @@ This method returns a `ApiResponse` instance. The `body` property of this instan ## Example Usage ```python -refund_id = 'refund_id4' - -result = payments_controller.refunds_get(refund_id) +collect = { + 'refund_id': 'refund_id4' +} +result = payments_controller.refunds_get(collect) ``` ## Errors diff --git a/doc/controllers/vault.md b/doc/controllers/vault.md index 3463847..6984f21 100644 --- a/doc/controllers/vault.md +++ b/doc/controllers/vault.md @@ -12,14 +12,57 @@ vault_controller = client.vault ## Methods +* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create) * [Customer Payment-Tokens Get](../../doc/controllers/vault.md#customer-payment-tokens-get) * [Payment-Tokens Get](../../doc/controllers/vault.md#payment-tokens-get) -* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create) -* [Setup-Tokens Create](../../doc/controllers/vault.md#setup-tokens-create) * [Payment-Tokens Delete](../../doc/controllers/vault.md#payment-tokens-delete) +* [Setup-Tokens Create](../../doc/controllers/vault.md#setup-tokens-create) * [Setup-Tokens Get](../../doc/controllers/vault.md#setup-tokens-get) +# Payment-Tokens Create + +Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer. + +```python +def payment_tokens_create(self, + options=dict()) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `paypal_request_id` | `str` | Header, Required | The server stores keys for 3 hours. | +| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. | + +## Response Type + +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). + +## Example Usage + +```python +collect = { + 'paypal_request_id': 'PayPal-Request-Id6', + 'body': PaymentTokenRequest( + payment_source=PaymentTokenRequestPaymentSource() + ) +} +result = vault_controller.payment_tokens_create(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 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + # Customer Payment-Tokens Get Returns all payment tokens for a customer. @@ -100,36 +143,31 @@ result = vault_controller.payment_tokens_get(id) | 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -# Payment-Tokens Create +# Payment-Tokens Delete -Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer. +Delete the payment token associated with the payment token id. ```python -def payment_tokens_create(self, - options=dict()) +def payment_tokens_delete(self, + id) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `paypal_request_id` | `str` | Header, Required | The server stores keys for 3 hours. | -| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. | +| `id` | `str` | Template, Required | ID of the payment token.
**Constraints**: *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | ## Response Type -This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). +This method returns a `ApiResponse` instance. ## Example Usage ```python -collect = { - 'paypal_request_id': 'PayPal-Request-Id6', - 'body': PaymentTokenRequest( - payment_source=PaymentTokenRequestPaymentSource() - ) -} -result = vault_controller.payment_tokens_create(collect) +id = 'id0' + +result = vault_controller.payment_tokens_delete(id) ``` ## Errors @@ -138,8 +176,6 @@ result = vault_controller.payment_tokens_create(collect) | --- | --- | --- | | 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | | 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | | 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | @@ -185,42 +221,6 @@ result = vault_controller.setup_tokens_create(collect) | 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -# Payment-Tokens Delete - -Delete the payment token associated with the payment token id. - -```python -def payment_tokens_delete(self, - id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `str` | Template, Required | ID of the payment token.
**Constraints**: *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | - -## Response Type - -This method returns a `ApiResponse` instance. - -## Example Usage - -```python -id = 'id0' - -result = vault_controller.payment_tokens_delete(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) | - - # Setup-Tokens Get Returns a readable representation of temporarily vaulted payment source associated with the setup token id. diff --git a/doc/models/card-verification-details.md b/doc/models/card-verification-details.md index 06a3b5e..63c8f03 100644 --- a/doc/models/card-verification-details.md +++ b/doc/models/card-verification-details.md @@ -17,6 +17,7 @@ Card Verification details including the authorization details and 3D SECURE deta | `time` | `str` | 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})$` | | `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | | `processor_response` | [`CardVerificationProcessorResponse`](../../doc/models/card-verification-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | +| `three_d_secure` | `object` | Optional | DEPRECATED. This field is DEPRECATED. Please find the 3D secure authentication data in 'three_d_secure' object under 'authentication_result' object instead of the 'verification' field. | ## Example (as JSON) diff --git a/doc/models/confirm-order-request.md b/doc/models/confirm-order-request.md index 515c9f5..6e2ec93 100644 --- a/doc/models/confirm-order-request.md +++ b/doc/models/confirm-order-request.md @@ -12,7 +12,7 @@ Payer confirms the intent to pay for the Order using the provided payment source | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Required | The payment source definition. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `'NO_INSTRUCTION'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `processing_instruction` | `object` | Optional | - | | `application_context` | [`OrderConfirmApplicationContext`](../../doc/models/order-confirm-application-context.md) | Optional | Customizes the payer confirmation experience. | ## Example (as JSON) @@ -86,7 +86,10 @@ Payer confirms the intent to pay for the Order using the provided payment source } } }, - "processing_instruction": "NO_INSTRUCTION", + "processing_instruction": { + "key1": "val1", + "key2": "val2" + }, "application_context": { "brand_name": "brand_name8", "locale": "locale2", diff --git a/doc/models/fullfillment-type.md b/doc/models/fulfillment-type.md similarity index 88% rename from doc/models/fullfillment-type.md rename to doc/models/fulfillment-type.md index 3c9598b..d8d0360 100644 --- a/doc/models/fullfillment-type.md +++ b/doc/models/fulfillment-type.md @@ -1,11 +1,11 @@ -# Fullfillment Type +# Fulfillment Type 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. ## Enumeration -`FullfillmentType` +`FulfillmentType` ## Fields diff --git a/doc/models/google-pay-card.md b/doc/models/google-pay-card.md new file mode 100644 index 0000000..c854767 --- /dev/null +++ b/doc/models/google-pay-card.md @@ -0,0 +1,33 @@ + +# Google Pay Card + +The payment card used to fund a Google Pay payment. Can be a credit or debit card. + +## Structure + +`GooglePayCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `str` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `number` | `str` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `str` | 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])$` | +| `last_digits` | `str` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{2,4}$` | +| `mtype` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`PortablePostalAddressMediumGrained`](../../doc/models/portable-postal-address-medium-grained.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "last_digits": "last_digits8", + "type": "DEBIT" +} +``` + diff --git a/doc/models/google-pay-decrypted-token-data.md b/doc/models/google-pay-decrypted-token-data.md index 25290a9..112b49c 100644 --- a/doc/models/google-pay-decrypted-token-data.md +++ b/doc/models/google-pay-decrypted-token-data.md @@ -14,6 +14,7 @@ Details shared by Google for the merchant to be shared with PayPal. This is requ | `message_id` | `str` | Optional | A unique ID that identifies the message in case it needs to be revoked or located at a later time.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | | `message_expiration` | `str` | Optional | Date and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that's expired.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `\d{13}` | | `payment_method` | [`GooglePayPaymentMethod`](../../doc/models/google-pay-payment-method.md) | Required | The type of the payment credential. Currently, only CARD is supported.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4` | +| `card` | [`GooglePayCard`](../../doc/models/google-pay-card.md) | Required | The payment card used to fund a Google Pay payment. Can be a credit or debit card. | | `authentication_method` | [`GooglePayAuthenticationMethod`](../../doc/models/google-pay-authentication-method.md) | Required | Authentication Method which is used for the card transaction.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50` | | `cryptogram` | `str` | Optional | Base-64 cryptographic identifier used by card schemes to validate the token verification result. This is a conditionally required field if authentication_method is CRYPTOGRAM_3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | | `eci_indicator` | `str` | Optional | Electronic Commerce Indicator may not always be present. It is only returned for tokens on the Visa card network. This value is passed through in the payment authorization request.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | @@ -25,6 +26,13 @@ Details shared by Google for the merchant to be shared with PayPal. This is requ "message_id": "message_id4", "message_expiration": "message_expiration8", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram0", "eci_indicator": "eci_indicator4" diff --git a/doc/models/google-pay-request.md b/doc/models/google-pay-request.md index 5d25eb6..0c31a1a 100644 --- a/doc/models/google-pay-request.md +++ b/doc/models/google-pay-request.md @@ -46,6 +46,13 @@ Information needed to pay using Google Pay. "message_id": "message_id0", "message_expiration": "message_expiration2", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram6", "eci_indicator": "eci_indicator0" diff --git a/doc/models/order-authorize-request-payment-source.md b/doc/models/order-authorize-request-payment-source.md index 08330b1..3d5ca5b 100644 --- a/doc/models/order-authorize-request-payment-source.md +++ b/doc/models/order-authorize-request-payment-source.md @@ -108,6 +108,13 @@ The payment source definition. "message_id": "message_id0", "message_expiration": "message_expiration2", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram6", "eci_indicator": "eci_indicator0" diff --git a/doc/models/order-authorize-request.md b/doc/models/order-authorize-request.md index 6986661..b3f39c8 100644 --- a/doc/models/order-authorize-request.md +++ b/doc/models/order-authorize-request.md @@ -104,6 +104,13 @@ The authorization of an order request. "message_id": "message_id0", "message_expiration": "message_expiration2", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram6", "eci_indicator": "eci_indicator0" diff --git a/doc/models/order-authorize-response.md b/doc/models/order-authorize-response.md index 6cc38d8..ddab70c 100644 --- a/doc/models/order-authorize-response.md +++ b/doc/models/order-authorize-response.md @@ -14,7 +14,7 @@ | `id` | `str` | Optional | The ID of the order. | | `payment_source` | [`OrderAuthorizeResponsePaymentSource`](../../doc/models/order-authorize-response-payment-source.md) | Optional | The payment source used to fund the payment. | | `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `'NO_INSTRUCTION'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `processing_instruction` | `object` | Optional | - | | `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | | `purchase_units` | [`List[PurchaseUnit]`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | | `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | @@ -24,7 +24,6 @@ ```json { - "processing_instruction": "NO_INSTRUCTION", "create_time": "create_time0", "update_time": "update_time4", "id": "id4", diff --git a/doc/models/order-capture-request-payment-source.md b/doc/models/order-capture-request-payment-source.md index b4741c4..44661df 100644 --- a/doc/models/order-capture-request-payment-source.md +++ b/doc/models/order-capture-request-payment-source.md @@ -108,6 +108,13 @@ The payment source definition. "message_id": "message_id0", "message_expiration": "message_expiration2", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram6", "eci_indicator": "eci_indicator0" diff --git a/doc/models/order-capture-request.md b/doc/models/order-capture-request.md index edcce3a..9fedad1 100644 --- a/doc/models/order-capture-request.md +++ b/doc/models/order-capture-request.md @@ -104,6 +104,13 @@ Completes an capture payment for an order. "message_id": "message_id0", "message_expiration": "message_expiration2", "payment_method": "CARD", + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "last_digits": "last_digits0", + "type": "UNKNOWN" + }, "authentication_method": "PAN_ONLY", "cryptogram": "cryptogram6", "eci_indicator": "eci_indicator0" diff --git a/doc/models/order-tracker-request.md b/doc/models/order-tracker-request.md index 9892bcc..1a7716e 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": "SNTGLOBAL_API", + "carrier": "HOMERUNNER", "carrier_name_other": "carrier_name_other0", "items": [ { diff --git a/doc/models/order.md b/doc/models/order.md index 73ac1e7..da61343 100644 --- a/doc/models/order.md +++ b/doc/models/order.md @@ -16,17 +16,16 @@ The order details. | `id` | `str` | Optional | The ID of the order. | | `payment_source` | [`PaymentSourceResponse`](../../doc/models/payment-source-response.md) | Optional | The payment source used to fund the payment. | | `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `'NO_INSTRUCTION'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `processing_instruction` | `object` | Optional | - | | `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | | `purchase_units` | [`List[PurchaseUnit]`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | | `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `links` | [`List[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 3 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 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. | +| `links` | [`List[LinkDescription]`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. | ## Example (as JSON) ```json { - "processing_instruction": "NO_INSTRUCTION", "create_time": "create_time8", "update_time": "update_time4", "id": "id2", diff --git a/doc/models/portable-postal-address-medium-grained.md b/doc/models/portable-postal-address-medium-grained.md new file mode 100644 index 0000000..fa10d5a --- /dev/null +++ b/doc/models/portable-postal-address-medium-grained.md @@ -0,0 +1,33 @@ + +# Portable Postal Address Medium Grained + +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 + +`PortablePostalAddressMediumGrained` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `address_line_1` | `str` | Optional | The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.
**Constraints**: *Maximum Length*: `300` | +| `address_line_2` | `str` | Optional | The second line of the address, for example, a suite or apartment number.
**Constraints**: *Maximum Length*: `300` | +| `admin_area_2` | `str` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | +| `admin_area_1` | `str` | 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:
**Constraints**: *Maximum Length*: `300` | +| `postal_code` | `str` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` | +| `country_code` | `str` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | + +## Example (as JSON) + +```json +{ + "address_line_1": "address_line_16", + "address_line_2": "address_line_24", + "admin_area_2": "admin_area_22", + "admin_area_1": "admin_area_10", + "postal_code": "postal_code6", + "country_code": "country_code6" +} +``` + diff --git a/doc/models/processing-instruction.md b/doc/models/processing-instruction.md deleted file mode 100644 index 1d19956..0000000 --- a/doc/models/processing-instruction.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Processing Instruction - -The instruction to process an order. - -## Enumeration - -`ProcessingInstruction` - -## Fields - -| Name | -| --- | -| `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` | -| `NO_INSTRUCTION` | - diff --git a/doc/models/shipment-carrier.md b/doc/models/shipment-carrier.md index 0e578dc..5aee941 100644 --- a/doc/models/shipment-carrier.md +++ b/doc/models/shipment-carrier.md @@ -1287,4 +1287,112 @@ The carrier for the shipment. Some carriers have a global version as well as loc | `LOGINEXT_WEBHOOK` | | `EMS` | | `SPEEDY` | +| `ZOOM_RED` | +| `NAVLUNGO` | +| `CASTLEPARCELS` | +| `WEEE` | +| `PACKALY` | +| `YUNHUIPOST` | +| `YOUPARCEL` | +| `LEMAN` | +| `MOOVIN` | +| `URB_IT` | +| `MULTIENTREGAPANAMA` | +| `JUSDASR` | +| `DISCOUNTPOST` | +| `RHENUS_UK` | +| `SWISHIP_JP` | +| `GLS_US` | +| `SMTL` | +| `EMEGA` | +| `EXPRESSONE_SV` | +| `HEPSIJET` | +| `WELIVERY` | +| `BRINGER` | +| `EASYROUTES` | +| `MRW` | +| `RPM` | +| `DPD_PRT` | +| `GLS_ROMANIA` | +| `LMPARCEL` | +| `GTAGSM` | +| `DOMINO` | +| `ESHIPPER` | +| `TRANSPAK` | +| `XINDUS` | +| `AOYUE` | +| `EASYPARCEL` | +| `EXPRESSONE` | +| `SENDEO_KARGO` | +| `SPEEDAF` | +| `ETOWER` | +| `GCX` | +| `NINJAVAN_VN` | +| `ALLEGRO` | +| `JUMPPOINT` | +| `SHIPGLOBAL_US` | +| `KINISI` | +| `OAKH` | +| `AWEST` | +| `BARSAN` | +| `ENERGOLOGISTIC` | +| `MADROOEX` | +| `GOBOLT` | +| `SWISS_UNIVERSAL_EXPRESS` | +| `IORDIRECT` | +| `XMSZM` | +| `GLS_HUN` | +| `SENDY` | +| `BRAUNSEXPRESS` | +| `GRANDSLAMEXPRESS` | +| `XGS` | +| `OTSCHILE` | +| `PACK_UP` | +| `PARCELSTARS` | +| `TEAMEXPRESSLLC` | +| `ASYADEXPRESS` | +| `TDN` | +| `EARLYBIRD` | +| `CACESA` | +| `PARCELJET` | +| `MNG_KARGO` | +| `SUPERPACKLINE` | +| `SPEEDX` | +| `VESYL` | +| `SKYKING` | +| `DIRMENSAJERIA` | +| `NETLOGIXGROUP` | +| `ZYOU` | +| `JAWAR` | +| `AGSYSTEMS` | +| `GPS` | +| `PTT_KARGO` | +| `MAERGO` | +| `ARIHANTCOURIER` | +| `VTFE` | +| `YUNANT` | +| `URBIFY` | +| `PACK_MAN` | +| `LIEFERGRUN` | +| `OBIBOX` | +| `PAIKEDA` | +| `SCOTTY` | +| `INTELCOM_CA` | +| `SWE` | +| `ASENDIA` | +| `DPD_AT` | +| `RELAY` | +| `ATA` | +| `SKYEXPRESS_INTERNATIONAL` | +| `SURAT_KARGO` | +| `SGLINK` | +| `FLEETOPTICSINC` | +| `SHOPLINE` | +| `PIGGYSHIP` | +| `LOGOIX` | +| `KOLAY_GELSIN` | +| `ASSOCIATED_COURIERS` | +| `UPS_CHECKER` | +| `WINESHIPPING` | +| `SPEDISCI` | diff --git a/doc/models/shipping-details.md b/doc/models/shipping-details.md index 1773196..f69d839 100644 --- a/doc/models/shipping-details.md +++ b/doc/models/shipping-details.md @@ -13,7 +13,7 @@ The shipping details. | --- | --- | --- | --- | | `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | | `phone_number` | [`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). | -| `mtype` | [`FullfillmentType`](../../doc/models/fullfillment-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_]+$` | +| `mtype` | [`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_]+$` | | `options` | [`List[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` | | `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | diff --git a/doc/models/shipping-with-tracking-details.md b/doc/models/shipping-with-tracking-details.md index bf33e78..7331207 100644 --- a/doc/models/shipping-with-tracking-details.md +++ b/doc/models/shipping-with-tracking-details.md @@ -13,7 +13,7 @@ The order shipping details. | --- | --- | --- | --- | | `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | | `phone_number` | [`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). | -| `mtype` | [`FullfillmentType`](../../doc/models/fullfillment-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_]+$` | +| `mtype` | [`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_]+$` | | `options` | [`List[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` | | `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). | | `trackers` | [`List[OrderTrackerResponse]`](../../doc/models/order-tracker-response.md) | Optional | An array of trackers for a transaction. | diff --git a/doc/models/vaulted-digital-wallet-shipping-details.md b/doc/models/vaulted-digital-wallet-shipping-details.md index 6081803..3c0f50a 100644 --- a/doc/models/vaulted-digital-wallet-shipping-details.md +++ b/doc/models/vaulted-digital-wallet-shipping-details.md @@ -12,7 +12,7 @@ The shipping details. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | -| `mtype` | [`FullfillmentType`](../../doc/models/fullfillment-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_]+$` | +| `mtype` | [`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_]+$` | | `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | ## Example (as JSON) diff --git a/paypalserversdk/controllers/base_controller.py b/paypalserversdk/controllers/base_controller.py index 59c75e7..0d5015b 100644 --- a/paypalserversdk/controllers/base_controller.py +++ b/paypalserversdk/controllers/base_controller.py @@ -30,7 +30,7 @@ class BaseController(object): @staticmethod def user_agent(): - return 'PayPal REST API Python SDK, Version: 0.6.0, on OS {os-info}' + return 'PayPal REST API Python SDK, Version: 0.6.1, on OS {os-info}' @staticmethod def user_agent_parameters(): diff --git a/paypalserversdk/controllers/orders_controller.py b/paypalserversdk/controllers/orders_controller.py index efe97bd..423372c 100644 --- a/paypalserversdk/controllers/orders_controller.py +++ b/paypalserversdk/controllers/orders_controller.py @@ -16,8 +16,8 @@ from apimatic_core.types.parameter import Parameter from paypalserversdk.http.http_method_enum import HttpMethodEnum from apimatic_core.authentication.multiple.single_auth import Single -from paypalserversdk.models.order_authorize_response import OrderAuthorizeResponse from paypalserversdk.models.order import Order +from paypalserversdk.models.order_authorize_response import OrderAuthorizeResponse from paypalserversdk.exceptions.error_exception import ErrorException @@ -27,19 +27,20 @@ class OrdersController(BaseController): def __init__(self, config): super(OrdersController, self).__init__(config) - def orders_authorize(self, - options=dict()): - """Does a POST request to /v2/checkout/orders/{id}/authorize. + def orders_create(self, + options=dict()): + """Does a POST request to /v2/checkout/orders. - 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 + checkout or multiparty checkout.
Note: + For error handling and troubleshooting, see Orders v2 errors.
+ #create-order">Orders v2 errors.
Args: options (dict, optional): Key-value pairs for any of the @@ -48,10 +49,18 @@ def orders_authorize(self, being the key and their desired values being the value. A list of parameters that can be used are:: - id -- str -- The ID of the order for which to authorize. + body -- OrderRequest -- TODO: type description here. paypal_request_id -- str -- 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. + 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). + paypal_partner_attribution_id -- str -- TODO: type + description here. + paypal_client_metadata_id -- str -- TODO: type description + here. prefer -- str -- The preferred server response upon successful completion of the request. Value is: - paypal_client_metadata_id -- str -- TODO: type description - here. paypal_auth_assertion -- str -- An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. - body -- OrderAuthorizeRequest -- TODO: type description - here. Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows - authorized payment details. + order details. Raises: ApiException: When an error occurs while fetching the data from @@ -89,29 +94,28 @@ def orders_authorize(self, return super().new_api_call_builder.request( RequestBuilder().server(Server.DEFAULT) - .path('/v2/checkout/orders/{id}/authorize') + .path('/v2/checkout/orders') .http_method(HttpMethodEnum.POST) - .template_param(Parameter() - .key('id') - .value(options.get('id', None)) - .should_encode(True)) .header_param(Parameter() .key('Content-Type') .value('application/json')) + .body_param(Parameter() + .value(options.get('body', None))) .header_param(Parameter() .key('PayPal-Request-Id') .value(options.get('paypal_request_id', None))) .header_param(Parameter() - .key('Prefer') - .value(options.get('prefer', None))) + .key('PayPal-Partner-Attribution-Id') + .value(options.get('paypal_partner_attribution_id', None))) .header_param(Parameter() .key('PayPal-Client-Metadata-Id') .value(options.get('paypal_client_metadata_id', None))) + .header_param(Parameter() + .key('Prefer') + .value(options.get('prefer', None))) .header_param(Parameter() .key('PayPal-Auth-Assertion') .value(options.get('paypal_auth_assertion', None))) - .body_param(Parameter() - .value(options.get('body', None))) .header_param(Parameter() .key('accept') .value('application/json')) @@ -120,22 +124,22 @@ def orders_authorize(self, ).response( ResponseHandler() .deserializer(APIHelper.json_deserialize) - .deserialize_into(OrderAuthorizeResponse.from_dictionary) + .deserialize_into(Order.from_dictionary) .is_api_response(True) .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) .local_error('401', 'Authentication failed due to missing authorization header, or invalid authentication credentials.', ErrorException) - .local_error('403', 'The authorized payment failed due to insufficient permissions.', ErrorException) - .local_error('404', 'The specified resource does not exist.', ErrorException) .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) - .local_error('500', 'An internal server error has occurred.', ErrorException) .local_error('default', 'The error response.', ErrorException) ).execute() - def orders_track_create(self, - options=dict()): - """Does a POST request to /v2/checkout/orders/{id}/track. + def orders_get(self, + options=dict()): + """Does a GET request to /v2/checkout/orders/{id}. - Adds tracking information for an Order. + Shows details for an order, by ID.
Note: + For error handling and troubleshooting, see Orders v2 errors.
Args: options (dict, optional): Key-value pairs for any of the @@ -144,21 +148,21 @@ def orders_track_create(self, being the key and their desired values being the value. A list of parameters that can be used are:: - id -- str -- The ID of the order that the tracking - information is associated with. - body -- OrderTrackerRequest -- TODO: type description here. + id -- str -- The ID of the order for which to show details. paypal_auth_assertion -- str -- An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. + fields -- str -- A comma-separated list of fields that + should be returned for the order. Valid filter field + is `payment_source`. Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A - successful response to an idempotent request returns the HTTP - `200 OK` status code with a JSON response body that shows - tracker details. + successful request returns the HTTP `200 OK` status code and a + JSON response body that shows order details. Raises: ApiException: When an error occurs while fetching the data from @@ -170,128 +174,29 @@ def orders_track_create(self, return super().new_api_call_builder.request( RequestBuilder().server(Server.DEFAULT) - .path('/v2/checkout/orders/{id}/track') - .http_method(HttpMethodEnum.POST) + .path('/v2/checkout/orders/{id}') + .http_method(HttpMethodEnum.GET) .template_param(Parameter() .key('id') .value(options.get('id', None)) .should_encode(True)) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(options.get('body', None))) .header_param(Parameter() .key('PayPal-Auth-Assertion') .value(options.get('paypal_auth_assertion', None))) + .query_param(Parameter() + .key('fields') + .value(options.get('fields', None))) .header_param(Parameter() .key('accept') .value('application/json')) - .body_serializer(APIHelper.json_serialize) - .auth(Single('Oauth2')) - ).response( - ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(Order.from_dictionary) - .is_api_response(True) - .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) - .local_error('403', 'Authorization failed due to insufficient permissions.', ErrorException) - .local_error('404', 'The specified resource does not exist.', ErrorException) - .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) - .local_error('500', 'An internal server error has occurred.', ErrorException) - .local_error('default', 'The error response.', ErrorException) - ).execute() - - def orders_create(self, - options=dict()): - """Does a POST request to /v2/checkout/orders. - - 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.
- - Args: - options (dict, optional): Key-value pairs for any of the - parameters to this API Endpoint. All parameters to the - endpoint are supplied through the dictionary with their names - being the key and their desired values being the value. A list - of parameters that can be used are:: - - body -- OrderRequest -- TODO: type description here. - paypal_request_id -- str -- 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. - paypal_partner_attribution_id -- str -- TODO: type - description here. - paypal_client_metadata_id -- str -- TODO: type description - here. - prefer -- str -- The preferred server response upon - successful completion of the request. Value - is: - - Returns: - ApiResponse: An object with the response value as well as other - useful information such as status codes and headers. A - successful response to an idempotent request returns the HTTP - `200 OK` status code with a JSON response body that shows - order details. - - Raises: - ApiException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/v2/checkout/orders') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(options.get('body', None))) - .header_param(Parameter() - .key('PayPal-Request-Id') - .value(options.get('paypal_request_id', None))) - .header_param(Parameter() - .key('PayPal-Partner-Attribution-Id') - .value(options.get('paypal_partner_attribution_id', None))) - .header_param(Parameter() - .key('PayPal-Client-Metadata-Id') - .value(options.get('paypal_client_metadata_id', None))) - .header_param(Parameter() - .key('Prefer') - .value(options.get('prefer', None))) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) .auth(Single('Oauth2')) ).response( ResponseHandler() .deserializer(APIHelper.json_deserialize) .deserialize_into(Order.from_dictionary) .is_api_response(True) - .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) .local_error('401', 'Authentication failed due to missing authorization header, or invalid authentication credentials.', ErrorException) - .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) + .local_error('404', 'The specified resource does not exist.', ErrorException) .local_error('default', 'The error response.', ErrorException) ).execute() @@ -369,6 +274,11 @@ def orders_patch(self, of parameters that can be used are:: id -- str -- The ID of the order to update. + paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see PayPal-Auth-Assertion. body -- List[Patch] -- TODO: type description here. Returns: @@ -396,6 +306,9 @@ def orders_patch(self, .header_param(Parameter() .key('Content-Type') .value('application/json')) + .header_param(Parameter() + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) .body_param(Parameter() .value(options.get('body', None))) .body_serializer(APIHelper.json_serialize) @@ -410,19 +323,108 @@ def orders_patch(self, .local_error('default', 'The error response.', ErrorException) ).execute() - def orders_capture(self, + def orders_confirm(self, options=dict()): - """Does a POST request to /v2/checkout/orders/{id}/capture. + """Does a POST request to /v2/checkout/orders/{id}/confirm-payment-source. - Captures payment for an order. To successfully capture payment for an - order, the buyer must first approve the order or a valid + Payer confirms their intent to pay for the the Order with the given + payment source. + + Args: + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list + of parameters that can be used are:: + + id -- str -- The ID of the order for which the payer + confirms their intent to pay. + paypal_client_metadata_id -- str -- TODO: type description + here. + paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see PayPal-Auth-Assertion. + prefer -- str -- The preferred server response upon + successful completion of the request. Value + is: + body -- ConfirmOrderRequest -- TODO: type description here. + + Returns: + ApiResponse: An object with the response value as well as other + useful information such as status codes and headers. A + successful request indicates that the payment source was added + to the Order. A successful request returns the HTTP `200 OK` + status code with a JSON response body that shows order details. + + Raises: + ApiException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. + + """ + + return super().new_api_call_builder.request( + RequestBuilder().server(Server.DEFAULT) + .path('/v2/checkout/orders/{id}/confirm-payment-source') + .http_method(HttpMethodEnum.POST) + .template_param(Parameter() + .key('id') + .value(options.get('id', None)) + .should_encode(True)) + .header_param(Parameter() + .key('Content-Type') + .value('application/json')) + .header_param(Parameter() + .key('PayPal-Client-Metadata-Id') + .value(options.get('paypal_client_metadata_id', None))) + .header_param(Parameter() + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) + .header_param(Parameter() + .key('Prefer') + .value(options.get('prefer', None))) + .body_param(Parameter() + .value(options.get('body', None))) + .header_param(Parameter() + .key('accept') + .value('application/json')) + .body_serializer(APIHelper.json_serialize) + .auth(Single('Oauth2')) + ).response( + ResponseHandler() + .deserializer(APIHelper.json_deserialize) + .deserialize_into(Order.from_dictionary) + .is_api_response(True) + .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) + .local_error('403', 'Authorization failed due to insufficient permissions.', ErrorException) + .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) + .local_error('500', 'An internal server error has occurred.', ErrorException) + .local_error('default', 'The error response.', ErrorException) + ).execute() + + def orders_authorize(self, + options=dict()): + """Does a POST request to /v2/checkout/orders/{id}/authorize. + + 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.
+ #authorize-order">Orders v2 errors. Args: options (dict, optional): Key-value pairs for any of the @@ -431,11 +433,14 @@ def orders_capture(self, being the key and their desired values being the value. A list of parameters that can be used are:: - id -- str -- The ID of the order for which to capture a - payment. + id -- str -- The ID of the order for which to authorize. paypal_request_id -- str -- 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. + 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). prefer -- str -- The preferred server response upon successful completion of the request. Value is: + paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see + [PayPal-Auth-Assertion](/docs/api/reference/api-request + s/#paypal-auth-assertion).
Note:For three party transactions in which a partner + is managing the API calls on behalf of a merchant, the + partner must identify the merchant using either a + PayPal-Auth-Assertion header or an access token with + target_subject.
body -- CaptureRequest -- TODO: type description here. Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A - successful request returns the HTTP 201 Created - status code and a JSON response body that shows captured - payment details. + successful request returns the HTTP 200 OK status + code and a JSON response body that shows captured payment + details. Raises: ApiException: When an error occurs while fetching the data from @@ -138,6 +166,9 @@ def authorizations_capture(self, .header_param(Parameter() .key('Prefer') .value(options.get('prefer', None))) + .header_param(Parameter() + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) .body_param(Parameter() .value(options.get('body', None))) .header_param(Parameter() @@ -160,12 +191,25 @@ def authorizations_capture(self, .local_error('default', 'The error response.', ErrorException) ).execute() - def authorizations_void(self, - options=dict()): - """Does a POST request to /v2/payments/authorizations/{authorization_id}/void. + def authorizations_reauthorize(self, + options=dict()): + """Does a POST request to /v2/payments/authorizations/{authorization_id}/reauthorize. - Voids, or cancels, an authorized payment, by ID. You cannot void an - authorized payment that has been fully captured. + 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.
Args: options (dict, optional): Key-value pairs for any of the @@ -175,17 +219,9 @@ def authorizations_void(self, of parameters that can be used are:: authorization_id -- str -- The PayPal-generated ID for the - authorized payment to void. - paypal_auth_assertion -- str -- An API-caller-provided - JSON Web Token (JWT) assertion that identifies the - merchant. For details, see - [PayPal-Auth-Assertion](/docs/api/reference/api-request - s/#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.
+ authorized payment to reauthorize. + paypal_request_id -- str -- The server stores keys for 45 + days. prefer -- str -- The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server @@ -196,14 +232,24 @@ def authorizations_void(self, links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
+ paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see + [PayPal-Auth-Assertion](/docs/api/reference/api-request + s/#paypal-auth-assertion).
Note:For three party transactions in which a partner + is managing the API calls on behalf of a merchant, the + partner must identify the merchant using either a + PayPal-Auth-Assertion header or an access token with + target_subject.
+ body -- ReauthorizeRequest -- TODO: type description here. Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A successful request returns the HTTP 200 OK status - code and a JSON response body that shows authorization - details. This response is returned when the Prefer header is - set to return=representation. + code and a JSON response body that shows the reauthorized + payment details. Raises: ApiException: When an error occurs while fetching the data from @@ -215,21 +261,30 @@ def authorizations_void(self, return super().new_api_call_builder.request( RequestBuilder().server(Server.DEFAULT) - .path('/v2/payments/authorizations/{authorization_id}/void') + .path('/v2/payments/authorizations/{authorization_id}/reauthorize') .http_method(HttpMethodEnum.POST) .template_param(Parameter() .key('authorization_id') .value(options.get('authorization_id', None)) .should_encode(True)) .header_param(Parameter() - .key('PayPal-Auth-Assertion') - .value(options.get('paypal_auth_assertion', None))) + .key('Content-Type') + .value('application/json')) + .header_param(Parameter() + .key('PayPal-Request-Id') + .value(options.get('paypal_request_id', None))) .header_param(Parameter() .key('Prefer') .value(options.get('prefer', None))) + .header_param(Parameter() + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) + .body_param(Parameter() + .value(options.get('body', None))) .header_param(Parameter() .key('accept') .value('application/json')) + .body_serializer(APIHelper.json_serialize) .auth(Single('Oauth2')) ).response( ResponseHandler() @@ -238,33 +293,18 @@ def authorizations_void(self, .is_api_response(True) .local_error('400', 'The request failed because it is not well-formed or is syntactically incorrect or violates schema.', ErrorException) .local_error('401', 'Authentication failed due to missing authorization header, or invalid authentication credentials.', ErrorException) - .local_error('403', 'The request failed because the caller has insufficient permissions.', ErrorException) .local_error('404', 'The request failed because the resource does not exist.', ErrorException) - .local_error('409', 'The request failed because a previous call for the given resource is in progress.', ErrorException) .local_error('422', 'The request failed because it either is semantically incorrect or failed business validation.', ErrorException) .local_error('500', 'The request failed because an internal server error occurred.', ApiException) .local_error('default', 'The error response.', ErrorException) ).execute() - def authorizations_reauthorize(self, - options=dict()): - """Does a POST request to /v2/payments/authorizations/{authorization_id}/reauthorize. + def authorizations_void(self, + options=dict()): + """Does a POST request to /v2/payments/authorizations/{authorization_id}/void. - 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.
+ Voids, or cancels, an authorized payment, by ID. You cannot void an + authorized payment that has been fully captured. Args: options (dict, optional): Key-value pairs for any of the @@ -274,7 +314,17 @@ def authorizations_reauthorize(self, of parameters that can be used are:: authorization_id -- str -- The PayPal-generated ID for the - authorized payment to reauthorize. + authorized payment to void. + paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see + [PayPal-Auth-Assertion](/docs/api/reference/api-request + s/#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.
paypal_request_id -- str -- The server stores keys for 45 days. prefer -- str -- The preferred server response upon @@ -287,14 +337,14 @@ def authorizations_reauthorize(self, links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
  • - body -- ReauthorizeRequest -- TODO: type description here. Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A - successful request returns the HTTP 201 Created - status code and a JSON response body that shows the - reauthorized payment details. + successful request returns the HTTP 200 OK status + code and a JSON response body that shows authorization + details. This response is returned when the Prefer header is + set to return=representation. Raises: ApiException: When an error occurs while fetching the data from @@ -306,37 +356,34 @@ def authorizations_reauthorize(self, return super().new_api_call_builder.request( RequestBuilder().server(Server.DEFAULT) - .path('/v2/payments/authorizations/{authorization_id}/reauthorize') + .path('/v2/payments/authorizations/{authorization_id}/void') .http_method(HttpMethodEnum.POST) .template_param(Parameter() .key('authorization_id') .value(options.get('authorization_id', None)) .should_encode(True)) .header_param(Parameter() - .key('Content-Type') - .value('application/json')) + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) .header_param(Parameter() .key('PayPal-Request-Id') .value(options.get('paypal_request_id', None))) .header_param(Parameter() .key('Prefer') .value(options.get('prefer', None))) - .body_param(Parameter() - .value(options.get('body', None))) .header_param(Parameter() .key('accept') .value('application/json')) - .body_serializer(APIHelper.json_serialize) .auth(Single('Oauth2')) ).response( ResponseHandler() .deserializer(APIHelper.json_deserialize) .deserialize_into(PaymentAuthorization.from_dictionary) .is_api_response(True) - .local_error('400', 'The request failed because it is not well-formed or is syntactically incorrect or violates schema.', ErrorException) .local_error('401', 'Authentication failed due to missing authorization header, or invalid authentication credentials.', ErrorException) .local_error('403', 'The request failed because the caller has insufficient permissions.', ErrorException) .local_error('404', 'The request failed because the resource does not exist.', ErrorException) + .local_error('409', 'The request failed because a previous call for the given resource is in progress.', ErrorException) .local_error('422', 'The request failed because it either is semantically incorrect or failed business validation.', ErrorException) .local_error('500', 'The request failed because an internal server error occurred.', ApiException) .local_error('default', 'The error response.', ErrorException) @@ -435,8 +482,8 @@ def captures_refund(self, Returns: ApiResponse: An object with the response value as well as other useful information such as status codes and headers. A - successful request returns the HTTP 201 Created - status code and a JSON response body that shows refund details. + successful request returns the HTTP 200 OK status + code and a JSON response body that shows refund details. Raises: ApiException: When an error occurs while fetching the data from @@ -489,14 +536,30 @@ def captures_refund(self, ).execute() def refunds_get(self, - refund_id): + options=dict()): """Does a GET request to /v2/payments/refunds/{refund_id}. Shows details for a refund, by ID. Args: - refund_id (str): The PayPal-generated ID for the refund for which - to show details. + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list + of parameters that can be used are:: + + refund_id -- str -- The PayPal-generated ID for the refund + for which to show details. + paypal_auth_assertion -- str -- An API-caller-provided + JSON Web Token (JWT) assertion that identifies the + merchant. For details, see + [PayPal-Auth-Assertion](/docs/api/reference/api-request + s/#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.
    Returns: ApiResponse: An object with the response value as well as other @@ -518,8 +581,11 @@ def refunds_get(self, .http_method(HttpMethodEnum.GET) .template_param(Parameter() .key('refund_id') - .value(refund_id) + .value(options.get('refund_id', None)) .should_encode(True)) + .header_param(Parameter() + .key('PayPal-Auth-Assertion') + .value(options.get('paypal_auth_assertion', None))) .header_param(Parameter() .key('accept') .value('application/json')) diff --git a/paypalserversdk/controllers/vault_controller.py b/paypalserversdk/controllers/vault_controller.py index bd9db12..9f5ce30 100644 --- a/paypalserversdk/controllers/vault_controller.py +++ b/paypalserversdk/controllers/vault_controller.py @@ -16,8 +16,8 @@ from apimatic_core.types.parameter import Parameter from paypalserversdk.http.http_method_enum import HttpMethodEnum from apimatic_core.authentication.multiple.single_auth import Single -from paypalserversdk.models.customer_vault_payment_tokens_response import CustomerVaultPaymentTokensResponse from paypalserversdk.models.payment_token_response import PaymentTokenResponse +from paypalserversdk.models.customer_vault_payment_tokens_response import CustomerVaultPaymentTokensResponse from paypalserversdk.models.setup_token_response import SetupTokenResponse from paypalserversdk.exceptions.error_exception import ErrorException @@ -28,6 +28,67 @@ class VaultController(BaseController): def __init__(self, config): super(VaultController, self).__init__(config) + def payment_tokens_create(self, + options=dict()): + """Does a POST request to /v3/vault/payment-tokens. + + Creates a Payment Token from the given payment source and adds it to + the Vault of the associated customer. + + Args: + options (dict, optional): Key-value pairs for any of the + parameters to this API Endpoint. All parameters to the + endpoint are supplied through the dictionary with their names + being the key and their desired values being the value. A list + of parameters that can be used are:: + + paypal_request_id -- str -- The server stores keys for 3 + hours. + body -- PaymentTokenRequest -- Payment Token creation with + a financial instrument and an optional customer_id. + + Returns: + ApiResponse: An object with the response value as well as other + useful information such as status codes and headers. + Idempotent response for a successful creation of payment token. + + Raises: + ApiException: When an error occurs while fetching the data from + the remote API. This exception includes the HTTP Response + code, an error message, and the HTTP body that was received in + the request. + + """ + + return super().new_api_call_builder.request( + RequestBuilder().server(Server.DEFAULT) + .path('/v3/vault/payment-tokens') + .http_method(HttpMethodEnum.POST) + .header_param(Parameter() + .key('PayPal-Request-Id') + .value(options.get('paypal_request_id', None))) + .header_param(Parameter() + .key('Content-Type') + .value('application/json')) + .body_param(Parameter() + .value(options.get('body', None))) + .header_param(Parameter() + .key('accept') + .value('application/json')) + .body_serializer(APIHelper.json_serialize) + .auth(Single('Oauth2')) + ).response( + ResponseHandler() + .deserializer(APIHelper.json_deserialize) + .deserialize_into(PaymentTokenResponse.from_dictionary) + .is_api_response(True) + .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) + .local_error('403', 'Authorization failed due to insufficient permissions.', ErrorException) + .local_error('404', 'Request contains reference to resources that do not exist.', ErrorException) + .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) + .local_error('500', 'An internal server error has occurred.', ErrorException) + ).execute() + def customer_payment_tokens_get(self, options=dict()): """Does a GET request to /v3/vault/payment-tokens. @@ -142,29 +203,20 @@ def payment_tokens_get(self, .local_error('500', 'An internal server error has occurred.', ErrorException) ).execute() - def payment_tokens_create(self, - options=dict()): - """Does a POST request to /v3/vault/payment-tokens. + def payment_tokens_delete(self, + id): + """Does a DELETE request to /v3/vault/payment-tokens/{id}. - Creates a Payment Token from the given payment source and adds it to - the Vault of the associated customer. + Delete the payment token associated with the payment token id. Args: - options (dict, optional): Key-value pairs for any of the - parameters to this API Endpoint. All parameters to the - endpoint are supplied through the dictionary with their names - being the key and their desired values being the value. A list - of parameters that can be used are:: - - paypal_request_id -- str -- The server stores keys for 3 - hours. - body -- PaymentTokenRequest -- Payment Token creation with - a financial instrument and an optional customer_id. + id (str): ID of the payment token. Returns: ApiResponse: An object with the response value as well as other - useful information such as status codes and headers. - Idempotent response for a successful creation of payment token. + useful information such as status codes and headers. The + server has successfully executed the method, but there is no + entity body to return. Raises: ApiException: When an error occurs while fetching the data from @@ -176,30 +228,18 @@ def payment_tokens_create(self, return super().new_api_call_builder.request( RequestBuilder().server(Server.DEFAULT) - .path('/v3/vault/payment-tokens') - .http_method(HttpMethodEnum.POST) - .header_param(Parameter() - .key('PayPal-Request-Id') - .value(options.get('paypal_request_id', None))) - .header_param(Parameter() - .key('Content-Type') - .value('application/json')) - .body_param(Parameter() - .value(options.get('body', None))) - .header_param(Parameter() - .key('accept') - .value('application/json')) - .body_serializer(APIHelper.json_serialize) + .path('/v3/vault/payment-tokens/{id}') + .http_method(HttpMethodEnum.DELETE) + .template_param(Parameter() + .key('id') + .value(id) + .should_encode(True)) .auth(Single('Oauth2')) ).response( ResponseHandler() - .deserializer(APIHelper.json_deserialize) - .deserialize_into(PaymentTokenResponse.from_dictionary) .is_api_response(True) .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) .local_error('403', 'Authorization failed due to insufficient permissions.', ErrorException) - .local_error('404', 'Request contains reference to resources that do not exist.', ErrorException) - .local_error('422', 'The requested action could not be performed, semantically incorrect, or failed business validation.', ErrorException) .local_error('500', 'An internal server error has occurred.', ErrorException) ).execute() @@ -264,46 +304,6 @@ def setup_tokens_create(self, .local_error('500', 'An internal server error has occurred.', ErrorException) ).execute() - def payment_tokens_delete(self, - id): - """Does a DELETE request to /v3/vault/payment-tokens/{id}. - - Delete the payment token associated with the payment token id. - - Args: - id (str): ID of the payment token. - - Returns: - ApiResponse: An object with the response value as well as other - useful information such as status codes and headers. The - server has successfully executed the method, but there is no - entity body to return. - - Raises: - ApiException: When an error occurs while fetching the data from - the remote API. This exception includes the HTTP Response - code, an error message, and the HTTP body that was received in - the request. - - """ - - return super().new_api_call_builder.request( - RequestBuilder().server(Server.DEFAULT) - .path('/v3/vault/payment-tokens/{id}') - .http_method(HttpMethodEnum.DELETE) - .template_param(Parameter() - .key('id') - .value(id) - .should_encode(True)) - .auth(Single('Oauth2')) - ).response( - ResponseHandler() - .is_api_response(True) - .local_error('400', 'Request is not well-formed, syntactically incorrect, or violates schema.', ErrorException) - .local_error('403', 'Authorization failed due to insufficient permissions.', ErrorException) - .local_error('500', 'An internal server error has occurred.', ErrorException) - ).execute() - def setup_tokens_get(self, id): """Does a GET request to /v3/vault/setup-tokens/{id}. diff --git a/paypalserversdk/models/__init__.py b/paypalserversdk/models/__init__.py index 8861728..aad05a3 100644 --- a/paypalserversdk/models/__init__.py +++ b/paypalserversdk/models/__init__.py @@ -1,250 +1,251 @@ __all__ = [ + 'activity_timestamps', + 'amount_breakdown', + 'amount_with_breakdown', 'apple_pay_payment_object', 'apple_pay_attributes', - 'assurance_details', - 'card_experience_context', - 'card_stored_credential', - 'card_verification', - 'exchange_rate', - 'apple_pay_card_response', - 'apple_pay_request', - 'link_description', - 'blik_payment_request', - 'blik_level_0_payment_object', - 'card_attributes_response', - 'card_supplementary_data', - 'customer_information', - 'platform_fee', - 'experience_context', 'apple_pay_attributes_response', - 'activity_timestamps', + 'apple_pay_card_response', + 'apple_pay_decrypted_token_data', 'apple_pay_payment_data', + 'apple_pay_request', + 'assurance_details', 'authentication_response', + 'authorization', + 'link_description', + 'authorization_status_with_details', 'authorization_status_details', 'authorization_with_additional_data', 'bancontact_payment_object', 'bancontact_payment_request', + 'bin_details', + 'blik_payment_object', 'blik_experience_context', 'blik_one_click_payment_request', 'blik_one_click_payment_object', + 'blik_payment_request', + 'blik_level_0_payment_object', 'capture', + 'capture_status_with_details', + 'capture_status_details', 'card_attributes', + 'card_attributes_response', 'card_customer_information', + 'card_experience_context', + 'card_from_request', + 'card_request', + 'card_response', + 'card_stored_credential', + 'card_supplementary_data', 'card_vault_response', + 'card_verification', + 'cobranded_card', 'confirm_order_request', + 'customer_information', + 'platform_fee', 'eps_payment_object', 'eps_payment_request', 'error_details', + 'exchange_rate', + 'experience_context', + 'giropay_payment_object', 'giropay_payment_request', 'google_pay_wallet_response', - 'amount_breakdown', - 'amount_with_breakdown', - 'apple_pay_decrypted_token_data', - 'authorization', - 'authorization_status_with_details', - 'bin_details', - 'blik_payment_object', - 'capture_status_with_details', - 'capture_status_details', - 'card_from_request', - 'card_request', - 'card_response', - 'cobranded_card', - 'giropay_payment_object', 'google_pay_card_response', - 'ideal_payment_object', - 'level_3_card_processing_data', - 'network_transaction_reference', - 'order', - 'p_24_payment_request', - 'payer_base', - 'payment_source_response', - 'paypal_wallet', - 'phone_number', - 'processor_response', - 'purchase_unit_request', + 'google_pay_decrypted_token_data', 'google_pay_request', + 'ideal_payment_object', + 'ideal_payment_request', 'item', + 'level_2_card_processing_data', + 'level_3_card_processing_data', + 'line_item', 'money', + 'mybank_payment_object', + 'mybank_payment_request', 'net_amount_breakdown_item', - 'order_application_context', - 'order_confirm_application_context', - 'order_tracker_request', - 'patch', - 'payee_base', - 'payer', - 'payment_collection', - 'phone_with_type', - 'purchase_unit', - 'google_pay_decrypted_token_data', - 'ideal_payment_request', 'network_token', + 'network_transaction_reference', + 'order', + 'order_application_context', 'order_authorize_request', 'order_authorize_response', 'order_capture_request', + 'order_confirm_application_context', 'order_request', - 'paypal_wallet_attributes', - 'paypal_wallet_experience_context', - 'paypal_wallet_vault_response', - 'level_2_card_processing_data', - 'line_item', - 'mybank_payment_object', - 'mybank_payment_request', + 'order_tracker_request', 'p_24_payment_object', + 'p_24_payment_request', + 'patch', 'payee', + 'payee_base', + 'payer', + 'payer_base', + 'payment_collection', 'payment_instruction', 'payment_method_preference', 'payment_source', + 'payment_source_response', + 'paypal_wallet', + 'paypal_wallet_attributes', 'paypal_wallet_attributes_response', 'paypal_wallet_customer', + 'paypal_wallet_experience_context', 'paypal_wallet_response', + 'paypal_wallet_vault_response', + 'phone_number', + 'phone_with_type', + 'processor_response', + 'purchase_unit', + 'purchase_unit_request', 'refund', 'refund_status_with_details', - 'seller_receivable_breakdown', 'refund_status_details', 'seller_payable_breakdown', 'seller_protection', + 'seller_receivable_breakdown', 'shipping_details', 'shipping_option', + 'shipping_with_tracking_details', + 'sofort_payment_object', + 'sofort_payment_request', 'stored_payment_source', + 'supplementary_data', + 'tax_info', + 'three_d_secure_authentication_response', + 'token', + 'order_tracker_response', + 'order_tracker_item', + 'trustly_payment_object', + 'trustly_payment_request', + 'universal_product_code', 'vault_instruction', + 'vault_instruction_base', + 'vault_response', + 'venmo_wallet_vault_attributes', 'venmo_wallet_additional_attributes', + 'venmo_wallet_attributes_response', 'venmo_wallet_experience_context', 'venmo_wallet_request', 'venmo_wallet_response', + 'address', + 'apple_pay_tokenized_card', + 'google_pay_card', + 'google_pay_card_attributes', 'google_pay_request_card', 'name', + 'order_authorize_request_payment_source', 'order_authorize_response_payment_source', 'order_capture_request_payment_source', - 'venmo_wallet_customer_information', - 'related_identifiers', - 'customer_request', - 'payment_token_request', - 'setup_token_request', - 'setup_token_response', - 'payment_token_request_card', - 'setup_token_card_experience_context', - 'shipping_with_tracking_details', - 'order_tracker_response', - 'order_tracker_item', - 'google_pay_card_attributes', + 'paypal_wallet_customer_request', + 'paypal_wallet_vault_instruction', 'phone_number_with_country_code', + 'portable_postal_address_medium_grained', + 'shipping_name', 'vault_customer', + 'venmo_wallet_customer_information', 'payment_authorization', 'captured_payment', 'capture_request', - 'apple_pay_payment_token', - 'card_verification_details', - 'customer_vault_payment_tokens_response', - 'vault_paypal_wallet_request', - 'phone', - 'apple_pay_card', - 'card_authentication_response', - 'card_verification_processor_response', - 'setup_token_request_card', - 'setup_token_response_payment_source', - 'sofort_payment_object', - 'three_d_secure_authentication_response', - 'trustly_payment_object', - 'trustly_payment_request', - 'vault_instruction_base', - 'vault_response', - 'venmo_wallet_vault_attributes', - 'address', - 'paypal_wallet_customer_request', - 'paypal_wallet_vault_instruction', 'refund_platform_fee', 'refund_payment_instruction', + 'reauthorize_request', 'refund_request', + 'related_identifiers', 'payment_supplementary_data', 'supplementary_purchase_data', + 'capture_payment_instruction', + 'address_details', + 'apple_pay_payment_token', 'card_payment_token', 'card_response_entity', + 'card_verification_details', + 'customer_request', + 'customer_vault_payment_tokens_response', 'payment_token_request_payment_source', - 'network_transaction_reference_entity', - 'paypal_payment_token', - 'venmo_payment_token', - 'vaulted_digital_wallet', - 'vaulted_digital_wallet_shipping_details', - 'sofort_payment_request', - 'supplementary_data', - 'tax_info', - 'token', - 'universal_product_code', - 'venmo_wallet_attributes_response', - 'apple_pay_tokenized_card', - 'order_authorize_request_payment_source', - 'shipping_name', - 'reauthorize_request', - 'capture_payment_instruction', - 'address_details', 'vault_experience_context', + 'network_transaction_reference_entity', 'payment_token_response_payment_source', + 'payment_token_request', 'payment_token_response', + 'vault_paypal_wallet_request', + 'paypal_payment_token', + 'phone', + 'setup_token_request', + 'setup_token_response', 'vault_token_request', 'vault_venmo_request', + 'venmo_payment_token', + 'vaulted_digital_wallet', + 'apple_pay_card', + 'card_authentication_response', + 'card_verification_processor_response', + 'payment_token_request_card', + 'setup_token_card_experience_context', + 'setup_token_request_card', 'setup_token_request_payment_source', 'setup_token_response_card', + 'setup_token_response_payment_source', 'vault_venmo_experience_context', + 'vaulted_digital_wallet_shipping_details', 'o_auth_token', - 'card_type', 'card_brand', + 'card_type', 'checkout_payment_intent', - 'eci_flag', - 'enrollment_status', 'disbursement_mode', 'dispute_category', + 'eci_flag', + 'enrollment_status', 'liability_shift_indicator', - 'phone_type', + 'order_status', 'pa_res_status', 'payee_payment_method_preference', - 'order_status', 'payment_initiator', - 'processing_instruction', + 'phone_type', 'shipment_carrier', + 'shipping_type', + 'store_in_vault_instruction', 'stored_payment_source_payment_type', + 'stored_payment_source_usage_type', + 'order_tracker_status', 'apple_pay_payment_data_type', + 'authorization_incomplete_reason', + 'authorization_status', + 'avs_code', 'capture_incomplete_reason', 'capture_status', 'card_verification_method', - 'fullfillment_type', + 'cvv_code', + 'fulfillment_type', 'google_pay_authentication_method', + 'google_pay_payment_method', 'item_category', - 'order_application_context_landing_page', - 'paypal_wallet_account_verification_status', - 'upc_type', - 'venmo_payment_token_customer_type', - 'venmo_payment_token_usage_pattern', - 'venmo_payment_token_usage_type', - 'stored_payment_source_usage_type', - 'authorization_status', 'link_http_method', + 'order_application_context_landing_page', 'order_application_context_shipping_preference', 'order_application_context_user_action', - 'paypal_payment_token_usage_type', - 'refund_incomplete_reason', - 'seller_protection_status', - 'shipping_preference', - 'token_type', - 'token_request_type', - 'shipping_type', 'patch_op', - 'paypal_experience_landing_page', - 'paypal_payment_token_usage_pattern', - 'paypal_wallet_vault_status', - 'refund_status', - 'vault_status', - 'store_in_vault_instruction', - 'order_tracker_status', - 'authorization_incomplete_reason', - 'avs_code', - 'cvv_code', - 'google_pay_payment_method', 'payment_advice_code', + 'paypal_experience_landing_page', 'paypal_experience_user_action', 'paypal_payment_token_customer_type', + 'paypal_payment_token_usage_pattern', + 'paypal_payment_token_usage_type', + 'paypal_wallet_account_verification_status', + 'paypal_wallet_vault_status', 'processor_response_code', + 'refund_incomplete_reason', + 'refund_status', + 'seller_protection_status', + 'shipping_preference', 'standard_entry_class_code', 'tax_id_type', + 'token_type', + 'upc_type', + 'vault_status', + 'venmo_payment_token_customer_type', + 'venmo_payment_token_usage_pattern', + 'venmo_payment_token_usage_type', + 'token_request_type', 'o_auth_provider_error', ] diff --git a/paypalserversdk/models/card_verification_details.py b/paypalserversdk/models/card_verification_details.py index ddce185..caa2d5e 100644 --- a/paypalserversdk/models/card_verification_details.py +++ b/paypalserversdk/models/card_verification_details.py @@ -38,6 +38,10 @@ class CardVerificationDetails(object): processor_response (CardVerificationProcessorResponse): The processor response information for payment requests, such as direct credit card transactions. + three_d_secure (object): DEPRECATED. This field is DEPRECATED. Please + find the 3D secure authentication data in 'three_d_secure' object + under 'authentication_result' object instead of the 'verification' + field. """ @@ -48,7 +52,8 @@ class CardVerificationDetails(object): "network": 'network', "time": 'time', "amount": 'amount', - "processor_response": 'processor_response' + "processor_response": 'processor_response', + "three_d_secure": 'three_d_secure' } _optionals = [ @@ -58,6 +63,7 @@ class CardVerificationDetails(object): 'time', 'amount', 'processor_response', + 'three_d_secure', ] def __init__(self, @@ -66,7 +72,8 @@ def __init__(self, network=APIHelper.SKIP, time=APIHelper.SKIP, amount=APIHelper.SKIP, - processor_response=APIHelper.SKIP): + processor_response=APIHelper.SKIP, + three_d_secure=APIHelper.SKIP): """Constructor for the CardVerificationDetails class""" # Initialize members of the class @@ -82,6 +89,8 @@ def __init__(self, self.amount = amount if processor_response is not APIHelper.SKIP: self.processor_response = processor_response + if three_d_secure is not APIHelper.SKIP: + self.three_d_secure = three_d_secure @classmethod def from_dictionary(cls, @@ -108,10 +117,12 @@ def from_dictionary(cls, time = dictionary.get("time") if dictionary.get("time") else APIHelper.SKIP amount = Money.from_dictionary(dictionary.get('amount')) if 'amount' in dictionary.keys() else APIHelper.SKIP processor_response = CardVerificationProcessorResponse.from_dictionary(dictionary.get('processor_response')) if 'processor_response' in dictionary.keys() else APIHelper.SKIP + three_d_secure = dictionary.get("three_d_secure") if dictionary.get("three_d_secure") else APIHelper.SKIP # Return an object of this model return cls(network_transaction_id, date, network, time, amount, - processor_response) + processor_response, + three_d_secure) diff --git a/paypalserversdk/models/confirm_order_request.py b/paypalserversdk/models/confirm_order_request.py index dd7faeb..064e725 100644 --- a/paypalserversdk/models/confirm_order_request.py +++ b/paypalserversdk/models/confirm_order_request.py @@ -20,8 +20,7 @@ class ConfirmOrderRequest(object): Attributes: payment_source (PaymentSource): The payment source definition. - processing_instruction (ProcessingInstruction): The instruction to - process an order. + processing_instruction (object): TODO: type description here. application_context (OrderConfirmApplicationContext): Customizes the payer confirmation experience. @@ -41,13 +40,14 @@ class ConfirmOrderRequest(object): def __init__(self, payment_source=None, - processing_instruction='NO_INSTRUCTION', + processing_instruction=APIHelper.SKIP, application_context=APIHelper.SKIP): """Constructor for the ConfirmOrderRequest class""" # Initialize members of the class self.payment_source = payment_source - self.processing_instruction = processing_instruction + if processing_instruction is not APIHelper.SKIP: + self.processing_instruction = processing_instruction if application_context is not APIHelper.SKIP: self.application_context = application_context @@ -71,7 +71,7 @@ def from_dictionary(cls, # Extract variables from the dictionary payment_source = PaymentSource.from_dictionary(dictionary.get('payment_source')) if dictionary.get('payment_source') else None - processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else 'NO_INSTRUCTION' + processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else APIHelper.SKIP application_context = OrderConfirmApplicationContext.from_dictionary(dictionary.get('application_context')) if 'application_context' in dictionary.keys() else APIHelper.SKIP # Return an object of this model return cls(payment_source, diff --git a/paypalserversdk/models/fullfillment_type.py b/paypalserversdk/models/fulfillment_type.py similarity index 88% rename from paypalserversdk/models/fullfillment_type.py rename to paypalserversdk/models/fulfillment_type.py index 24b6215..9a869c4 100644 --- a/paypalserversdk/models/fullfillment_type.py +++ b/paypalserversdk/models/fulfillment_type.py @@ -8,9 +8,9 @@ """ -class FullfillmentType(object): +class FulfillmentType(object): - """Implementation of the 'Fullfillment Type' enum. + """Implementation of the 'Fulfillment Type' enum. A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not diff --git a/paypalserversdk/models/google_pay_card.py b/paypalserversdk/models/google_pay_card.py new file mode 100644 index 0000000..85e9cdf --- /dev/null +++ b/paypalserversdk/models/google_pay_card.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- + +""" +paypalserversdk + +This file was automatically generated by APIMATIC v3.0 ( + https://www.apimatic.io ). +""" +from paypalserversdk.api_helper import APIHelper +from paypalserversdk.models.portable_postal_address_medium_grained import PortablePostalAddressMediumGrained + + +class GooglePayCard(object): + + """Implementation of the 'Google Pay Card' model. + + The payment card used to fund a Google Pay payment. Can be a credit or + debit card. + + Attributes: + name (str): The card holder's name as it appears on the card. + number (str): The primary account number (PAN) for the payment card. + expiry (str): 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). + last_digits (str): The last digits of the payment card. + mtype (CardType): Type of card. i.e Credit, Debit and so on. + brand (CardBrand): The card network or brand. Applies to credit, + debit, gift, and payment cards. + billing_address (PortablePostalAddressMediumGrained): The portable + international postal address. Maps to + [AddressValidationMetadata](https://github.com/googlei18n/libaddres + sinput/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). + + """ + + # Create a mapping from Model property names to API property names + _names = { + "name": 'name', + "number": 'number', + "expiry": 'expiry', + "last_digits": 'last_digits', + "mtype": 'type', + "brand": 'brand', + "billing_address": 'billing_address' + } + + _optionals = [ + 'name', + 'number', + 'expiry', + 'last_digits', + 'mtype', + 'brand', + 'billing_address', + ] + + def __init__(self, + name=APIHelper.SKIP, + number=APIHelper.SKIP, + expiry=APIHelper.SKIP, + last_digits=APIHelper.SKIP, + mtype=APIHelper.SKIP, + brand=APIHelper.SKIP, + billing_address=APIHelper.SKIP): + """Constructor for the GooglePayCard class""" + + # Initialize members of the class + if name is not APIHelper.SKIP: + self.name = name + if number is not APIHelper.SKIP: + self.number = number + if expiry is not APIHelper.SKIP: + self.expiry = expiry + if last_digits is not APIHelper.SKIP: + self.last_digits = last_digits + if mtype is not APIHelper.SKIP: + self.mtype = mtype + if brand is not APIHelper.SKIP: + self.brand = brand + if billing_address is not APIHelper.SKIP: + self.billing_address = billing_address + + @classmethod + def from_dictionary(cls, + dictionary): + """Creates an instance of this model from a dictionary + + Args: + dictionary (dictionary): A dictionary representation of the object + as obtained from the deserialization of the server's response. The + keys MUST match property names in the API description. + + Returns: + object: An instance of this structure class. + + """ + + if dictionary is None: + return None + + # Extract variables from the dictionary + name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP + number = dictionary.get("number") if dictionary.get("number") else APIHelper.SKIP + expiry = dictionary.get("expiry") if dictionary.get("expiry") else APIHelper.SKIP + last_digits = dictionary.get("last_digits") if dictionary.get("last_digits") else APIHelper.SKIP + mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP + brand = dictionary.get("brand") if dictionary.get("brand") else APIHelper.SKIP + billing_address = PortablePostalAddressMediumGrained.from_dictionary(dictionary.get('billing_address')) if 'billing_address' in dictionary.keys() else APIHelper.SKIP + # Return an object of this model + return cls(name, + number, + expiry, + last_digits, + mtype, + brand, + billing_address) diff --git a/paypalserversdk/models/google_pay_decrypted_token_data.py b/paypalserversdk/models/google_pay_decrypted_token_data.py index 1653d6a..8dffb2b 100644 --- a/paypalserversdk/models/google_pay_decrypted_token_data.py +++ b/paypalserversdk/models/google_pay_decrypted_token_data.py @@ -7,6 +7,7 @@ https://www.apimatic.io ). """ from paypalserversdk.api_helper import APIHelper +from paypalserversdk.models.google_pay_card import GooglePayCard class GooglePayDecryptedTokenData(object): @@ -24,6 +25,8 @@ class GooglePayDecryptedTokenData(object): message that's expired. payment_method (GooglePayPaymentMethod): The type of the payment credential. Currently, only CARD is supported. + card (GooglePayCard): The payment card used to fund a Google Pay + payment. Can be a credit or debit card. authentication_method (GooglePayAuthenticationMethod): Authentication Method which is used for the card transaction. cryptogram (str): Base-64 cryptographic identifier used by card @@ -39,6 +42,7 @@ class GooglePayDecryptedTokenData(object): # Create a mapping from Model property names to API property names _names = { "payment_method": 'payment_method', + "card": 'card', "authentication_method": 'authentication_method', "message_id": 'message_id', "message_expiration": 'message_expiration', @@ -55,6 +59,7 @@ class GooglePayDecryptedTokenData(object): def __init__(self, payment_method=None, + card=None, authentication_method=None, message_id=APIHelper.SKIP, message_expiration=APIHelper.SKIP, @@ -68,6 +73,7 @@ def __init__(self, if message_expiration is not APIHelper.SKIP: self.message_expiration = message_expiration self.payment_method = payment_method + self.card = card self.authentication_method = authentication_method if cryptogram is not APIHelper.SKIP: self.cryptogram = cryptogram @@ -94,6 +100,7 @@ def from_dictionary(cls, # Extract variables from the dictionary payment_method = dictionary.get("payment_method") if dictionary.get("payment_method") else None + card = GooglePayCard.from_dictionary(dictionary.get('card')) if dictionary.get('card') else None authentication_method = dictionary.get("authentication_method") if dictionary.get("authentication_method") else None message_id = dictionary.get("message_id") if dictionary.get("message_id") else APIHelper.SKIP message_expiration = dictionary.get("message_expiration") if dictionary.get("message_expiration") else APIHelper.SKIP @@ -101,6 +108,7 @@ def from_dictionary(cls, eci_indicator = dictionary.get("eci_indicator") if dictionary.get("eci_indicator") else APIHelper.SKIP # Return an object of this model return cls(payment_method, + card, authentication_method, message_id, message_expiration, diff --git a/paypalserversdk/models/order.py b/paypalserversdk/models/order.py index f245f12..dfea614 100644 --- a/paypalserversdk/models/order.py +++ b/paypalserversdk/models/order.py @@ -38,8 +38,7 @@ class Order(object): intent (CheckoutPaymentIntent): The intent to either capture payment immediately or authorize a payment for an order after order creation. - processing_instruction (ProcessingInstruction): The instruction to - process an order. + processing_instruction (object): TODO: type description here. payer (Payer): TODO: type description here. purchase_units (List[PurchaseUnit]): An array of purchase units. Each purchase unit establishes a contract between a customer and @@ -48,11 +47,11 @@ class Order(object): status (OrderStatus): The order status. links (List[LinkDescription]): An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to - redirect the payer. The API caller has 3 hours (default setting, + 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 3 hours for the payer to approve the order and either + 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 @@ -94,7 +93,7 @@ def __init__(self, id=APIHelper.SKIP, payment_source=APIHelper.SKIP, intent=APIHelper.SKIP, - processing_instruction='NO_INSTRUCTION', + processing_instruction=APIHelper.SKIP, payer=APIHelper.SKIP, purchase_units=APIHelper.SKIP, status=APIHelper.SKIP, @@ -112,7 +111,8 @@ def __init__(self, self.payment_source = payment_source if intent is not APIHelper.SKIP: self.intent = intent - self.processing_instruction = processing_instruction + if processing_instruction is not APIHelper.SKIP: + self.processing_instruction = processing_instruction if payer is not APIHelper.SKIP: self.payer = payer if purchase_units is not APIHelper.SKIP: @@ -146,7 +146,7 @@ def from_dictionary(cls, id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP payment_source = PaymentSourceResponse.from_dictionary(dictionary.get('payment_source')) if 'payment_source' in dictionary.keys() else APIHelper.SKIP intent = dictionary.get("intent") if dictionary.get("intent") else APIHelper.SKIP - processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else 'NO_INSTRUCTION' + processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else APIHelper.SKIP payer = Payer.from_dictionary(dictionary.get('payer')) if 'payer' in dictionary.keys() else APIHelper.SKIP purchase_units = None if dictionary.get('purchase_units') is not None: diff --git a/paypalserversdk/models/order_authorize_response.py b/paypalserversdk/models/order_authorize_response.py index 5c6039b..817034c 100644 --- a/paypalserversdk/models/order_authorize_response.py +++ b/paypalserversdk/models/order_authorize_response.py @@ -38,8 +38,7 @@ class OrderAuthorizeResponse(object): intent (CheckoutPaymentIntent): The intent to either capture payment immediately or authorize a payment for an order after order creation. - processing_instruction (ProcessingInstruction): The instruction to - process an order. + processing_instruction (object): TODO: type description here. payer (Payer): TODO: type description here. purchase_units (List[PurchaseUnit]): An array of purchase units. Each purchase unit establishes a contract between a customer and @@ -86,7 +85,7 @@ def __init__(self, id=APIHelper.SKIP, payment_source=APIHelper.SKIP, intent=APIHelper.SKIP, - processing_instruction='NO_INSTRUCTION', + processing_instruction=APIHelper.SKIP, payer=APIHelper.SKIP, purchase_units=APIHelper.SKIP, status=APIHelper.SKIP, @@ -104,7 +103,8 @@ def __init__(self, self.payment_source = payment_source if intent is not APIHelper.SKIP: self.intent = intent - self.processing_instruction = processing_instruction + if processing_instruction is not APIHelper.SKIP: + self.processing_instruction = processing_instruction if payer is not APIHelper.SKIP: self.payer = payer if purchase_units is not APIHelper.SKIP: @@ -138,7 +138,7 @@ def from_dictionary(cls, id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP payment_source = OrderAuthorizeResponsePaymentSource.from_dictionary(dictionary.get('payment_source')) if 'payment_source' in dictionary.keys() else APIHelper.SKIP intent = dictionary.get("intent") if dictionary.get("intent") else APIHelper.SKIP - processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else 'NO_INSTRUCTION' + processing_instruction = dictionary.get("processing_instruction") if dictionary.get("processing_instruction") else APIHelper.SKIP payer = Payer.from_dictionary(dictionary.get('payer')) if 'payer' in dictionary.keys() else APIHelper.SKIP purchase_units = None if dictionary.get('purchase_units') is not None: diff --git a/paypalserversdk/models/portable_postal_address_medium_grained.py b/paypalserversdk/models/portable_postal_address_medium_grained.py new file mode 100644 index 0000000..64fcfe4 --- /dev/null +++ b/paypalserversdk/models/portable_postal_address_medium_grained.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- + +""" +paypalserversdk + +This file was automatically generated by APIMATIC v3.0 ( + https://www.apimatic.io ). +""" +from paypalserversdk.api_helper import APIHelper + + +class PortablePostalAddressMediumGrained(object): + + """Implementation of the 'Portable Postal Address (Medium-Grained)' model. + + The portable international postal address. Maps to + [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/w + iki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + the autocomplete + attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-con + trols-the-autocomplete-attribute). + + Attributes: + address_line_1 (str): The first line of the address, such as number + and street, for example, `173 Drury Lane`. Needed for data entry, + and Compliance and Risk checks. This field needs to pass the full + address. + address_line_2 (str): The second line of the address, for example, a + suite or apartment number. + admin_area_2 (str): A city, town, or village. Smaller than + `admin_area_level_1`. + admin_area_1 (str): 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*.
    + postal_code (str): 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). + country_code (str): 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.
    + + """ + + # Create a mapping from Model property names to API property names + _names = { + "country_code": 'country_code', + "address_line_1": 'address_line_1', + "address_line_2": 'address_line_2', + "admin_area_2": 'admin_area_2', + "admin_area_1": 'admin_area_1', + "postal_code": 'postal_code' + } + + _optionals = [ + 'address_line_1', + 'address_line_2', + 'admin_area_2', + 'admin_area_1', + 'postal_code', + ] + + def __init__(self, + country_code=None, + address_line_1=APIHelper.SKIP, + address_line_2=APIHelper.SKIP, + admin_area_2=APIHelper.SKIP, + admin_area_1=APIHelper.SKIP, + postal_code=APIHelper.SKIP): + """Constructor for the PortablePostalAddressMediumGrained class""" + + # Initialize members of the class + if address_line_1 is not APIHelper.SKIP: + self.address_line_1 = address_line_1 + if address_line_2 is not APIHelper.SKIP: + self.address_line_2 = address_line_2 + if admin_area_2 is not APIHelper.SKIP: + self.admin_area_2 = admin_area_2 + if admin_area_1 is not APIHelper.SKIP: + self.admin_area_1 = admin_area_1 + if postal_code is not APIHelper.SKIP: + self.postal_code = postal_code + self.country_code = country_code + + @classmethod + def from_dictionary(cls, + dictionary): + """Creates an instance of this model from a dictionary + + Args: + dictionary (dictionary): A dictionary representation of the object + as obtained from the deserialization of the server's response. The + keys MUST match property names in the API description. + + Returns: + object: An instance of this structure class. + + """ + + if dictionary is None: + return None + + # Extract variables from the dictionary + country_code = dictionary.get("country_code") if dictionary.get("country_code") else None + address_line_1 = dictionary.get("address_line_1") if dictionary.get("address_line_1") else APIHelper.SKIP + address_line_2 = dictionary.get("address_line_2") if dictionary.get("address_line_2") else APIHelper.SKIP + admin_area_2 = dictionary.get("admin_area_2") if dictionary.get("admin_area_2") else APIHelper.SKIP + admin_area_1 = dictionary.get("admin_area_1") if dictionary.get("admin_area_1") else APIHelper.SKIP + postal_code = dictionary.get("postal_code") if dictionary.get("postal_code") else APIHelper.SKIP + # Return an object of this model + return cls(country_code, + address_line_1, + address_line_2, + admin_area_2, + admin_area_1, + postal_code) diff --git a/paypalserversdk/models/processing_instruction.py b/paypalserversdk/models/processing_instruction.py deleted file mode 100644 index c46cd36..0000000 --- a/paypalserversdk/models/processing_instruction.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -paypalserversdk - -This file was automatically generated by APIMATIC v3.0 ( - https://www.apimatic.io ). -""" - - -class ProcessingInstruction(object): - - """Implementation of the 'Processing Instruction' enum. - - The instruction to process an order. - - Attributes: - ORDER_COMPLETE_ON_PAYMENT_APPROVAL: TODO: type description here. - NO_INSTRUCTION: TODO: type description here. - - """ - ORDER_COMPLETE_ON_PAYMENT_APPROVAL = 'ORDER_COMPLETE_ON_PAYMENT_APPROVAL' - - NO_INSTRUCTION = 'NO_INSTRUCTION' - diff --git a/paypalserversdk/models/shipment_carrier.py b/paypalserversdk/models/shipment_carrier.py index 0a32831..3c50763 100644 --- a/paypalserversdk/models/shipment_carrier.py +++ b/paypalserversdk/models/shipment_carrier.py @@ -1298,6 +1298,114 @@ class ShipmentCarrier(object): LOGINEXT_WEBHOOK: TODO: type description here. EMS: TODO: type description here. SPEEDY: TODO: type description here. + ZOOM_RED: TODO: type description here. + NAVLUNGO: TODO: type description here. + CASTLEPARCELS: TODO: type description here. + WEEE: TODO: type description here. + PACKALY: TODO: type description here. + YUNHUIPOST: TODO: type description here. + YOUPARCEL: TODO: type description here. + LEMAN: TODO: type description here. + MOOVIN: TODO: type description here. + URB_IT: TODO: type description here. + MULTIENTREGAPANAMA: TODO: type description here. + JUSDASR: TODO: type description here. + DISCOUNTPOST: TODO: type description here. + RHENUS_UK: TODO: type description here. + SWISHIP_JP: TODO: type description here. + GLS_US: TODO: type description here. + SMTL: TODO: type description here. + EMEGA: TODO: type description here. + EXPRESSONE_SV: TODO: type description here. + HEPSIJET: TODO: type description here. + WELIVERY: TODO: type description here. + BRINGER: TODO: type description here. + EASYROUTES: TODO: type description here. + MRW: TODO: type description here. + RPM: TODO: type description here. + DPD_PRT: TODO: type description here. + GLS_ROMANIA: TODO: type description here. + LMPARCEL: TODO: type description here. + GTAGSM: TODO: type description here. + DOMINO: TODO: type description here. + ESHIPPER: TODO: type description here. + TRANSPAK: TODO: type description here. + XINDUS: TODO: type description here. + AOYUE: TODO: type description here. + EASYPARCEL: TODO: type description here. + EXPRESSONE: TODO: type description here. + SENDEO_KARGO: TODO: type description here. + SPEEDAF: TODO: type description here. + ETOWER: TODO: type description here. + GCX: TODO: type description here. + NINJAVAN_VN: TODO: type description here. + ALLEGRO: TODO: type description here. + JUMPPOINT: TODO: type description here. + SHIPGLOBAL_US: TODO: type description here. + KINISI: TODO: type description here. + OAKH: TODO: type description here. + AWEST: TODO: type description here. + BARSAN: TODO: type description here. + ENERGOLOGISTIC: TODO: type description here. + MADROOEX: TODO: type description here. + GOBOLT: TODO: type description here. + SWISS_UNIVERSAL_EXPRESS: TODO: type description here. + IORDIRECT: TODO: type description here. + XMSZM: TODO: type description here. + GLS_HUN: TODO: type description here. + SENDY: TODO: type description here. + BRAUNSEXPRESS: TODO: type description here. + GRANDSLAMEXPRESS: TODO: type description here. + XGS: TODO: type description here. + OTSCHILE: TODO: type description here. + PACK_UP: TODO: type description here. + PARCELSTARS: TODO: type description here. + TEAMEXPRESSLLC: TODO: type description here. + ASYADEXPRESS: TODO: type description here. + TDN: TODO: type description here. + EARLYBIRD: TODO: type description here. + CACESA: TODO: type description here. + PARCELJET: TODO: type description here. + MNG_KARGO: TODO: type description here. + SUPERPACKLINE: TODO: type description here. + SPEEDX: TODO: type description here. + VESYL: TODO: type description here. + SKYKING: TODO: type description here. + DIRMENSAJERIA: TODO: type description here. + NETLOGIXGROUP: TODO: type description here. + ZYOU: TODO: type description here. + JAWAR: TODO: type description here. + AGSYSTEMS: TODO: type description here. + GPS: TODO: type description here. + PTT_KARGO: TODO: type description here. + MAERGO: TODO: type description here. + ARIHANTCOURIER: TODO: type description here. + VTFE: TODO: type description here. + YUNANT: TODO: type description here. + URBIFY: TODO: type description here. + PACK_MAN: TODO: type description here. + LIEFERGRUN: TODO: type description here. + OBIBOX: TODO: type description here. + PAIKEDA: TODO: type description here. + SCOTTY: TODO: type description here. + INTELCOM_CA: TODO: type description here. + SWE: TODO: type description here. + ASENDIA: TODO: type description here. + DPD_AT: TODO: type description here. + RELAY: TODO: type description here. + ATA: TODO: type description here. + SKYEXPRESS_INTERNATIONAL: TODO: type description here. + SURAT_KARGO: TODO: type description here. + SGLINK: TODO: type description here. + FLEETOPTICSINC: TODO: type description here. + SHOPLINE: TODO: type description here. + PIGGYSHIP: TODO: type description here. + LOGOIX: TODO: type description here. + KOLAY_GELSIN: TODO: type description here. + ASSOCIATED_COURIERS: TODO: type description here. + UPS_CHECKER: TODO: type description here. + WINESHIPPING: TODO: type description here. + SPEDISCI: TODO: type description here. """ DPD_RU = 'DPD_RU' @@ -3852,3 +3960,219 @@ class ShipmentCarrier(object): SPEEDY = 'SPEEDY' + ZOOM_RED = 'ZOOM_RED' + + NAVLUNGO = 'NAVLUNGO' + + CASTLEPARCELS = 'CASTLEPARCELS' + + WEEE = 'WEEE' + + PACKALY = 'PACKALY' + + YUNHUIPOST = 'YUNHUIPOST' + + YOUPARCEL = 'YOUPARCEL' + + LEMAN = 'LEMAN' + + MOOVIN = 'MOOVIN' + + URB_IT = 'URB_IT' + + MULTIENTREGAPANAMA = 'MULTIENTREGAPANAMA' + + JUSDASR = 'JUSDASR' + + DISCOUNTPOST = 'DISCOUNTPOST' + + RHENUS_UK = 'RHENUS_UK' + + SWISHIP_JP = 'SWISHIP_JP' + + GLS_US = 'GLS_US' + + SMTL = 'SMTL' + + EMEGA = 'EMEGA' + + EXPRESSONE_SV = 'EXPRESSONE_SV' + + HEPSIJET = 'HEPSIJET' + + WELIVERY = 'WELIVERY' + + BRINGER = 'BRINGER' + + EASYROUTES = 'EASYROUTES' + + MRW = 'MRW' + + RPM = 'RPM' + + DPD_PRT = 'DPD_PRT' + + GLS_ROMANIA = 'GLS_ROMANIA' + + LMPARCEL = 'LMPARCEL' + + GTAGSM = 'GTAGSM' + + DOMINO = 'DOMINO' + + ESHIPPER = 'ESHIPPER' + + TRANSPAK = 'TRANSPAK' + + XINDUS = 'XINDUS' + + AOYUE = 'AOYUE' + + EASYPARCEL = 'EASYPARCEL' + + EXPRESSONE = 'EXPRESSONE' + + SENDEO_KARGO = 'SENDEO_KARGO' + + SPEEDAF = 'SPEEDAF' + + ETOWER = 'ETOWER' + + GCX = 'GCX' + + NINJAVAN_VN = 'NINJAVAN_VN' + + ALLEGRO = 'ALLEGRO' + + JUMPPOINT = 'JUMPPOINT' + + SHIPGLOBAL_US = 'SHIPGLOBAL_US' + + KINISI = 'KINISI' + + OAKH = 'OAKH' + + AWEST = 'AWEST' + + BARSAN = 'BARSAN' + + ENERGOLOGISTIC = 'ENERGOLOGISTIC' + + MADROOEX = 'MADROOEX' + + GOBOLT = 'GOBOLT' + + SWISS_UNIVERSAL_EXPRESS = 'SWISS_UNIVERSAL_EXPRESS' + + IORDIRECT = 'IORDIRECT' + + XMSZM = 'XMSZM' + + GLS_HUN = 'GLS_HUN' + + SENDY = 'SENDY' + + BRAUNSEXPRESS = 'BRAUNSEXPRESS' + + GRANDSLAMEXPRESS = 'GRANDSLAMEXPRESS' + + XGS = 'XGS' + + OTSCHILE = 'OTSCHILE' + + PACK_UP = 'PACK_UP' + + PARCELSTARS = 'PARCELSTARS' + + TEAMEXPRESSLLC = 'TEAMEXPRESSLLC' + + ASYADEXPRESS = 'ASYADEXPRESS' + + TDN = 'TDN' + + EARLYBIRD = 'EARLYBIRD' + + CACESA = 'CACESA' + + PARCELJET = 'PARCELJET' + + MNG_KARGO = 'MNG_KARGO' + + SUPERPACKLINE = 'SUPERPACKLINE' + + SPEEDX = 'SPEEDX' + + VESYL = 'VESYL' + + SKYKING = 'SKYKING' + + DIRMENSAJERIA = 'DIRMENSAJERIA' + + NETLOGIXGROUP = 'NETLOGIXGROUP' + + ZYOU = 'ZYOU' + + JAWAR = 'JAWAR' + + AGSYSTEMS = 'AGSYSTEMS' + + GPS = 'GPS' + + PTT_KARGO = 'PTT_KARGO' + + MAERGO = 'MAERGO' + + ARIHANTCOURIER = 'ARIHANTCOURIER' + + VTFE = 'VTFE' + + YUNANT = 'YUNANT' + + URBIFY = 'URBIFY' + + PACK_MAN = 'PACK_MAN' + + LIEFERGRUN = 'LIEFERGRUN' + + OBIBOX = 'OBIBOX' + + PAIKEDA = 'PAIKEDA' + + SCOTTY = 'SCOTTY' + + INTELCOM_CA = 'INTELCOM_CA' + + SWE = 'SWE' + + ASENDIA = 'ASENDIA' + + DPD_AT = 'DPD_AT' + + RELAY = 'RELAY' + + ATA = 'ATA' + + SKYEXPRESS_INTERNATIONAL = 'SKYEXPRESS_INTERNATIONAL' + + SURAT_KARGO = 'SURAT_KARGO' + + SGLINK = 'SGLINK' + + FLEETOPTICSINC = 'FLEETOPTICSINC' + + SHOPLINE = 'SHOPLINE' + + PIGGYSHIP = 'PIGGYSHIP' + + LOGOIX = 'LOGOIX' + + KOLAY_GELSIN = 'KOLAY_GELSIN' + + ASSOCIATED_COURIERS = 'ASSOCIATED_COURIERS' + + UPS_CHECKER = 'UPS_CHECKER' + + WINESHIPPING = 'WINESHIPPING' + + SPEDISCI = 'SPEDISCI' + diff --git a/paypalserversdk/models/shipping_details.py b/paypalserversdk/models/shipping_details.py index b06d4d2..9618542 100644 --- a/paypalserversdk/models/shipping_details.py +++ b/paypalserversdk/models/shipping_details.py @@ -24,7 +24,7 @@ class ShippingDetails(object): phone_number (PhoneNumberWithCountryCode): The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). - mtype (FullfillmentType): A classification for the method of purchase + mtype (FulfillmentType): 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. options (List[ShippingOption]): An array of shipping options that the diff --git a/paypalserversdk/models/shipping_with_tracking_details.py b/paypalserversdk/models/shipping_with_tracking_details.py index 505586f..f0975db 100644 --- a/paypalserversdk/models/shipping_with_tracking_details.py +++ b/paypalserversdk/models/shipping_with_tracking_details.py @@ -25,7 +25,7 @@ class ShippingWithTrackingDetails(object): phone_number (PhoneNumberWithCountryCode): The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). - mtype (FullfillmentType): A classification for the method of purchase + mtype (FulfillmentType): 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. options (List[ShippingOption]): An array of shipping options that the diff --git a/paypalserversdk/models/vaulted_digital_wallet_shipping_details.py b/paypalserversdk/models/vaulted_digital_wallet_shipping_details.py index 581b0a6..9248ac8 100644 --- a/paypalserversdk/models/vaulted_digital_wallet_shipping_details.py +++ b/paypalserversdk/models/vaulted_digital_wallet_shipping_details.py @@ -19,7 +19,7 @@ class VaultedDigitalWalletShippingDetails(object): Attributes: name (ShippingName): The name of the party. - mtype (FullfillmentType): A classification for the method of purchase + mtype (FulfillmentType): 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. address (Address): The portable international postal address. Maps to diff --git a/pyproject.toml b/pyproject.toml index 3365674..1c25142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=61.0"] [project] name = "paypal-server-sdk" description = "PayPal's SDK for interacting with the REST APIs" -version = "0.6.0" +version = "0.6.1" readme = "README.md" requires-python = ">=3.7" keywords = []