stackone_client 0.36.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stack_one/ats.rb +597 -3
  3. data/lib/stack_one/documents.rb +1 -1
  4. data/lib/stack_one/hris.rb +61 -59
  5. data/lib/stack_one/messaging.rb +1 -1
  6. data/lib/stack_one/models/operations/ats_download_application_document_response.rb +13 -5
  7. data/lib/stack_one/models/operations/ats_download_application_document_response.rbi +6 -2
  8. data/lib/stack_one/models/operations/documents_download_file_response.rb +6 -6
  9. data/lib/stack_one/models/operations/documents_download_file_response.rbi +2 -2
  10. data/lib/stack_one/models/operations/hris_download_employee_document_response.rb +12 -152
  11. data/lib/stack_one/models/operations/hris_download_employee_document_response.rbi +6 -76
  12. data/lib/stack_one/models/operations/messaging_download_messaging_attachment_response.rb +6 -6
  13. data/lib/stack_one/models/operations/messaging_download_messaging_attachment_response.rbi +2 -2
  14. data/lib/stack_one/models/operations/ticketing_download_ticketing_attachment_response.rb +6 -6
  15. data/lib/stack_one/models/operations/ticketing_download_ticketing_attachment_response.rbi +2 -2
  16. data/lib/stack_one/models/shared/customfieldoption.rb +2 -2
  17. data/lib/stack_one/models/shared/customfieldoption_4.rb +28 -0
  18. data/lib/stack_one/models/shared/customfieldoption_4.rbi +11 -0
  19. data/lib/stack_one/models/shared/customfieldoption_value.rb +28 -0
  20. data/lib/stack_one/models/shared/customfieldoption_value.rbi +11 -0
  21. data/lib/stack_one/models/shared/customfields.rb +2 -2
  22. data/lib/stack_one/models/shared/downloadapimodel.rb +37 -0
  23. data/lib/stack_one/models/shared/downloadapimodel.rbi +15 -0
  24. data/lib/stack_one/models/shared/downloadheadersapimodel.rb +53 -0
  25. data/lib/stack_one/models/shared/downloadheadersapimodel.rbi +23 -0
  26. data/lib/stack_one/models/shared.rb +4 -0
  27. data/lib/stack_one/sdkconfiguration.rb +3 -3
  28. data/lib/stack_one/ticketing.rb +1 -1
  29. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d1e367d85f593935df49faad8a76783c713092757dfdbbf96388e24cb19435a
4
- data.tar.gz: 3fd32675bda5a8452899aa2ef71c78be0f2529e842f83ba7240a24a5ad6ce1ad
3
+ metadata.gz: 812394efb762d746b6407934faf4d34023ce48600f093afd3d441545ddf4581a
4
+ data.tar.gz: 1bffbd3ec92ece4ba7041213f458329e0c3759f19088e18ad6bc1aca1d8e43dc
5
5
  SHA512:
6
- metadata.gz: 319f9e27fa43aa9014442ac0290ba555ef8af522b57cfaf901e54f2616e56255aac5f002f6d68698a13b141517ff1ca16de76df49d1333168f5a3cec49f280ad
7
- data.tar.gz: db6f22452a4d42f4e70064acc822adb183f6a9ac654c261ddb954c940d061b050cbe1c2d3e5592b3e1b8232c6274a13f7ada947f63d6a46dfb8147d694a7603f
6
+ metadata.gz: f9e24ab1a9ae5dff140a386d38839b1138f02e156d4e69204968a55509bbda11a5852c3624440789adff29605518747a39e41aeda4091aa5d71022768e0f1243
7
+ data.tar.gz: 84c38a53f879f3455d146e099c442e51baffb783782519dcace2f7840670f1455f550dcf5479dd42f9d15eb91beff49f36084fe12a6c8502707452f0e7059e43
data/lib/stack_one/ats.rb CHANGED
@@ -2475,7 +2475,7 @@ module StackOne
2475
2475
  headers = Utils.get_headers(request)
2476
2476
  headers = T.cast(headers, T::Hash[String, String])
2477
2477
  query_params = Utils.get_query_params(Models::Operations::AtsDownloadApplicationDocumentRequest, request, nil)
2478
- headers['Accept'] = 'application/octet-stream'
2478
+ headers['Accept'] = 'application/json;q=1, text/csv;q=0.97, text/plain;q=0.95, application/gzip;q=0.92, application/msword;q=0.89, application/octet-stream;q=0.87, application/pdf;q=0.84, application/rtf;q=0.82, application/vnd.ms-excel;q=0.79, application/vnd.ms-outlook;q=0.76, application/vnd.ms-powerpoint;q=0.74, application/vnd.oasis.opendocument.presentation;q=0.71, application/vnd.oasis.opendocument.spreadsheet;q=0.68, application/vnd.oasis.opendocument.text;q=0.66, application/vnd.openxmlformats-officedocument.presentationml.presentation;q=0.63, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;q=0.61, application/vnd.openxmlformats-officedocument.wordprocessingml.document;q=0.58, application/x-7z-compressed;q=0.55, application/x-rar-compressed;q=0.53, application/xml;q=0.50, application/zip;q=0.47, audio/mp4;q=0.45, audio/mpeg;q=0.42, audio/wav;q=0.39, image/bmp;q=0.37, image/gif;q=0.34, image/heic;q=0.32, image/jpeg;q=0.29, image/png;q=0.26, image/tiff;q=0.24, image/webp;q=0.21, message/rfc822;q=0.18, text/html;q=0.16, text/rtf;q=0.13, video/avi;q=0.11, video/mp4;q=0.08, video/quicktime;q=0.05, video/webm;q=0'
2479
2479
  headers['user-agent'] = @sdk_configuration.user_agent
2480
2480
  retries ||= @sdk_configuration.retry_config
2481
2481
  retries ||= Utils::RetryConfig.new(
@@ -2554,7 +2554,7 @@ module StackOne
2554
2554
 
2555
2555
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
2556
2556
  if Utils.match_status_code(http_response.status, ['200'])
2557
- if Utils.match_content_type(content_type, 'application/octet-stream')
2557
+ if Utils.match_content_type(content_type, 'application/gzip')
2558
2558
  http_response = @sdk_configuration.hooks.after_success(
2559
2559
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2560
2560
  hook_ctx: hook_ctx
@@ -2568,7 +2568,601 @@ module StackOne
2568
2568
  content_type: content_type,
2569
2569
  raw_response: http_response,
2570
2570
  headers: {},
2571
- bytes: T.unsafe(obj)
2571
+ body: T.unsafe(obj)
2572
+ )
2573
+ elsif Utils.match_content_type(content_type, 'application/msword')
2574
+ http_response = @sdk_configuration.hooks.after_success(
2575
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2576
+ hook_ctx: hook_ctx
2577
+ ),
2578
+ response: http_response
2579
+ )
2580
+ obj = http_response.env.body
2581
+
2582
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2583
+ status_code: http_response.status,
2584
+ content_type: content_type,
2585
+ raw_response: http_response,
2586
+ headers: {},
2587
+ body: T.unsafe(obj)
2588
+ )
2589
+ elsif Utils.match_content_type(content_type, 'application/octet-stream')
2590
+ http_response = @sdk_configuration.hooks.after_success(
2591
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2592
+ hook_ctx: hook_ctx
2593
+ ),
2594
+ response: http_response
2595
+ )
2596
+ obj = http_response.env.body
2597
+
2598
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2599
+ status_code: http_response.status,
2600
+ content_type: content_type,
2601
+ raw_response: http_response,
2602
+ headers: {},
2603
+ body: T.unsafe(obj)
2604
+ )
2605
+ elsif Utils.match_content_type(content_type, 'application/pdf')
2606
+ http_response = @sdk_configuration.hooks.after_success(
2607
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2608
+ hook_ctx: hook_ctx
2609
+ ),
2610
+ response: http_response
2611
+ )
2612
+ obj = http_response.env.body
2613
+
2614
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2615
+ status_code: http_response.status,
2616
+ content_type: content_type,
2617
+ raw_response: http_response,
2618
+ headers: {},
2619
+ body: T.unsafe(obj)
2620
+ )
2621
+ elsif Utils.match_content_type(content_type, 'application/rtf')
2622
+ http_response = @sdk_configuration.hooks.after_success(
2623
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2624
+ hook_ctx: hook_ctx
2625
+ ),
2626
+ response: http_response
2627
+ )
2628
+ obj = http_response.env.body
2629
+
2630
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2631
+ status_code: http_response.status,
2632
+ content_type: content_type,
2633
+ raw_response: http_response,
2634
+ headers: {},
2635
+ body: T.unsafe(obj)
2636
+ )
2637
+ elsif Utils.match_content_type(content_type, 'application/vnd.ms-excel')
2638
+ http_response = @sdk_configuration.hooks.after_success(
2639
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2640
+ hook_ctx: hook_ctx
2641
+ ),
2642
+ response: http_response
2643
+ )
2644
+ obj = http_response.env.body
2645
+
2646
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2647
+ status_code: http_response.status,
2648
+ content_type: content_type,
2649
+ raw_response: http_response,
2650
+ headers: {},
2651
+ body: T.unsafe(obj)
2652
+ )
2653
+ elsif Utils.match_content_type(content_type, 'application/vnd.ms-outlook')
2654
+ http_response = @sdk_configuration.hooks.after_success(
2655
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2656
+ hook_ctx: hook_ctx
2657
+ ),
2658
+ response: http_response
2659
+ )
2660
+ obj = http_response.env.body
2661
+
2662
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2663
+ status_code: http_response.status,
2664
+ content_type: content_type,
2665
+ raw_response: http_response,
2666
+ headers: {},
2667
+ body: T.unsafe(obj)
2668
+ )
2669
+ elsif Utils.match_content_type(content_type, 'application/vnd.ms-powerpoint')
2670
+ http_response = @sdk_configuration.hooks.after_success(
2671
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2672
+ hook_ctx: hook_ctx
2673
+ ),
2674
+ response: http_response
2675
+ )
2676
+ obj = http_response.env.body
2677
+
2678
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2679
+ status_code: http_response.status,
2680
+ content_type: content_type,
2681
+ raw_response: http_response,
2682
+ headers: {},
2683
+ body: T.unsafe(obj)
2684
+ )
2685
+ elsif Utils.match_content_type(content_type, 'application/vnd.oasis.opendocument.presentation')
2686
+ http_response = @sdk_configuration.hooks.after_success(
2687
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2688
+ hook_ctx: hook_ctx
2689
+ ),
2690
+ response: http_response
2691
+ )
2692
+ obj = http_response.env.body
2693
+
2694
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2695
+ status_code: http_response.status,
2696
+ content_type: content_type,
2697
+ raw_response: http_response,
2698
+ headers: {},
2699
+ body: T.unsafe(obj)
2700
+ )
2701
+ elsif Utils.match_content_type(content_type, 'application/vnd.oasis.opendocument.spreadsheet')
2702
+ http_response = @sdk_configuration.hooks.after_success(
2703
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2704
+ hook_ctx: hook_ctx
2705
+ ),
2706
+ response: http_response
2707
+ )
2708
+ obj = http_response.env.body
2709
+
2710
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2711
+ status_code: http_response.status,
2712
+ content_type: content_type,
2713
+ raw_response: http_response,
2714
+ headers: {},
2715
+ body: T.unsafe(obj)
2716
+ )
2717
+ elsif Utils.match_content_type(content_type, 'application/vnd.oasis.opendocument.text')
2718
+ http_response = @sdk_configuration.hooks.after_success(
2719
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2720
+ hook_ctx: hook_ctx
2721
+ ),
2722
+ response: http_response
2723
+ )
2724
+ obj = http_response.env.body
2725
+
2726
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2727
+ status_code: http_response.status,
2728
+ content_type: content_type,
2729
+ raw_response: http_response,
2730
+ headers: {},
2731
+ body: T.unsafe(obj)
2732
+ )
2733
+ elsif Utils.match_content_type(content_type, 'application/vnd.openxmlformats-officedocument.presentationml.presentation')
2734
+ http_response = @sdk_configuration.hooks.after_success(
2735
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2736
+ hook_ctx: hook_ctx
2737
+ ),
2738
+ response: http_response
2739
+ )
2740
+ obj = http_response.env.body
2741
+
2742
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2743
+ status_code: http_response.status,
2744
+ content_type: content_type,
2745
+ raw_response: http_response,
2746
+ headers: {},
2747
+ body: T.unsafe(obj)
2748
+ )
2749
+ elsif Utils.match_content_type(content_type, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
2750
+ http_response = @sdk_configuration.hooks.after_success(
2751
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2752
+ hook_ctx: hook_ctx
2753
+ ),
2754
+ response: http_response
2755
+ )
2756
+ obj = http_response.env.body
2757
+
2758
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2759
+ status_code: http_response.status,
2760
+ content_type: content_type,
2761
+ raw_response: http_response,
2762
+ headers: {},
2763
+ body: T.unsafe(obj)
2764
+ )
2765
+ elsif Utils.match_content_type(content_type, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')
2766
+ http_response = @sdk_configuration.hooks.after_success(
2767
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2768
+ hook_ctx: hook_ctx
2769
+ ),
2770
+ response: http_response
2771
+ )
2772
+ obj = http_response.env.body
2773
+
2774
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2775
+ status_code: http_response.status,
2776
+ content_type: content_type,
2777
+ raw_response: http_response,
2778
+ headers: {},
2779
+ body: T.unsafe(obj)
2780
+ )
2781
+ elsif Utils.match_content_type(content_type, 'application/x-7z-compressed')
2782
+ http_response = @sdk_configuration.hooks.after_success(
2783
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2784
+ hook_ctx: hook_ctx
2785
+ ),
2786
+ response: http_response
2787
+ )
2788
+ obj = http_response.env.body
2789
+
2790
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2791
+ status_code: http_response.status,
2792
+ content_type: content_type,
2793
+ raw_response: http_response,
2794
+ headers: {},
2795
+ body: T.unsafe(obj)
2796
+ )
2797
+ elsif Utils.match_content_type(content_type, 'application/x-rar-compressed')
2798
+ http_response = @sdk_configuration.hooks.after_success(
2799
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2800
+ hook_ctx: hook_ctx
2801
+ ),
2802
+ response: http_response
2803
+ )
2804
+ obj = http_response.env.body
2805
+
2806
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2807
+ status_code: http_response.status,
2808
+ content_type: content_type,
2809
+ raw_response: http_response,
2810
+ headers: {},
2811
+ body: T.unsafe(obj)
2812
+ )
2813
+ elsif Utils.match_content_type(content_type, 'application/xml')
2814
+ http_response = @sdk_configuration.hooks.after_success(
2815
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2816
+ hook_ctx: hook_ctx
2817
+ ),
2818
+ response: http_response
2819
+ )
2820
+ obj = http_response.env.body
2821
+
2822
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2823
+ status_code: http_response.status,
2824
+ content_type: content_type,
2825
+ raw_response: http_response,
2826
+ headers: {},
2827
+ body: T.unsafe(obj)
2828
+ )
2829
+ elsif Utils.match_content_type(content_type, 'application/zip')
2830
+ http_response = @sdk_configuration.hooks.after_success(
2831
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2832
+ hook_ctx: hook_ctx
2833
+ ),
2834
+ response: http_response
2835
+ )
2836
+ obj = http_response.env.body
2837
+
2838
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2839
+ status_code: http_response.status,
2840
+ content_type: content_type,
2841
+ raw_response: http_response,
2842
+ headers: {},
2843
+ body: T.unsafe(obj)
2844
+ )
2845
+ elsif Utils.match_content_type(content_type, 'audio/mp4')
2846
+ http_response = @sdk_configuration.hooks.after_success(
2847
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2848
+ hook_ctx: hook_ctx
2849
+ ),
2850
+ response: http_response
2851
+ )
2852
+ obj = http_response.env.body
2853
+
2854
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2855
+ status_code: http_response.status,
2856
+ content_type: content_type,
2857
+ raw_response: http_response,
2858
+ headers: {},
2859
+ body: T.unsafe(obj)
2860
+ )
2861
+ elsif Utils.match_content_type(content_type, 'audio/mpeg')
2862
+ http_response = @sdk_configuration.hooks.after_success(
2863
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2864
+ hook_ctx: hook_ctx
2865
+ ),
2866
+ response: http_response
2867
+ )
2868
+ obj = http_response.env.body
2869
+
2870
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2871
+ status_code: http_response.status,
2872
+ content_type: content_type,
2873
+ raw_response: http_response,
2874
+ headers: {},
2875
+ body: T.unsafe(obj)
2876
+ )
2877
+ elsif Utils.match_content_type(content_type, 'audio/wav')
2878
+ http_response = @sdk_configuration.hooks.after_success(
2879
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2880
+ hook_ctx: hook_ctx
2881
+ ),
2882
+ response: http_response
2883
+ )
2884
+ obj = http_response.env.body
2885
+
2886
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2887
+ status_code: http_response.status,
2888
+ content_type: content_type,
2889
+ raw_response: http_response,
2890
+ headers: {},
2891
+ body: T.unsafe(obj)
2892
+ )
2893
+ elsif Utils.match_content_type(content_type, 'image/bmp')
2894
+ http_response = @sdk_configuration.hooks.after_success(
2895
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2896
+ hook_ctx: hook_ctx
2897
+ ),
2898
+ response: http_response
2899
+ )
2900
+ obj = http_response.env.body
2901
+
2902
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2903
+ status_code: http_response.status,
2904
+ content_type: content_type,
2905
+ raw_response: http_response,
2906
+ headers: {},
2907
+ body: T.unsafe(obj)
2908
+ )
2909
+ elsif Utils.match_content_type(content_type, 'image/gif')
2910
+ http_response = @sdk_configuration.hooks.after_success(
2911
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2912
+ hook_ctx: hook_ctx
2913
+ ),
2914
+ response: http_response
2915
+ )
2916
+ obj = http_response.env.body
2917
+
2918
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2919
+ status_code: http_response.status,
2920
+ content_type: content_type,
2921
+ raw_response: http_response,
2922
+ headers: {},
2923
+ body: T.unsafe(obj)
2924
+ )
2925
+ elsif Utils.match_content_type(content_type, 'image/heic')
2926
+ http_response = @sdk_configuration.hooks.after_success(
2927
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2928
+ hook_ctx: hook_ctx
2929
+ ),
2930
+ response: http_response
2931
+ )
2932
+ obj = http_response.env.body
2933
+
2934
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2935
+ status_code: http_response.status,
2936
+ content_type: content_type,
2937
+ raw_response: http_response,
2938
+ headers: {},
2939
+ body: T.unsafe(obj)
2940
+ )
2941
+ elsif Utils.match_content_type(content_type, 'image/jpeg')
2942
+ http_response = @sdk_configuration.hooks.after_success(
2943
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2944
+ hook_ctx: hook_ctx
2945
+ ),
2946
+ response: http_response
2947
+ )
2948
+ obj = http_response.env.body
2949
+
2950
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2951
+ status_code: http_response.status,
2952
+ content_type: content_type,
2953
+ raw_response: http_response,
2954
+ headers: {},
2955
+ body: T.unsafe(obj)
2956
+ )
2957
+ elsif Utils.match_content_type(content_type, 'image/png')
2958
+ http_response = @sdk_configuration.hooks.after_success(
2959
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2960
+ hook_ctx: hook_ctx
2961
+ ),
2962
+ response: http_response
2963
+ )
2964
+ obj = http_response.env.body
2965
+
2966
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2967
+ status_code: http_response.status,
2968
+ content_type: content_type,
2969
+ raw_response: http_response,
2970
+ headers: {},
2971
+ body: T.unsafe(obj)
2972
+ )
2973
+ elsif Utils.match_content_type(content_type, 'image/tiff')
2974
+ http_response = @sdk_configuration.hooks.after_success(
2975
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2976
+ hook_ctx: hook_ctx
2977
+ ),
2978
+ response: http_response
2979
+ )
2980
+ obj = http_response.env.body
2981
+
2982
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2983
+ status_code: http_response.status,
2984
+ content_type: content_type,
2985
+ raw_response: http_response,
2986
+ headers: {},
2987
+ body: T.unsafe(obj)
2988
+ )
2989
+ elsif Utils.match_content_type(content_type, 'image/webp')
2990
+ http_response = @sdk_configuration.hooks.after_success(
2991
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
2992
+ hook_ctx: hook_ctx
2993
+ ),
2994
+ response: http_response
2995
+ )
2996
+ obj = http_response.env.body
2997
+
2998
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
2999
+ status_code: http_response.status,
3000
+ content_type: content_type,
3001
+ raw_response: http_response,
3002
+ headers: {},
3003
+ body: T.unsafe(obj)
3004
+ )
3005
+ elsif Utils.match_content_type(content_type, 'message/rfc822')
3006
+ http_response = @sdk_configuration.hooks.after_success(
3007
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3008
+ hook_ctx: hook_ctx
3009
+ ),
3010
+ response: http_response
3011
+ )
3012
+ obj = http_response.env.body
3013
+
3014
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3015
+ status_code: http_response.status,
3016
+ content_type: content_type,
3017
+ raw_response: http_response,
3018
+ headers: {},
3019
+ body: T.unsafe(obj)
3020
+ )
3021
+ elsif Utils.match_content_type(content_type, 'text/csv')
3022
+ http_response = @sdk_configuration.hooks.after_success(
3023
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3024
+ hook_ctx: hook_ctx
3025
+ ),
3026
+ response: http_response
3027
+ )
3028
+ obj = http_response.env.body
3029
+
3030
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3031
+ status_code: http_response.status,
3032
+ content_type: content_type,
3033
+ raw_response: http_response,
3034
+ headers: {},
3035
+ body: T.unsafe(obj)
3036
+ )
3037
+ elsif Utils.match_content_type(content_type, 'text/html')
3038
+ http_response = @sdk_configuration.hooks.after_success(
3039
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3040
+ hook_ctx: hook_ctx
3041
+ ),
3042
+ response: http_response
3043
+ )
3044
+ obj = http_response.env.body
3045
+
3046
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3047
+ status_code: http_response.status,
3048
+ content_type: content_type,
3049
+ raw_response: http_response,
3050
+ headers: {},
3051
+ body: T.unsafe(obj)
3052
+ )
3053
+ elsif Utils.match_content_type(content_type, 'text/rtf')
3054
+ http_response = @sdk_configuration.hooks.after_success(
3055
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3056
+ hook_ctx: hook_ctx
3057
+ ),
3058
+ response: http_response
3059
+ )
3060
+ obj = http_response.env.body
3061
+
3062
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3063
+ status_code: http_response.status,
3064
+ content_type: content_type,
3065
+ raw_response: http_response,
3066
+ headers: {},
3067
+ body: T.unsafe(obj)
3068
+ )
3069
+ elsif Utils.match_content_type(content_type, 'video/avi')
3070
+ http_response = @sdk_configuration.hooks.after_success(
3071
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3072
+ hook_ctx: hook_ctx
3073
+ ),
3074
+ response: http_response
3075
+ )
3076
+ obj = http_response.env.body
3077
+
3078
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3079
+ status_code: http_response.status,
3080
+ content_type: content_type,
3081
+ raw_response: http_response,
3082
+ headers: {},
3083
+ body: T.unsafe(obj)
3084
+ )
3085
+ elsif Utils.match_content_type(content_type, 'video/mp4')
3086
+ http_response = @sdk_configuration.hooks.after_success(
3087
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3088
+ hook_ctx: hook_ctx
3089
+ ),
3090
+ response: http_response
3091
+ )
3092
+ obj = http_response.env.body
3093
+
3094
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3095
+ status_code: http_response.status,
3096
+ content_type: content_type,
3097
+ raw_response: http_response,
3098
+ headers: {},
3099
+ body: T.unsafe(obj)
3100
+ )
3101
+ elsif Utils.match_content_type(content_type, 'video/quicktime')
3102
+ http_response = @sdk_configuration.hooks.after_success(
3103
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3104
+ hook_ctx: hook_ctx
3105
+ ),
3106
+ response: http_response
3107
+ )
3108
+ obj = http_response.env.body
3109
+
3110
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3111
+ status_code: http_response.status,
3112
+ content_type: content_type,
3113
+ raw_response: http_response,
3114
+ headers: {},
3115
+ body: T.unsafe(obj)
3116
+ )
3117
+ elsif Utils.match_content_type(content_type, 'video/webm')
3118
+ http_response = @sdk_configuration.hooks.after_success(
3119
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3120
+ hook_ctx: hook_ctx
3121
+ ),
3122
+ response: http_response
3123
+ )
3124
+ obj = http_response.env.body
3125
+
3126
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3127
+ status_code: http_response.status,
3128
+ content_type: content_type,
3129
+ raw_response: http_response,
3130
+ headers: {},
3131
+ body: T.unsafe(obj)
3132
+ )
3133
+ elsif Utils.match_content_type(content_type, 'application/json')
3134
+ http_response = @sdk_configuration.hooks.after_success(
3135
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3136
+ hook_ctx: hook_ctx
3137
+ ),
3138
+ response: http_response
3139
+ )
3140
+ response_data = http_response.env.response_body
3141
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::DownloadApiModel)
3142
+ response = Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3143
+ status_code: http_response.status,
3144
+ content_type: content_type,
3145
+ raw_response: http_response,
3146
+ headers: {},
3147
+ download_api_model: T.unsafe(obj)
3148
+ )
3149
+
3150
+ return response
3151
+ elsif Utils.match_content_type(content_type, 'text/plain')
3152
+ http_response = @sdk_configuration.hooks.after_success(
3153
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
3154
+ hook_ctx: hook_ctx
3155
+ ),
3156
+ response: http_response
3157
+ )
3158
+ obj = http_response.env.body
3159
+
3160
+ return Models::Operations::AtsDownloadApplicationDocumentResponse.new(
3161
+ status_code: http_response.status,
3162
+ content_type: content_type,
3163
+ raw_response: http_response,
3164
+ headers: {},
3165
+ download_api_model1: T.unsafe(obj)
2572
3166
  )
2573
3167
  else
2574
3168
  raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -147,7 +147,7 @@ module StackOne
147
147
  content_type: content_type,
148
148
  raw_response: http_response,
149
149
  headers: {},
150
- bytes: T.unsafe(obj)
150
+ body: T.unsafe(obj)
151
151
  )
152
152
  else
153
153
  raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'