Skip to content

Commit 08831b2

Browse files
authored
Merge pull request #116 from square/release/29.0.0.20230720
Generated PR for Release: 29.0.0.20230720
2 parents 3f85a25 + b5e96b2 commit 08831b2

File tree

364 files changed

+2216
-2032
lines changed

Some content is hidden

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

364 files changed

+2216
-2032
lines changed

doc/api/customers.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def list_customers(self,
3535
cursor=None,
3636
limit=None,
3737
sort_field=None,
38-
sort_order=None)
38+
sort_order=None,
39+
count=False)
3940
```
4041

4142
## Parameters
@@ -46,6 +47,7 @@ def list_customers(self,
4647
| `limit` | `int` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>If the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
4748
| `sort_field` | [`str (Customer Sort Field)`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
4849
| `sort_order` | [`str (Sort Order)`](../../doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |
50+
| `count` | `bool` | Query, Optional | Indicates whether to return the total count of customers in the `count` field of the response.<br><br>The default value is `false`.<br>**Default**: `False` |
4951

5052
## Response Type
5153

@@ -54,7 +56,11 @@ def list_customers(self,
5456
## Example Usage
5557

5658
```python
57-
result = customers_api.list_customers()
59+
count = False
60+
61+
result = customers_api.list_customers(
62+
count
63+
)
5864
print(result)
5965

6066
if result.is_success():

doc/api/invoices.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ body = {
116116
'card': True,
117117
'square_gift_card': False,
118118
'bank_account': False,
119-
'buy_now_pay_later': False
119+
'buy_now_pay_later': False,
120+
'cash_app_pay': False
120121
},
121122
'custom_fields': [
122123
{

doc/api/refunds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def list_payment_refunds(self,
4040

4141
| Parameter | Type | Tags | Description |
4242
| --- | --- | --- | --- |
43-
| `begin_time` | `string` | Query, Optional | Indicates the start of the time range to retrieve each PaymentRefund`for, in RFC 3339 format. The range is determined using the`created_at`field for each`PaymentRefund`.<br><br>Default: The current time minus one year. |
43+
| `begin_time` | `string` | Query, Optional | Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time minus one year. |
4444
| `end_time` | `string` | Query, Optional | Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time. |
4545
| `sort_order` | `string` | Query, Optional | The order in which results are listed by `PaymentRefund.created_at`:<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
4646
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |

doc/api/subscriptions.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,19 @@ body = {
5555
'location_id': 'S8GWD5R9QB376',
5656
'customer_id': 'CHFGVKYY8RSV93M5KCYTG4PN0G',
5757
'idempotency_key': '8193148c-9586-11e6-99f9-28cfe92138cf',
58-
'plan_id': '6JHXF3B2CW3YKHDV4XEM674H',
59-
'start_date': '2021-10-20',
60-
'tax_percentage': '5',
61-
'price_override_money': {
62-
'amount': 100,
63-
'currency': 'USD'
64-
},
58+
'plan_variation_id': '6JHXF3B2CW3YKHDV4XEM674H',
59+
'start_date': '2023-06-20',
6560
'card_id': 'ccof:qy5x8hHGYsgLrp4Q4GB',
6661
'timezone': 'America/Los_Angeles',
6762
'source': {
68-
'name': 'My App'
69-
}
63+
'name': 'My Application'
64+
},
65+
'phases': [
66+
{
67+
'ordinal': 0,
68+
'order_template_id': 'U2NaowWxzXwpsZU697x7ZHOAnCNZY'
69+
}
70+
]
7071
}
7172

7273
result = subscriptions_api.create_subscription(body)
@@ -444,7 +445,15 @@ def swap_plan(self,
444445
```python
445446
subscription_id = 'subscription_id0'
446447

447-
body = {}
448+
body = {
449+
'new_plan_variation_id': 'FQ7CDXXWSLUJRPM3GFJSJGZ7',
450+
'phases': [
451+
{
452+
'ordinal': 0,
453+
'order_template_id': 'uhhnjH9osVv3shUADwaC0b3hNxQZY'
454+
}
455+
]
456+
}
448457

449458
result = subscriptions_api.swap_plan(
450459
subscription_id,

doc/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2023-06-08'` |
8+
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2023-07-20'` |
99
| `custom_url` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
@@ -25,7 +25,7 @@ The API client can be initialized as follows:
2525
```python
2626
from square.client import Client
2727
client = Client(
28-
square_version='2023-06-08',
28+
square_version='2023-07-20',
2929
access_token='AccessToken'
3030
)
3131
```
@@ -48,7 +48,7 @@ API calls return an `ApiResponse` object that includes the following fields:
4848
```python
4949
from square.client import Client
5050
client = Client(
51-
square_version='2023-06-08',
51+
square_version='2023-07-20',
5252
access_token='AccessToken'
5353
)
5454

doc/models/accept-dispute-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ Defines the fields in an `AcceptDispute` response.
4141
},
4242
"errors": [
4343
{
44-
"category": "AUTHENTICATION_ERROR",
45-
"code": "REFUND_ALREADY_PENDING",
44+
"category": "REFUND_ERROR",
45+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
4646
"detail": "detail1",
4747
"field": "field9"
4848
},
4949
{
50-
"category": "INVALID_REQUEST_ERROR",
51-
"code": "PAYMENT_NOT_REFUNDABLE",
50+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
51+
"code": "BAD_REQUEST",
5252
"detail": "detail2",
5353
"field": "field0"
5454
},
5555
{
56-
"category": "RATE_LIMIT_ERROR",
57-
"code": "REFUND_DECLINED",
56+
"category": "EXTERNAL_VENDOR_ERROR",
57+
"code": "MISSING_REQUIRED_PARAMETER",
5858
"detail": "detail3",
5959
"field": "field1"
6060
}

doc/models/accumulate-loyalty-points-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ Represents an [AccumulateLoyaltyPoints](../../doc/api/loyalty.md#accumulate-loya
5656
],
5757
"errors": [
5858
{
59-
"category": "AUTHENTICATION_ERROR",
60-
"code": "REFUND_ALREADY_PENDING",
59+
"category": "REFUND_ERROR",
60+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
6161
"detail": "detail1",
6262
"field": "field9"
6363
},
6464
{
65-
"category": "INVALID_REQUEST_ERROR",
66-
"code": "PAYMENT_NOT_REFUNDABLE",
65+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
66+
"code": "BAD_REQUEST",
6767
"detail": "detail2",
6868
"field": "field0"
6969
},
7070
{
71-
"category": "RATE_LIMIT_ERROR",
72-
"code": "REFUND_DECLINED",
71+
"category": "EXTERNAL_VENDOR_ERROR",
72+
"code": "MISSING_REQUIRED_PARAMETER",
7373
"detail": "detail3",
7474
"field": "field1"
7575
}

doc/models/add-group-to-customer-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ a request to the [AddGroupToCustomer](../../doc/api/customers.md#add-group-to-cu
2020
{
2121
"errors": [
2222
{
23-
"category": "AUTHENTICATION_ERROR",
24-
"code": "REFUND_ALREADY_PENDING",
23+
"category": "REFUND_ERROR",
24+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
2525
"detail": "detail1",
2626
"field": "field9"
2727
},
2828
{
29-
"category": "INVALID_REQUEST_ERROR",
30-
"code": "PAYMENT_NOT_REFUNDABLE",
29+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
30+
"code": "BAD_REQUEST",
3131
"detail": "detail2",
3232
"field": "field0"
3333
},
3434
{
35-
"category": "RATE_LIMIT_ERROR",
36-
"code": "REFUND_DECLINED",
35+
"category": "EXTERNAL_VENDOR_ERROR",
36+
"code": "MISSING_REQUIRED_PARAMETER",
3737
"detail": "detail3",
3838
"field": "field1"
3939
}

doc/models/additional-recipient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Represents an additional recipient (other than the merchant) receiving a portion
2424
"description": "description0",
2525
"amount_money": {
2626
"amount": 186,
27-
"currency": "NGN"
27+
"currency": "TZS"
2828
},
2929
"receivable_id": "receivable_id0"
3030
}

doc/models/adjust-loyalty-points-response.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ Represents an [AdjustLoyaltyPoints](../../doc/api/loyalty.md#adjust-loyalty-poin
5252
},
5353
"errors": [
5454
{
55-
"category": "AUTHENTICATION_ERROR",
56-
"code": "REFUND_ALREADY_PENDING",
55+
"category": "REFUND_ERROR",
56+
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
5757
"detail": "detail1",
5858
"field": "field9"
5959
},
6060
{
61-
"category": "INVALID_REQUEST_ERROR",
62-
"code": "PAYMENT_NOT_REFUNDABLE",
61+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
62+
"code": "BAD_REQUEST",
6363
"detail": "detail2",
6464
"field": "field0"
6565
},
6666
{
67-
"category": "RATE_LIMIT_ERROR",
68-
"code": "REFUND_DECLINED",
67+
"category": "EXTERNAL_VENDOR_ERROR",
68+
"code": "MISSING_REQUIRED_PARAMETER",
6969
"detail": "detail3",
7070
"field": "field1"
7171
}

0 commit comments

Comments
 (0)