forked from StackOneHQ/stackone-client-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeSamples.yaml
More file actions
1007 lines (1007 loc) · 151 KB
/
Copy pathcodeSamples.yaml
File metadata and controls
1007 lines (1007 loc) · 151 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::StackoneListLinkedAccountsRequest.new()\n \nres = s.accounts.list_linked_accounts(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.accounts.delete_account(id=\"<id>\")\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.accounts.get_account(id=\"<id>\")\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.accounts.update_account(id=\"<id>\", patch_account_external_dto=::StackOne::Shared::PatchAccountExternalDto.new())\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.accounts.get_account_meta_info(id=\"<id>\")\n\nif ! res.linked_account_meta.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Shared::ConnectSessionCreate.new(\n categories: [\n ::StackOne::Shared::Categories::ATS,\n ::StackOne::Shared::Categories::HRIS,\n ::StackOne::Shared::Categories::HRIS_LEGACY,\n ::StackOne::Shared::Categories::CRM,\n ::StackOne::Shared::Categories::IAM,\n ::StackOne::Shared::Categories::MARKETING,\n ::StackOne::Shared::Categories::LMS,\n ::StackOne::Shared::Categories::ATS,\n ],\n origin_owner_id: \"<value>\",\n origin_owner_name: \"<value>\",\n)\n \nres = s.connect_sessions.create_connect_session(req)\n\nif ! res.connect_session_token.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Shared::ConnectSessionAuthenticate.new(\n token: \"<value>\",\n)\n \nres = s.connect_sessions.authenticate_connect_session(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.connectors.list_connectors_meta(include=\"field_path,unmapped_fields,resources,inactive,webhooks\")\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.connectors.get_connector_meta(provider=\"<value>\", include=\"field_path,unmapped_fields,resources,inactive,webhooks\")\n\nif ! res.connectors_meta.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationsRequest.new(\n fields_: \"id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,interview_stage,interview_stage_id,remote_interview_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\",\n filter: ::StackOne::Operations::AtsListApplicationsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"documents\",\n include: \"attachments,custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_applications(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.create_application(x_account_id=\"<value>\", ats_create_application_request_dto=::StackOne::Shared::AtsCreateApplicationRequestDto.new(\n job_id: \"4071538b-3cac-4fbf-ac76-f78ed250ffdd\",\n location_id: \"dd8d41d1-5eb8-4408-9c87-9ba44604eae4\",\n application_status: ::StackOne::Shared::AtsCreateApplicationRequestDtoApplicationStatus.new(\n value: ::StackOne::Shared::AtsCreateApplicationRequestDtoValue::HIRED,\n source_value: \"Hired\",\n ),\n questionnaires: [\n ::StackOne::Shared::Questionnaire.new(\n id: \"right_to_work\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n answers: [\n ::StackOne::Shared::Answer.new(\n id: \"answer1\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n type: ::StackOne::Shared::AnswerType.new(\n value: ::StackOne::Shared::AnswerValue::SHORT_TEXT,\n source_value: \"Short Text\",\n ),\n values: [\n \"Yes\",\n ],\n ),\n ],\n ),\n ],\n source: ::StackOne::Shared::AtsCreateApplicationRequestDtoSource.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"LinkedIn\",\n ),\n candidate_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n candidate: ::StackOne::Shared::AtsCreateApplicationRequestDtoCandidate.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Romain Sestier\",\n first_name: \"Romain\",\n last_name: \"Sestier\",\n email: \"sestier.romain123@gmail.com\",\n social_links: [\n ::StackOne::Shared::SocialLink.new(\n type: \"linkedin\",\n url: \"https://www.linkedin.com/in/romainsestier/\",\n ),\n ],\n company: \"Company Inc.\",\n title: \"Software Engineer\",\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n country: \"United States\",\n custom_fields: [\n ::StackOne::Shared::CandidateCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n phone_number: \"+1234567890\",\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,interview_stage,interview_stage_id,remote_interview_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\",\n expand: \"documents\",\n include: \"attachments,custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.update_application(id=\"<id>\", x_account_id=\"<value>\", ats_update_application_request_dto=::StackOne::Shared::AtsUpdateApplicationRequestDto.new(\n interview_stage_id: \"18bcbb1b-3cbc-4198-a999-460861d19480\",\n application_status: ::StackOne::Shared::AtsUpdateApplicationRequestDtoApplicationStatus.new(\n value: ::StackOne::Shared::AtsUpdateApplicationRequestDtoValue::HIRED,\n source_value: \"Hired\",\n ),\n source: ::StackOne::Shared::AtsUpdateApplicationRequestDtoSource.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"LinkedIn\",\n ),\n custom_fields: [\n ::StackOne::Shared::ApplicationCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n rejected_reason_id: \"f223d7f6-908b-48f0-9237-b201c307f609\",\n))\n\nif ! res.update_result.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationDocumentsRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,path,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format\",\n filter: ::StackOne::Operations::AtsListApplicationDocumentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_application_documents(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.upload_application_document(id=\"<id>\", x_account_id=\"<value>\", unified_upload_request_dto=::StackOne::Shared::UnifiedUploadRequestDto.new(\n name: \"weather-forecast\",\n file_format: ::StackOne::Shared::UnifiedUploadRequestDtoFileFormat.new(\n value: ::StackOne::Shared::UnifiedUploadRequestDtoValue::PDF,\n source_value: \"abc\",\n ),\n content: \"VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE\",\n category_id: \"6530\",\n path: \"/path/to/file\",\n category: ::StackOne::Shared::UnifiedUploadRequestDtoCategory.new(\n value: \"reports, resumes\",\n source_value: \"550e8400-e29b-41d4-a716-446655440000, CUSTOM_CATEGORY_NAME\",\n ),\n confidential: ::StackOne::Shared::UnifiedUploadRequestDtoConfidential.new(\n value: ::StackOne::Shared::UnifiedUploadRequestDtoSchemasValue::TRUE,\n source_value: \"public\",\n ),\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationDocumentRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,name,path,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application_document(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.download_application_document(id=\"<id>\", sub_resource_id=\"<value>\", x_account_id=\"<value>\", format=\"base64\")\n\nif ! res.bytes.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.move_application(id=\"<id>\", x_account_id=\"<value>\", ats_move_application_request_dto=::StackOne::Shared::AtsMoveApplicationRequestDto.new(\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n interview_stage_id: \"f223d7f6-908b-48f0-9237-b201c307f609\",\n))\n\nif ! res.move_application_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationsOffersRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,application_id,remote_application_id,start_date,status,offer_status,salary,currency,created_at,updated_at,offer_history\",\n filter: ::StackOne::Operations::AtsListApplicationsOffersQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_applications_offers(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationOfferRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,application_id,remote_application_id,start_date,status,offer_status,salary,currency,created_at,updated_at,offer_history\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application_offer(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.reject_application(id=\"<id>\", x_account_id=\"<value>\", ats_reject_application_request_dto=::StackOne::Shared::AtsRejectApplicationRequestDto.new(\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n rejected_reason_id: \"f223d7f6-908b-48f0-9237-b201c307f609\",\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationsScheduledInterviewsRequest.new(\n id: \"<id>\",\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\",\n filter: ::StackOne::Operations::AtsListApplicationsScheduledInterviewsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_applications_scheduled_interviews(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationScheduledInterviewRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,candidate_id,remote_candidate_id,job_id,remote_job_id,interview_stage,interview_stage_id,remote_interview_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\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application_scheduled_interview(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationScorecardsRequest.new(\n id: \"<id>\",\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\",\n filter: ::StackOne::Operations::AtsListApplicationScorecardsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_application_scorecards(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationScorecardRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\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\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application_scorecard(req)\n\nif ! res.scorecards_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/orders/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: ats_get_assessments_request
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetAssessmentsRequestRequest.new(\n id: \"<id>\",\n fields_: \"assessment_id,remote_assessment_id,candidate,score,assessment_date,submission_date,summary,result,result_url,attachments\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_assessments_request(req)\n\nif ! res.assessments_results_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/assessments/orders/{id}/results"]["get"]
update:
x-codeSamples:
- lang: ruby
label: ats_get_assessments_result
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetAssessmentsResultRequest.new(\n id: \"<id>\",\n fields_: \"assessment_id,remote_assessment_id,candidate,score,assessment_date,submission_date,summary,result,result_url,attachments\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_assessments_result(req)\n\nif ! res.assessments_results_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListAssessmentsPackagesRequest.new(\n filter: ::StackOne::Operations::AtsListAssessmentsPackagesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_assessments_packages(req)\n\nif ! res.assessments_packages_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetAssessmentsPackageRequest.new(\n id: \"<id>\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_assessments_package(req)\n\nif ! res.assessments_packages_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListCandidatesRequest.new(\n fields_: \"id,remote_id,name,first_name,last_name,email,emails,social_links,phone,phone_numbers,company,title,application_ids,remote_application_ids,hired_at,custom_fields,created_at,updated_at\",\n filter: ::StackOne::Operations::AtsListCandidatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_candidates(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.create_candidate(x_account_id=\"<value>\", ats_create_candidate_request_dto=::StackOne::Shared::AtsCreateCandidateRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Romain Sestier\",\n first_name: \"Romain\",\n last_name: \"Sestier\",\n email: \"sestier.romain123@gmail.com\",\n social_links: [\n ::StackOne::Shared::SocialLink.new(\n type: \"linkedin\",\n url: \"https://www.linkedin.com/in/romainsestier/\",\n ),\n ],\n company: \"Company Inc.\",\n title: \"Software Engineer\",\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n country: \"United States\",\n custom_fields: [\n ::StackOne::Shared::CandidateCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n phone_number: \"+1234567890\",\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetCandidateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,first_name,last_name,email,emails,social_links,phone,phone_numbers,company,title,application_ids,remote_application_ids,hired_at,custom_fields,created_at,updated_at\",\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_candidate(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.update_candidate(id=\"<id>\", x_account_id=\"<value>\", ats_update_candidate_request_dto=::StackOne::Shared::AtsUpdateCandidateRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Romain Sestier\",\n first_name: \"Romain\",\n last_name: \"Sestier\",\n email: \"sestier.romain123@gmail.com\",\n emails: [\n ::StackOne::Shared::CandidateEmail.new(\n type: \"personal\",\n value: \"sestier.romain123@gmail.com\",\n ),\n ],\n social_links: [\n ::StackOne::Shared::SocialLink.new(\n type: \"linkedin\",\n url: \"https://www.linkedin.com/in/romainsestier/\",\n ),\n ],\n phone_numbers: [\n ::StackOne::Shared::PhoneNumber.new(\n phone: \"+447700112233\",\n ),\n ],\n company: \"Company Inc.\",\n title: \"Software Engineer\",\n application_ids: [\n \"123e4567-e89b-12d3-a456-426614174000\",\n \"523e1234-e89b-fdd2-a456-762545121101\",\n ],\n hired_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n country: \"United States\",\n custom_fields: [\n ::StackOne::Shared::CandidateCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListCandidateNotesRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at\",\n filter: ::StackOne::Operations::AtsListCandidateNotesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_candidate_notes(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.create_candidate_note(id=\"<id>\", x_account_id=\"<value>\", ats_create_notes_request_dto=::StackOne::Shared::AtsCreateNotesRequestDto.new(\n content: [\n ::StackOne::Shared::NoteContentApiModel.new(\n body: \"This candidate seems like a good fit for the role\",\n ),\n ],\n author_id: \"1234567890\",\n visibility: ::StackOne::Shared::AtsCreateNotesRequestDtoVisibility.new(\n value: ::StackOne::Shared::AtsCreateNotesRequestDtoValue::PUBLIC,\n source_value: \"Public\",\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetCandidateNoteRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,content,author_id,remote_author_id,visibility,created_at,updated_at,deleted_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_candidate_note(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListApplicationCustomFieldDefinitionsRequest.new(\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsListApplicationCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_application_custom_field_definitions(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetApplicationCustomFieldDefinitionRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsGetApplicationCustomFieldDefinitionQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_application_custom_field_definition(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListCandidateCustomFieldDefinitionsRequest.new(\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsListCandidateCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_candidate_custom_field_definitions(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetCandidateCustomFieldDefinitionRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsGetCandidateCustomFieldDefinitionQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_candidate_custom_field_definition(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListJobCustomFieldDefinitionsRequest.new(\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsListJobCustomFieldDefinitionsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_job_custom_field_definitions(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetJobCustomFieldDefinitionRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,description,type,options\",\n filter: ::StackOne::Operations::AtsGetJobCustomFieldDefinitionQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_job_custom_field_definition(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListDepartmentsRequest.new(\n fields_: \"id,remote_id,name\",\n filter: ::StackOne::Operations::AtsListDepartmentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_departments(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetDepartmentRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_department(req)\n\nif ! res.department_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interview_stages"]["get"]
update:
x-codeSamples:
- lang: ruby
label: ats_list_interview_stages
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListInterviewStagesRequest.new(\n fields_: \"id,remote_id,name,order,created_at,updated_at\",\n filter: ::StackOne::Operations::AtsListInterviewStagesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_interview_stages(req)\n\nif ! res.interview_stages_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/ats/interview_stages/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: ats_get_interview_stage
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetInterviewStageRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,order,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_interview_stage(req)\n\nif ! res.interview_stage_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListInterviewsRequest.new(\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\",\n filter: ::StackOne::Operations::AtsListInterviewsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_interviews(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetInterviewRequest.new(\n id: \"<id>\",\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\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_interview(req)\n\nif ! res.interviews_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListJobPostingsRequest.new(\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,updated_at,created_at\",\n filter: ::StackOne::Operations::AtsListJobPostingsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n include: \"questionnaires\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_job_postings(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetJobPostingRequest.new(\n id: \"<id>\",\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,updated_at,created_at\",\n include: \"questionnaires\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_job_posting(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListJobsRequest.new(\n fields_: \"id,remote_id,code,title,status,job_status,department_ids,remote_department_ids,location_ids,remote_location_ids,hiring_team,interview_stages,confidential,custom_fields,created_at,updated_at\",\n filter: ::StackOne::Operations::AtsListJobsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"job_postings,interview_stages\",\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_jobs(req)\n\nif ! res.jobs_paginated.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetJobRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,code,title,status,job_status,department_ids,remote_department_ids,location_ids,remote_location_ids,hiring_team,interview_stages,confidential,custom_fields,created_at,updated_at\",\n expand: \"job_postings,interview_stages\",\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_job(req)\n\nif ! res.job_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListListsRequest.new(\n fields_: \"id,remote_id,name,created_at,updated_at,items,type\",\n filter: ::StackOne::Operations::AtsListListsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_lists(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetListRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,created_at,updated_at,items,type\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_list(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListLocationsRequest.new(\n fields_: \"id,remote_id,name\",\n filter: ::StackOne::Operations::AtsListLocationsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_locations(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetLocationRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_location(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListOffersRequest.new(\n fields_: \"id,remote_id,application_id,remote_application_id,start_date,status,offer_status,salary,currency,created_at,updated_at,offer_history\",\n filter: ::StackOne::Operations::AtsListOffersQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_offers(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.ats.create_offer(x_account_id=\"<value>\", ats_create_offer_request_dto=::StackOne::Shared::AtsCreateOfferRequestDto.new(\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n offer_status: ::StackOne::Shared::AtsCreateOfferRequestDtoOfferStatus.new(\n value: ::StackOne::Shared::AtsCreateOfferRequestDtoValue::PENDING,\n source_value: \"Pending\",\n ),\n offer_history: [\n ::StackOne::Shared::OfferHistory.new(\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetOfferRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,application_id,remote_application_id,start_date,status,offer_status,salary,currency,created_at,updated_at,offer_history\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_offer(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListRejectedReasonsRequest.new(\n fields_: \"id,remote_id,label,type,rejected_reason_type\",\n filter: ::StackOne::Operations::AtsListRejectedReasonsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_rejected_reasons(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetRejectedReasonRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,label,type,rejected_reason_type\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_rejected_reason(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsListUsersRequest.new(\n fields_: \"id,remote_id,first_name,last_name,name,email\",\n filter: ::StackOne::Operations::AtsListUsersQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.ats.list_users(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::AtsGetUserRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,first_name,last_name,name,email\",\n x_account_id: \"<value>\",\n)\n \nres = s.ats.get_user(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmListAccountsRequest.new(\n fields_: \"id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at\",\n filter: ::StackOne::Operations::CrmListAccountsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.crm.list_accounts(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmGetAccountRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,owner_id,remote_owner_id,name,description,industries,annual_revenue,website,addresses,phone_numbers,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.crm.get_account(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmListContactsRequest.new(\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\",\n filter: ::StackOne::Operations::CrmListContactsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.crm.list_contacts(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.crm.create_contact(x_account_id=\"<value>\", crm_create_contact_request_dto=::StackOne::Shared::CrmCreateContactRequestDto.new(\n first_name: \"Steve\",\n last_name: \"Wozniak\",\n company_name: \"Apple Inc.\",\n emails: [\n \"steve@apple.com\",\n ],\n phone_numbers: [\n \"123-456-7890\",\n ],\n deal_ids: [\n \"deal-001\",\n \"deal-002\",\n ],\n account_ids: [\n \"account-123\",\n \"account-456\",\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmGetContactRequest.new(\n id: \"<id>\",\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\",\n include: \"custom_fields\",\n x_account_id: \"<value>\",\n)\n \nres = s.crm.get_contact(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.crm.update_contact(id=\"<id>\", x_account_id=\"<value>\", crm_create_contact_request_dto=::StackOne::Shared::CrmCreateContactRequestDto.new(\n first_name: \"Steve\",\n last_name: \"Wozniak\",\n company_name: \"Apple Inc.\",\n emails: [\n \"steve@apple.com\",\n ],\n phone_numbers: [\n \"123-456-7890\",\n ],\n deal_ids: [\n \"deal-001\",\n \"deal-002\",\n ],\n account_ids: [\n \"account-123\",\n \"account-456\",\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.contact_result.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmListListsRequest.new(\n fields_: \"id,remote_id,name,created_at,updated_at,items,type\",\n filter: ::StackOne::Operations::CrmListListsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.crm.list_lists(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::CrmGetListRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,created_at,updated_at,items,type\",\n x_account_id: \"<value>\",\n)\n \nres = s.crm.get_list(req)\n\nif ! res.list_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListBenefitsRequest.new(\n fields_: \"id,remote_id,name,benefit_type,provider,description,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListBenefitsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_benefits(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetBenefitRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,benefit_type,provider,description,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_benefit(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListCompaniesRequest.new(\n fields_: \"id,remote_id,name,full_name,display_name,created_at,updated_at\",\n filter: ::StackOne::Operations::Filter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_companies(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetCompanyRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,full_name,display_name,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_company(req)\n\nif ! res.company_result.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeeCategoriesRequest.new(\n fields_: \"id,remote_id,name,active\",\n filter: ::StackOne::Operations::HrisListEmployeeCategoriesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employee_categories(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeeDocumentCategoryRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,active\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employee_document_category(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeesRequest.new(\n fields_: \"id,remote_id,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,benefits,manager_id,remote_manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,preferred_language,citizenships,home_location,work_location,employments,custom_fields,documents,created_at,updated_at,employee_number,national_identity_number\",\n filter: ::StackOne::Operations::QueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"company,employments,work_location,home_location,custom_fields,groups\",\n include: \"avatar_url,avatar,custom_fields,job_description,benefits\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employees(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.create_employee(x_account_id=\"<value>\", hris_create_employee_request_dto=::StackOne::Shared::HrisCreateEmployeeRequestDto.new(\n first_name: \"Issac\",\n last_name: \"Newton\",\n name: \"Issac Newton\",\n display_name: \"Sir Issac Newton\",\n avatar_url: \"https://example.com/avatar.png\",\n personal_email: \"isaac.newton@example.com\",\n personal_phone_number: \"+1234567890\",\n work_email: \"newton@example.com\",\n work_phone_number: \"+1234567890\",\n job_id: \"R-6789\",\n job_title: \"Physicist\",\n department_id: \"3093\",\n department: \"Physics\",\n manager_id: \"67890\",\n gender: ::StackOne::Shared::HrisCreateEmployeeRequestDtoGender.new(),\n preferred_language: ::StackOne::Shared::HrisCreateEmployeeRequestDtoPreferredLanguage.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasValue::ENG,\n ),\n ethnicity: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEthnicity.new(),\n date_of_birth: DateTime.iso8601('1990-01-01T00:00.000Z'),\n birthday: DateTime.iso8601('2021-01-01T00:00:00Z'),\n marital_status: ::StackOne::Shared::HrisCreateEmployeeRequestDtoMaritalStatus.new(),\n avatar: ::StackOne::Shared::HrisCreateEmployeeRequestDtoAvatar.new(),\n hire_date: DateTime.iso8601('2021-01-01T00:00.000Z'),\n start_date: DateTime.iso8601('2021-01-01T00:00.000Z'),\n tenure: 2.0,\n work_anniversary: DateTime.iso8601('2021-01-01T00:00:00Z'),\n employment_type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentType.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasEmploymentTypeValue::PERMANENT,\n source_value: \"Permanent\",\n ),\n employment_contract_type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentContractType.new(),\n employment_status: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentStatus.new(),\n termination_date: DateTime.iso8601('2021-01-01T00:00:00Z'),\n company_name: \"Example Corp\",\n citizenships: [\n ::StackOne::Shared::CountryCodeEnum.new(\n value: ::StackOne::Shared::Value::US,\n ),\n ],\n employments: [\n ::StackOne::Shared::Employment.new(\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 employee_id: \"1687-3\",\n remote_employee_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n job_title: \"Software Engineer\",\n pay_rate: \"40.00\",\n pay_period: ::StackOne::Shared::PayPeriod.new(\n value: ::StackOne::Shared::EmploymentValue::HOUR,\n source_value: \"Hour\",\n ),\n pay_frequency: ::StackOne::Shared::PayFrequency.new(\n value: ::StackOne::Shared::EmploymentSchemasValue::HOURLY,\n source_value: \"Hourly\",\n ),\n pay_currency: \"USD\",\n effective_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n employment_type: ::StackOne::Shared::EmploymentEmploymentType.new(\n value: ::StackOne::Shared::EmploymentSchemasEmploymentTypeValue::PERMANENT,\n source_value: \"Permanent\",\n ),\n employment_contract_type: ::StackOne::Shared::EmploymentEmploymentContractType.new(),\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n ),\n ],\n custom_fields: [\n ::StackOne::Shared::EmployeeCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n benefits: [\n ::StackOne::Shared::HRISBenefit.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Health Insurance\",\n provider: \"Aetna\",\n description: \"Health insurance for employees\",\n created_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n updated_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n ),\n ],\n national_identity_number: ::StackOne::Shared::HrisCreateEmployeeRequestDtoNationalIdentityNumber.new(\n value: \"123456789\",\n type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoType.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasNationalIdentityNumberValue::SSN,\n ),\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n home_location: ::StackOne::Shared::HrisCreateEmployeeRequestDtoHomeLocation.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Woolsthorpe Manor\",\n phone_number: \"+44 1476 860 364\",\n street_1: \"Water Lane\",\n street_2: \"Woolsthorpe by Colsterworth\",\n city: \"Grantham\",\n zip_code: \"NG33 5NR\",\n country: ::StackOne::Shared::HrisCreateEmployeeRequestDtoCountry.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasHomeLocationValue::US,\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n state: ::StackOne::Shared::State.new(),\n ),\n work_location: ::StackOne::Shared::HrisCreateEmployeeRequestDtoWorkLocation.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Woolsthorpe Manor\",\n phone_number: \"+44 1476 860 364\",\n street_1: \"Water Lane\",\n street_2: \"Woolsthorpe by Colsterworth\",\n city: \"Grantham\",\n zip_code: \"NG33 5NR\",\n country: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasCountry.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasWorkLocationValue::US,\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n state: ::StackOne::Shared::HrisCreateEmployeeRequestDtoState.new(),\n ),\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeeRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,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,benefits,manager_id,remote_manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,preferred_language,citizenships,home_location,work_location,employments,custom_fields,documents,created_at,updated_at,employee_number,national_identity_number\",\n expand: \"company,employments,work_location,home_location,custom_fields,groups\",\n include: \"avatar_url,avatar,custom_fields,job_description,benefits\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employee(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.update_employee(id=\"<id>\", x_account_id=\"<value>\", hris_create_employee_request_dto=::StackOne::Shared::HrisCreateEmployeeRequestDto.new(\n first_name: \"Issac\",\n last_name: \"Newton\",\n name: \"Issac Newton\",\n display_name: \"Sir Issac Newton\",\n avatar_url: \"https://example.com/avatar.png\",\n personal_email: \"isaac.newton@example.com\",\n personal_phone_number: \"+1234567890\",\n work_email: \"newton@example.com\",\n work_phone_number: \"+1234567890\",\n job_id: \"R-6789\",\n job_title: \"Physicist\",\n department_id: \"3093\",\n department: \"Physics\",\n manager_id: \"67890\",\n gender: ::StackOne::Shared::HrisCreateEmployeeRequestDtoGender.new(),\n preferred_language: ::StackOne::Shared::HrisCreateEmployeeRequestDtoPreferredLanguage.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasValue::ENG,\n ),\n ethnicity: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEthnicity.new(),\n date_of_birth: DateTime.iso8601('1990-01-01T00:00.000Z'),\n birthday: DateTime.iso8601('2021-01-01T00:00:00Z'),\n marital_status: ::StackOne::Shared::HrisCreateEmployeeRequestDtoMaritalStatus.new(),\n avatar: ::StackOne::Shared::HrisCreateEmployeeRequestDtoAvatar.new(),\n hire_date: DateTime.iso8601('2021-01-01T00:00.000Z'),\n start_date: DateTime.iso8601('2021-01-01T00:00.000Z'),\n tenure: 2.0,\n work_anniversary: DateTime.iso8601('2021-01-01T00:00:00Z'),\n employment_type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentType.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasEmploymentTypeValue::PERMANENT,\n source_value: \"Permanent\",\n ),\n employment_contract_type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentContractType.new(),\n employment_status: ::StackOne::Shared::HrisCreateEmployeeRequestDtoEmploymentStatus.new(),\n termination_date: DateTime.iso8601('2021-01-01T00:00:00Z'),\n company_name: \"Example Corp\",\n citizenships: [\n ::StackOne::Shared::CountryCodeEnum.new(\n value: ::StackOne::Shared::Value::US,\n ),\n ],\n employments: [\n ::StackOne::Shared::Employment.new(\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 employee_id: \"1687-3\",\n remote_employee_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n job_title: \"Software Engineer\",\n pay_rate: \"40.00\",\n pay_period: ::StackOne::Shared::PayPeriod.new(\n value: ::StackOne::Shared::EmploymentValue::HOUR,\n source_value: \"Hour\",\n ),\n pay_frequency: ::StackOne::Shared::PayFrequency.new(\n value: ::StackOne::Shared::EmploymentSchemasValue::HOURLY,\n source_value: \"Hourly\",\n ),\n pay_currency: \"USD\",\n effective_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n employment_type: ::StackOne::Shared::EmploymentEmploymentType.new(\n value: ::StackOne::Shared::EmploymentSchemasEmploymentTypeValue::PERMANENT,\n source_value: \"Permanent\",\n ),\n employment_contract_type: ::StackOne::Shared::EmploymentEmploymentContractType.new(),\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n ),\n ],\n custom_fields: [\n ::StackOne::Shared::EmployeeCustomFields.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Training Completion Status\",\n value: \"Completed\",\n value_id: \"value_456\",\n remote_value_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n ),\n ],\n benefits: [\n ::StackOne::Shared::HRISBenefit.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Health Insurance\",\n provider: \"Aetna\",\n description: \"Health insurance for employees\",\n created_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n updated_at: DateTime.iso8601('2021-01-01T00:00:00Z'),\n ),\n ],\n national_identity_number: ::StackOne::Shared::HrisCreateEmployeeRequestDtoNationalIdentityNumber.new(\n value: \"123456789\",\n type: ::StackOne::Shared::HrisCreateEmployeeRequestDtoType.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasNationalIdentityNumberValue::SSN,\n ),\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n home_location: ::StackOne::Shared::HrisCreateEmployeeRequestDtoHomeLocation.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Woolsthorpe Manor\",\n phone_number: \"+44 1476 860 364\",\n street_1: \"Water Lane\",\n street_2: \"Woolsthorpe by Colsterworth\",\n city: \"Grantham\",\n zip_code: \"NG33 5NR\",\n country: ::StackOne::Shared::HrisCreateEmployeeRequestDtoCountry.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasHomeLocationValue::US,\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n state: ::StackOne::Shared::State.new(),\n ),\n work_location: ::StackOne::Shared::HrisCreateEmployeeRequestDtoWorkLocation.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"Woolsthorpe Manor\",\n phone_number: \"+44 1476 860 364\",\n street_1: \"Water Lane\",\n street_2: \"Woolsthorpe by Colsterworth\",\n city: \"Grantham\",\n zip_code: \"NG33 5NR\",\n country: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasCountry.new(\n value: ::StackOne::Shared::HrisCreateEmployeeRequestDtoSchemasWorkLocationValue::US,\n ),\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n state: ::StackOne::Shared::HrisCreateEmployeeRequestDtoState.new(),\n ),\n))\n\nif ! res.create_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeeDocumentsRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,path,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format\",\n filter: ::StackOne::Operations::HrisListEmployeeDocumentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employee_documents(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.upload_employee_document(id=\"<id>\", x_account_id=\"<value>\", hris_documents_upload_request_dto=::StackOne::Shared::HrisDocumentsUploadRequestDto.new(\n name: \"weather-forecast\",\n file_format: ::StackOne::Shared::FileFormat.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoValue::PDF,\n source_value: \"abc\",\n ),\n content: \"VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE\",\n category_id: \"6530\",\n path: \"/path/to/file\",\n category: ::StackOne::Shared::HrisDocumentsUploadRequestDtoCategory.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoSchemasValue::UNMAPPED_VALUE,\n source_value: \"550e8400-e29b-41d4-a716-446655440000\",\n ),\n confidential: ::StackOne::Shared::Confidential.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoSchemasConfidentialValue::TRUE,\n source_value: \"public\",\n ),\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.batch_upload_employee_document(id=\"<id>\", x_account_id=\"<value>\", hris_batch_document_upload_request_dto=::StackOne::Shared::HrisBatchDocumentUploadRequestDto.new(\n items: [\n ::StackOne::Shared::HrisDocumentsUploadRequestDto.new(\n name: \"weather-forecast\",\n file_format: ::StackOne::Shared::FileFormat.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoValue::PDF,\n source_value: \"abc\",\n ),\n content: \"VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE\",\n category_id: \"6530\",\n path: \"/path/to/file\",\n category: ::StackOne::Shared::HrisDocumentsUploadRequestDtoCategory.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoSchemasValue::ACADEMIC,\n source_value: \"550e8400-e29b-41d4-a716-446655440000\",\n ),\n confidential: ::StackOne::Shared::Confidential.new(\n value: ::StackOne::Shared::HrisDocumentsUploadRequestDtoSchemasConfidentialValue::TRUE,\n source_value: \"public\",\n ),\n ),\n ],\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeeDocumentRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,name,path,type,category,category_id,remote_category_id,contents,created_at,updated_at,remote_url,file_format\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employee_document(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.download_employee_document(id=\"<id>\", sub_resource_id=\"<value>\", x_account_id=\"<value>\", format=\"base64\")\n\nif ! res.bytes.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeeEmploymentsRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListEmployeeEmploymentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employee_employments(req)\n\nif ! res.employments_paginated.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeeEmploymentRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type,created_at,updated_at\",\n expand: \"groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employee_employment(req)\n\nif ! res.employment_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeeTimeOffRequestsRequest.new(\n id: \"<id>\",\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,duration,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListEmployeeTimeOffRequestsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employee_time_off_requests(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.create_employee_time_off_request(id=\"<id>\", x_account_id=\"<value>\", hris_create_time_off_request_dto=::StackOne::Shared::HrisCreateTimeOffRequestDto.new(\n employee_id: \"1687-3\",\n approver_id: \"1687-4\",\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n start_half_day: true,\n end_half_day: true,\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeesTimeOffRequestRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\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,duration,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employees_time_off_request(req)\n\nif ! res.time_off_result.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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmployeeWorkEligibilityRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,type,sub_type,document,valid_from,valid_to,issued_by,number\",\n filter: ::StackOne::Operations::HrisListEmployeeWorkEligibilityQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employee_work_eligibility(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.create_employee_work_eligibility_request(id=\"<id>\", x_account_id=\"<value>\", hris_create_work_eligibility_request_dto=::StackOne::Shared::HrisCreateWorkEligibilityRequestDto.new(\n type: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoType.new(),\n sub_type: \"H1B\",\n document: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoDocument.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"My Document\",\n path: \"/path/to/file\",\n category: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoCategory.new(),\n category_id: \"6530\",\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-02T01:01:01.000Z'),\n remote_url: \"https://example.com/file.pdf\",\n file_format: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoFileFormat.new(\n value: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoSchemasDocumentValue::PDF,\n source_value: \"abc\",\n ),\n ),\n valid_from: DateTime.iso8601('2021-01-01T00:00.000Z'),\n valid_to: DateTime.iso8601('2021-01-01T00:00.000Z'),\n issued_by: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoIssuedBy.new(\n value: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoSchemasValue::US,\n ),\n number: \"1234567890\",\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmployeesWorkEligibilityRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n fields_: \"id,remote_id,type,sub_type,document,valid_from,valid_to,issued_by,number\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employees_work_eligibility(req)\n\nif ! 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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.update_employee_work_eligibility_request(id=\"<id>\", sub_resource_id=\"<value>\", x_account_id=\"<value>\", hris_create_work_eligibility_request_dto=::StackOne::Shared::HrisCreateWorkEligibilityRequestDto.new(\n type: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoType.new(),\n sub_type: \"H1B\",\n document: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoDocument.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n name: \"My Document\",\n path: \"/path/to/file\",\n category: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoCategory.new(),\n category_id: \"6530\",\n created_at: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n updated_at: DateTime.iso8601('2021-01-02T01:01:01.000Z'),\n remote_url: \"https://example.com/file.pdf\",\n file_format: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoFileFormat.new(\n value: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoSchemasDocumentValue::PDF,\n source_value: \"abc\",\n ),\n ),\n valid_from: DateTime.iso8601('2021-01-01T00:00.000Z'),\n valid_to: DateTime.iso8601('2021-01-01T00:00.000Z'),\n issued_by: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoIssuedBy.new(\n value: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDtoSchemasValue::US,\n ),\n number: \"1234567890\",\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\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\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListEmploymentsRequest.new(\n fields_: \"id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListEmploymentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_employments(req)\n\nif ! res.employments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/employments/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_employment
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetEmploymentRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,employee_id,remote_employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type,created_at,updated_at\",\n expand: \"groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_employment(req)\n\nif ! res.employment_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/groups"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_list_groups
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListGroupsRequest.new(\n fields_: \"id,remote_id,name,type,parent_ids,remote_parent_ids,owner_ids,remote_owner_ids\",\n filter: ::StackOne::Operations::HrisListGroupsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_groups(req)\n\nif ! res.hris_groups_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/groups/departments"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_list_department_groups
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListDepartmentGroupsRequest.new(\n fields_: \"id,remote_id,name\",\n filter: ::StackOne::Operations::HrisListDepartmentGroupsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_department_groups(req)\n\nif ! res.hris_departments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/groups/departments/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_department_group
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetDepartmentGroupRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_department_group(req)\n\nif ! res.hris_departments_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/groups/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_group
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetGroupRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,type,parent_ids,remote_parent_ids,owner_ids,remote_owner_ids\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_group(req)\n\nif ! res.hris_groups_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/jobs"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_list_jobs
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListJobsRequest.new(\n fields_: \"id,remote_id,name,type,parent_ids,remote_parent_ids,owner_ids,remote_owner_ids\",\n filter: ::StackOne::Operations::HrisListJobsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_jobs(req)\n\nif ! res.jobs_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/jobs/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_job
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetJobRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,type,parent_ids,remote_parent_ids,owner_ids,remote_owner_ids\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_job(req)\n\nif ! res.job_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/locations"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_list_locations
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListLocationsRequest.new(\n fields_: \"id,remote_id,employee_id,remote_employee_id,name,phone_number,street_1,street_2,city,state,zip_code,country,location_type,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListLocationsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_locations(req)\n\nif ! res.hris_locations_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/locations/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_location
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetLocationRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,employee_id,remote_employee_id,name,phone_number,street_1,street_2,city,state,zip_code,country,location_type,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_location(req)\n\nif ! res.hris_location_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/time_off"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_list_time_off_requests
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisListTimeOffRequestsRequest.new(\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,duration,created_at,updated_at\",\n filter: ::StackOne::Operations::HrisListTimeOffRequestsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.hris.list_time_off_requests(req)\n\nif ! res.time_off_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/time_off"]["post"]
update:
x-codeSamples:
- lang: ruby
label: hris_create_time_off_request
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.create_time_off_request(x_account_id=\"<value>\", hris_create_time_off_request_dto=::StackOne::Shared::HrisCreateTimeOffRequestDto.new(\n employee_id: \"1687-3\",\n approver_id: \"1687-4\",\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n start_half_day: true,\n end_half_day: true,\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/time_off/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: hris_get_time_off_request
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::HrisGetTimeOffRequestRequest.new(\n id: \"<id>\",\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,duration,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.hris.get_time_off_request(req)\n\nif ! res.time_off_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/hris/time_off/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: hris_update_time_off_request
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.hris.update_time_off_request(id=\"<id>\", x_account_id=\"<value>\", hris_create_time_off_request_dto=::StackOne::Shared::HrisCreateTimeOffRequestDto.new(\n employee_id: \"1687-3\",\n approver_id: \"1687-4\",\n start_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n end_date: DateTime.iso8601('2021-01-01T01:01:01.000Z'),\n start_half_day: true,\n end_half_day: true,\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/groups"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_list_groups
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamListGroupsRequest.new(\n fields_: \"id,remote_id,parent_id,remote_parent_id,name,description,roles,type,created_at,updated_at\",\n filter: ::StackOne::Operations::IamListGroupsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"roles\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.list_groups(req)\n\nif ! res.iam_groups_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/groups/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_get_group
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamGetGroupRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,parent_id,remote_parent_id,name,description,roles,type,created_at,updated_at\",\n expand: \"roles\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.get_group(req)\n\nif ! res.iam_group_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/policies"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_list_policies
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamListPoliciesRequest.new(\n fields_: \"id,remote_id,name,permissions,description,created_at,updated_at\",\n filter: ::StackOne::Operations::IamListPoliciesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"permissions\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.list_policies(req)\n\nif ! res.iam_policies_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/policies/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_get_policy
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamGetPolicyRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,permissions,description,created_at,updated_at\",\n expand: \"permissions\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.get_policy(req)\n\nif ! res.iam_policy_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/roles"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_list_roles
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamListRolesRequest.new(\n fields_: \"id,remote_id,name,type,policies,description,created_at,updated_at\",\n filter: ::StackOne::Operations::IamListRolesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"policies\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.list_roles(req)\n\nif ! res.iam_roles_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/roles/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_get_role
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamGetRoleRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,type,policies,description,created_at,updated_at\",\n expand: \"policies\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.get_role(req)\n\nif ! res.iam_role_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/users"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_list_users
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamListUsersRequest.new(\n fields_: \"id,remote_id,first_name,last_name,name,primary_email_address,username,roles,groups,status,avatar,is_bot_user,last_active_at,last_login_at,created_at,updated_at,multi_factor_enabled\",\n filter: ::StackOne::Operations::IamListUsersQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n expand: \"roles,groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.list_users(req)\n\nif ! res.iam_users_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/iam/users/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: iam_get_user
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::IamGetUserRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,first_name,last_name,name,primary_email_address,username,roles,groups,status,avatar,is_bot_user,last_active_at,last_login_at,created_at,updated_at,multi_factor_enabled\",\n expand: \"roles,groups\",\n x_account_id: \"<value>\",\n)\n \nres = s.iam.get_user(req)\n\nif ! res.iam_user_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/assignments"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_assignments
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListAssignmentsRequest.new(\n fields_: \"id,remote_id,user_id,remote_user_id,course_id,remote_course_id,updated_at,created_at,due_date,status\",\n filter: ::StackOne::Operations::LmsListAssignmentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n user_id: \"c28xyrc55866bvuv\",\n remote_user_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_assignments(req)\n\nif ! res.assignments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/assignments/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_assignment
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetAssignmentRequest.new(\n id: \"<id>\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_assignment(req)\n\nif ! res.assignment_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/categories"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_categories
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListCategoriesRequest.new(\n fields_: \"id,remote_id,name,active\",\n filter: ::StackOne::Operations::LmsListCategoriesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_categories(req)\n\nif ! res.categories_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/categories/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_category
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetCategoryRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,active\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_category(req)\n\nif ! res.category_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/completions"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_completions
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListCompletionsRequest.new(\n fields_: \"id,remote_id,external_id,remote_external_id,content_id,remote_content_id,user_id,remote_user_id,completed_at,updated_at,created_at,result,content_external_reference\",\n filter: ::StackOne::Operations::LmsListCompletionsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n user_id: \"746359\",\n remote_user_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_completions(req)\n\nif ! res.completions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/completions/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_completion
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetCompletionRequest.new(\n id: \"<id>\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_completion(req)\n\nif ! res.completion_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListContentRequest.new(\n fields_: \"id,remote_id,external_reference,course_ids,remote_course_ids,title,description,languages,content_url,content_type,cover_url,active,duration,categories,order\",\n filter: ::StackOne::Operations::LmsListContentQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_content(req)\n\nif ! res.content_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content"]["post"]
update:
x-codeSamples:
- lang: ruby
label: lms_create_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.lms.create_content(x_account_id=\"<value>\", lms_create_content_request_dto=::StackOne::Shared::LmsCreateContentRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n external_reference: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1\",\n course_ids: [\n \"16873-SOFTWARE-ENG-COURSE\",\n ],\n title: \"Software Engineer Lv 1\",\n description: \"This video acts as learning content for software engineers.\",\n languages: [\n ::StackOne::Shared::ContentLanguageEnum.new(\n value: ::StackOne::Shared::ContentLanguageEnumValue::EN_GB,\n ),\n ],\n content_url: \"https://www.youtube.com/watch?v=16873\",\n cover_url: \"https://www.googledrive.com/?v=16873\",\n active: true,\n duration: \"P3Y6M4DT12H30M5S\",\n order: 1.0,\n categories: [\n ::StackOne::Shared::CreateCategoriesApiModel.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Technology\",\n active: true,\n ),\n ],\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content"]["put"]
update:
x-codeSamples:
- lang: ruby
label: lms_upsert_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.lms.upsert_content(x_account_id=\"<value>\", lms_upsert_content_request_dto=::StackOne::Shared::LmsUpsertContentRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n external_reference: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1\",\n course_ids: [\n \"16873-SOFTWARE-ENG-COURSE\",\n ],\n title: \"Software Engineer Lv 1\",\n description: \"This video acts as learning content for software engineers.\",\n languages: [\n ::StackOne::Shared::ContentLanguageEnum.new(\n value: ::StackOne::Shared::ContentLanguageEnumValue::EN_GB,\n ),\n ],\n content_url: \"https://www.youtube.com/watch?v=16873\",\n cover_url: \"https://www.googledrive.com/?v=16873\",\n active: true,\n duration: \"P3Y6M4DT12H30M5S\",\n order: 1.0,\n categories: [\n ::StackOne::Shared::CreateCategoriesApiModel.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Technology\",\n active: true,\n ),\n ],\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content/batch"]["post"]
update:
x-codeSamples:
- lang: ruby
label: lms_batch_upsert_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.lms.batch_upsert_content(x_account_id=\"<value>\", lms_batch_upsert_content_request_dto=::StackOne::Shared::LmsBatchUpsertContentRequestDto.new(\n items: [\n ::StackOne::Shared::LmsUpsertContentRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n external_reference: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1\",\n course_ids: [\n \"16873-SOFTWARE-ENG-COURSE\",\n ],\n title: \"Software Engineer Lv 1\",\n description: \"This video acts as learning content for software engineers.\",\n languages: [\n ::StackOne::Shared::ContentLanguageEnum.new(\n value: ::StackOne::Shared::ContentLanguageEnumValue::EN_GB,\n ),\n ],\n content_url: \"https://www.youtube.com/watch?v=16873\",\n cover_url: \"https://www.googledrive.com/?v=16873\",\n active: true,\n duration: \"P3Y6M4DT12H30M5S\",\n order: 1.0,\n categories: [\n ::StackOne::Shared::CreateCategoriesApiModel.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Technology\",\n active: true,\n ),\n ],\n ),\n ],\n))\n\nif ! res.batch_result_api_model.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetContentRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,external_reference,course_ids,remote_course_ids,title,description,languages,content_url,content_type,cover_url,active,duration,categories,order\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_content(req)\n\nif ! res.content_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/content/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: lms_update_content
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.lms.update_content(id=\"<id>\", x_account_id=\"<value>\", lms_create_content_request_dto=::StackOne::Shared::LmsCreateContentRequestDto.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n external_reference: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1\",\n course_ids: [\n \"16873-SOFTWARE-ENG-COURSE\",\n ],\n title: \"Software Engineer Lv 1\",\n description: \"This video acts as learning content for software engineers.\",\n languages: [\n ::StackOne::Shared::ContentLanguageEnum.new(\n value: ::StackOne::Shared::ContentLanguageEnumValue::EN_GB,\n ),\n ],\n content_url: \"https://www.youtube.com/watch?v=16873\",\n cover_url: \"https://www.googledrive.com/?v=16873\",\n active: true,\n duration: \"P3Y6M4DT12H30M5S\",\n order: 1.0,\n categories: [\n ::StackOne::Shared::CreateCategoriesApiModel.new(\n unified_custom_fields: {\n \"my_project_custom_field_1\": \"REF-1236\",\n \"my_project_custom_field_2\": \"some other value\",\n },\n name: \"Technology\",\n active: true,\n ),\n ],\n))\n\nif ! res.update_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/courses"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_courses
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListCoursesRequest.new(\n fields_: \"id,remote_id,external_reference,content_ids,remote_content_ids,title,description,languages,course_type,cover_url,url,active,duration,categories,skills,updated_at,created_at\",\n filter: ::StackOne::Operations::LmsListCoursesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_courses(req)\n\nif ! res.course_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/courses/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_course
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetCourseRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,external_reference,content_ids,remote_content_ids,title,description,languages,course_type,cover_url,url,active,duration,categories,skills,updated_at,created_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_course(req)\n\nif ! res.course_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/skills"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_skills
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListSkillsRequest.new(\n fields_: \"id,remote_id,name,active,level\",\n filter: ::StackOne::Operations::LmsListSkillsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_skills(req)\n\nif ! res.skills_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/skills/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_skill
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetSkillRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,active,level\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_skill(req)\n\nif ! res.skill_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_users
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListUsersRequest.new(\n fields_: \"id,remote_id,external_reference,active,email,phone_number,created_at,updated_at,name\",\n filter: ::StackOne::Operations::LmsListUsersQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_users(req)\n\nif ! res.users_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_user
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetUserRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,external_reference,active,email,phone_number,created_at,updated_at,name\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_user(req)\n\nif ! res.user_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}/assignments"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_user_assignments
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListUserAssignmentsRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,user_id,remote_user_id,course_id,remote_course_id,updated_at,created_at,due_date,status\",\n filter: ::StackOne::Operations::LmsListUserAssignmentsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n user_id: \"c28xyrc55866bvuv\",\n remote_user_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_user_assignments(req)\n\nif ! res.assignments_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}/assignments/{subResourceId}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_user_assignment
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetUserAssignmentRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_user_assignment(req)\n\nif ! res.assignment_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}/completions"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_list_user_completions
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsListUserCompletionsRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,external_id,remote_external_id,content_id,remote_content_id,user_id,remote_user_id,completed_at,updated_at,created_at,result,content_external_reference\",\n filter: ::StackOne::Operations::LmsListUserCompletionsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n user_id: \"746359\",\n remote_user_id: \"e3cb75bf-aa84-466e-a6c1-b8322b257a48\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.list_user_completions(req)\n\nif ! res.completions_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}/completions"]["post"]
update:
x-codeSamples:
- lang: ruby
label: lms_create_user_completion
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.lms.create_user_completion(id=\"<id>\", x_account_id=\"<value>\", lms_create_completion_request_dto=::StackOne::Shared::LmsCreateCompletionRequestDto.new(\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n external_id: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1-COMPLETION\",\n content_external_reference: \"SOFTWARE-ENG-LV1-TRAINING-VIDEO-1-CONTENT\",\n content_id: \"16873-ENG-VIDEO-1\",\n completed_at: \"2021-07-21T14:00:00.000Z\",\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/lms/users/{id}/completions/{subResourceId}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: lms_get_user_completion
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::LmsGetUserCompletionRequest.new(\n id: \"<id>\",\n sub_resource_id: \"<value>\",\n x_account_id: \"<value>\",\n)\n \nres = s.lms.get_user_completion(req)\n\nif ! res.completion_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/campaigns"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_campaigns
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListCampaignsRequest.new(\n fields_: \"id,remote_id,name,created_at,updated_at,description,schedule_type,status,channels,first_sent_at,last_sent_at,tags,messages\",\n filter: ::StackOne::Operations::MarketingListCampaignsQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_campaigns(req)\n\nif ! res.campaigns_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/campaigns/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_campaign
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetCampaignRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,created_at,updated_at,description,schedule_type,status,channels,first_sent_at,last_sent_at,tags,messages\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_campaign(req)\n\nif ! res.campaign_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/content_blocks"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_content_blocks
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListContentBlocksRequest.new(\n fields_: \"id,remote_id,name,type,content,status,tags,created_at,updated_at\",\n filter: ::StackOne::Operations::MarketingListContentBlocksQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_content_blocks(req)\n\nif ! res.content_blocks_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/content_blocks"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_content_block
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_content_block(x_account_id=\"<value>\", marketing_create_content_blocks_request_dto=::StackOne::Shared::MarketingCreateContentBlocksRequestDto.new(\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/content_blocks/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_content_block
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetContentBlockRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,type,content,status,tags,created_at,updated_at\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_content_block(req)\n\nif ! res.content_blocks_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/content_blocks/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_content_block
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.update_content_block(id=\"<id>\", x_account_id=\"<value>\", marketing_create_content_blocks_request_dto=::StackOne::Shared::MarketingCreateContentBlocksRequestDto.new(\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/email"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_email_templates
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListEmailTemplatesRequest.new(\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n filter: ::StackOne::Operations::MarketingListEmailTemplatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_email_templates(req)\n\nif ! res.templates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/email"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_email_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_email_template(x_account_id=\"<value>\", marketing_create_email_template_request_dto=::StackOne::Shared::MarketingCreateEmailTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::EmailMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::MessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/email/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_email_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetEmailTemplateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_email_template(req)\n\nif ! res.template_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/email/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_email_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.update_email_template(id=\"<id>\", x_account_id=\"<value>\", marketing_create_email_template_request_dto=::StackOne::Shared::MarketingCreateEmailTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::EmailMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::MessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/in_app"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_in_app_templates
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListInAppTemplatesRequest.new(\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n filter: ::StackOne::Operations::MarketingListInAppTemplatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_in_app_templates(req)\n\nif ! res.templates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/in_app"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_in_app_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_in_app_template(x_account_id=\"<value>\", marketing_create_in_app_template_request_dto=::StackOne::Shared::MarketingCreateInAppTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::InAppMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::InAppMessagesMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/in_app/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_in_app_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetInAppTemplateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_in_app_template(req)\n\nif ! res.template_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/in_app/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_in_app_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.update_in_app_template(id=\"<id>\", x_account_id=\"<value>\", marketing_create_in_app_template_request_dto=::StackOne::Shared::MarketingCreateInAppTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::InAppMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::InAppMessagesMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/omni_channel"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_omni_channel_templates
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListOmniChannelTemplatesRequest.new(\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n filter: ::StackOne::Operations::MarketingListOmniChannelTemplatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_omni_channel_templates(req)\n\nif ! res.templates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/omni_channel"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_omni_channel_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_omni_channel_template(x_account_id=\"<value>\", marketing_create_template_request_dto=::StackOne::Shared::MarketingCreateTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::Message.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::MessageMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/omni_channel/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_omni_channel_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetOmniChannelTemplateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_omni_channel_template(req)\n\nif ! res.template_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/omni_channel/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_omni_channel_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.update_omni_channel_template(id=\"<id>\", x_account_id=\"<value>\", marketing_create_template_request_dto=::StackOne::Shared::MarketingCreateTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::Message.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::MessageMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/push"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_push_templates
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListPushTemplatesRequest.new(\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n filter: ::StackOne::Operations::MarketingListPushTemplatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_push_templates(req)\n\nif ! res.templates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/push"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_push_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_push_template(x_account_id=\"<value>\", marketing_create_push_template_request_dto=::StackOne::Shared::MarketingCreatePushTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::PushMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::PushMessagesMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/push/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_push_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetPushTemplateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_push_template(req)\n\nif ! res.template_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/push/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_push_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.update_push_template(id=\"<id>\", x_account_id=\"<value>\", marketing_create_push_template_request_dto=::StackOne::Shared::MarketingCreatePushTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::PushMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::PushMessagesMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/sms"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_list_sms_templates
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingListSmsTemplatesRequest.new(\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n filter: ::StackOne::Operations::MarketingListSmsTemplatesQueryParamFilter.new(\n updated_after: \"2020-01-01T00:00:00.000Z\",\n ),\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.list_sms_templates(req)\n\nif ! res.templates_paginated.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/sms"]["post"]
update:
x-codeSamples:
- lang: ruby
label: marketing_create_sms_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n \nres = s.marketing.create_sms_template(x_account_id=\"<value>\", marketing_create_sms_template_request_dto=::StackOne::Shared::MarketingCreateSmsTemplateRequestDto.new(\n messages: [\n ::StackOne::Shared::SmsMessages.new(\n id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n remote_id: \"8187e5da-dc77-475e-9949-af0f1fa4e4e3\",\n message_type: ::StackOne::Shared::SmsMessagesMessageType.new(\n source_value: \"Email\",\n ),\n ),\n ],\n passthrough: {\n \"other_known_names\": \"John Doe\",\n },\n))\n\nif ! res.create_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/sms/{id}"]["get"]
update:
x-codeSamples:
- lang: ruby
label: marketing_get_sms_template
source: "require 'stackone_client'\n\n\ns = ::StackOne::StackOne.new\ns.config_security(\n ::StackOne::Shared::Security.new(\n username: \"\",\n password: \"\",\n )\n)\n\n\nreq = ::StackOne::Operations::MarketingGetSmsTemplateRequest.new(\n id: \"<id>\",\n fields_: \"id,remote_id,name,messages,created_at,updated_at,tags\",\n x_account_id: \"<value>\",\n)\n \nres = s.marketing.get_sms_template(req)\n\nif ! res.template_result.nil?\n # handle response\nend"
- target: $["paths"]["/unified/marketing/templates/sms/{id}"]["patch"]
update:
x-codeSamples:
- lang: ruby
label: marketing_update_sms_template