Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
# Change Log

## Version 15.0.0.20211020 (2021-10-20)
## API updates
* **Transactions API.** Three previously deprecated endpoints (`ListRefunds`, `Charge`, and `CreateRefund`) in the [Transactions API](https://developer.squareup.com/reference/square_2021-10-20/transactions-api) are removed from Square API version 2021-10-20 and later. These endpoints will work if you are using Square API versions prior to 2021-10-20. However, these endpoints will eventually be retired from all Square versions.

* Instead of the Transactions API `Charge` endpoint, use the Payments API [CreatePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment) endpoint.
* Instead of the Transactions API `CreateRefund` endpoint, use the Refunds API [RefundPayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/refund-payment) endpoint.
* Instead of the Transactions API `ListRefunds` endpoint, use the Refunds API [ListPaymentRefund](https://developer.squareup.com/reference/square_2021-10-20/payments-api/list-payment-refunds) endpoint.

* **Payments API:**
* [Payment](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment) object.
* Added the [device_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-device_details) read-only field to view details of the device used to take a payment. This `Payment`-level field provides device information for all types of payments. Previously, device details were only available for card payments (`Payment.card_details.device_details`), which is now deprecated.
* Added the [team_member_id](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-team_member_id) that applications can use to view the ID of the [TeamMember](https://developer.squareup.com/reference/square_2021-10-20/objects/TeamMember) associated with the payment. Use this field instead of the `Payment.employee_id` field, which is now deprecated.
* Added the [application_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-application_details) read-only field to view details of the application that took the payment.

* These `Payment` fields have moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle) (GA) state:[tip_money](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-tip_money), [delay_duration](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_duration), [statement_description_identifier](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-statement_description_identifier), [delay_duration](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_duration), [delay_action](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delay_action), [delayed_until](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-delayed_until), and [statement_description_identifier](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-statement_description_identifier).

* The [ACH Bank Transfer Payments](https://developer.squareup.com/docs/payments-api/take-payments/ach-payments) feature has moved to the GA state. Accordingly, the [bank_account_details](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment#definition__property-bank_account_details) field (and its [BankAccountPaymentDetails](https://developer.squareup.com/reference/square_2021-10-20/objects/BankAccountPaymentDetails) type) are moved to the GA state.
* [CreatePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment) endpoint.
* Added the [team_member_id](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment#request__property-team_member_id) request field to record the ID of the team member associated with the payment.
* The [accept_partial_authorization](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment#request__property-accept_partial_authorization) request field has moved to the GA state.
* [CompletePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/complete-payment) endpoint. Added the `version_token` request field to support optimistic concurrency. For more information, see [Delayed capture of a card payment.](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment)

* **Refunds API:**
* [RefundPayment](https://developer.squareup.com/reference/square_2021-10-20/refunds-api/refund-payment) endpoint.
* Added the `team_member_id` request field to record the ID of the team member associated with the refund.
* Added the `payment_version_token` request field to support optimistic concurrency. For more information, see [Refund Payment.](https://developer.squareup.com/docs/payments-api/refund-payments#optimistic-concurrency)

* **Customers API:**
* [Customer](https://developer.squareup.com/reference/square_2021-10-20/objects/Customer) object. Added a new `tax_ids` field of the [CustomerTaxIds](https://developer.squareup.com/reference/square_2021-10-20/objects/CustomerTaxIds) type, which can contain the EU VAT ID of the customer. This field is available only for customers of sellers in France, Ireland, or the United Kingdom. For more information, see [Customer tax IDs.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids)

* [UpdateCustomer](https://developer.squareup.com/reference/square_2021-10-20/customers-api/update-customer) endpoint. The Customers API now returns a `400 BAD_REQUEST` error if the request body does not contain any fields. For earlier Square versions, the Customers API will continue to return a `200 OK` response along with the customer profile. For more information, see [Migration notes.](https://developer.squareup.com/docs/customers-api/what-it-does#migration-notes)

* **Invoices API:**
* [InvoiceRecipient](https://developer.squareup.com/reference/square_2021-10-20/objects/InvoiceRecipient) object. Added a new, read-only `tax_ids` field of the [InvoiceRecipientTaxIds](https://developer.squareup.com/reference/square_2021-10-20/objects/InvoiceRecipientTaxIds) type, which can contain the EU VAT ID of the invoice recipient. This field is available only for customers of sellers in Ireland or the United Kingdom. If defined, `tax_ids` is returned for all Square API versions. For more information, see [Invoice recipient tax IDs.](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids)
* Square now sends emails for test invoices that are published in the Sandbox environment.

* **Catalog API:**
* [CatalogSubscriptionPlan.name](https://developer.squareup.com/reference/square_2021-10-20/objects/CatalogSubscriptionPlan#definition__property-name) can be updated after the subscription plan is created. The change is retroactively applicable to prior versions of the Square API.

* **Subscriptions API:**
* The new [SubscriptionSource](https://developer.squareup.com/reference/square_2021-10-20/objects/SubscriptionSource) data type is introduced to encapsulate the source where a subscription is created. The new `SubscriptionSource.name` value is propagated to the `Order.source` attribute when an order is made on the subscription. The new feature is retroactively applicable to prior versions of the Square API.
* The new [Subscription.source](https://developer.squareup.com/reference/square_2021-10-20/objects/Subscription#definition__property-source) attribute is introduced to indicate the source where the subscription was created. This new feature is retroactively applicable to prior versions of the Square API.
* The new [SearchSubscriptionsFilter.source_names](https://developer.squareup.com/reference/square_2021-10-20/objects/SearchSubscriptionFilter#definition__property-source_names) query expression is introduced to enable search for subscriptions by the subscription source name. This new feature is retroactively applicable to prior versions of the Square API.


## Version 14.1.1.20210915 (2021-09-15)
## SDK updates
* Upgraded josnpickle dependency
* Upgraded jsonpickle dependency

## Version 14.1.0.20210915 (2021-09-15)
## API updates
Expand Down
24 changes: 14 additions & 10 deletions doc/api/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def create_payment(self,

```python
body = {}
body['source_id'] = 'ccof:uIbfJXhXETSP197M3GB'
body['idempotency_key'] = '4935a656-a929-4792-b97c-8848be85c27c'
body['source_id'] = 'ccof:GaJGNaZa8x4OgDJn4GB'
body['idempotency_key'] = '7b0f3ec5-086a-4871-8f13-3c81b3875218'
body['amount_money'] = {}
body['amount_money']['amount'] = 200
body['amount_money']['amount'] = 1000
body['amount_money']['currency'] = 'USD'
body['tip_money'] = {}
body['tip_money']['amount'] = 198
Expand All @@ -125,8 +125,8 @@ body['app_fee_money']['currency'] = 'USD'
body['delay_duration'] = 'delay_duration6'
body['autocomplete'] = True
body['order_id'] = 'order_id0'
body['customer_id'] = 'VDKXEEKPJN48QDG3BGGFAK05P8'
body['location_id'] = 'XK3DBG77NJBFX'
body['customer_id'] = 'W92WH6P11H4Z77CTET0RNTGFW8'
body['location_id'] = 'L88917AVBK2S5'
body['reference_id'] = '123456'
body['note'] = 'Brief description'

Expand Down Expand Up @@ -251,10 +251,10 @@ body['payment']['amount_money'] = {}
body['payment']['amount_money']['amount'] = 1000
body['payment']['amount_money']['currency'] = 'USD'
body['payment']['tip_money'] = {}
body['payment']['tip_money']['amount'] = 300
body['payment']['tip_money']['amount'] = 100
body['payment']['tip_money']['currency'] = 'USD'
body['payment']['version_token'] = 'Z3okDzm2VRv5m5nE3WGx381ItTNhvjkB4VapByyz54h6o'
body['idempotency_key'] = '3d3c3b22-9572-4fc6-1111-e4d2f41b4122'
body['payment']['version_token'] = 'ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o'
body['idempotency_key'] = '956f8b13-e4ec-45d6-85e8-d1d95ef0c5de'

result = payments_api.update_payment(payment_id, body)

Expand Down Expand Up @@ -308,14 +308,16 @@ You can use this endpoint to complete a payment with the APPROVED `status`.

```python
def complete_payment(self,
payment_id)
payment_id,
body)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `payment_id` | `string` | Template, Required | The unique ID identifying the payment to be completed. |
| `body` | [`Complete Payment Request`](/doc/models/complete-payment-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |

## Response Type

Expand All @@ -325,8 +327,10 @@ def complete_payment(self,

```python
payment_id = 'payment_id0'
body = {}
body['version_token'] = 'version_token2'

result = payments_api.complete_payment(payment_id)
result = payments_api.complete_payment(payment_id, body)

if result.is_success():
print(result.body)
Expand Down
14 changes: 8 additions & 6 deletions doc/api/refunds.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ def refund_payment(self,

```python
body = {}
body['idempotency_key'] = 'a7e36d40-d24b-11e8-b568-0800200c9a66'
body['idempotency_key'] = '9b7f2dcf-49da-4411-b23e-a2d6af21333a'
body['amount_money'] = {}
body['amount_money']['amount'] = 100
body['amount_money']['amount'] = 1000
body['amount_money']['currency'] = 'USD'
body['app_fee_money'] = {}
body['app_fee_money']['amount'] = 114
body['app_fee_money']['currency'] = 'GEL'
body['payment_id'] = 'UNOE3kv2BZwqHlJ830RCt5YCuaB'
body['reason'] = 'reason8'
body['app_fee_money']['amount'] = 10
body['app_fee_money']['currency'] = 'USD'
body['payment_id'] = 'R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY'
body['reason'] = 'Example'
body['payment_version_token'] = 'payment_version_token6'
body['team_member_id'] = 'team_member_id4'

result = refunds_api.refund_payment(body)

Expand Down
5 changes: 4 additions & 1 deletion doc/api/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ body['idempotency_key'] = '8193148c-9586-11e6-99f9-28cfe92138cf'
body['location_id'] = 'S8GWD5R9QB376'
body['plan_id'] = '6JHXF3B2CW3YKHDV4XEM674H'
body['customer_id'] = 'CHFGVKYY8RSV93M5KCYTG4PN0G'
body['start_date'] = '2020-08-01'
body['start_date'] = '2021-10-20'
body['canceled_date'] = 'canceled_date0'
body['tax_percentage'] = '5'
body['price_override_money'] = {}
body['price_override_money']['amount'] = 100
body['price_override_money']['currency'] = 'USD'
body['card_id'] = 'ccof:qy5x8hHGYsgLrp4Q4GB'
body['timezone'] = 'America/Los_Angeles'
body['source'] = {}
body['source']['name'] = 'My App'

result = subscriptions_api.create_subscription(body)

Expand Down Expand Up @@ -113,6 +115,7 @@ body['query'] = {}
body['query']['filter'] = {}
body['query']['filter']['customer_ids'] = ['CHFGVKYY8RSV93M5KCYTG4PN0G']
body['query']['filter']['location_ids'] = ['S8GWD5R9QB376']
body['query']['filter']['source_names'] = ['My App']

result = subscriptions_api.search_subscriptions(body)

Expand Down
Loading