This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
/
V1EmployeesApi.cs
3558 lines (3126 loc) · 238 KB
/
V1EmployeesApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Square Connect API
*
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: developers@squareup.com
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using Square.Connect.Client;
using Square.Connect.Model;
namespace Square.Connect.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IV1EmployeesApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// CreateEmployee
/// </summary>
/// <remarks>
/// Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1Employee</returns>
V1Employee CreateEmployee (V1Employee body);
/// <summary>
/// CreateEmployee
/// </summary>
/// <remarks>
/// Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1Employee</returns>
ApiResponse<V1Employee> CreateEmployeeWithHttpInfo (V1Employee body);
/// <summary>
/// CreateEmployeeRole
/// </summary>
/// <remarks>
/// Creates an employee role you can then assign to employees. Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a \"Shift Manager\" role might be able to issue refunds in Square Point of Sale, whereas an employee with a \"Clerk\" role might not. Roles are assigned with the [V1UpdateEmployee](#endpoint-v1updateemployee) endpoint. An employee can have only one role at a time. If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeRole">An EmployeeRole object with a name and permissions, and an optional owner flag.</param>
/// <returns>V1EmployeeRole</returns>
V1EmployeeRole CreateEmployeeRole (V1EmployeeRole employeeRole);
/// <summary>
/// CreateEmployeeRole
/// </summary>
/// <remarks>
/// Creates an employee role you can then assign to employees. Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a \"Shift Manager\" role might be able to issue refunds in Square Point of Sale, whereas an employee with a \"Clerk\" role might not. Roles are assigned with the [V1UpdateEmployee](#endpoint-v1updateemployee) endpoint. An employee can have only one role at a time. If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeRole">An EmployeeRole object with a name and permissions, and an optional owner flag.</param>
/// <returns>ApiResponse of V1EmployeeRole</returns>
ApiResponse<V1EmployeeRole> CreateEmployeeRoleWithHttpInfo (V1EmployeeRole employeeRole);
/// <summary>
/// CreateTimecard
/// </summary>
/// <remarks>
/// Creates a timecard for an employee and clocks them in with an `API_CREATE` event and a `clockin_time` set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the `clockin_time` and* `clockout_time` in the request. Timecards correspond to exactly one shift for a given employee, bounded by the `clockin_time` and `clockout_time` fields. An employee is considered clocked in if they have a timecard that doesn't have a `clockout_time` set. An employee that is currently clocked in cannot be clocked in a second time.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1Timecard</returns>
V1Timecard CreateTimecard (V1Timecard body);
/// <summary>
/// CreateTimecard
/// </summary>
/// <remarks>
/// Creates a timecard for an employee and clocks them in with an `API_CREATE` event and a `clockin_time` set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the `clockin_time` and* `clockout_time` in the request. Timecards correspond to exactly one shift for a given employee, bounded by the `clockin_time` and `clockout_time` fields. An employee is considered clocked in if they have a timecard that doesn't have a `clockout_time` set. An employee that is currently clocked in cannot be clocked in a second time.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1Timecard</returns>
ApiResponse<V1Timecard> CreateTimecardWithHttpInfo (V1Timecard body);
/// <summary>
/// DeleteTimecard
/// </summary>
/// <remarks>
/// Deletes a timecard. Timecards can also be deleted through the Square Dashboard. Deleted timecards are still accessible through Connect API endpoints, but cannot be modified. The `deleted` field of the `Timecard` object indicates whether the timecard has been deleted. *Note**: By default, deleted timecards appear alongside valid timecards in results returned by the [ListTimecards](#endpoint-v1employees-listtimecards) endpoint. To filter deleted timecards, include the `deleted` query parameter in the list request. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to delete.</param>
/// <returns>Object</returns>
Object DeleteTimecard (string timecardId);
/// <summary>
/// DeleteTimecard
/// </summary>
/// <remarks>
/// Deletes a timecard. Timecards can also be deleted through the Square Dashboard. Deleted timecards are still accessible through Connect API endpoints, but cannot be modified. The `deleted` field of the `Timecard` object indicates whether the timecard has been deleted. *Note**: By default, deleted timecards appear alongside valid timecards in results returned by the [ListTimecards](#endpoint-v1employees-listtimecards) endpoint. To filter deleted timecards, include the `deleted` query parameter in the list request. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to delete.</param>
/// <returns>ApiResponse of Object</returns>
ApiResponse<Object> DeleteTimecardWithHttpInfo (string timecardId);
/// <summary>
/// ListCashDrawerShifts
/// </summary>
/// <remarks>
/// Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="order">The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. (optional)</param>
/// <param name="endTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. (optional)</param>
/// <returns>List<V1CashDrawerShift></returns>
List<V1CashDrawerShift> ListCashDrawerShifts (string locationId, string order = null, string beginTime = null, string endTime = null);
/// <summary>
/// ListCashDrawerShifts
/// </summary>
/// <remarks>
/// Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="order">The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. (optional)</param>
/// <param name="endTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. (optional)</param>
/// <returns>ApiResponse of List<V1CashDrawerShift></returns>
ApiResponse<List<V1CashDrawerShift>> ListCashDrawerShiftsWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null);
/// <summary>
/// ListEmployeeRoles
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee roles.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field.Default value: ASC (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>List<V1EmployeeRole></returns>
List<V1EmployeeRole> ListEmployeeRoles (string order = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployeeRoles
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee roles.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field.Default value: ASC (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>ApiResponse of List<V1EmployeeRole></returns>
ApiResponse<List<V1EmployeeRole>> ListEmployeeRolesWithHttpInfo (string order = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployees
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employees.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format (optional)</param>
/// <param name="endUpdatedAt">If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginCreatedAt">If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endCreatedAt">If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="status">If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). (optional)</param>
/// <param name="externalId">If provided, the endpoint returns only employee entities with the specified external_id. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>List<V1Employee></returns>
List<V1Employee> ListEmployees (string order = null, string beginUpdatedAt = null, string endUpdatedAt = null, string beginCreatedAt = null, string endCreatedAt = null, string status = null, string externalId = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployees
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employees.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format (optional)</param>
/// <param name="endUpdatedAt">If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginCreatedAt">If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endCreatedAt">If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="status">If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). (optional)</param>
/// <param name="externalId">If provided, the endpoint returns only employee entities with the specified external_id. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>ApiResponse of List<V1Employee></returns>
ApiResponse<List<V1Employee>> ListEmployeesWithHttpInfo (string order = null, string beginUpdatedAt = null, string endUpdatedAt = null, string beginCreatedAt = null, string endCreatedAt = null, string status = null, string externalId = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListTimecardEvents
/// </summary>
/// <remarks>
/// Provides summary information for all events associated with a particular timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to list events for.</param>
/// <returns>List<V1TimecardEvent></returns>
List<V1TimecardEvent> ListTimecardEvents (string timecardId);
/// <summary>
/// ListTimecardEvents
/// </summary>
/// <remarks>
/// Provides summary information for all events associated with a particular timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to list events for.</param>
/// <returns>ApiResponse of List<V1TimecardEvent></returns>
ApiResponse<List<V1TimecardEvent>> ListTimecardEventsWithHttpInfo (string timecardId);
/// <summary>
/// ListTimecards
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee timecards.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which timecards are listed in the response, based on their created_at field. (optional)</param>
/// <param name="employeeId">If provided, the endpoint returns only timecards for the employee with the specified ID. (optional)</param>
/// <param name="beginClockinTime">If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockinTime">If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginClockoutTime">If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockoutTime">If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endUpdatedAt">If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="deleted">If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>List<V1Timecard></returns>
List<V1Timecard> ListTimecards (string order = null, string employeeId = null, string beginClockinTime = null, string endClockinTime = null, string beginClockoutTime = null, string endClockoutTime = null, string beginUpdatedAt = null, string endUpdatedAt = null, bool? deleted = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListTimecards
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee timecards.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which timecards are listed in the response, based on their created_at field. (optional)</param>
/// <param name="employeeId">If provided, the endpoint returns only timecards for the employee with the specified ID. (optional)</param>
/// <param name="beginClockinTime">If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockinTime">If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginClockoutTime">If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockoutTime">If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endUpdatedAt">If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="deleted">If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>ApiResponse of List<V1Timecard></returns>
ApiResponse<List<V1Timecard>> ListTimecardsWithHttpInfo (string order = null, string employeeId = null, string beginClockinTime = null, string endClockinTime = null, string beginClockoutTime = null, string endClockoutTime = null, string beginUpdatedAt = null, string endUpdatedAt = null, bool? deleted = null, int? limit = null, string batchToken = null);
/// <summary>
/// RetrieveCashDrawerShift
/// </summary>
/// <remarks>
/// Provides the details for a single cash drawer shift, including all events that occurred during the shift.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="shiftId">The shift's ID.</param>
/// <returns>V1CashDrawerShift</returns>
V1CashDrawerShift RetrieveCashDrawerShift (string locationId, string shiftId);
/// <summary>
/// RetrieveCashDrawerShift
/// </summary>
/// <remarks>
/// Provides the details for a single cash drawer shift, including all events that occurred during the shift.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="shiftId">The shift's ID.</param>
/// <returns>ApiResponse of V1CashDrawerShift</returns>
ApiResponse<V1CashDrawerShift> RetrieveCashDrawerShiftWithHttpInfo (string locationId, string shiftId);
/// <summary>
/// RetrieveEmployee
/// </summary>
/// <remarks>
/// Provides the details for a single employee.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The employee's ID.</param>
/// <returns>V1Employee</returns>
V1Employee RetrieveEmployee (string employeeId);
/// <summary>
/// RetrieveEmployee
/// </summary>
/// <remarks>
/// Provides the details for a single employee.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The employee's ID.</param>
/// <returns>ApiResponse of V1Employee</returns>
ApiResponse<V1Employee> RetrieveEmployeeWithHttpInfo (string employeeId);
/// <summary>
/// RetrieveEmployeeRole
/// </summary>
/// <remarks>
/// Provides the details for a single employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The role's ID.</param>
/// <returns>V1EmployeeRole</returns>
V1EmployeeRole RetrieveEmployeeRole (string roleId);
/// <summary>
/// RetrieveEmployeeRole
/// </summary>
/// <remarks>
/// Provides the details for a single employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The role's ID.</param>
/// <returns>ApiResponse of V1EmployeeRole</returns>
ApiResponse<V1EmployeeRole> RetrieveEmployeeRoleWithHttpInfo (string roleId);
/// <summary>
/// RetrieveTimecard
/// </summary>
/// <remarks>
/// Provides the details for a single timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The timecard's ID.</param>
/// <returns>V1Timecard</returns>
V1Timecard RetrieveTimecard (string timecardId);
/// <summary>
/// RetrieveTimecard
/// </summary>
/// <remarks>
/// Provides the details for a single timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The timecard's ID.</param>
/// <returns>ApiResponse of V1Timecard</returns>
ApiResponse<V1Timecard> RetrieveTimecardWithHttpInfo (string timecardId);
/// <summary>
/// UpdateEmployee
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1Employee</returns>
V1Employee UpdateEmployee (string employeeId, V1Employee body);
/// <summary>
/// UpdateEmployee
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1Employee</returns>
ApiResponse<V1Employee> UpdateEmployeeWithHttpInfo (string employeeId, V1Employee body);
/// <summary>
/// UpdateEmployeeRole
/// </summary>
/// <remarks>
/// Modifies the details of an employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1EmployeeRole</returns>
V1EmployeeRole UpdateEmployeeRole (string roleId, V1EmployeeRole body);
/// <summary>
/// UpdateEmployeeRole
/// </summary>
/// <remarks>
/// Modifies the details of an employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1EmployeeRole</returns>
ApiResponse<V1EmployeeRole> UpdateEmployeeRoleWithHttpInfo (string roleId, V1EmployeeRole body);
/// <summary>
/// UpdateTimecard
/// </summary>
/// <remarks>
/// Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">TThe ID of the timecard to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1Timecard</returns>
V1Timecard UpdateTimecard (string timecardId, V1Timecard body);
/// <summary>
/// UpdateTimecard
/// </summary>
/// <remarks>
/// Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">TThe ID of the timecard to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1Timecard</returns>
ApiResponse<V1Timecard> UpdateTimecardWithHttpInfo (string timecardId, V1Timecard body);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// CreateEmployee
/// </summary>
/// <remarks>
/// Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of V1Employee</returns>
System.Threading.Tasks.Task<V1Employee> CreateEmployeeAsync (V1Employee body);
/// <summary>
/// CreateEmployee
/// </summary>
/// <remarks>
/// Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of ApiResponse (V1Employee)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Employee>> CreateEmployeeAsyncWithHttpInfo (V1Employee body);
/// <summary>
/// CreateEmployeeRole
/// </summary>
/// <remarks>
/// Creates an employee role you can then assign to employees. Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a \"Shift Manager\" role might be able to issue refunds in Square Point of Sale, whereas an employee with a \"Clerk\" role might not. Roles are assigned with the [V1UpdateEmployee](#endpoint-v1updateemployee) endpoint. An employee can have only one role at a time. If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeRole">An EmployeeRole object with a name and permissions, and an optional owner flag.</param>
/// <returns>Task of V1EmployeeRole</returns>
System.Threading.Tasks.Task<V1EmployeeRole> CreateEmployeeRoleAsync (V1EmployeeRole employeeRole);
/// <summary>
/// CreateEmployeeRole
/// </summary>
/// <remarks>
/// Creates an employee role you can then assign to employees. Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a \"Shift Manager\" role might be able to issue refunds in Square Point of Sale, whereas an employee with a \"Clerk\" role might not. Roles are assigned with the [V1UpdateEmployee](#endpoint-v1updateemployee) endpoint. An employee can have only one role at a time. If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeRole">An EmployeeRole object with a name and permissions, and an optional owner flag.</param>
/// <returns>Task of ApiResponse (V1EmployeeRole)</returns>
System.Threading.Tasks.Task<ApiResponse<V1EmployeeRole>> CreateEmployeeRoleAsyncWithHttpInfo (V1EmployeeRole employeeRole);
/// <summary>
/// CreateTimecard
/// </summary>
/// <remarks>
/// Creates a timecard for an employee and clocks them in with an `API_CREATE` event and a `clockin_time` set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the `clockin_time` and* `clockout_time` in the request. Timecards correspond to exactly one shift for a given employee, bounded by the `clockin_time` and `clockout_time` fields. An employee is considered clocked in if they have a timecard that doesn't have a `clockout_time` set. An employee that is currently clocked in cannot be clocked in a second time.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of V1Timecard</returns>
System.Threading.Tasks.Task<V1Timecard> CreateTimecardAsync (V1Timecard body);
/// <summary>
/// CreateTimecard
/// </summary>
/// <remarks>
/// Creates a timecard for an employee and clocks them in with an `API_CREATE` event and a `clockin_time` set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the `clockin_time` and* `clockout_time` in the request. Timecards correspond to exactly one shift for a given employee, bounded by the `clockin_time` and `clockout_time` fields. An employee is considered clocked in if they have a timecard that doesn't have a `clockout_time` set. An employee that is currently clocked in cannot be clocked in a second time.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of ApiResponse (V1Timecard)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Timecard>> CreateTimecardAsyncWithHttpInfo (V1Timecard body);
/// <summary>
/// DeleteTimecard
/// </summary>
/// <remarks>
/// Deletes a timecard. Timecards can also be deleted through the Square Dashboard. Deleted timecards are still accessible through Connect API endpoints, but cannot be modified. The `deleted` field of the `Timecard` object indicates whether the timecard has been deleted. *Note**: By default, deleted timecards appear alongside valid timecards in results returned by the [ListTimecards](#endpoint-v1employees-listtimecards) endpoint. To filter deleted timecards, include the `deleted` query parameter in the list request. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to delete.</param>
/// <returns>Task of Object</returns>
System.Threading.Tasks.Task<Object> DeleteTimecardAsync (string timecardId);
/// <summary>
/// DeleteTimecard
/// </summary>
/// <remarks>
/// Deletes a timecard. Timecards can also be deleted through the Square Dashboard. Deleted timecards are still accessible through Connect API endpoints, but cannot be modified. The `deleted` field of the `Timecard` object indicates whether the timecard has been deleted. *Note**: By default, deleted timecards appear alongside valid timecards in results returned by the [ListTimecards](#endpoint-v1employees-listtimecards) endpoint. To filter deleted timecards, include the `deleted` query parameter in the list request. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to delete.</param>
/// <returns>Task of ApiResponse (Object)</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteTimecardAsyncWithHttpInfo (string timecardId);
/// <summary>
/// ListCashDrawerShifts
/// </summary>
/// <remarks>
/// Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="order">The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. (optional)</param>
/// <param name="endTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. (optional)</param>
/// <returns>Task of List<V1CashDrawerShift></returns>
System.Threading.Tasks.Task<List<V1CashDrawerShift>> ListCashDrawerShiftsAsync (string locationId, string order = null, string beginTime = null, string endTime = null);
/// <summary>
/// ListCashDrawerShifts
/// </summary>
/// <remarks>
/// Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="order">The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days. (optional)</param>
/// <param name="endTime">The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time. (optional)</param>
/// <returns>Task of ApiResponse (List<V1CashDrawerShift>)</returns>
System.Threading.Tasks.Task<ApiResponse<List<V1CashDrawerShift>>> ListCashDrawerShiftsAsyncWithHttpInfo (string locationId, string order = null, string beginTime = null, string endTime = null);
/// <summary>
/// ListEmployeeRoles
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee roles.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field.Default value: ASC (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of List<V1EmployeeRole></returns>
System.Threading.Tasks.Task<List<V1EmployeeRole>> ListEmployeeRolesAsync (string order = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployeeRoles
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee roles.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field.Default value: ASC (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of ApiResponse (List<V1EmployeeRole>)</returns>
System.Threading.Tasks.Task<ApiResponse<List<V1EmployeeRole>>> ListEmployeeRolesAsyncWithHttpInfo (string order = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployees
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employees.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format (optional)</param>
/// <param name="endUpdatedAt">If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginCreatedAt">If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endCreatedAt">If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="status">If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). (optional)</param>
/// <param name="externalId">If provided, the endpoint returns only employee entities with the specified external_id. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of List<V1Employee></returns>
System.Threading.Tasks.Task<List<V1Employee>> ListEmployeesAsync (string order = null, string beginUpdatedAt = null, string endUpdatedAt = null, string beginCreatedAt = null, string endCreatedAt = null, string status = null, string externalId = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListEmployees
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employees.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which employees are listed in the response, based on their created_at field. Default value: ASC (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format (optional)</param>
/// <param name="endUpdatedAt">If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginCreatedAt">If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endCreatedAt">If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="status">If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). (optional)</param>
/// <param name="externalId">If provided, the endpoint returns only employee entities with the specified external_id. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of ApiResponse (List<V1Employee>)</returns>
System.Threading.Tasks.Task<ApiResponse<List<V1Employee>>> ListEmployeesAsyncWithHttpInfo (string order = null, string beginUpdatedAt = null, string endUpdatedAt = null, string beginCreatedAt = null, string endCreatedAt = null, string status = null, string externalId = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListTimecardEvents
/// </summary>
/// <remarks>
/// Provides summary information for all events associated with a particular timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to list events for.</param>
/// <returns>Task of List<V1TimecardEvent></returns>
System.Threading.Tasks.Task<List<V1TimecardEvent>> ListTimecardEventsAsync (string timecardId);
/// <summary>
/// ListTimecardEvents
/// </summary>
/// <remarks>
/// Provides summary information for all events associated with a particular timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The ID of the timecard to list events for.</param>
/// <returns>Task of ApiResponse (List<V1TimecardEvent>)</returns>
System.Threading.Tasks.Task<ApiResponse<List<V1TimecardEvent>>> ListTimecardEventsAsyncWithHttpInfo (string timecardId);
/// <summary>
/// ListTimecards
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee timecards.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which timecards are listed in the response, based on their created_at field. (optional)</param>
/// <param name="employeeId">If provided, the endpoint returns only timecards for the employee with the specified ID. (optional)</param>
/// <param name="beginClockinTime">If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockinTime">If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginClockoutTime">If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockoutTime">If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endUpdatedAt">If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="deleted">If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of List<V1Timecard></returns>
System.Threading.Tasks.Task<List<V1Timecard>> ListTimecardsAsync (string order = null, string employeeId = null, string beginClockinTime = null, string endClockinTime = null, string beginClockoutTime = null, string endClockoutTime = null, string beginUpdatedAt = null, string endUpdatedAt = null, bool? deleted = null, int? limit = null, string batchToken = null);
/// <summary>
/// ListTimecards
/// </summary>
/// <remarks>
/// Provides summary information for all of a business's employee timecards.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="order">The order in which timecards are listed in the response, based on their created_at field. (optional)</param>
/// <param name="employeeId">If provided, the endpoint returns only timecards for the employee with the specified ID. (optional)</param>
/// <param name="beginClockinTime">If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockinTime">If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginClockoutTime">If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endClockoutTime">If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="beginUpdatedAt">If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="endUpdatedAt">If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. (optional)</param>
/// <param name="deleted">If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. (optional)</param>
/// <param name="limit">The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. (optional)</param>
/// <param name="batchToken">A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)</param>
/// <returns>Task of ApiResponse (List<V1Timecard>)</returns>
System.Threading.Tasks.Task<ApiResponse<List<V1Timecard>>> ListTimecardsAsyncWithHttpInfo (string order = null, string employeeId = null, string beginClockinTime = null, string endClockinTime = null, string beginClockoutTime = null, string endClockoutTime = null, string beginUpdatedAt = null, string endUpdatedAt = null, bool? deleted = null, int? limit = null, string batchToken = null);
/// <summary>
/// RetrieveCashDrawerShift
/// </summary>
/// <remarks>
/// Provides the details for a single cash drawer shift, including all events that occurred during the shift.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="shiftId">The shift's ID.</param>
/// <returns>Task of V1CashDrawerShift</returns>
System.Threading.Tasks.Task<V1CashDrawerShift> RetrieveCashDrawerShiftAsync (string locationId, string shiftId);
/// <summary>
/// RetrieveCashDrawerShift
/// </summary>
/// <remarks>
/// Provides the details for a single cash drawer shift, including all events that occurred during the shift.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="locationId">The ID of the location to list cash drawer shifts for.</param>
/// <param name="shiftId">The shift's ID.</param>
/// <returns>Task of ApiResponse (V1CashDrawerShift)</returns>
System.Threading.Tasks.Task<ApiResponse<V1CashDrawerShift>> RetrieveCashDrawerShiftAsyncWithHttpInfo (string locationId, string shiftId);
/// <summary>
/// RetrieveEmployee
/// </summary>
/// <remarks>
/// Provides the details for a single employee.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The employee's ID.</param>
/// <returns>Task of V1Employee</returns>
System.Threading.Tasks.Task<V1Employee> RetrieveEmployeeAsync (string employeeId);
/// <summary>
/// RetrieveEmployee
/// </summary>
/// <remarks>
/// Provides the details for a single employee.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The employee's ID.</param>
/// <returns>Task of ApiResponse (V1Employee)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Employee>> RetrieveEmployeeAsyncWithHttpInfo (string employeeId);
/// <summary>
/// RetrieveEmployeeRole
/// </summary>
/// <remarks>
/// Provides the details for a single employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The role's ID.</param>
/// <returns>Task of V1EmployeeRole</returns>
System.Threading.Tasks.Task<V1EmployeeRole> RetrieveEmployeeRoleAsync (string roleId);
/// <summary>
/// RetrieveEmployeeRole
/// </summary>
/// <remarks>
/// Provides the details for a single employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The role's ID.</param>
/// <returns>Task of ApiResponse (V1EmployeeRole)</returns>
System.Threading.Tasks.Task<ApiResponse<V1EmployeeRole>> RetrieveEmployeeRoleAsyncWithHttpInfo (string roleId);
/// <summary>
/// RetrieveTimecard
/// </summary>
/// <remarks>
/// Provides the details for a single timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The timecard's ID.</param>
/// <returns>Task of V1Timecard</returns>
System.Threading.Tasks.Task<V1Timecard> RetrieveTimecardAsync (string timecardId);
/// <summary>
/// RetrieveTimecard
/// </summary>
/// <remarks>
/// Provides the details for a single timecard. <aside> Only approved accounts can manage their employees with Square. Unapproved accounts cannot use employee management features with the API. </aside>
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">The timecard's ID.</param>
/// <returns>Task of ApiResponse (V1Timecard)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Timecard>> RetrieveTimecardAsyncWithHttpInfo (string timecardId);
/// <summary>
/// UpdateEmployee
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of V1Employee</returns>
System.Threading.Tasks.Task<V1Employee> UpdateEmployeeAsync (string employeeId, V1Employee body);
/// <summary>
/// UpdateEmployee
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="employeeId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of ApiResponse (V1Employee)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Employee>> UpdateEmployeeAsyncWithHttpInfo (string employeeId, V1Employee body);
/// <summary>
/// UpdateEmployeeRole
/// </summary>
/// <remarks>
/// Modifies the details of an employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of V1EmployeeRole</returns>
System.Threading.Tasks.Task<V1EmployeeRole> UpdateEmployeeRoleAsync (string roleId, V1EmployeeRole body);
/// <summary>
/// UpdateEmployeeRole
/// </summary>
/// <remarks>
/// Modifies the details of an employee role.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="roleId">The ID of the role to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of ApiResponse (V1EmployeeRole)</returns>
System.Threading.Tasks.Task<ApiResponse<V1EmployeeRole>> UpdateEmployeeRoleAsyncWithHttpInfo (string roleId, V1EmployeeRole body);
/// <summary>
/// UpdateTimecard
/// </summary>
/// <remarks>
/// Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">TThe ID of the timecard to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of V1Timecard</returns>
System.Threading.Tasks.Task<V1Timecard> UpdateTimecardAsync (string timecardId, V1Timecard body);
/// <summary>
/// UpdateTimecard
/// </summary>
/// <remarks>
/// Modifies the details of a timecard with an `API_EDIT` event for the timecard. Updating an active timecard with a `clockout_time` clocks the employee out.
/// </remarks>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="timecardId">TThe ID of the timecard to modify.</param>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>Task of ApiResponse (V1Timecard)</returns>
System.Threading.Tasks.Task<ApiResponse<V1Timecard>> UpdateTimecardAsyncWithHttpInfo (string timecardId, V1Timecard body);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class V1EmployeesApi : IV1EmployeesApi
{
private Square.Connect.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="V1EmployeesApi"/> class.
/// </summary>
/// <returns></returns>
public V1EmployeesApi(String basePath)
{
this.Configuration = new Configuration(new ApiClient(basePath));
ExceptionFactory = Square.Connect.Client.Configuration.DefaultExceptionFactory;
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="V1EmployeesApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public V1EmployeesApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
this.Configuration = Configuration.Default;
else
this.Configuration = configuration;
ExceptionFactory = Square.Connect.Client.Configuration.DefaultExceptionFactory;
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Configuration Configuration {get; set;}
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public Square.Connect.Client.ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public Dictionary<String, String> DefaultHeader()
{
return this.Configuration.DefaultHeader;
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// CreateEmployee Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </summary>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>V1Employee</returns>
public V1Employee CreateEmployee (V1Employee body)
{
ApiResponse<V1Employee> localVarResponse = CreateEmployeeWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// CreateEmployee Use the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of `INACTIVE`. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API. <aside class=\"important\"> Employee entities cannot be deleted. To disable employee profiles, set the employee's status to <code>INACTIVE</code> </aside>
/// </summary>
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
/// <returns>ApiResponse of V1Employee</returns>
public ApiResponse< V1Employee > CreateEmployeeWithHttpInfo (V1Employee body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling V1EmployeesApi->CreateEmployee");
var localVarPath = "/v1/me/employees";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
localVarHeaderParams.Add("Square-Version", "2019-03-13");
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (oauth2) required
// oauth required
if (!String.IsNullOrEmpty(Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("CreateEmployee", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<V1Employee>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(V1Employee) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1Employee)));
}