You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api/payments.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,10 @@ def list_payments(self,
41
41
limit=None,
42
42
is_offline_payment=False,
43
43
offline_begin_time=None,
44
-
offline_end_time=None)
44
+
offline_end_time=None,
45
+
updated_at_begin_time=None,
46
+
updated_at_end_time=None,
47
+
sort_field=None)
45
48
```
46
49
47
50
## Parameters
@@ -50,7 +53,7 @@ def list_payments(self,
50
53
| --- | --- | --- | --- |
51
54
|`begin_time`|`str`| Query, Optional | Indicates the start of the time range to retrieve payments for, in RFC 3339 format. <br>The range is determined using the `created_at` field for each Payment.<br>Inclusive. Default: The current time minus one year. |
52
55
|`end_time`|`str`| Query, Optional | Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The<br>range is determined using the `created_at` field for each Payment.<br><br>Default: The current time. |
53
-
|`sort_order`|`str`| Query, Optional | The order in which results are listed by `Payment.created_at`:<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
56
+
|`sort_order`|`str`| Query, Optional | The order in which results are listed by `ListPaymentsRequest.sort_field`:<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
54
57
|`cursor`|`str`| 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). |
55
58
|`location_id`|`str`| Query, Optional | Limit results to the location supplied. By default, results are returned<br>for the default (main) location associated with the seller. |
56
59
|`total`|`long\|int`| Query, Optional | The exact amount in the `total_money` for a payment. |
@@ -60,6 +63,9 @@ def list_payments(self,
60
63
|`is_offline_payment`|`bool`| Query, Optional | Whether the payment was taken offline or not.<br>**Default**: `False`|
61
64
|`offline_begin_time`|`str`| Query, Optional | Indicates the start of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |
62
65
|`offline_end_time`|`str`| Query, Optional | Indicates the end of the time range for which to retrieve offline payments, in RFC 3339<br>format for timestamps. The range is determined using the<br>`offline_payment_details.client_created_at` field for each Payment. If set, payments without a<br>value set in `offline_payment_details.client_created_at` will not be returned.<br><br>Default: The current time. |
66
+
|`updated_at_begin_time`|`str`| Query, Optional | Indicates the start of the time range to retrieve payments for, in RFC 3339 format. The<br>range is determined using the `updated_at` field for each Payment. |
67
+
|`updated_at_end_time`|`str`| Query, Optional | Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The<br>range is determined using the `updated_at` field for each Payment. |
68
+
|`sort_field`|[`str (Payment Sort Field)`](../../doc/models/payment-sort-field.md)| Query, Optional | The field used to sort results by. The default is `CREATED_AT`. |
*[Search Team Members](../../doc/api/team.md#search-team-members)
17
21
*[Retrieve Team Member](../../doc/api/team.md#retrieve-team-member)
18
22
*[Update Team Member](../../doc/api/team.md#update-team-member)
@@ -63,6 +67,28 @@ body = {
63
67
'YSGH2WBKG94QZ',
64
68
'GA2Y9HSJ8KRYT'
65
69
]
70
+
},
71
+
'wage_setting': {
72
+
'job_assignments': [
73
+
{
74
+
'pay_type': 'SALARY',
75
+
'annual_rate': {
76
+
'amount': 3000000,
77
+
'currency': 'USD'
78
+
},
79
+
'weekly_hours': 40,
80
+
'job_id': 'FjS8x95cqHiMenw4f1NAUH4P'
81
+
},
82
+
{
83
+
'pay_type': 'HOURLY',
84
+
'hourly_rate': {
85
+
'amount': 2000,
86
+
'currency': 'USD'
87
+
},
88
+
'job_id': 'VDNpRv8da51NU8qZFC5zDWpF'
89
+
}
90
+
],
91
+
'is_overtime_exempt': True
66
92
}
67
93
}
68
94
}
@@ -215,13 +241,162 @@ elif result.is_error():
215
241
```
216
242
217
243
244
+
# List Jobs
245
+
246
+
Lists jobs in a seller account. Results are sorted by title in ascending order.
247
+
248
+
```python
249
+
deflist_jobs(self,
250
+
cursor=None)
251
+
```
252
+
253
+
## Parameters
254
+
255
+
| Parameter | Type | Tags | Description |
256
+
| --- | --- | --- | --- |
257
+
|`cursor`|`str`| Query, Optional | The pagination cursor returned by the previous call to this endpoint. Provide this<br>cursor to retrieve the next page of results for your original request. For more information,<br>see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
258
+
259
+
## Response Type
260
+
261
+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`List Jobs Response`](../../doc/models/list-jobs-response.md).
262
+
263
+
## Example Usage
264
+
265
+
```python
266
+
result = team_api.list_jobs()
267
+
268
+
if result.is_success():
269
+
print(result.body)
270
+
elif result.is_error():
271
+
print(result.errors)
272
+
```
273
+
274
+
275
+
# Create Job
276
+
277
+
Creates a job in a seller account. A job defines a title and tip eligibility. Note that
278
+
compensation is defined in a [job assignment](../../doc/models/job-assignment.md) in a team member's wage setting.
279
+
280
+
```python
281
+
defcreate_job(self,
282
+
body)
283
+
```
284
+
285
+
## Parameters
286
+
287
+
| Parameter | Type | Tags | Description |
288
+
| --- | --- | --- | --- |
289
+
|`body`|[`Create Job Request`](../../doc/models/create-job-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
290
+
291
+
## Response Type
292
+
293
+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Create Job Response`](../../doc/models/create-job-response.md).
294
+
295
+
## Example Usage
296
+
297
+
```python
298
+
body = {
299
+
'job': {
300
+
'title': 'Cashier',
301
+
'is_tip_eligible': True
302
+
},
303
+
'idempotency_key': 'idempotency-key-0'
304
+
}
305
+
306
+
result = team_api.create_job(body)
307
+
308
+
if result.is_success():
309
+
print(result.body)
310
+
elif result.is_error():
311
+
print(result.errors)
312
+
```
313
+
314
+
315
+
# Retrieve Job
316
+
317
+
Retrieves a specified job.
318
+
319
+
```python
320
+
defretrieve_job(self,
321
+
job_id)
322
+
```
323
+
324
+
## Parameters
325
+
326
+
| Parameter | Type | Tags | Description |
327
+
| --- | --- | --- | --- |
328
+
|`job_id`|`str`| Template, Required | The ID of the job to retrieve. |
329
+
330
+
## Response Type
331
+
332
+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Retrieve Job Response`](../../doc/models/retrieve-job-response.md).
333
+
334
+
## Example Usage
335
+
336
+
```python
337
+
job_id ='job_id2'
338
+
339
+
result = team_api.retrieve_job(job_id)
340
+
341
+
if result.is_success():
342
+
print(result.body)
343
+
elif result.is_error():
344
+
print(result.errors)
345
+
```
346
+
347
+
348
+
# Update Job
349
+
350
+
Updates the title or tip eligibility of a job. Changes to the title propagate to all
351
+
`JobAssignment`, `Shift`, and `TeamMemberWage` objects that reference the job ID. Changes to
352
+
tip eligibility propagate to all `TeamMemberWage` objects that reference the job ID.
353
+
354
+
```python
355
+
defupdate_job(self,
356
+
job_id,
357
+
body)
358
+
```
359
+
360
+
## Parameters
361
+
362
+
| Parameter | Type | Tags | Description |
363
+
| --- | --- | --- | --- |
364
+
|`job_id`|`str`| Template, Required | The ID of the job to update. |
365
+
|`body`|[`Update Job Request`](../../doc/models/update-job-request.md)| Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
366
+
367
+
## Response Type
368
+
369
+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Update Job Response`](../../doc/models/update-job-response.md).
370
+
371
+
## Example Usage
372
+
373
+
```python
374
+
job_id ='job_id2'
375
+
376
+
body = {
377
+
'job': {
378
+
'title': 'Cashier 1',
379
+
'is_tip_eligible': True
380
+
}
381
+
}
382
+
383
+
result = team_api.update_job(
384
+
job_id,
385
+
body
386
+
)
387
+
388
+
if result.is_success():
389
+
print(result.body)
390
+
elif result.is_error():
391
+
print(result.errors)
392
+
```
393
+
394
+
218
395
# Search Team Members
219
396
220
397
Returns a paginated list of `TeamMember` objects for a business.
221
-
The list can be filtered by the following:
222
-
223
-
- location IDs
224
-
-`status`
398
+
The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, or whether
399
+
the team member is the Square account owner.
225
400
226
401
```python
227
402
defsearch_team_members(self,
@@ -356,8 +531,11 @@ elif result.is_error():
356
531
# Retrieve Wage Setting
357
532
358
533
Retrieves a `WageSetting` object for a team member specified
359
-
by `TeamMember.id`.
360
-
Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting).
534
+
by `TeamMember.id`. For more information, see
535
+
[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting).
536
+
537
+
Square recommends using [RetrieveTeamMember](../../doc/api/team.md#retrieve-team-member) or [SearchTeamMembers](../../doc/api/team.md#search-team-members)
538
+
to get this information directly from the `TeamMember.wage_setting` field.
361
539
362
540
```python
363
541
defretrieve_wage_setting(self,
@@ -391,10 +569,13 @@ elif result.is_error():
391
569
# Update Wage Setting
392
570
393
571
Creates or updates a `WageSetting` object. The object is created if a
394
-
`WageSetting` with the specified `team_member_id`does not exist. Otherwise,
572
+
`WageSetting` with the specified `team_member_id`doesn't exist. Otherwise,
395
573
it fully replaces the `WageSetting` object for the team member.
396
-
The `WageSetting` is returned on a successful update.
397
-
Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting).
574
+
The `WageSetting` is returned on a successful update. For more information, see
575
+
[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting).
576
+
577
+
Square recommends using [CreateTeamMember](../../doc/api/team.md#create-team-member) or [UpdateTeamMember](../../doc/api/team.md#update-team-member)
578
+
to manage the `TeamMember.wage_setting` field directly.
Copy file name to clipboardExpand all lines: doc/client.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
5
5
6
6
| Parameter | Type | Description |
7
7
| --- | --- | --- |
8
-
|`square_version`|`str`| Square Connect API versions<br>*Default*: `'2024-11-20'`|
8
+
|`square_version`|`str`| Square Connect API versions<br>*Default*: `'2024-12-18'`|
9
9
|`custom_url`|`str`| Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'`|
10
10
|`environment`|`string`| The API environment. <br> **Default: `production`**|
11
11
|`http_client_instance`|`HttpClient`| The Http Client passed from the sdk user for making requests |
@@ -24,7 +24,7 @@ The API client can be initialized as follows:
24
24
25
25
```python
26
26
client = Client(
27
-
square_version='2024-11-20',
27
+
square_version='2024-12-18',
28
28
bearer_auth_credentials=BearerAuthCredentials(
29
29
access_token='AccessToken'
30
30
),
@@ -53,7 +53,7 @@ from square.http.auth.o_auth_2 import BearerAuthCredentials
Copy file name to clipboardExpand all lines: doc/models/bulk-create-team-members-request.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Represents a bulk create request for `TeamMember` objects.
11
11
12
12
| Name | Type | Tags | Description |
13
13
| --- | --- | --- | --- |
14
-
|`team_members`|[`Dict Str Create Team Member Request`](../../doc/models/create-team-member-request.md)| Required | The data used to create the `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.The maximum number of create objects is 25. |
14
+
|`team_members`|[`Dict Str Create Team Member Request`](../../doc/models/create-team-member-request.md)| Required | The data used to create the `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.<br>The maximum number of create objects is 25.<br><br>If you include a team member's `wage_setting`, you must provide `job_id` for each job assignment. To get job IDs,<br>call [ListJobs](api-endpoint:Team-ListJobs). |
0 commit comments