Skip to content

Commit 15193d0

Browse files
author
Wolfgang Schuster
authored
Merge pull request #79 from square/release/15.0.0.20211020
Generated PR for Release: 15.0.0.20211020
2 parents 3271d6c + 79ae7ce commit 15193d0

67 files changed

Lines changed: 588 additions & 760 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,53 @@
11
# Change Log
22

3+
## Version 15.0.0.20211020 (2021-10-20)
4+
## API updates
5+
* **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.
6+
7+
* 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.
8+
* 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.
9+
* 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.
10+
11+
* **Payments API:**
12+
* [Payment](https://developer.squareup.com/reference/square_2021-10-20/objects/Payment) object.
13+
* 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.
14+
* 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.
15+
* 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.
16+
17+
* 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).
18+
19+
* 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.
20+
* [CreatePayment](https://developer.squareup.com/reference/square_2021-10-20/payments-api/create-payment) endpoint.
21+
* 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.
22+
* 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.
23+
* [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)
24+
25+
* **Refunds API:**
26+
* [RefundPayment](https://developer.squareup.com/reference/square_2021-10-20/refunds-api/refund-payment) endpoint.
27+
* Added the `team_member_id` request field to record the ID of the team member associated with the refund.
28+
* 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)
29+
30+
* **Customers API:**
31+
* [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)
32+
33+
* [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)
34+
35+
* **Invoices API:**
36+
* [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)
37+
* Square now sends emails for test invoices that are published in the Sandbox environment.
38+
39+
* **Catalog API:**
40+
* [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.
41+
42+
* **Subscriptions API:**
43+
* 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.
44+
* 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.
45+
* 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.
46+
47+
348
## Version 14.1.1.20210915 (2021-09-15)
449
## SDK updates
5-
* Upgraded josnpickle dependency
50+
* Upgraded jsonpickle dependency
651

752
## Version 14.1.0.20210915 (2021-09-15)
853
## API updates

doc/api/payments.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ def create_payment(self,
111111

112112
```python
113113
body = {}
114-
body['source_id'] = 'ccof:uIbfJXhXETSP197M3GB'
115-
body['idempotency_key'] = '4935a656-a929-4792-b97c-8848be85c27c'
114+
body['source_id'] = 'ccof:GaJGNaZa8x4OgDJn4GB'
115+
body['idempotency_key'] = '7b0f3ec5-086a-4871-8f13-3c81b3875218'
116116
body['amount_money'] = {}
117-
body['amount_money']['amount'] = 200
117+
body['amount_money']['amount'] = 1000
118118
body['amount_money']['currency'] = 'USD'
119119
body['tip_money'] = {}
120120
body['tip_money']['amount'] = 198
@@ -125,8 +125,8 @@ body['app_fee_money']['currency'] = 'USD'
125125
body['delay_duration'] = 'delay_duration6'
126126
body['autocomplete'] = True
127127
body['order_id'] = 'order_id0'
128-
body['customer_id'] = 'VDKXEEKPJN48QDG3BGGFAK05P8'
129-
body['location_id'] = 'XK3DBG77NJBFX'
128+
body['customer_id'] = 'W92WH6P11H4Z77CTET0RNTGFW8'
129+
body['location_id'] = 'L88917AVBK2S5'
130130
body['reference_id'] = '123456'
131131
body['note'] = 'Brief description'
132132

@@ -251,10 +251,10 @@ body['payment']['amount_money'] = {}
251251
body['payment']['amount_money']['amount'] = 1000
252252
body['payment']['amount_money']['currency'] = 'USD'
253253
body['payment']['tip_money'] = {}
254-
body['payment']['tip_money']['amount'] = 300
254+
body['payment']['tip_money']['amount'] = 100
255255
body['payment']['tip_money']['currency'] = 'USD'
256-
body['payment']['version_token'] = 'Z3okDzm2VRv5m5nE3WGx381ItTNhvjkB4VapByyz54h6o'
257-
body['idempotency_key'] = '3d3c3b22-9572-4fc6-1111-e4d2f41b4122'
256+
body['payment']['version_token'] = 'ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o'
257+
body['idempotency_key'] = '956f8b13-e4ec-45d6-85e8-d1d95ef0c5de'
258258

259259
result = payments_api.update_payment(payment_id, body)
260260

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

309309
```python
310310
def complete_payment(self,
311-
payment_id)
311+
payment_id,
312+
body)
312313
```
313314

314315
## Parameters
315316

316317
| Parameter | Type | Tags | Description |
317318
| --- | --- | --- | --- |
318319
| `payment_id` | `string` | Template, Required | The unique ID identifying the payment to be completed. |
320+
| `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. |
319321

320322
## Response Type
321323

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

326328
```python
327329
payment_id = 'payment_id0'
330+
body = {}
331+
body['version_token'] = 'version_token2'
328332

329-
result = payments_api.complete_payment(payment_id)
333+
result = payments_api.complete_payment(payment_id, body)
330334

331335
if result.is_success():
332336
print(result.body)

doc/api/refunds.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,17 @@ def refund_payment(self,
100100

101101
```python
102102
body = {}
103-
body['idempotency_key'] = 'a7e36d40-d24b-11e8-b568-0800200c9a66'
103+
body['idempotency_key'] = '9b7f2dcf-49da-4411-b23e-a2d6af21333a'
104104
body['amount_money'] = {}
105-
body['amount_money']['amount'] = 100
105+
body['amount_money']['amount'] = 1000
106106
body['amount_money']['currency'] = 'USD'
107107
body['app_fee_money'] = {}
108-
body['app_fee_money']['amount'] = 114
109-
body['app_fee_money']['currency'] = 'GEL'
110-
body['payment_id'] = 'UNOE3kv2BZwqHlJ830RCt5YCuaB'
111-
body['reason'] = 'reason8'
108+
body['app_fee_money']['amount'] = 10
109+
body['app_fee_money']['currency'] = 'USD'
110+
body['payment_id'] = 'R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY'
111+
body['reason'] = 'Example'
112+
body['payment_version_token'] = 'payment_version_token6'
113+
body['team_member_id'] = 'team_member_id4'
112114

113115
result = refunds_api.refund_payment(body)
114116

doc/api/subscriptions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ body['idempotency_key'] = '8193148c-9586-11e6-99f9-28cfe92138cf'
5151
body['location_id'] = 'S8GWD5R9QB376'
5252
body['plan_id'] = '6JHXF3B2CW3YKHDV4XEM674H'
5353
body['customer_id'] = 'CHFGVKYY8RSV93M5KCYTG4PN0G'
54-
body['start_date'] = '2020-08-01'
54+
body['start_date'] = '2021-10-20'
5555
body['canceled_date'] = 'canceled_date0'
5656
body['tax_percentage'] = '5'
5757
body['price_override_money'] = {}
5858
body['price_override_money']['amount'] = 100
5959
body['price_override_money']['currency'] = 'USD'
6060
body['card_id'] = 'ccof:qy5x8hHGYsgLrp4Q4GB'
6161
body['timezone'] = 'America/Los_Angeles'
62+
body['source'] = {}
63+
body['source']['name'] = 'My App'
6264

6365
result = subscriptions_api.create_subscription(body)
6466

@@ -113,6 +115,7 @@ body['query'] = {}
113115
body['query']['filter'] = {}
114116
body['query']['filter']['customer_ids'] = ['CHFGVKYY8RSV93M5KCYTG4PN0G']
115117
body['query']['filter']['location_ids'] = ['S8GWD5R9QB376']
118+
body['query']['filter']['source_names'] = ['My App']
116119

117120
result = subscriptions_api.search_subscriptions(body)
118121

0 commit comments

Comments
 (0)