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
|`begin_time`|`String`| 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. |
51
54
|`end_time`|`String`| 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. |
52
-
|`sort_order`|`String`| 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). |
55
+
|`sort_order`|`String`| 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). |
53
56
|`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). |
54
57
|`location_id`|`String`| Query, Optional | Limit results to the location supplied. By default, results are returned<br>for the default (main) location associated with the seller. |
55
58
|`total`|`Integer`| Query, Optional | The exact amount in the `total_money` for a payment. |
|`is_offline_payment`|`TrueClass \| FalseClass`| Query, Optional | Whether the payment was taken offline or not.<br>**Default**: `false`|
60
63
|`offline_begin_time`|`String`| 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. |
61
64
|`offline_end_time`|`String`| 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. |
65
+
|`updated_at_begin_time`|`String`| 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. |
66
+
|`updated_at_end_time`|`String`| 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. |
67
+
|`sort_field`|[`String (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)
@@ -62,6 +66,28 @@ body = {
62
66
'YSGH2WBKG94QZ',
63
67
'GA2Y9HSJ8KRYT'
64
68
]
69
+
},
70
+
:wage_setting => {
71
+
:job_assignments => [
72
+
{
73
+
:pay_type => 'SALARY',
74
+
:annual_rate => {
75
+
:amount => 3000000,
76
+
:currency => 'USD'
77
+
},
78
+
:weekly_hours => 40,
79
+
:job_id => 'FjS8x95cqHiMenw4f1NAUH4P'
80
+
},
81
+
{
82
+
:pay_type => 'HOURLY',
83
+
:hourly_rate => {
84
+
:amount => 2000,
85
+
:currency => 'USD'
86
+
},
87
+
:job_id => 'VDNpRv8da51NU8qZFC5zDWpF'
88
+
}
89
+
],
90
+
:is_overtime_exempt => true
65
91
}
66
92
}
67
93
}
@@ -218,13 +244,165 @@ end
218
244
```
219
245
220
246
247
+
# List Jobs
248
+
249
+
Lists jobs in a seller account. Results are sorted by title in ascending order.
250
+
251
+
```ruby
252
+
deflist_jobs(cursor:nil)
253
+
```
254
+
255
+
## Parameters
256
+
257
+
| Parameter | Type | Tags | Description |
258
+
| --- | --- | --- | --- |
259
+
|`cursor`|`String`| 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). |
260
+
261
+
## Response Type
262
+
263
+
This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`List Jobs Response Hash`](../../doc/models/list-jobs-response.md).
264
+
265
+
## Example Usage
266
+
267
+
```ruby
268
+
result = team_api.list_jobs
269
+
270
+
if result.success?
271
+
puts result.data
272
+
elsif result.error?
273
+
warn result.errors
274
+
end
275
+
```
276
+
277
+
278
+
# Create Job
279
+
280
+
Creates a job in a seller account. A job defines a title and tip eligibility. Note that
281
+
compensation is defined in a [job assignment](../../doc/models/job-assignment.md) in a team member's wage setting.
282
+
283
+
```ruby
284
+
defcreate_job(body:)
285
+
```
286
+
287
+
## Parameters
288
+
289
+
| Parameter | Type | Tags | Description |
290
+
| --- | --- | --- | --- |
291
+
|`body`|[`Create Job Request Hash`](../../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. |
292
+
293
+
## Response Type
294
+
295
+
This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Create Job Response Hash`](../../doc/models/create-job-response.md).
296
+
297
+
## Example Usage
298
+
299
+
```ruby
300
+
body = {
301
+
:job => {
302
+
:title => 'Cashier',
303
+
:is_tip_eligible => true
304
+
},
305
+
:idempotency_key => 'idempotency-key-0'
306
+
}
307
+
308
+
309
+
result = team_api.create_job(body: body)
310
+
311
+
if result.success?
312
+
puts result.data
313
+
elsif result.error?
314
+
warn result.errors
315
+
end
316
+
```
317
+
318
+
319
+
# Retrieve Job
320
+
321
+
Retrieves a specified job.
322
+
323
+
```ruby
324
+
defretrieve_job(job_id:)
325
+
```
326
+
327
+
## Parameters
328
+
329
+
| Parameter | Type | Tags | Description |
330
+
| --- | --- | --- | --- |
331
+
|`job_id`|`String`| Template, Required | The ID of the job to retrieve. |
332
+
333
+
## Response Type
334
+
335
+
This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Retrieve Job Response Hash`](../../doc/models/retrieve-job-response.md).
336
+
337
+
## Example Usage
338
+
339
+
```ruby
340
+
job_id ='job_id2'
341
+
342
+
343
+
result = team_api.retrieve_job(job_id: job_id)
344
+
345
+
if result.success?
346
+
puts result.data
347
+
elsif result.error?
348
+
warn result.errors
349
+
end
350
+
```
351
+
352
+
353
+
# Update Job
354
+
355
+
Updates the title or tip eligibility of a job. Changes to the title propagate to all
356
+
`JobAssignment`, `Shift`, and `TeamMemberWage` objects that reference the job ID. Changes to
357
+
tip eligibility propagate to all `TeamMemberWage` objects that reference the job ID.
358
+
359
+
```ruby
360
+
defupdate_job(job_id:,
361
+
body:)
362
+
```
363
+
364
+
## Parameters
365
+
366
+
| Parameter | Type | Tags | Description |
367
+
| --- | --- | --- | --- |
368
+
|`job_id`|`String`| Template, Required | The ID of the job to update. |
369
+
|`body`|[`Update Job Request Hash`](../../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. |
370
+
371
+
## Response Type
372
+
373
+
This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Update Job Response Hash`](../../doc/models/update-job-response.md).
374
+
375
+
## Example Usage
376
+
377
+
```ruby
378
+
job_id ='job_id2'
379
+
380
+
body = {
381
+
:job => {
382
+
:title => 'Cashier 1',
383
+
:is_tip_eligible => true
384
+
}
385
+
}
386
+
387
+
388
+
result = team_api.update_job(
389
+
job_id: job_id,
390
+
body: body
391
+
)
392
+
393
+
if result.success?
394
+
puts result.data
395
+
elsif result.error?
396
+
warn result.errors
397
+
end
398
+
```
399
+
400
+
221
401
# Search Team Members
222
402
223
403
Returns a paginated list of `TeamMember` objects for a business.
224
-
The list can be filtered by the following:
225
-
226
-
- location IDs
227
-
-`status`
404
+
The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, or whether
405
+
the team member is the Square account owner.
228
406
229
407
```ruby
230
408
defsearch_team_members(body:)
@@ -362,8 +540,11 @@ end
362
540
# Retrieve Wage Setting
363
541
364
542
Retrieves a `WageSetting` object for a team member specified
365
-
by `TeamMember.id`.
366
-
Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting).
543
+
by `TeamMember.id`. For more information, see
544
+
[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting).
545
+
546
+
Square recommends using [RetrieveTeamMember](../../doc/api/team.md#retrieve-team-member) or [SearchTeamMembers](../../doc/api/team.md#search-team-members)
547
+
to get this information directly from the `TeamMember.wage_setting` field.
367
548
368
549
```ruby
369
550
defretrieve_wage_setting(team_member_id:)
@@ -398,10 +579,13 @@ end
398
579
# Update Wage Setting
399
580
400
581
Creates or updates a `WageSetting` object. The object is created if a
401
-
`WageSetting` with the specified `team_member_id`does not exist. Otherwise,
582
+
`WageSetting` with the specified `team_member_id`doesn't exist. Otherwise,
402
583
it fully replaces the `WageSetting` object for the team member.
403
-
The `WageSetting` is returned on a successful update.
404
-
Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting).
584
+
The `WageSetting` is returned on a successful update. For more information, see
585
+
[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting).
586
+
587
+
Square recommends using [CreateTeamMember](../../doc/api/team.md#create-team-member) or [UpdateTeamMember](../../doc/api/team.md#update-team-member)
588
+
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
Display the source diff
Display the rich diff
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`|`String`| Square Connect API versions<br>*Default*: `'2024-11-20'`|
8
+
|`square_version`|`String`| Square Connect API versions<br>*Default*: `'2024-12-18'`|
9
9
|`custom_url`|`String`| 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
|`connection`|`Faraday::Connection`| The Faraday connection object passed by the SDK user for making requests |
@@ -25,7 +25,7 @@ The API client can be initialized as follows:
Copy file name to clipboardExpand all lines: doc/models/bulk-create-team-members-request.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
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`|[`Hash String Create Team Member Request Hash`](../../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`|[`Hash String Create Team Member Request Hash`](../../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