-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcodeSamples.yaml
More file actions
1709 lines (1709 loc) · 272 KB
/
codeSamples.yaml
File metadata and controls
1709 lines (1709 loc) · 272 KB
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
overlay: 1.0.0
info:
title: CodeSamples overlay for ruby target
version: 0.0.0
actions:
- target: $["paths"]["/accounts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_linked_accounts"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::StackoneListLinkedAccountsRequest.new\nres = s.accounts.list_linked_accounts(request: req)\n\nunless res.linked_accounts.nil?\n # handle response\nend"
- target: $["paths"]["/accounts/{id}"]["delete"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_delete_account"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounts.delete_account(id: '<id>')\n\nunless res.linked_account.nil?\n # handle response\nend"
- target: $["paths"]["/accounts/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_get_account"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounts.get_account(id: '<id>')\n\nunless res.linked_account.nil?\n # handle response\nend"
- target: $["paths"]["/accounts/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_update_account"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounts.update_account(patch_account_external_dto: Models::Shared::PatchAccountExternalDto.new(\n type: Models::Shared::PatchAccountExternalDtoType::TEST\n), id: '<id>')\n\nunless res.linked_account.nil?\n # handle response\nend"
- target: $["paths"]["/accounts/{id}/meta"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_get_account_meta_info"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounts.get_account_meta_info(id: '<id>')\n\nunless res.linked_account_meta.nil?\n # handle response\nend"
- target: $["paths"]["/actions"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_actions_meta"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::StackoneListActionsMetaRequest.new(\n exclude: [\n Models::Operations::Exclude::ACTIONS,\n ],\n filter: Models::Operations::Filter.new(\n account_ids: 'account1,account2',\n action_key: 'action1',\n connectors: 'connector1,connector2'\n ),\n group_by: '[\"connector\"]',\n include: [\n Models::Operations::Include::ACTION_DETAILS,\n ],\n search: 'employee'\n)\nres = s.actions.list_actions_meta(request: req)\n\nunless res.actions_meta_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/actions/build"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_build_action_embeddings"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Shared::ActionBuildDto.new(\n connector_key: 'slack'\n)\nres = s.actions.build_action_embeddings(request: req)\n\nunless res.action_build_response_dto.nil?\n # handle response\nend"
- target: $["paths"]["/actions/rpc"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_rpc_action"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Shared::ActionsRpcRequestDto.new(\n action: 'create_employee',\n body: {\n 'data' => 'example',\n },\n headers: {\n 'Content-Type' => 'application/json',\n },\n path: {\n 'id' => '123',\n },\n query: Models::Shared::Query.new(\n debug: false\n )\n)\nres = s.actions.rpc_action(request: req)\n\nunless res.actions_rpc_response.nil?\n # handle response\nend"
- target: $["paths"]["/actions/search"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_search_actions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Shared::ActionSearchDto.new(\n connector: 'slack',\n query: 'send a message'\n)\nres = s.actions.search_actions(request: req)\n\nunless res.action_search_response_dto.nil?\n # handle response\nend"
- target: $["paths"]["/connect_sessions"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_create_connect_session"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Shared::ConnectSessionCreate.new(\n categories: [\n Models::Shared::ConnectSessionCreateCategories::ATS,\n Models::Shared::ConnectSessionCreateCategories::HRIS,\n Models::Shared::ConnectSessionCreateCategories::TICKETING,\n Models::Shared::ConnectSessionCreateCategories::CRM,\n Models::Shared::ConnectSessionCreateCategories::IAM,\n Models::Shared::ConnectSessionCreateCategories::MARKETING,\n Models::Shared::ConnectSessionCreateCategories::LMS,\n Models::Shared::ConnectSessionCreateCategories::IAM,\n Models::Shared::ConnectSessionCreateCategories::DOCUMENTS,\n Models::Shared::ConnectSessionCreateCategories::TICKETING,\n Models::Shared::ConnectSessionCreateCategories::SCREENING,\n Models::Shared::ConnectSessionCreateCategories::MESSAGING,\n Models::Shared::ConnectSessionCreateCategories::ACCOUNTING,\n Models::Shared::ConnectSessionCreateCategories::SCHEDULING,\n ],\n origin_owner_id: '<id>',\n origin_owner_name: '<value>'\n)\nres = s.connect_sessions.create_connect_session(request: req)\n\nunless res.connect_session_token_auth_link.nil?\n # handle response\nend"
- target: $["paths"]["/connect_sessions/authenticate"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_authenticate_connect_session"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Shared::ConnectSessionAuthenticate.new(\n token: '<value>'\n)\nres = s.connect_sessions.authenticate_connect_session(request: req)\n\nunless res.connect_session.nil?\n # handle response\nend"
- target: $["paths"]["/connectors/meta"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_connectors_meta"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.connectors.list_connectors_meta(include: 'field_path,unmapped_fields,resources,inactive,webhooks,static_fields')\n\nunless res.connectors_metas.nil?\n # handle response\nend"
- target: $["paths"]["/connectors/meta/{provider}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_get_connector_meta"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.connectors.get_connector_meta(provider: '<value>', include: 'field_path,unmapped_fields,resources,inactive,webhooks,static_fields')\n\nunless res.connectors_meta.nil?\n # handle response\nend"
- target: $["paths"]["/mcp"]["delete"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_mcp_delete"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new\nres = s.mcp.mcp_delete(security: Models::Operations::StackoneMcpDeleteSecurity.new(\n api_key: '<YOUR_API_KEY_HERE>'\n), mcp_session_id: '<id>', x_account_id: '<id>')\n\nif res.status_code == 200\n # handle response\nend"
- target: $["paths"]["/mcp"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_mcp_get"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new\nres = s.mcp.mcp_get(security: Models::Operations::StackoneMcpGetSecurity.new(\n api_key: '<YOUR_API_KEY_HERE>'\n), mcp_session_id: '<id>', x_account_id: '<id>')\n\nif res.status_code == 200\n # handle response\nend"
- target: $["paths"]["/mcp"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_mcp_post"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new\nres = s.mcp.mcp_post(security: Models::Operations::StackoneMcpPostSecurity.new(\n api_key: '<YOUR_API_KEY_HERE>'\n), json_rpc_message_dto: Models::Shared::JsonRpcMessageDto.new(\n id: Models::Shared::Id.new,\n jsonrpc: '2.0',\n method: 'initialize',\n params: Models::Shared::Params.new\n), x_account_id: '<id>')\n\nif res.status_code == 200\n # handle response\nend"
- target: $["paths"]["/requests/logs"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_logs"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::StackoneListLogsRequest.new(\n filter: Models::Operations::QueryParamFilter.new(\n account_ids: '45355976281015164504,45355976281015164505',\n actions: 'download,upload',\n child_resources: 'documents,time-off',\n end_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n http_methods: 'GET,POST',\n order_by: Models::Operations::QueryParamOrderBy::DURATION,\n order_direction: Models::Operations::QueryParamOrderDirection::ASC,\n providers: 'ashby,greenhouse',\n request_ids: 'adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c',\n resources: 'employees,users',\n services: 'hris,ats',\n source_types: 'DASHBOARD,SYNTHETIC_WEBHOOK',\n start_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n status_codes: '200,400',\n sub_resources: 'documents,employees',\n success: true\n ),\n include: Models::Operations::StackoneListLogsQueryParamInclude::STEP_LOGS,\n order_by: Models::Operations::OrderBy::DURATION,\n order_direction: Models::Operations::OrderDirection::ASC\n)\nres = s.request_logs.list_logs(request: req)\n\nunless res.unified_logs_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/requests/logs/steps"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_step_logs"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::StackoneListStepLogsRequest.new(\n filter: Models::Operations::StackoneListStepLogsQueryParamFilter.new(\n account_ids: '45355976281015164504,45355976281015164505',\n actions: 'download,upload',\n child_resources: 'documents,time-off',\n end_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n http_methods: 'GET,POST',\n providers: 'ashby,greenhouse',\n request_ids: 'adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c',\n resources: 'employees,users',\n services: 'hris,ats',\n start_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n status_codes: '200,400',\n sub_resources: 'documents,employees',\n success: true\n ),\n order_by: Models::Operations::StackoneListStepLogsQueryParamOrderBy::EVENT_DATETIME,\n order_direction: Models::Operations::StackoneListStepLogsQueryParamOrderDirection::ASC\n)\nres = s.request_logs.list_step_logs(request: req)\n\nunless res.step_logs_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/requests/logs/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_get_log"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.request_logs.get_log(id: '<id>', include: Models::Operations::QueryParamInclude::STEP_LOGS)\n\nunless res.unified_log_result.nil?\n # handle response\nend"
- target: $["paths"]["/requests/platform-logs"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "stackone_list_platform_logs"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::StackoneListPlatformLogsRequest.new(\n filter: Models::Operations::StackoneListPlatformLogsQueryParamFilter.new(\n account_ids: '45355976281015164504,45355976281015164505',\n actions: 'download,upload',\n categories: 'hris,ats',\n end_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n http_methods: 'GET,POST',\n order_by: Models::Operations::StackoneListPlatformLogsQueryParamRequestLogsOrderBy::EVENT_DATETIME,\n order_direction: Models::Operations::StackoneListPlatformLogsQueryParamRequestLogsOrderDirection::ASC,\n request_ids: 'adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c',\n resources: 'employees,users',\n source_types: 'DASHBOARD,SYNTHETIC_WEBHOOK',\n start_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n status_codes: '200,400',\n success: true\n ),\n order_by: Models::Operations::StackoneListPlatformLogsQueryParamOrderBy::DURATION,\n order_direction: Models::Operations::StackoneListPlatformLogsQueryParamOrderDirection::ASC\n)\nres = s.request_logs.list_platform_logs(request: req)\n\nunless res.platform_logs_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_list_companies"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingListCompaniesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,base_currency,fiscal_year_start_month,fiscal_year_start_day,unified_custom_fields',\n filter: Models::Operations::AccountingListCompaniesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.accounting.list_companies(request: req)\n\nunless res.accounting_companies_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_get_company"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingGetCompanyRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,base_currency,fiscal_year_start_month,fiscal_year_start_day,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.get_company(request: req)\n\nunless res.accounting_company_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/accounts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_list_company_accounts"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingListCompanyAccountsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,code,name,type,active,unified_custom_fields',\n filter: nil,\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.list_company_accounts(request: req)\n\nunless res.accounting_accounts_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/accounts/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_get_company_account"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingGetCompanyAccountRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,code,name,type,active,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.get_company_account(request: req)\n\nunless res.accounting_account_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/journals"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_list_company_journals"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingListCompanyJournalsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,reference,memo,transaction_date,status,lines,created_at,updated_at,posted_at,unified_custom_fields',\n filter: nil,\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.list_company_journals(request: req)\n\nunless res.accounting_journals_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/journals"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_create_company_journal"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounting.create_company_journal(accounting_journal_create_request_dto: Models::Shared::AccountingJournalCreateRequestDto.new(\n currency_code: Models::Shared::CurrencyCode.new(\n source_value: 'USD',\n value: Models::Shared::AccountingJournalCreateRequestDtoValue::USD\n ),\n exchange_rate: 1.0,\n lines: [\n Models::Shared::CreateJournalLine.new(\n account_id: 'acc_123456789',\n amount: 10_010.0,\n description: 'Payment for office supplies',\n tax_amount: 10_010.0,\n tax_rate_id: 'tax_123456789'\n ),\n ],\n memo: 'Monthly closing entries',\n reference: 'JRN-2024-001',\n transaction_date: DateTime.iso8601('2024-03-20T10:00:00Z')\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/journals/batch"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_batch_create_company_journals"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.accounting.batch_create_company_journals(accounting_journal_batch_create_request_dto: Models::Shared::AccountingJournalBatchCreateRequestDto.new(\n items: []\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.batch_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/journals/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_get_company_journal"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingGetCompanyJournalRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,reference,memo,transaction_date,status,lines,created_at,updated_at,posted_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.get_company_journal(request: req)\n\nunless res.accounting_journal_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/tax_rates"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_list_company_tax_rates"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingListCompanyTaxRatesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,name,code,percentage,active,unified_custom_fields',\n filter: Models::Operations::AccountingListCompanyTaxRatesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.list_company_tax_rates(request: req)\n\nunless res.accounting_tax_rates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/accounting/companies/{id}/tax_rates/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "accounting_get_company_tax_rate"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AccountingGetCompanyTaxRateRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,company_id,remote_company_id,name,code,percentage,active,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.accounting.get_company_tax_rate(request: req)\n\nunless res.accounting_tax_rate_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/application_stages"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_stages"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationStagesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,order,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationStagesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_application_stages(request: req)\n\nunless res.interview_stages_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/application_stages/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_stage"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationStageRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,order,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_stage(request: req)\n\nunless res.interview_stage_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_applications"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationsRequest.new(\n prefer: 'heartbeat',\n expand: 'documents',\n fields_: 'id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,job_posting_id,remote_job_posting_id,interview_stage,interview_stage_id,remote_interview_stage_id,application_stage,application_stage_id,remote_application_stage_id,rejected_reason,rejected_reason_id,remote_rejected_reason_id,rejected_reason_ids,remote_rejected_reason_ids,rejected_reasons,rejected_at,location_id,remote_location_id,location_ids,remote_location_ids,status,application_status,questionnaires,attachments,result_links,source,created_at,updated_at,documents,custom_fields,candidate,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationsQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'attachments,custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.list_applications(request: req)\n\nunless res.applications_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_application"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_application(ats_create_application_request_dto: Models::Shared::AtsCreateApplicationRequestDto.new(\n application_status: nil,\n candidate: Models::Shared::AtsCreateApplicationRequestDtoCandidate.new(\n company: 'Company Inc.',\n country: 'United States',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n email: 'sestier.romain123@gmail.com',\n first_name: 'Romain',\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n last_name: 'Sestier',\n name: 'Romain Sestier',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_numbers: [\n Models::Shared::PhoneNumber.new(\n phone: '+447700112233'\n ),\n ],\n social_links: [\n Models::Shared::SocialLink.new(\n type: 'linkedin',\n url: 'https://www.linkedin.com/in/romainsestier/'\n ),\n ],\n title: 'Software Engineer',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n }\n ),\n candidate_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n documents: [\n Models::Shared::AtsDocumentsUploadRequestDto.new(\n category: Models::Shared::AtsDocumentsUploadRequestDtoCategory.new,\n category_id: '6530',\n confidential: Models::Shared::AtsDocumentsUploadRequestDtoConfidential.new(\n source_value: 'public',\n value: Models::Shared::AtsDocumentsUploadRequestDtoSchemasValue::TRUE\n ),\n content: 'VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE',\n file_format: Models::Shared::AtsDocumentsUploadRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::AtsDocumentsUploadRequestDtoSchemasFileFormatValue::PDF\n ),\n name: 'weather-forecast',\n path: '/path/to/file'\n ),\n ],\n job_id: '4071538b-3cac-4fbf-ac76-f78ed250ffdd',\n job_posting_id: '1c702a20-8de8-4d03-ac18-cbf4ac42eb51',\n location_id: 'dd8d41d1-5eb8-4408-9c87-9ba44604eae4',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n questionnaires: [\n Models::Shared::CreateQuestionnaire.new(\n answers: [\n Models::Shared::CreateAnswer.new(\n id: 'answer1',\n type: Models::Shared::CreateAnswerType.new(\n source_value: 'Short Text',\n value: Models::Shared::CreateAnswerValue::SHORT_TEXT\n ),\n values: [\n 'Yes',\n ]\n ),\n ],\n id: 'right_to_work'\n ),\n ],\n source: nil\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationRequest.new(\n prefer: 'heartbeat',\n expand: 'documents',\n fields_: 'id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,job_posting_id,remote_job_posting_id,interview_stage,interview_stage_id,remote_interview_stage_id,application_stage,application_stage_id,remote_application_stage_id,rejected_reason,rejected_reason_id,remote_rejected_reason_id,rejected_reason_ids,remote_rejected_reason_ids,rejected_reasons,rejected_at,location_id,remote_location_id,location_ids,remote_location_ids,status,application_status,questionnaires,attachments,result_links,source,created_at,updated_at,documents,custom_fields,candidate,unified_custom_fields',\n id: '<id>',\n include: 'attachments,custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.get_application(request: req)\n\nunless res.application_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_application"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_application(ats_update_application_request_dto: Models::Shared::AtsUpdateApplicationRequestDto.new(\n application_status: Models::Shared::AtsUpdateApplicationRequestDtoApplicationStatus.new(\n source_value: 'Hired',\n value: Models::Shared::AtsUpdateApplicationRequestDtoValue::HIRED\n ),\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n source: Models::Shared::AtsUpdateApplicationRequestDtoSource.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'LinkedIn'\n )\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/changes"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_changes"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationChangesRequest.new(\n prefer: 'heartbeat',\n fields_: 'event_id,remote_event_id,created_at,effective_at,change_type,actor,new_values,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationChangesQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_application_changes(request: req)\n\nunless res.application_changes_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/documents"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_documents"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationDocumentsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationDocumentsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_application_documents(request: req)\n\nunless res.ats_documents_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/documents/upload"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_upload_application_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.upload_application_document(ats_documents_upload_request_dto: Models::Shared::AtsDocumentsUploadRequestDto.new(\n category: Models::Shared::AtsDocumentsUploadRequestDtoCategory.new,\n category_id: '6530',\n confidential: nil,\n content: 'VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE',\n file_format: Models::Shared::AtsDocumentsUploadRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::AtsDocumentsUploadRequestDtoSchemasFileFormatValue::PDF\n ),\n name: 'weather-forecast',\n path: '/path/to/file'\n), id: '<id>', x_account_id: '<id>')\n\nunless res.write_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/documents/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationDocumentRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_document(request: req)\n\nunless res.ats_document_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/documents/{subResourceId}/download"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_download_application_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsDownloadApplicationDocumentRequest.new(\n export_format: 'text/plain',\n format: 'base64',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.download_application_document(request: req)\n\nunless res.body.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/move"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_move_application"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.move_application(ats_move_application_request_dto: Models::Shared::AtsMoveApplicationRequestDto.new(\n interview_stage_id: 'f223d7f6-908b-48f0-9237-b201c307f609',\n passthrough: {\n 'other_known_names' => 'John Doe',\n }\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.move_application_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/notes"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_notes"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationNotesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationNotesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_application_notes(request: req)\n\nunless res.notes_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/notes"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_application_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_application_note(ats_create_notes_request_dto: Models::Shared::AtsCreateNotesRequestDto.new(\n author_id: '1234567890',\n content: [\n Models::Shared::NoteContentApiModel.new(\n body: 'This candidate seems like a good fit for the role'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n visibility: Models::Shared::Visibility.new(\n source_value: 'Public',\n value: Models::Shared::AtsCreateNotesRequestDtoValue::PUBLIC\n )\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/notes/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationNoteRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_note(request: req)\n\nunless res.note_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/notes/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_application_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsUpdateApplicationNoteRequest.new(\n ats_update_notes_request_dto: Models::Shared::AtsUpdateNotesRequestDto.new(\n author_id: '1234567890',\n content: [\n Models::Shared::NoteContentApiModel.new(\n body: 'This candidate seems like a good fit for the role'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n visibility: Models::Shared::AtsUpdateNotesRequestDtoVisibility.new(\n source_value: 'Public',\n value: Models::Shared::AtsUpdateNotesRequestDtoValue::PUBLIC\n )\n ),\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.update_application_note(request: req)\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/offers"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_applications_offers"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationsOffersRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationsOffersQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_applications_offers(request: req)\n\nunless res.offers_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/offers/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_offer"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationOfferRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_offer(request: req)\n\nunless res.offers_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/reject"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_reject_application"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.reject_application(ats_reject_application_request_dto: Models::Shared::AtsRejectApplicationRequestDto.new(\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n rejected_reason_id: 'f223d7f6-908b-48f0-9237-b201c307f609'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.reject_application_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/scheduled_interviews"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_applications_scheduled_interviews"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationsScheduledInterviewsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,interview_stage_id,remote_interview_stage_id,interview_stage,status,interview_status,interviewer_ids,remote_interviewer_ids,interview_parts,interviewers,start_at,end_at,meeting_url,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationsScheduledInterviewsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_applications_scheduled_interviews(request: req)\n\nunless res.scheduled_interviews_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/scheduled_interviews/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_scheduled_interview"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationScheduledInterviewRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,job_posting_id,remote_job_posting_id,interview_stage,interview_stage_id,remote_interview_stage_id,application_stage,application_stage_id,remote_application_stage_id,rejected_reason,rejected_reason_id,remote_rejected_reason_id,rejected_reason_ids,remote_rejected_reason_ids,rejected_reasons,rejected_at,location_id,remote_location_id,location_ids,remote_location_ids,status,application_status,questionnaires,attachments,result_links,source,created_at,updated_at,documents,custom_fields,candidate,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_scheduled_interview(request: req)\n\nunless res.scheduled_interviews_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/scorecards"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_scorecards"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationScorecardsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,sections,label,candidate_id,remote_candidate_id,application_id,remote_application_id,interview_id,remote_interview_id,author_id,remote_author_id,overall_recommendation,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationScorecardsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_application_scorecards(request: req)\n\nunless res.scorecards_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/applications/{id}/scorecards/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_scorecard"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationScorecardRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,sections,label,candidate_id,remote_candidate_id,application_id,remote_application_id,interview_id,remote_interview_id,author_id,remote_author_id,overall_recommendation,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_scorecard(request: req)\n\nunless res.scorecards_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/orders"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_order_assessments_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.order_assessments_request(ats_create_candidates_assessments_request_dto: Models::Shared::AtsCreateCandidatesAssessmentsRequestDto.new(\n application: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoApplication.new(\n application_status: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoApplicationStatus.new(\n source_value: 'Hired',\n value: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoValue::HIRED\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n candidate: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoCandidate.new(\n emails: [\n Models::Shared::CandidateEmail.new(\n type: 'personal',\n value: 'sestier.romain123@gmail.com'\n ),\n ],\n first_name: 'Romain',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n last_name: 'Sestier',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n profile_url: 'https://exmaple.com/candidate?id=xyz',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n job: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoJob.new(\n hiring_team: [\n Models::Shared::AtsJobHiringTeam.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n ],\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n title: 'Software Engineer'\n ),\n package: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoPackage.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Test 1',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n requester: Models::Shared::AtsCreateCandidatesAssessmentsRequestDtoRequester.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n results_update_url: 'https://exmaple.com/integrations/results/update'\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_assessment_order_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/orders/{id}/result"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_assessments_result"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_assessments_result(ats_update_candidates_assessments_results_request_dto: Models::Shared::AtsUpdateCandidatesAssessmentsResultsRequestDto.new(\n attachments: nil,\n candidate: Models::Shared::AtsUpdateCandidatesAssessmentsResultsRequestDtoCandidate.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n profile_url: 'https://exmaple.com/candidate?id=xyz'\n ),\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n result: Models::Shared::AtsUpdateCandidatesAssessmentsResultsRequestDtoResult.new(\n source_value: 'Passed',\n value: Models::Shared::AtsUpdateCandidatesAssessmentsResultsRequestDtoValue::PASSED\n ),\n result_url: 'https://exmaple.com/result?id=xyz',\n score: Models::Shared::AtsUpdateCandidatesAssessmentsResultsRequestDtoScore.new(\n label: 'Percentage',\n max: '100',\n min: '0',\n value: '80'\n ),\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n submission_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n summary: 'Test is passed'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/packages"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_assessments_packages"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListAssessmentsPackagesRequest.new(\n prefer: 'heartbeat',\n filter: Models::Operations::AtsListAssessmentsPackagesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_assessments_packages(request: req)\n\nunless res.assessment_package_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/packages/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_assessments_package"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetAssessmentsPackageRequest.new(\n prefer: 'heartbeat',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_assessments_package(request: req)\n\nunless res.assessment_package_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/orders"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_order_background_check_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.order_background_check_request(ats_create_background_check_order_request_dto: Models::Shared::AtsCreateBackgroundCheckOrderRequestDto.new(\n application: Models::Shared::AtsCreateBackgroundCheckOrderRequestDtoApplication.new(\n application_status: Models::Shared::AtsCreateBackgroundCheckOrderRequestDtoApplicationStatus.new(\n source_value: 'Hired',\n value: Models::Shared::AtsCreateBackgroundCheckOrderRequestDtoValue::HIRED\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n candidate: nil,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n job: Models::Shared::Job.new(\n hiring_team: [\n Models::Shared::AtsJobHiringTeam.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n ],\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n title: 'Software Engineer'\n ),\n package: Models::Shared::AtsCreateBackgroundCheckOrderRequestDtoPackage.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Test 1',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n tests: [\n Models::Shared::Package.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Test 1',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n ]\n ),\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n requester: Models::Shared::Requester.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n results_update_url: 'https://exmaple.com/integrations/results/update'\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_background_check_order_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/orders/{id}/result"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_background_check_result"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_background_check_result(ats_update_background_check_result_request_dto: Models::Shared::AtsUpdateBackgroundCheckResultRequestDto.new(\n attachments: [\n Models::Shared::Attachment.new(\n content_type: Models::Shared::AttachmentContentType.new(\n source_value: 'Text',\n value: Models::Shared::AttachmentValue::TEXT\n ),\n url: 'http://example.com/resume.pdf'\n ),\n ],\n candidate: Models::Shared::AtsUpdateBackgroundCheckResultRequestDtoCandidate.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n profile_url: 'https://exmaple.com/candidate?id=xyz'\n ),\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n result: Models::Shared::AtsUpdateBackgroundCheckResultRequestDtoResult.new(\n source_value: 'Passed',\n value: Models::Shared::AtsUpdateBackgroundCheckResultRequestDtoValue::PASSED\n ),\n result_url: 'https://exmaple.com/result?id=xyz',\n score: Models::Shared::Score.new(\n label: 'Percentage',\n max: '100',\n min: '0',\n value: '80'\n ),\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n submission_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n summary: 'Test is passed'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/packages"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_background_check_packages"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListBackgroundCheckPackagesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,tests,unified_custom_fields',\n filter: Models::Operations::AtsListBackgroundCheckPackagesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_background_check_packages(request: req)\n\nunless res.background_check_package_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/packages"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_background_check_package"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_background_check_package(ats_create_background_check_packages_request_dto: Models::Shared::AtsCreateBackgroundCheckPackagesRequestDto.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n name: 'Test 1',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n tests: [\n Models::Shared::CreatePackage.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n name: 'Test 1'\n ),\n ]\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/packages/{id}"]["delete"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_delete_background_check_package"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.delete_background_check_package(id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.delete_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/packages/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_background_check_package"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetBackgroundCheckPackageRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,tests,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_background_check_package(request: req)\n\nunless res.background_check_package_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/background_checks/packages/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_background_check_package"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_background_check_package(ats_update_background_check_packages_request_dto: Models::Shared::AtsUpdateBackgroundCheckPackagesRequestDto.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n name: 'Test 1',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n tests: [\n Models::Shared::UpdatePackage.new(\n description: 'Skills test to gauge a candidate\\'s proficiency in job-specific skills',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Test 1'\n ),\n ]\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_candidates"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListCandidatesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,first_name,last_name,email,emails,social_links,phone,phone_numbers,company,country,title,application_ids,remote_application_ids,hired_at,custom_fields,tags,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListCandidatesQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.list_candidates(request: req)\n\nunless res.candidates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_candidate"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_candidate(ats_create_candidate_request_dto: Models::Shared::AtsCreateCandidateRequestDto.new(\n company: 'Company Inc.',\n country: 'United States',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n email: 'sestier.romain123@gmail.com',\n first_name: 'Romain',\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n last_name: 'Sestier',\n name: 'Romain Sestier',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_numbers: [\n Models::Shared::PhoneNumber.new(\n phone: '+447700112233'\n ),\n ],\n social_links: [\n Models::Shared::SocialLink.new(\n type: 'linkedin',\n url: 'https://www.linkedin.com/in/romainsestier/'\n ),\n ],\n title: 'Software Engineer',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n }\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_candidate"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetCandidateRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,first_name,last_name,email,emails,social_links,phone,phone_numbers,company,country,title,application_ids,remote_application_ids,hired_at,custom_fields,tags,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.get_candidate(request: req)\n\nunless res.candidate_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_candidate"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_candidate(ats_update_candidate_request_dto: Models::Shared::AtsUpdateCandidateRequestDto.new(\n application_ids: [\n '123e4567-e89b-12d3-a456-426614174000',\n '523e1234-e89b-fdd2-a456-762545121101',\n ],\n company: 'Company Inc.',\n country: 'United States',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n email: 'sestier.romain123@gmail.com',\n emails: [\n Models::Shared::CandidateEmail.new(\n type: 'personal',\n value: 'sestier.romain123@gmail.com'\n ),\n ],\n first_name: 'Romain',\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n last_name: 'Sestier',\n name: 'Romain Sestier',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_numbers: [\n Models::Shared::PhoneNumber.new(\n phone: '+447700112233'\n ),\n ],\n social_links: nil,\n title: 'Software Engineer',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n }\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates/{id}/notes"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_candidate_notes"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListCandidateNotesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at,unified_custom_fields',\n filter: Models::Operations::AtsListCandidateNotesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_candidate_notes(request: req)\n\nunless res.notes_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates/{id}/notes"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_candidate_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_candidate_note(ats_create_notes_request_dto: Models::Shared::AtsCreateNotesRequestDto.new(\n author_id: '1234567890',\n content: [\n Models::Shared::NoteContentApiModel.new(\n body: 'This candidate seems like a good fit for the role'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n visibility: Models::Shared::Visibility.new(\n source_value: 'Public',\n value: Models::Shared::AtsCreateNotesRequestDtoValue::PUBLIC\n )\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/candidates/{id}/notes/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_candidate_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetCandidateNoteRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_candidate_note(request: req)\n\nunless res.note_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/applications"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_custom_field_definitions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationCustomFieldDefinitionsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: nil,\n x_account_id: '<id>'\n)\nres = s.ats.list_application_custom_field_definitions(request: req)\n\nunless res.custom_field_definitions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/applications/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_custom_field_definition"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationCustomFieldDefinitionRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: nil,\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_custom_field_definition(request: req)\n\nunless res.custom_field_definition_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/candidates"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_candidate_custom_field_definitions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListCandidateCustomFieldDefinitionsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::AtsListCandidateCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_candidate_custom_field_definitions(request: req)\n\nunless res.custom_field_definitions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/candidates/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_candidate_custom_field_definition"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetCandidateCustomFieldDefinitionRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::AtsGetCandidateCustomFieldDefinitionQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_candidate_custom_field_definition(request: req)\n\nunless res.custom_field_definition_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/jobs"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_job_custom_field_definitions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListJobCustomFieldDefinitionsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::AtsListJobCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_job_custom_field_definitions(request: req)\n\nunless res.custom_field_definitions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/custom_field_definitions/jobs/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_job_custom_field_definition"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetJobCustomFieldDefinitionRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::AtsGetJobCustomFieldDefinitionQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_job_custom_field_definition(request: req)\n\nunless res.custom_field_definition_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/departments"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_departments"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListDepartmentsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,unified_custom_fields',\n filter: Models::Operations::AtsListDepartmentsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_departments(request: req)\n\nunless res.departments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/departments/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_department"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetDepartmentRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_department(request: req)\n\nunless res.department_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/documents/application_categories"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_application_document_categories"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListApplicationDocumentCategoriesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,unified_custom_fields',\n filter: Models::Operations::AtsListApplicationDocumentCategoriesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_application_document_categories(request: req)\n\nunless res.reference_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/documents/application_categories/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_application_document_category"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetApplicationDocumentCategoryRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_application_document_category(request: req)\n\nunless res.reference_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interviews"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_interviews"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListInterviewsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,interview_stage_id,remote_interview_stage_id,interview_stage,status,interview_status,interviewer_ids,remote_interviewer_ids,interview_parts,interviewers,start_at,end_at,meeting_url,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListInterviewsQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_interviews(request: req)\n\nunless res.interviews_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interviews/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_interview"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetInterviewRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,interview_stage_id,remote_interview_stage_id,interview_stage,status,interview_status,interviewer_ids,remote_interviewer_ids,interview_parts,interviewers,start_at,end_at,meeting_url,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_interview(request: req)\n\nunless res.interviews_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interviews/{id}/notes"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_interview_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_interview_note(ats_create_notes_request_dto: Models::Shared::AtsCreateNotesRequestDto.new(\n author_id: '1234567890',\n content: [\n Models::Shared::NoteContentApiModel.new(\n body: 'This candidate seems like a good fit for the role'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n visibility: Models::Shared::Visibility.new(\n source_value: 'Public',\n value: Models::Shared::AtsCreateNotesRequestDtoValue::PUBLIC\n )\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interviews/{id}/notes/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_interview_note"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsUpdateInterviewNoteRequest.new(\n ats_update_notes_request_dto: Models::Shared::AtsUpdateNotesRequestDto.new(\n author_id: '1234567890',\n content: [\n Models::Shared::NoteContentApiModel.new(\n body: 'This candidate seems like a good fit for the role'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n visibility: Models::Shared::AtsUpdateNotesRequestDtoVisibility.new(\n source_value: 'Public',\n value: Models::Shared::AtsUpdateNotesRequestDtoValue::PUBLIC\n )\n ),\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.update_interview_note(request: req)\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/job_postings"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_job_postings"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListJobPostingsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,title,locations,internal,status,job_id,remote_job_id,content,compensation,employment_type,employment_contract_type,external_url,external_apply_url,questionnaires,start_date,updated_at,created_at,unified_custom_fields',\n filter: Models::Operations::AtsListJobPostingsQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'questionnaires',\n x_account_id: '<id>'\n)\nres = s.ats.list_job_postings(request: req)\n\nunless res.job_postings_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/job_postings/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_job_posting"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetJobPostingRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,title,locations,internal,status,job_id,remote_job_id,content,compensation,employment_type,employment_contract_type,external_url,external_apply_url,questionnaires,start_date,updated_at,created_at,unified_custom_fields',\n id: '<id>',\n include: 'questionnaires',\n x_account_id: '<id>'\n)\nres = s.ats.get_job_posting(request: req)\n\nunless res.job_posting_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_jobs"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListJobsRequest.new(\n prefer: 'heartbeat',\n expand: 'job_postings,interview_stages',\n fields_: 'id,remote_id,code,title,description,status,job_status,department_ids,remote_department_ids,location_ids,remote_location_ids,hiring_team,interview_stages,confidential,custom_fields,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListJobsQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.list_jobs(request: req)\n\nunless res.ats_jobs_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_job"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_job(ats_create_job_request_dto: Models::Shared::AtsCreateJobRequestDto.new(\n code: '184919',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n department_ids: [\n '308570',\n '308571',\n '308572',\n ],\n description: 'Responsible for identifying business requirements',\n hiring_team: [\n Models::Shared::AtsJobHiringTeam.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n ],\n interview_stages: [\n Models::Shared::InterviewStage.new(\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n },\n updated_at: DateTime.iso8601('2021-01-01T01:01:01.000Z')\n ),\n ],\n job_status: Models::Shared::JobStatus.new(\n source_value: 'Published',\n value: Models::Shared::AtsCreateJobRequestDtoValue::PUBLISHED\n ),\n location_ids: [\n '668570',\n '678571',\n '688572',\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n title: 'Software Engineer',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n }\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_job"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetJobRequest.new(\n prefer: 'heartbeat',\n expand: 'job_postings,interview_stages',\n fields_: 'id,remote_id,code,title,description,status,job_status,department_ids,remote_department_ids,location_ids,remote_location_ids,hiring_team,interview_stages,confidential,custom_fields,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.ats.get_job(request: req)\n\nunless res.ats_job_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_update_job"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.update_job(ats_update_job_request_dto: Models::Shared::AtsUpdateJobRequestDto.new(\n code: '184919',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n department_ids: [\n '308570',\n '308571',\n '308572',\n ],\n description: 'Responsible for identifying business requirements',\n hiring_team: [\n Models::Shared::AtsJobHiringTeam.new(\n email: 'john.doe@gmail.com',\n first_name: 'John',\n last_name: 'Doe',\n remote_user_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n role: 'Software Engineer',\n user_id: '123456'\n ),\n ],\n interview_stages: nil,\n job_status: nil,\n location_ids: [\n '668570',\n '678571',\n '688572',\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n title: 'Software Engineer',\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n }\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs/{id}/application_stages"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_job_application_stages"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListJobApplicationStagesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,order,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::AtsListJobApplicationStagesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.list_job_application_stages(request: req)\n\nunless res.application_stages_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/jobs/{id}/application_stages/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_job_application_stage"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetJobApplicationStageRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,order,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_job_application_stage(request: req)\n\nunless res.application_stage_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/lists"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_lists"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListListsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',\n filter: nil,\n x_account_id: '<id>'\n)\nres = s.ats.list_lists(request: req)\n\nunless res.lists_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/lists/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_list"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetListRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_list(request: req)\n\nunless res.list_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/locations"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_locations"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListLocationsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,unified_custom_fields',\n filter: Models::Operations::AtsListLocationsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_locations(request: req)\n\nunless res.ats_locations_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/locations/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_location"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetLocationRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_location(request: req)\n\nunless res.ats_location_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/offers"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_offers"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListOffersRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields',\n filter: Models::Operations::AtsListOffersQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_offers(request: req)\n\nunless res.offers_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/offers"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_create_offer"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.ats.create_offer(ats_create_offer_request_dto: Models::Shared::AtsCreateOfferRequestDto.new(\n offer_history: [\n Models::Shared::OfferHistory.new(\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-01T01:01:01.000Z')\n ),\n ],\n offer_status: Models::Shared::OfferStatus.new(\n source_value: 'Pending',\n value: Models::Shared::AtsCreateOfferRequestDtoValue::PENDING\n ),\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z')\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/offers/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_offer"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetOfferRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_offer(request: req)\n\nunless res.offers_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/rejected_reasons"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_rejected_reasons"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListRejectedReasonsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,label,type,rejected_reason_type,unified_custom_fields',\n filter: Models::Operations::AtsListRejectedReasonsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.ats.list_rejected_reasons(request: req)\n\nunless res.rejected_reasons_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/rejected_reasons/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_rejected_reason"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetRejectedReasonRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,label,type,rejected_reason_type,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_rejected_reason(request: req)\n\nunless res.rejected_reason_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/users"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_list_users"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsListUsersRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,first_name,last_name,name,email,phone,unified_custom_fields',\n filter: nil,\n x_account_id: '<id>'\n)\nres = s.ats.list_users(request: req)\n\nunless res.users_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/users/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "ats_get_user"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::AtsGetUserRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,first_name,last_name,name,email,phone,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.ats.get_user(request: req)\n\nunless res.user_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/accounts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_list_accounts"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmListAccountsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::CrmListAccountsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.crm.list_accounts(request: req)\n\nunless res.accounts_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/accounts/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_get_account"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmGetAccountRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.crm.get_account(request: req)\n\nunless res.account_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/contacts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_list_contacts"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmListContactsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,first_name,last_name,company_name,emails,phone_numbers,deal_ids,remote_deal_ids,account_ids,remote_account_ids,custom_fields,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::CrmListContactsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.crm.list_contacts(request: req)\n\nunless res.contacts_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/contacts"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_create_contact"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.crm.create_contact(crm_create_contact_request_dto: Models::Shared::CrmCreateContactRequestDto.new(\n account_ids: [\n 'account-123',\n 'account-456',\n ],\n company_name: 'Apple Inc.',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n deal_ids: [\n 'deal-001',\n 'deal-002',\n ],\n emails: [\n 'steve@apple.com',\n ],\n first_name: 'Steve',\n last_name: 'Wozniak',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_numbers: [\n '123-456-7890',\n ]\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.contact_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/contacts/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_get_contact"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmGetContactRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,first_name,last_name,company_name,emails,phone_numbers,deal_ids,remote_deal_ids,account_ids,remote_account_ids,custom_fields,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n include: 'custom_fields',\n x_account_id: '<id>'\n)\nres = s.crm.get_contact(request: req)\n\nunless res.contact_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/contacts/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_update_contact"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.crm.update_contact(crm_create_contact_request_dto: Models::Shared::CrmCreateContactRequestDto.new(\n account_ids: [\n 'account-123',\n 'account-456',\n ],\n company_name: 'Apple Inc.',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n deal_ids: [\n 'deal-001',\n 'deal-002',\n ],\n emails: [\n 'steve@apple.com',\n ],\n first_name: 'Steve',\n last_name: 'Wozniak',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_numbers: [\n '123-456-7890',\n ]\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.contact_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/custom_field_definitions/contacts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_list_contact_custom_field_definitions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmListContactCustomFieldDefinitionsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::CrmListContactCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.crm.list_contact_custom_field_definitions(request: req)\n\nunless res.custom_field_definitions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/custom_field_definitions/contacts/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_get_contact_custom_field_definition"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmGetContactCustomFieldDefinitionRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::CrmGetContactCustomFieldDefinitionQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.crm.get_contact_custom_field_definition(request: req)\n\nunless res.custom_field_definition_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/lists"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_list_lists"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmListListsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',\n filter: Models::Operations::CrmListListsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.crm.list_lists(request: req)\n\nunless res.lists_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/crm/lists/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "crm_get_list"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::CrmGetListRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,created_at,updated_at,items,type,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.crm.get_list(request: req)\n\nunless res.list_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/drives"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_list_drives"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsListDrivesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::DocumentsListDrivesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.documents.list_drives(request: req)\n\nunless res.drives_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/drives/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_get_drive"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsGetDriveRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.documents.get_drive(request: req)\n\nunless res.drive_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/files"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_list_files"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsListFilesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,size,file_format,path,owner_id,remote_owner_id,folder_id,remote_folder_id,drive_id,remote_drive_id,export_formats,default_download_format,created_at,updated_at,has_content,has_children,all_parent_folder_ids,remote_all_parent_folder_ids,unified_custom_fields',\n filter: Models::Operations::DocumentsListFilesQueryParamFilter.new(\n content: 'FAQ of the project',\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n drive_id: '1234567890',\n folder_id: '1234567890',\n name: 'john_doe_resume.pdf',\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n folder_id: '1234567890',\n include: 'all_parent_folder_ids',\n nested_items: 'true',\n x_account_id: '<id>'\n)\nres = s.documents.list_files(request: req)\n\nunless res.files_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/files/upload"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_upload_file"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.documents.upload_file(unified_upload_request_dto: Models::Shared::UnifiedUploadRequestDto.new(\n category: Models::Shared::UnifiedUploadRequestDtoCategory.new(\n source_value: '550e8400-e29b-41d4-a716-446655440000, CUSTOM_CATEGORY_NAME',\n value: 'reports, resumes'\n ),\n category_id: '6530',\n confidential: Models::Shared::UnifiedUploadRequestDtoConfidential.new(\n source_value: 'public',\n value: Models::Shared::UnifiedUploadRequestDtoValue::TRUE\n ),\n content: 'VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE',\n file_format: Models::Shared::UnifiedUploadRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::UnifiedUploadRequestDtoSchemasValue::PDF\n ),\n name: 'weather-forecast',\n path: '/path/to/file'\n), x_account_id: '<id>')\n\nunless res.write_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/files/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_get_file"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsGetFileRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,size,file_format,path,owner_id,remote_owner_id,folder_id,remote_folder_id,drive_id,remote_drive_id,export_formats,default_download_format,created_at,updated_at,has_content,has_children,all_parent_folder_ids,remote_all_parent_folder_ids,unified_custom_fields',\n id: '<id>',\n include: 'all_parent_folder_ids',\n x_account_id: '<id>'\n)\nres = s.documents.get_file(request: req)\n\nunless res.file_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/files/{id}/download"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_download_file"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsDownloadFileRequest.new(\n export_format: 'text/plain',\n format: 'base64',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.documents.download_file(request: req)\n\nunless res.body.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/folders"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_list_folders"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsListFoldersRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,size,path,owner_id,remote_owner_id,parent_folder_id,remote_parent_folder_id,drive_id,remote_drive_id,created_at,updated_at,has_content,has_children,is_root,all_parent_folder_ids,remote_all_parent_folder_ids,unified_custom_fields',\n filter: Models::Operations::DocumentsListFoldersQueryParamFilter.new(\n drive_id: '1234567890',\n folder_id: '1234567890',\n name: 'Engineering',\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n folder_id: '1234567890',\n include: 'all_parent_folder_ids',\n nested_items: 'true',\n x_account_id: '<id>'\n)\nres = s.documents.list_folders(request: req)\n\nunless res.folders_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/documents/folders/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "documents_get_folder"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::DocumentsGetFolderRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,url,size,path,owner_id,remote_owner_id,parent_folder_id,remote_parent_folder_id,drive_id,remote_drive_id,created_at,updated_at,has_content,has_children,is_root,all_parent_folder_ids,remote_all_parent_folder_ids,unified_custom_fields',\n id: '<id>',\n include: 'all_parent_folder_ids',\n x_account_id: '<id>'\n)\nres = s.documents.get_folder(request: req)\n\nunless res.folder_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/benefits"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_benefits"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListBenefitsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,benefit_type,provider,description,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::HrisListBenefitsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.hris.list_benefits(request: req)\n\nunless res.hris_benefits_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/benefits/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_benefit"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetBenefitRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,benefit_type,provider,description,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_benefit(request: req)\n\nunless res.hris_benefit_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/companies"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_companies"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListCompaniesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,full_name,display_name,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::HrisListCompaniesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.hris.list_companies(request: req)\n\nunless res.companies_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/companies/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_company"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetCompanyRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,full_name,display_name,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_company(request: req)\n\nunless res.company_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/custom_field_definitions/employees"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_custom_field_definitions"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_custom_field_definitions(request: req)\n\nunless res.custom_field_definitions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/custom_field_definitions/employees/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_custom_field_definition"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeCustomFieldDefinitionRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,options,unified_custom_fields',\n filter: Models::Operations::HrisGetEmployeeCustomFieldDefinitionQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_custom_field_definition(request: req)\n\nunless res.custom_field_definition_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/documents/employee_categories"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_categories"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeCategoriesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeCategoriesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_categories(request: req)\n\nunless res.reference_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/documents/employee_categories/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_document_category"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeDocumentCategoryRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,unified_custom_fields',\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_document_category(request: req)\n\nunless res.reference_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employees"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeesRequest.new(\n prefer: 'heartbeat',\n expand: 'company,employments,work_location,home_location,groups,skills',\n fields_: 'id,remote_id,title,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar_url,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_id,remote_job_id,job_title,job_description,department_id,remote_department_id,department,cost_centers,company,manager_id,remote_manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,company_id,remote_company_id,preferred_language,citizenships,home_location,work_location,employments,custom_fields,created_at,updated_at,benefits,employee_number,national_identity_number,national_identity_numbers,bank_details,skills,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n include: 'avatar_url,avatar,custom_fields,job_description,benefits,bank_details',\n x_account_id: '<id>'\n)\nres = s.hris.list_employees(request: req)\n\nunless res.employees_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_create_employee"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.create_employee(hris_create_employee_request_dto: Models::Shared::HrisCreateEmployeeRequestDto.new(\n avatar: Models::Shared::HrisCreateEmployeeRequestDtoAvatar.new,\n avatar_url: 'https://example.com/avatar.png',\n benefits: [\n Models::Shared::CreateHRISBenefit.new(\n created_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n description: 'Health insurance for employees',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Health Insurance',\n provider: 'Aetna',\n updated_at: DateTime.iso8601('2021-01-01T00:00:00Z')\n ),\n ],\n birthday: DateTime.iso8601('2021-01-01T00:00:00Z'),\n citizenships: nil,\n company_id: '1234567890',\n cost_centers: [\n Models::Shared::CreateCostCenterApiModel.new(\n distribution_percentage: 100.0,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'R&D'\n ),\n ],\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n date_of_birth: DateTime.iso8601('1990-01-01T00:00:00.000Z'),\n department: 'Physics',\n department_id: '3093',\n display_name: 'Sir Isaac Newton',\n employee_number: '125',\n employment: Models::Shared::HrisCreateEmployeeRequestDtoEmployment.new(\n contract_type: Models::Shared::HrisCreateEmployeeRequestDtoContractType.new(\n contract_type: Models::Shared::HrisCreateEmployeeRequestDtoSchemasContractType.new,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n label: 'Full-Time',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n grade: Models::Shared::HrisCreateEmployeeRequestDtoGrade.new(\n description: 'Mid-level employee demonstrating proficiency and autonomy.',\n id: '1687-3',\n name: '1687-4',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n job_title: 'Software Engineer',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n pay_currency: 'USD',\n pay_frequency: Models::Shared::HrisCreateEmployeeRequestDtoPayFrequency.new(\n source_value: 'Hourly',\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasEmploymentValue::HOURLY\n ),\n pay_period: Models::Shared::HrisCreateEmployeeRequestDtoPayPeriod.new(\n source_value: 'Hour',\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasEmploymentPayPeriodValue::HOUR\n ),\n pay_rate: '40.00',\n payroll_code: 'PC1',\n type: nil,\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n },\n work_time: Models::Shared::HrisCreateEmployeeRequestDtoWorkTime.new(\n duration: 'P0Y0M0DT8H0M0S',\n period: Models::Shared::HrisCreateEmployeeRequestDtoPeriod.new(\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasEmploymentWorkTimeValue::MONTH\n )\n )\n ),\n employment_status: Models::Shared::HrisCreateEmployeeRequestDtoEmploymentStatus.new,\n ethnicity: Models::Shared::HrisCreateEmployeeRequestDtoEthnicity.new,\n first_name: 'Isaac',\n gender: Models::Shared::HrisCreateEmployeeRequestDtoGender.new,\n hire_date: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n home_location: Models::Shared::HrisCreateEmployeeRequestDtoHomeLocation.new(\n city: 'Grantham',\n country: Models::Shared::HrisCreateEmployeeRequestDtoCountry.new(\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasHomeLocationValue::US\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Woolsthorpe Manor',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_number: '+44 1476 860 364',\n state: Models::Shared::State.new,\n street_1: 'Water Lane',\n street_2: 'Woolsthorpe by Colsterworth',\n zip_code: 'NG33 5NR'\n ),\n job_title: 'Physicist',\n last_name: 'Newton',\n manager_id: '67890',\n marital_status: Models::Shared::HrisCreateEmployeeRequestDtoMaritalStatus.new,\n name: 'Isaac Newton',\n national_identity_numbers: nil,\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n personal_email: 'isaac.newton@example.com',\n personal_phone_number: '+1234567890',\n preferred_language: Models::Shared::HrisCreateEmployeeRequestDtoPreferredLanguage.new(\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasPreferredLanguageValue::ENG\n ),\n start_date: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n team_id: '2913',\n termination_date: DateTime.iso8601('2021-01-01T00:00:00Z'),\n title: 'Mr',\n work_email: 'newton@example.com',\n work_location: Models::Shared::HrisCreateEmployeeRequestDtoWorkLocation.new(\n city: 'Grantham',\n country: Models::Shared::HrisCreateEmployeeRequestDtoSchemasWorkLocationCountry.new(\n value: Models::Shared::HrisCreateEmployeeRequestDtoSchemasWorkLocationValue::US\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Woolsthorpe Manor',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_number: '+44 1476 860 364',\n state: Models::Shared::HrisCreateEmployeeRequestDtoState.new,\n street_1: 'Water Lane',\n street_2: 'Woolsthorpe by Colsterworth',\n zip_code: 'NG33 5NR'\n ),\n work_phone_number: '+1234567890'\n), x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeRequest.new(\n prefer: 'heartbeat',\n expand: 'company,employments,work_location,home_location,groups,skills',\n fields_: 'id,remote_id,title,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar_url,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_id,remote_job_id,job_title,job_description,department_id,remote_department_id,department,cost_centers,company,manager_id,remote_manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,company_id,remote_company_id,preferred_language,citizenships,home_location,work_location,employments,custom_fields,created_at,updated_at,benefits,employee_number,national_identity_number,national_identity_numbers,bank_details,skills,unified_custom_fields',\n id: '<id>',\n include: 'avatar_url,avatar,custom_fields,job_description,benefits,bank_details',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee(request: req)\n\nunless res.employee_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_update_employee"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.update_employee(hris_update_employee_request_dto: Models::Shared::HrisUpdateEmployeeRequestDto.new(\n avatar: Models::Shared::HrisUpdateEmployeeRequestDtoAvatar.new,\n avatar_url: 'https://example.com/avatar.png',\n benefits: [\n Models::Shared::CreateHRISBenefit.new(\n created_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n description: 'Health insurance for employees',\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Health Insurance',\n provider: 'Aetna',\n updated_at: DateTime.iso8601('2021-01-01T00:00:00Z')\n ),\n ],\n birthday: DateTime.iso8601('2021-01-01T00:00:00Z'),\n citizenships: nil,\n company_id: '1234567890',\n custom_fields: [\n Models::Shared::CustomFields.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Training Completion Status',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_value_id: 'e3cb75bf-aa84-466e-a6c1-b8322b257a48',\n value: 'Completed',\n value_id: 'value_456'\n ),\n ],\n date_of_birth: DateTime.iso8601('1990-01-01T00:00:00.000Z'),\n department: 'Physics',\n department_id: '3093',\n display_name: 'Sir Isaac Newton',\n employee_number: '125',\n employment: nil,\n employment_status: Models::Shared::HrisUpdateEmployeeRequestDtoEmploymentStatus.new,\n ethnicity: Models::Shared::HrisUpdateEmployeeRequestDtoEthnicity.new,\n first_name: 'Isaac',\n gender: Models::Shared::HrisUpdateEmployeeRequestDtoGender.new,\n hire_date: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n home_location: Models::Shared::HrisUpdateEmployeeRequestDtoHomeLocation.new(\n city: 'Grantham',\n country: Models::Shared::HrisUpdateEmployeeRequestDtoCountry.new(\n value: Models::Shared::HrisUpdateEmployeeRequestDtoSchemasHomeLocationValue::US\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Woolsthorpe Manor',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_number: '+44 1476 860 364',\n state: Models::Shared::HrisUpdateEmployeeRequestDtoState.new,\n street_1: 'Water Lane',\n street_2: 'Woolsthorpe by Colsterworth',\n zip_code: 'NG33 5NR'\n ),\n job_title: 'Physicist',\n last_name: 'Newton',\n manager_id: '67890',\n marital_status: Models::Shared::HrisUpdateEmployeeRequestDtoMaritalStatus.new,\n name: 'Isaac Newton',\n national_identity_numbers: [\n Models::Shared::NationalIdentityNumberApiModel.new(\n country: Models::Shared::NationalIdentityNumberApiModelCountry.new(\n value: Models::Shared::NationalIdentityNumberApiModelValue::US\n ),\n type: Models::Shared::NationalIdentityNumberApiModelType.new(\n value: Models::Shared::NationalIdentityNumberApiModelSchemasValue::SSN\n ),\n value: '123456789'\n ),\n ],\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n personal_email: 'isaac.newton@example.com',\n personal_phone_number: '+1234567890',\n preferred_language: Models::Shared::HrisUpdateEmployeeRequestDtoPreferredLanguage.new(\n value: Models::Shared::HrisUpdateEmployeeRequestDtoSchemasPreferredLanguageValue::ENG\n ),\n start_date: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n team_id: '2913',\n termination_date: DateTime.iso8601('2021-01-01T00:00:00Z'),\n title: 'Mr',\n work_email: 'newton@example.com',\n work_location: Models::Shared::HrisUpdateEmployeeRequestDtoWorkLocation.new(\n city: 'Grantham',\n country: Models::Shared::HrisUpdateEmployeeRequestDtoSchemasWorkLocationCountry.new(\n value: Models::Shared::HrisUpdateEmployeeRequestDtoSchemasWorkLocationValue::US\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Woolsthorpe Manor',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n phone_number: '+44 1476 860 364',\n state: Models::Shared::HrisUpdateEmployeeRequestDtoSchemasState.new,\n street_1: 'Water Lane',\n street_2: 'Woolsthorpe by Colsterworth',\n zip_code: 'NG33 5NR'\n ),\n work_phone_number: '+1234567890'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/documents"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_documents"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeDocumentsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeDocumentsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_documents(request: req)\n\nunless res.hris_documents_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/documents/upload"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_upload_employee_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.upload_employee_document(hris_documents_upload_request_dto: Models::Shared::HrisDocumentsUploadRequestDto.new(\n category: Models::Shared::HrisDocumentsUploadRequestDtoCategory.new,\n category_id: '6530',\n confidential: Models::Shared::HrisDocumentsUploadRequestDtoConfidential.new(\n source_value: 'public',\n value: Models::Shared::HrisDocumentsUploadRequestDtoSchemasValue::TRUE\n ),\n content: 'VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE',\n file_format: Models::Shared::HrisDocumentsUploadRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::HrisDocumentsUploadRequestDtoSchemasFileFormatValue::PDF\n ),\n name: 'weather-forecast',\n path: '/path/to/file'\n), id: '<id>', x_account_id: '<id>')\n\nunless res.write_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/documents/upload/batch"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_batch_upload_employee_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.batch_upload_employee_document(hris_batch_document_upload_request_dto: Models::Shared::HrisBatchDocumentUploadRequestDto.new(\n items: [\n Models::Shared::HrisDocumentsUploadRequestDto.new(\n category: Models::Shared::HrisDocumentsUploadRequestDtoCategory.new,\n category_id: '6530',\n confidential: Models::Shared::HrisDocumentsUploadRequestDtoConfidential.new(\n source_value: 'public',\n value: Models::Shared::HrisDocumentsUploadRequestDtoSchemasValue::TRUE\n ),\n content: 'VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE',\n file_format: Models::Shared::HrisDocumentsUploadRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::HrisDocumentsUploadRequestDtoSchemasFileFormatValue::PDF\n ),\n name: 'weather-forecast',\n path: '/path/to/file'\n ),\n ]\n), id: '<id>', x_account_id: '<id>')\n\nunless res.batch_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/documents/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeDocumentRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_document(request: req)\n\nunless res.hris_document_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/documents/{subResourceId}/download"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_download_employee_document"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisDownloadEmployeeDocumentRequest.new(\n export_format: 'text/plain',\n format: 'base64',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.download_employee_document(request: req)\n\nunless res.body.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/employments"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_employments"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeEmploymentsRequest.new(\n prefer: 'heartbeat',\n expand: 'groups',\n fields_: 'id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,end_date,employment_type,employment_contract_type,type,contract_type,change_reason,grade,work_time,payroll_code,fte,created_at,updated_at,start_date,active,department,team,cost_center,cost_centers,division,job,manager,groups,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeEmploymentsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_employments(request: req)\n\nunless res.employments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/employments"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_create_employee_employment"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.create_employee_employment(hris_create_employment_request_dto: Models::Shared::HrisCreateEmploymentRequestDto.new(\n contract_type: Models::Shared::HrisCreateEmploymentRequestDtoContractType.new(\n contract_type: Models::Shared::HrisCreateEmploymentRequestDtoSchemasContractType.new,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n label: 'Full-Time',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n effective_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n grade: Models::Shared::HrisCreateEmploymentRequestDtoGrade.new(\n description: 'Mid-level employee demonstrating proficiency and autonomy.',\n id: '1687-3',\n name: '1687-4',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n job_id: '5290',\n job_title: 'Software Engineer',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n pay_currency: 'USD',\n pay_frequency: Models::Shared::HrisCreateEmploymentRequestDtoPayFrequency.new(\n source_value: 'Hourly',\n value: Models::Shared::HrisCreateEmploymentRequestDtoSchemasPayFrequencyValue::HOURLY\n ),\n pay_period: Models::Shared::HrisCreateEmploymentRequestDtoPayPeriod.new(\n source_value: 'Hour',\n value: Models::Shared::HrisCreateEmploymentRequestDtoSchemasPayPeriodValue::HOUR\n ),\n pay_rate: '40.00',\n payroll_code: 'PC1',\n type: Models::Shared::HrisCreateEmploymentRequestDtoType.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n label: 'Permanent',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n type: Models::Shared::HrisCreateEmploymentRequestDtoSchemasType.new\n ),\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n },\n work_time: Models::Shared::HrisCreateEmploymentRequestDtoWorkTime.new(\n duration: 'P0Y0M0DT8H0M0S',\n period: Models::Shared::HrisCreateEmploymentRequestDtoPeriod.new(\n value: Models::Shared::HrisCreateEmploymentRequestDtoSchemasWorkTimeValue::MONTH\n )\n )\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/employments/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_employment"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeEmploymentRequest.new(\n prefer: 'heartbeat',\n expand: 'groups',\n fields_: 'id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,end_date,employment_type,employment_contract_type,type,contract_type,change_reason,grade,work_time,payroll_code,fte,created_at,updated_at,start_date,active,department,team,cost_center,cost_centers,division,job,manager,groups,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_employment(request: req)\n\nunless res.employment_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/employments/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_update_employee_employment"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisUpdateEmployeeEmploymentRequest.new(\n hris_update_employment_request_dto: Models::Shared::HrisUpdateEmploymentRequestDto.new(\n contract_type: Models::Shared::HrisUpdateEmploymentRequestDtoContractType.new(\n contract_type: Models::Shared::HrisUpdateEmploymentRequestDtoSchemasContractType.new,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n label: 'Full-Time',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n effective_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n grade: Models::Shared::HrisUpdateEmploymentRequestDtoGrade.new(\n description: 'Mid-level employee demonstrating proficiency and autonomy.',\n id: '1687-3',\n name: '1687-4',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n job_title: 'Software Engineer',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n pay_currency: 'USD',\n pay_frequency: Models::Shared::HrisUpdateEmploymentRequestDtoPayFrequency.new(\n source_value: 'Hourly',\n value: Models::Shared::HrisUpdateEmploymentRequestDtoSchemasPayFrequencyValue::HOURLY\n ),\n pay_period: Models::Shared::HrisUpdateEmploymentRequestDtoPayPeriod.new(\n source_value: 'Hour',\n value: Models::Shared::HrisUpdateEmploymentRequestDtoSchemasPayPeriodValue::HOUR\n ),\n pay_rate: '40.00',\n payroll_code: 'PC1',\n type: Models::Shared::HrisUpdateEmploymentRequestDtoType.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n label: 'Permanent',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n type: Models::Shared::HrisUpdateEmploymentRequestDtoSchemasType.new\n ),\n unified_custom_fields: {\n 'my_project_custom_field_1' => 'REF-1236',\n 'my_project_custom_field_2' => 'some other value',\n },\n work_time: Models::Shared::HrisUpdateEmploymentRequestDtoWorkTime.new(\n duration: 'P0Y0M0DT8H0M0S',\n period: Models::Shared::HrisUpdateEmploymentRequestDtoPeriod.new(\n value: Models::Shared::HrisUpdateEmploymentRequestDtoSchemasWorkTimeValue::MONTH\n )\n )\n ),\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.update_employee_employment(request: req)\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/invite"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_invite_employee"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.invite_employee(hris_invite_employee_request_dto: Models::Shared::HrisInviteEmployeeRequestDto.new(\n passthrough: {\n 'other_known_names' => 'John Doe',\n }\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.invite_employee_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/shifts"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_shifts"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeShiftsRequest.new(\n prefer: 'heartbeat',\n filter: Models::Operations::HrisListEmployeeShiftsQueryParamFilter.new(\n ends_before: '2024-01-15T17:00',\n starts_after: '2024-01-15T09:00',\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_shifts(request: req)\n\nunless res.hris_shifts_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/shifts/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_shift"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeShiftRequest.new(\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_shift(request: req)\n\nunless res.hris_shift_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/skills"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_skills"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeSkillsRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,language,maximum_proficiency,minimum_proficiency,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeSkillsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_skills(request: req)\n\nunless res.entity_skills_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/skills"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_create_employee_skill"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.create_employee_skill(entity_skills_create_request_dto: Models::Shared::EntitySkillsCreateRequestDto.new(\n id: '16873-IT345',\n maximum_proficiency: Models::Shared::EntitySkillsCreateRequestDtoMaximumProficiency.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'Expert',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n minimum_proficiency: nil,\n name: 'Information-Technology'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/skills/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_skill"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeSkillRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,active,language,maximum_proficiency,minimum_proficiency,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_skill(request: req)\n\nunless res.entity_skill_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/tasks"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_tasks"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeTasksRequest.new(\n prefer: 'heartbeat',\n expand: 'attachments',\n fields_: 'id,remote_id,employee_id,remote_employee_id,name,description,type,status,due_date,completion_date,assigned_by_employee_id,remote_assigned_by_employee_id,assigned_by_employee_name,link_to_task,extracted_links,next_task_id,remote_next_task_id,parent_process_name,comments,attachments,created_at,updated_at,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeTasksQueryParamFilter.new(\n created_after: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_tasks(request: req)\n\nunless res.tasks_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/tasks/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_task"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeTaskRequest.new(\n prefer: 'heartbeat',\n expand: 'attachments',\n fields_: 'id,remote_id,employee_id,remote_employee_id,name,description,type,status,due_date,completion_date,assigned_by_employee_id,remote_assigned_by_employee_id,assigned_by_employee_name,link_to_task,extracted_links,next_task_id,remote_next_task_id,parent_process_name,comments,attachments,created_at,updated_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_task(request: req)\n\nunless res.task_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/tasks/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_update_employee_task"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisUpdateEmployeeTaskRequest.new(\n prefer: 'heartbeat',\n update_task_request_dto: Models::Shared::UpdateTaskRequestDto.new(\n comment: 'All required documents have been submitted',\n status: Models::Shared::UpdateTaskRequestDtoStatus.new(\n value: Models::Shared::UpdateTaskRequestDtoValue::OPEN\n )\n ),\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.update_employee_task(request: req)\n\nunless res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_time_off_requests"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeTimeOffRequestsRequest.new(\n prefer: 'heartbeat',\n expand: 'policy',\n fields_: 'id,remote_id,employee_id,remote_employee_id,approver_id,remote_approver_id,status,type,start_date,end_date,start_half_day,end_half_day,time_off_policy_id,remote_time_off_policy_id,reason,comment,duration,created_at,updated_at,policy,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeTimeOffRequestsQueryParamFilter.new(\n end_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n start_date: DateTime.iso8601('2020-01-01T00:00:00.000Z'),\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_time_off_requests(request: req)\n\nunless res.time_off_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_create_employee_time_off_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.create_employee_time_off_request(hris_create_time_off_request_dto: Models::Shared::HrisCreateTimeOffRequestDto.new(\n approver_id: '1687-4',\n comment: 'Taking a day off for personal reasons',\n end_date: '2021-01-01T01:01:01.000',\n end_half_day: true,\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n reason: Models::Shared::HrisCreateTimeOffRequestDtoReason.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n start_date: '2021-01-01T01:01:01.000',\n start_half_day: true,\n time_off_policy_id: 'cx280928933'\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off/{subResourceId}"]["delete"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_cancel_employee_time_off_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.cancel_employee_time_off_request(id: '<id>', sub_resource_id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.delete_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employees_time_off_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeesTimeOffRequestRequest.new(\n prefer: 'heartbeat',\n expand: 'policy',\n fields_: 'id,remote_id,employee_id,remote_employee_id,approver_id,remote_approver_id,status,type,start_date,end_date,start_half_day,end_half_day,time_off_policy_id,remote_time_off_policy_id,reason,comment,duration,created_at,updated_at,policy,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employees_time_off_request(request: req)\n\nunless res.time_off_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_update_employee_time_off_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisUpdateEmployeeTimeOffRequestRequest.new(\n hris_create_time_off_request_dto: Models::Shared::HrisCreateTimeOffRequestDto.new(\n approver_id: '1687-4',\n comment: 'Taking a day off for personal reasons',\n end_date: '2021-01-01T01:01:01.000',\n end_half_day: true,\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n reason: Models::Shared::HrisCreateTimeOffRequestDtoReason.new(\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3'\n ),\n start_date: '2021-01-01T01:01:01.000',\n start_half_day: true,\n time_off_policy_id: 'cx280928933'\n ),\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.update_employee_time_off_request(request: req)\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off_balances"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_time_off_balances"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeTimeOffBalancesRequest.new(\n prefer: 'heartbeat',\n expand: 'policy',\n fields_: 'id,remote_id,employee_id,remote_employee_id,policy_id,remote_policy_id,policy,current_balance,initial_balance,balance_unit,balance_start_date,balance_expiry_date,is_unlimited,updated_at,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeTimeOffBalancesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_time_off_balances(request: req)\n\nunless res.time_off_balances_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off_balances/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employee_time_off_balance"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeeTimeOffBalanceRequest.new(\n prefer: 'heartbeat',\n expand: 'policy',\n fields_: 'id,remote_id,employee_id,remote_employee_id,policy_id,remote_policy_id,policy,current_balance,initial_balance,balance_unit,balance_start_date,balance_expiry_date,is_unlimited,updated_at,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employee_time_off_balance(request: req)\n\nunless res.time_off_balance_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/time_off_policies"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_time_off_policies"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeTimeOffPoliciesRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,name,description,type,duration_unit,reasons,updated_at,created_at,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeTimeOffPoliciesQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_time_off_policies(request: req)\n\nunless res.time_off_policies_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/work_eligibility"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employee_work_eligibility"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmployeeWorkEligibilityRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,type,sub_type,document,valid_from,valid_to,issued_by,number,unified_custom_fields',\n filter: Models::Operations::HrisListEmployeeWorkEligibilityQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.list_employee_work_eligibility(request: req)\n\nunless res.work_eligibility_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/work_eligibility"]["post"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_create_employee_work_eligibility_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\nres = s.hris.create_employee_work_eligibility_request(hris_create_work_eligibility_request_dto: Models::Shared::HrisCreateWorkEligibilityRequestDto.new(\n document: Models::Shared::Document.new(\n category: Models::Shared::HrisCreateWorkEligibilityRequestDtoCategory.new,\n category_id: '6530',\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n file_format: nil,\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'My Document',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_url: 'https://example.com/file.pdf',\n updated_at: DateTime.iso8601('2021-01-02T01:01:01.000Z')\n ),\n issued_by: Models::Shared::IssuedBy.new(\n value: Models::Shared::HrisCreateWorkEligibilityRequestDtoValue::US\n ),\n number: '1234567890',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n sub_type: 'H1B',\n type: Models::Shared::HrisCreateWorkEligibilityRequestDtoType.new,\n valid_from: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n valid_to: DateTime.iso8601('2021-01-01T00:00:00.000Z')\n), id: '<id>', x_account_id: '<id>', prefer: 'heartbeat')\n\nunless res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/work_eligibility/{subResourceId}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employees_work_eligibility"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisGetEmployeesWorkEligibilityRequest.new(\n prefer: 'heartbeat',\n fields_: 'id,remote_id,type,sub_type,document,valid_from,valid_to,issued_by,number,unified_custom_fields',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.get_employees_work_eligibility(request: req)\n\nunless res.work_eligibility_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employees/{id}/work_eligibility/{subResourceId}"]["patch"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_update_employee_work_eligibility_request"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisUpdateEmployeeWorkEligibilityRequestRequest.new(\n hris_create_work_eligibility_request_dto: Models::Shared::HrisCreateWorkEligibilityRequestDto.new(\n document: Models::Shared::Document.new(\n category: Models::Shared::HrisCreateWorkEligibilityRequestDtoCategory.new,\n category_id: '6530',\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n file_format: Models::Shared::HrisCreateWorkEligibilityRequestDtoFileFormat.new(\n source_value: 'application/pdf',\n value: Models::Shared::HrisCreateWorkEligibilityRequestDtoSchemasDocumentValue::PDF\n ),\n id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n name: 'My Document',\n remote_id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',\n remote_url: 'https://example.com/file.pdf',\n updated_at: DateTime.iso8601('2021-01-02T01:01:01.000Z')\n ),\n issued_by: Models::Shared::IssuedBy.new(\n value: Models::Shared::HrisCreateWorkEligibilityRequestDtoValue::US\n ),\n number: '1234567890',\n passthrough: {\n 'other_known_names' => 'John Doe',\n },\n sub_type: 'H1B',\n type: Models::Shared::HrisCreateWorkEligibilityRequestDtoType.new,\n valid_from: DateTime.iso8601('2021-01-01T00:00:00.000Z'),\n valid_to: DateTime.iso8601('2021-01-01T00:00:00.000Z')\n ),\n prefer: 'heartbeat',\n id: '<id>',\n sub_resource_id: '<id>',\n x_account_id: '<id>'\n)\nres = s.hris.update_employee_work_eligibility_request(request: req)\n\nif res.status_code == 200\n # handle response\nend"
- target: $["paths"]["/unified/hris/employments"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_list_employments"
"source": "require 'stackone_client'\n\nModels = ::StackOne::Models\ns = ::StackOne::StackOne.new(\n security: Models::Shared::Security.new(\n password: '',\n username: ''\n )\n)\n\nreq = Models::Operations::HrisListEmploymentsRequest.new(\n prefer: 'heartbeat',\n expand: 'groups',\n fields_: 'id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,end_date,employment_type,employment_contract_type,type,contract_type,change_reason,grade,work_time,payroll_code,fte,created_at,updated_at,start_date,active,department,team,cost_center,cost_centers,division,job,manager,groups,unified_custom_fields',\n filter: Models::Operations::HrisListEmploymentsQueryParamFilter.new(\n updated_after: DateTime.iso8601('2020-01-01T00:00:00.000Z')\n ),\n x_account_id: '<id>'\n)\nres = s.hris.list_employments(request: req)\n\nunless res.employments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employments/{id}"]["get"]
update:
"x-codeSamples":
- "lang": "ruby"
"label": "hris_get_employment"