schematichq 1.5.7 → 1.5.8

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +7 -1
  4. data/lib/schematic/accesstokens/client.rb +1 -1
  5. data/lib/schematic/accounts/client.rb +15 -15
  6. data/lib/schematic/billing/client.rb +432 -37
  7. data/lib/schematic/billing/types/charge_native_invoice_response.rb +15 -0
  8. data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +4 -0
  9. data/lib/schematic/billing/types/delete_contract_document_response.rb +15 -0
  10. data/lib/schematic/billing/types/get_company_contract_response.rb +15 -0
  11. data/lib/schematic/billing/types/get_company_upcoming_invoices_response.rb +15 -0
  12. data/lib/schematic/billing/types/move_to_default_plan_response.rb +15 -0
  13. data/lib/schematic/billing/types/reissue_native_invoice_link_response.rb +15 -0
  14. data/lib/schematic/billing/types/revoke_native_invoice_link_response.rb +15 -0
  15. data/lib/schematic/billing/types/update_billing_settings_request_body.rb +4 -0
  16. data/lib/schematic/billing/types/update_company_billing_profile_request_body.rb +6 -0
  17. data/lib/schematic/billing/types/upload_contract_document_request.rb +11 -0
  18. data/lib/schematic/billing/types/upload_contract_document_response.rb +15 -0
  19. data/lib/schematic/catalogs/client.rb +16 -16
  20. data/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb +2 -0
  21. data/lib/schematic/checkout/client.rb +98 -9
  22. data/lib/schematic/checkout/types/pause_subscription_request.rb +15 -0
  23. data/lib/schematic/checkout/types/pause_subscription_response.rb +15 -0
  24. data/lib/schematic/checkout/types/resume_subscription_request.rb +13 -0
  25. data/lib/schematic/checkout/types/resume_subscription_response.rb +15 -0
  26. data/lib/schematic/client.rb +7 -196
  27. data/lib/schematic/companies/client.rb +140 -44
  28. data/lib/schematic/companies/types/get_billing_entity_settings_response.rb +15 -0
  29. data/lib/schematic/companies/types/list_users_params.rb +4 -0
  30. data/lib/schematic/companies/types/list_users_request.rb +4 -0
  31. data/lib/schematic/companies/types/update_billing_entity_settings_request_body.rb +13 -0
  32. data/lib/schematic/companies/types/update_billing_entity_settings_response.rb +15 -0
  33. data/lib/schematic/components/client.rb +8 -8
  34. data/lib/schematic/componentspublic/client.rb +1 -1
  35. data/lib/schematic/credits/client.rb +41 -41
  36. data/lib/schematic/customplangrouprollouts/client.rb +258 -0
  37. data/lib/schematic/customplangrouprollouts/types/copy_custom_plan_request_body.rb +15 -0
  38. data/lib/schematic/customplangrouprollouts/types/copy_custom_plan_response.rb +15 -0
  39. data/lib/schematic/customplangrouprollouts/types/get_group_rollout_response.rb +15 -0
  40. data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_params.rb +14 -0
  41. data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_request.rb +11 -0
  42. data/lib/schematic/customplangrouprollouts/types/list_group_rollouts_response.rb +15 -0
  43. data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_params.rb +16 -0
  44. data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_request.rb +15 -0
  45. data/lib/schematic/customplangrouprollouts/types/preview_group_rollout_response.rb +15 -0
  46. data/lib/schematic/customplangrouprollouts/types/start_group_rollout_request_body.rb +17 -0
  47. data/lib/schematic/customplangrouprollouts/types/start_group_rollout_response.rb +15 -0
  48. data/lib/schematic/dataexports/client.rb +4 -4
  49. data/lib/schematic/entitlements/client.rb +28 -28
  50. data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +2 -0
  51. data/lib/schematic/entitlements/types/create_company_override_request_body.rb +2 -0
  52. data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +2 -0
  53. data/lib/schematic/entitlements/types/update_company_override_request_body.rb +2 -0
  54. data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +2 -0
  55. data/lib/schematic/errors/response_error.rb +4 -2
  56. data/lib/schematic/events/client.rb +213 -9
  57. data/lib/schematic/events/types/create_account_inference_cost_rate_request_body.rb +19 -0
  58. data/lib/schematic/events/types/create_account_inference_cost_rate_response.rb +15 -0
  59. data/lib/schematic/events/types/delete_account_inference_cost_rate_response.rb +15 -0
  60. data/lib/schematic/events/types/list_account_inference_cost_rates_params.rb +20 -0
  61. data/lib/schematic/events/types/list_account_inference_cost_rates_request.rb +17 -0
  62. data/lib/schematic/events/types/list_account_inference_cost_rates_response.rb +15 -0
  63. data/lib/schematic/events/types/update_account_inference_cost_rate_request_body.rb +13 -0
  64. data/lib/schematic/events/types/update_account_inference_cost_rate_response.rb +15 -0
  65. data/lib/schematic/features/client.rb +18 -18
  66. data/lib/schematic/insights/client.rb +6 -6
  67. data/lib/schematic/integrationsapi/client.rb +14 -14
  68. data/lib/schematic/internal/http/raw_client.rb +1 -1
  69. data/lib/schematic/licenses/client.rb +3 -3
  70. data/lib/schematic/planbundle/client.rb +3 -3
  71. data/lib/schematic/plangroups/client.rb +3 -3
  72. data/lib/schematic/planmigrations/client.rb +11 -11
  73. data/lib/schematic/plans/client.rb +20 -20
  74. data/lib/schematic/scheduledcheckout/client.rb +4 -4
  75. data/lib/schematic/types/account_inference_cost_rate_response_data.rb +29 -0
  76. data/lib/schematic/types/billing_invoice_billing_details_response_data.rb +2 -0
  77. data/lib/schematic/types/billing_invoice_detail_response_data.rb +2 -0
  78. data/lib/schematic/types/billing_moved_to_default_plan_response_data.rb +15 -0
  79. data/lib/schematic/types/billing_settings_response_data.rb +4 -0
  80. data/lib/schematic/types/billing_subscription_pause_behavior.rb +15 -0
  81. data/lib/schematic/types/billing_subscription_response_data.rb +6 -0
  82. data/lib/schematic/types/billing_subscription_view.rb +6 -0
  83. data/lib/schematic/types/billing_upcoming_invoice_response_data.rb +43 -0
  84. data/lib/schematic/types/billing_upcoming_invoices_response_data.rb +13 -0
  85. data/lib/schematic/types/catalog_configuration_response_data.rb +2 -0
  86. data/lib/schematic/types/catalog_plan_response_data.rb +4 -0
  87. data/lib/schematic/types/catalog_response_data.rb +2 -0
  88. data/lib/schematic/types/checkout_subscription.rb +6 -0
  89. data/lib/schematic/types/company_billing_entity_settings_response_data.rb +15 -0
  90. data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +10 -0
  91. data/lib/schematic/types/company_billing_profile_contract_response_data.rb +55 -0
  92. data/lib/schematic/types/company_billing_profile_document_response_data.rb +15 -0
  93. data/lib/schematic/types/company_override_response_data.rb +2 -0
  94. data/lib/schematic/types/company_subscription_response_data.rb +10 -0
  95. data/lib/schematic/types/contract_billing_details_request_body.rb +19 -0
  96. data/lib/schematic/types/contract_postpaid_credit_response_data.rb +23 -0
  97. data/lib/schematic/types/contract_postpaid_response_data.rb +15 -0
  98. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +2 -0
  99. data/lib/schematic/types/create_entitlement_req_common.rb +2 -0
  100. data/lib/schematic/types/credit_burn_breakdown_line.rb +4 -0
  101. data/lib/schematic/types/credit_model_rate.rb +17 -0
  102. data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
  103. data/lib/schematic/types/group_rollout_change_response_data.rb +13 -0
  104. data/lib/schematic/types/group_rollout_changes_response_data.rb +23 -0
  105. data/lib/schematic/types/group_rollout_company_response_data.rb +15 -0
  106. data/lib/schematic/types/group_rollout_company_result_response_data.rb +19 -0
  107. data/lib/schematic/types/group_rollout_preview_response_data.rb +19 -0
  108. data/lib/schematic/types/group_rollout_response_data.rb +25 -0
  109. data/lib/schematic/types/group_rollout_versions_request_body.rb +13 -0
  110. data/lib/schematic/types/manage_plan_request.rb +2 -0
  111. data/lib/schematic/types/plan_change_action.rb +1 -0
  112. data/lib/schematic/types/plan_entitlement_response_data.rb +2 -0
  113. data/lib/schematic/types/publish_plan_version_request_body.rb +4 -0
  114. data/lib/schematic/types/publish_preview_response_data.rb +4 -0
  115. data/lib/schematic/types/stripe_integration_config.rb +2 -0
  116. data/lib/schematic/types/update_entitlement_req_common.rb +2 -0
  117. data/lib/schematic/version.rb +1 -1
  118. data/lib/schematic/webhooks/client.rb +10 -10
  119. data/lib/schematic.rb +66 -5
  120. data/reference.md +2146 -1054
  121. metadata +57 -2
@@ -64,7 +64,7 @@ module Schematic
64
64
  500 => Schematic::Types::ApiError
65
65
  }
66
66
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
67
- raise error_class.new(response.body, code: code, body: error_body)
67
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
68
68
  end
69
69
  end
70
70
 
@@ -111,7 +111,7 @@ module Schematic
111
111
  500 => Schematic::Types::ApiError
112
112
  }
113
113
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
114
- raise error_class.new(response.body, code: code, body: error_body)
114
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
115
115
  end
116
116
  end
117
117
 
@@ -153,7 +153,7 @@ module Schematic
153
153
  500 => Schematic::Types::ApiError
154
154
  }
155
155
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
156
- raise error_class.new(response.body, code: code, body: error_body)
156
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
157
157
  end
158
158
  end
159
159
 
@@ -205,7 +205,7 @@ module Schematic
205
205
  500 => Schematic::Types::ApiError
206
206
  }
207
207
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
208
- raise error_class.new(response.body, code: code, body: error_body)
208
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
209
209
  end
210
210
  end
211
211
 
@@ -248,7 +248,7 @@ module Schematic
248
248
  500 => Schematic::Types::ApiError
249
249
  }
250
250
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
251
- raise error_class.new(response.body, code: code, body: error_body)
251
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
252
252
  end
253
253
  end
254
254
 
@@ -295,7 +295,7 @@ module Schematic
295
295
  500 => Schematic::Types::ApiError
296
296
  }
297
297
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
298
- raise error_class.new(response.body, code: code, body: error_body)
298
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
299
299
  end
300
300
  end
301
301
 
@@ -352,7 +352,7 @@ module Schematic
352
352
  500 => Schematic::Types::ApiError
353
353
  }
354
354
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
355
- raise error_class.new(response.body, code: code, body: error_body)
355
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
356
356
  end
357
357
  end
358
358
 
@@ -416,7 +416,7 @@ module Schematic
416
416
  500 => Schematic::Types::ApiError
417
417
  }
418
418
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
419
- raise error_class.new(response.body, code: code, body: error_body)
419
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
420
420
  end
421
421
  end
422
422
 
@@ -464,7 +464,7 @@ module Schematic
464
464
  500 => Schematic::Types::ApiError
465
465
  }
466
466
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
467
- raise error_class.new(response.body, code: code, body: error_body)
467
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
468
468
  end
469
469
  end
470
470
 
@@ -506,7 +506,7 @@ module Schematic
506
506
  500 => Schematic::Types::ApiError
507
507
  }
508
508
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
509
- raise error_class.new(response.body, code: code, body: error_body)
509
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
510
510
  end
511
511
  end
512
512
 
@@ -558,7 +558,7 @@ module Schematic
558
558
  500 => Schematic::Types::ApiError
559
559
  }
560
560
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
561
- raise error_class.new(response.body, code: code, body: error_body)
561
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
562
562
  end
563
563
  end
564
564
 
@@ -601,7 +601,7 @@ module Schematic
601
601
  500 => Schematic::Types::ApiError
602
602
  }
603
603
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
604
- raise error_class.new(response.body, code: code, body: error_body)
604
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
605
605
  end
606
606
  end
607
607
 
@@ -665,7 +665,7 @@ module Schematic
665
665
  500 => Schematic::Types::ApiError
666
666
  }
667
667
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
668
- raise error_class.new(response.body, code: code, body: error_body)
668
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
669
669
  end
670
670
  end
671
671
 
@@ -723,7 +723,7 @@ module Schematic
723
723
  500 => Schematic::Types::ApiError
724
724
  }
725
725
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
726
- raise error_class.new(response.body, code: code, body: error_body)
726
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
727
727
  end
728
728
  end
729
729
 
@@ -771,7 +771,7 @@ module Schematic
771
771
  500 => Schematic::Types::ApiError
772
772
  }
773
773
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
774
- raise error_class.new(response.body, code: code, body: error_body)
774
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
775
775
  end
776
776
  end
777
777
 
@@ -819,7 +819,7 @@ module Schematic
819
819
  500 => Schematic::Types::ApiError
820
820
  }
821
821
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
822
- raise error_class.new(response.body, code: code, body: error_body)
822
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
823
823
  end
824
824
  end
825
825
 
@@ -880,7 +880,7 @@ module Schematic
880
880
  500 => Schematic::Types::ApiError
881
881
  }
882
882
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
883
- raise error_class.new(response.body, code: code, body: error_body)
883
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
884
884
  end
885
885
  end
886
886
 
@@ -941,7 +941,7 @@ module Schematic
941
941
  500 => Schematic::Types::ApiError
942
942
  }
943
943
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
944
- raise error_class.new(response.body, code: code, body: error_body)
944
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
945
945
  end
946
946
  end
947
947
 
@@ -999,7 +999,7 @@ module Schematic
999
999
  500 => Schematic::Types::ApiError
1000
1000
  }
1001
1001
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1002
- raise error_class.new(response.body, code: code, body: error_body)
1002
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1003
1003
  end
1004
1004
  end
1005
1005
 
@@ -1057,7 +1057,7 @@ module Schematic
1057
1057
  500 => Schematic::Types::ApiError
1058
1058
  }
1059
1059
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1060
- raise error_class.new(response.body, code: code, body: error_body)
1060
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1061
1061
  end
1062
1062
  end
1063
1063
 
@@ -1105,7 +1105,7 @@ module Schematic
1105
1105
  500 => Schematic::Types::ApiError
1106
1106
  }
1107
1107
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1108
- raise error_class.new(response.body, code: code, body: error_body)
1108
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1109
1109
  end
1110
1110
  end
1111
1111
 
@@ -1157,7 +1157,7 @@ module Schematic
1157
1157
  500 => Schematic::Types::ApiError
1158
1158
  }
1159
1159
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1160
- raise error_class.new(response.body, code: code, body: error_body)
1160
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1161
1161
  end
1162
1162
  end
1163
1163
 
@@ -1200,7 +1200,7 @@ module Schematic
1200
1200
  500 => Schematic::Types::ApiError
1201
1201
  }
1202
1202
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1203
- raise error_class.new(response.body, code: code, body: error_body)
1203
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1204
1204
  end
1205
1205
  end
1206
1206
 
@@ -1270,7 +1270,7 @@ module Schematic
1270
1270
  500 => Schematic::Types::ApiError
1271
1271
  }
1272
1272
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1273
- raise error_class.new(response.body, code: code, body: error_body)
1273
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1274
1274
  end
1275
1275
  end
1276
1276
 
@@ -1319,7 +1319,7 @@ module Schematic
1319
1319
  500 => Schematic::Types::ApiError
1320
1320
  }
1321
1321
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1322
- raise error_class.new(response.body, code: code, body: error_body)
1322
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1323
1323
  end
1324
1324
  end
1325
1325
 
@@ -1361,7 +1361,7 @@ module Schematic
1361
1361
  500 => Schematic::Types::ApiError
1362
1362
  }
1363
1363
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1364
- raise error_class.new(response.body, code: code, body: error_body)
1364
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1365
1365
  end
1366
1366
  end
1367
1367
 
@@ -1412,7 +1412,7 @@ module Schematic
1412
1412
  500 => Schematic::Types::ApiError
1413
1413
  }
1414
1414
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1415
- raise error_class.new(response.body, code: code, body: error_body)
1415
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1416
1416
  end
1417
1417
  end
1418
1418
 
@@ -1463,7 +1463,7 @@ module Schematic
1463
1463
  500 => Schematic::Types::ApiError
1464
1464
  }
1465
1465
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1466
- raise error_class.new(response.body, code: code, body: error_body)
1466
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1467
1467
  end
1468
1468
  end
1469
1469
 
@@ -1533,7 +1533,7 @@ module Schematic
1533
1533
  500 => Schematic::Types::ApiError
1534
1534
  }
1535
1535
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1536
- raise error_class.new(response.body, code: code, body: error_body)
1536
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1537
1537
  end
1538
1538
  end
1539
1539
 
@@ -1581,7 +1581,7 @@ module Schematic
1581
1581
  500 => Schematic::Types::ApiError
1582
1582
  }
1583
1583
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1584
- raise error_class.new(response.body, code: code, body: error_body)
1584
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1585
1585
  end
1586
1586
  end
1587
1587
 
@@ -1624,7 +1624,7 @@ module Schematic
1624
1624
  500 => Schematic::Types::ApiError
1625
1625
  }
1626
1626
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1627
- raise error_class.new(response.body, code: code, body: error_body)
1627
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1628
1628
  end
1629
1629
  end
1630
1630
 
@@ -1691,7 +1691,7 @@ module Schematic
1691
1691
  500 => Schematic::Types::ApiError
1692
1692
  }
1693
1693
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1694
- raise error_class.new(response.body, code: code, body: error_body)
1694
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1695
1695
  end
1696
1696
  end
1697
1697
 
@@ -1734,7 +1734,7 @@ module Schematic
1734
1734
  500 => Schematic::Types::ApiError
1735
1735
  }
1736
1736
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1737
- raise error_class.new(response.body, code: code, body: error_body)
1737
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1738
1738
  end
1739
1739
  end
1740
1740
 
@@ -1776,7 +1776,7 @@ module Schematic
1776
1776
  500 => Schematic::Types::ApiError
1777
1777
  }
1778
1778
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1779
- raise error_class.new(response.body, code: code, body: error_body)
1779
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1780
1780
  end
1781
1781
  end
1782
1782
 
@@ -1824,7 +1824,7 @@ module Schematic
1824
1824
  500 => Schematic::Types::ApiError
1825
1825
  }
1826
1826
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1827
- raise error_class.new(response.body, code: code, body: error_body)
1827
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1828
1828
  end
1829
1829
  end
1830
1830
 
@@ -1867,7 +1867,7 @@ module Schematic
1867
1867
  500 => Schematic::Types::ApiError
1868
1868
  }
1869
1869
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1870
- raise error_class.new(response.body, code: code, body: error_body)
1870
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1871
1871
  end
1872
1872
  end
1873
1873
 
@@ -1934,7 +1934,7 @@ module Schematic
1934
1934
  500 => Schematic::Types::ApiError
1935
1935
  }
1936
1936
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1937
- raise error_class.new(response.body, code: code, body: error_body)
1937
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1938
1938
  end
1939
1939
  end
1940
1940
 
@@ -1989,7 +1989,7 @@ module Schematic
1989
1989
  500 => Schematic::Types::ApiError
1990
1990
  }
1991
1991
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1992
- raise error_class.new(response.body, code: code, body: error_body)
1992
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1993
1993
  end
1994
1994
  end
1995
1995
 
@@ -2062,7 +2062,7 @@ module Schematic
2062
2062
  500 => Schematic::Types::ApiError
2063
2063
  }
2064
2064
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
2065
- raise error_class.new(response.body, code: code, body: error_body)
2065
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
2066
2066
  end
2067
2067
  end
2068
2068
 
@@ -2104,7 +2104,7 @@ module Schematic
2104
2104
  500 => Schematic::Types::ApiError
2105
2105
  }
2106
2106
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
2107
- raise error_class.new(response.body, code: code, body: error_body)
2107
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
2108
2108
  end
2109
2109
  end
2110
2110
 
@@ -2177,7 +2177,7 @@ module Schematic
2177
2177
  500 => Schematic::Types::ApiError
2178
2178
  }
2179
2179
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
2180
- raise error_class.new(response.body, code: code, body: error_body)
2180
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
2181
2181
  end
2182
2182
  end
2183
2183
  end
@@ -0,0 +1,258 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Customplangrouprollouts
5
+ class Client
6
+ # @param client [Schematic::Internal::Http::RawClient]
7
+ #
8
+ # @return [void]
9
+ def initialize(client:)
10
+ @client = client
11
+ end
12
+
13
+ # @param request_options [Hash]
14
+ # @param params [Hash]
15
+ # @option request_options [String] :base_url
16
+ # @option request_options [Hash{String => Object}] :additional_headers
17
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
18
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
19
+ # @option request_options [Integer] :timeout_in_seconds
20
+ # @option params [String] :plan_id
21
+ #
22
+ # @example
23
+ # client.customplangrouprollouts.list_group_rollouts(plan_id: "plan_id")
24
+ #
25
+ # @return [Schematic::Customplangrouprollouts::Types::ListGroupRolloutsResponse]
26
+ def list_group_rollouts(request_options: {}, **params)
27
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
28
+ query_params = {}
29
+ query_params["plan_id"] = params[:plan_id] if params.key?(:plan_id)
30
+
31
+ request = Schematic::Internal::JSON::Request.new(
32
+ base_url: request_options[:base_url],
33
+ method: "GET",
34
+ path: "custom-plan-group-rollouts",
35
+ query: query_params,
36
+ request_options: request_options
37
+ )
38
+ begin
39
+ response = @client.send(request)
40
+ rescue Net::HTTPRequestTimeout
41
+ raise Schematic::Errors::TimeoutError
42
+ end
43
+ code = response.code.to_i
44
+ if code.between?(200, 299)
45
+ (response.body.to_s.empty? ? nil : Schematic::Customplangrouprollouts::Types::ListGroupRolloutsResponse.load(response.body))
46
+ else
47
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
48
+ error_types = {
49
+ 400 => Schematic::Types::ApiError,
50
+ 401 => Schematic::Types::ApiError,
51
+ 403 => Schematic::Types::ApiError,
52
+ 404 => Schematic::Types::ApiError,
53
+ 500 => Schematic::Types::ApiError
54
+ }
55
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
56
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
57
+ end
58
+ end
59
+
60
+ # @param request_options [Hash]
61
+ # @param params [Hash]
62
+ # @option request_options [String] :base_url
63
+ # @option request_options [Hash{String => Object}] :additional_headers
64
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
65
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
66
+ # @option request_options [Integer] :timeout_in_seconds
67
+ # @option params [String] :custom_plan_group_rollout_id
68
+ #
69
+ # @example
70
+ # client.customplangrouprollouts.get_group_rollout(custom_plan_group_rollout_id: "custom_plan_group_rollout_id")
71
+ #
72
+ # @return [Schematic::Customplangrouprollouts::Types::GetGroupRolloutResponse]
73
+ def get_group_rollout(request_options: {}, **params)
74
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
75
+ request = Schematic::Internal::JSON::Request.new(
76
+ base_url: request_options[:base_url],
77
+ method: "GET",
78
+ path: "custom-plan-group-rollouts/#{URI.encode_uri_component(params[:custom_plan_group_rollout_id].to_s)}",
79
+ request_options: request_options
80
+ )
81
+ begin
82
+ response = @client.send(request)
83
+ rescue Net::HTTPRequestTimeout
84
+ raise Schematic::Errors::TimeoutError
85
+ end
86
+ code = response.code.to_i
87
+ if code.between?(200, 299)
88
+ (response.body.to_s.empty? ? nil : Schematic::Customplangrouprollouts::Types::GetGroupRolloutResponse.load(response.body))
89
+ else
90
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
91
+ error_types = {
92
+ 401 => Schematic::Types::ApiError,
93
+ 403 => Schematic::Types::ApiError,
94
+ 404 => Schematic::Types::ApiError,
95
+ 500 => Schematic::Types::ApiError
96
+ }
97
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
98
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
99
+ end
100
+ end
101
+
102
+ # @param request_options [Hash]
103
+ # @param params [Schematic::Customplangrouprollouts::Types::CopyCustomPlanRequestBody]
104
+ # @option request_options [String] :base_url
105
+ # @option request_options [Hash{String => Object}] :additional_headers
106
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
107
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
108
+ # @option request_options [Integer] :timeout_in_seconds
109
+ # @option params [String] :plan_id
110
+ #
111
+ # @example
112
+ # client.customplangrouprollouts.copy_custom_plan(
113
+ # plan_id: "plan_id",
114
+ # company_id: "company_id"
115
+ # )
116
+ #
117
+ # @return [Schematic::Customplangrouprollouts::Types::CopyCustomPlanResponse]
118
+ def copy_custom_plan(request_options: {}, **params)
119
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
120
+ request_data = Schematic::Customplangrouprollouts::Types::CopyCustomPlanRequestBody.new(params).to_h
121
+ non_body_param_names = %w[plan_id]
122
+ body = request_data.except(*non_body_param_names)
123
+
124
+ request = Schematic::Internal::JSON::Request.new(
125
+ base_url: request_options[:base_url],
126
+ method: "POST",
127
+ path: "custom-plans/#{URI.encode_uri_component(params[:plan_id].to_s)}/copies",
128
+ body: body,
129
+ request_options: request_options
130
+ )
131
+ begin
132
+ response = @client.send(request)
133
+ rescue Net::HTTPRequestTimeout
134
+ raise Schematic::Errors::TimeoutError
135
+ end
136
+ code = response.code.to_i
137
+ if code.between?(200, 299)
138
+ (response.body.to_s.empty? ? nil : Schematic::Customplangrouprollouts::Types::CopyCustomPlanResponse.load(response.body))
139
+ else
140
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
141
+ error_types = {
142
+ 400 => Schematic::Types::ApiError,
143
+ 401 => Schematic::Types::ApiError,
144
+ 403 => Schematic::Types::ApiError,
145
+ 404 => Schematic::Types::ApiError,
146
+ 500 => Schematic::Types::ApiError
147
+ }
148
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
149
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
150
+ end
151
+ end
152
+
153
+ # @param request_options [Hash]
154
+ # @param params [Hash]
155
+ # @option request_options [String] :base_url
156
+ # @option request_options [Hash{String => Object}] :additional_headers
157
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
158
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
159
+ # @option request_options [Integer] :timeout_in_seconds
160
+ # @option params [String] :plan_id
161
+ # @option params [String, nil] :from_plan_version_id
162
+ # @option params [String, nil] :to_plan_version_id
163
+ #
164
+ # @example
165
+ # client.customplangrouprollouts.preview_group_rollout(
166
+ # plan_id: "plan_id",
167
+ # from_plan_version_id: "from_plan_version_id",
168
+ # to_plan_version_id: "to_plan_version_id"
169
+ # )
170
+ #
171
+ # @return [Schematic::Customplangrouprollouts::Types::PreviewGroupRolloutResponse]
172
+ def preview_group_rollout(request_options: {}, **params)
173
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
174
+ query_params = {}
175
+ query_params["from_plan_version_id"] = params[:from_plan_version_id] if params.key?(:from_plan_version_id)
176
+ query_params["to_plan_version_id"] = params[:to_plan_version_id] if params.key?(:to_plan_version_id)
177
+
178
+ request = Schematic::Internal::JSON::Request.new(
179
+ base_url: request_options[:base_url],
180
+ method: "GET",
181
+ path: "custom-plans/#{URI.encode_uri_component(params[:plan_id].to_s)}/group-rollout-preview",
182
+ query: query_params,
183
+ request_options: request_options
184
+ )
185
+ begin
186
+ response = @client.send(request)
187
+ rescue Net::HTTPRequestTimeout
188
+ raise Schematic::Errors::TimeoutError
189
+ end
190
+ code = response.code.to_i
191
+ if code.between?(200, 299)
192
+ (response.body.to_s.empty? ? nil : Schematic::Customplangrouprollouts::Types::PreviewGroupRolloutResponse.load(response.body))
193
+ else
194
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
195
+ error_types = {
196
+ 401 => Schematic::Types::ApiError,
197
+ 403 => Schematic::Types::ApiError,
198
+ 404 => Schematic::Types::ApiError,
199
+ 500 => Schematic::Types::ApiError
200
+ }
201
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
202
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
203
+ end
204
+ end
205
+
206
+ # @param request_options [Hash]
207
+ # @param params [Schematic::Customplangrouprollouts::Types::StartGroupRolloutRequestBody]
208
+ # @option request_options [String] :base_url
209
+ # @option request_options [Hash{String => Object}] :additional_headers
210
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
211
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
212
+ # @option request_options [Integer] :timeout_in_seconds
213
+ # @option params [String] :plan_id
214
+ #
215
+ # @example
216
+ # client.customplangrouprollouts.start_group_rollout(
217
+ # plan_id: "plan_id",
218
+ # excluded_company_ids: ["excluded_company_ids"]
219
+ # )
220
+ #
221
+ # @return [Schematic::Customplangrouprollouts::Types::StartGroupRolloutResponse]
222
+ def start_group_rollout(request_options: {}, **params)
223
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
224
+ request_data = Schematic::Customplangrouprollouts::Types::StartGroupRolloutRequestBody.new(params).to_h
225
+ non_body_param_names = %w[plan_id]
226
+ body = request_data.except(*non_body_param_names)
227
+
228
+ request = Schematic::Internal::JSON::Request.new(
229
+ base_url: request_options[:base_url],
230
+ method: "POST",
231
+ path: "custom-plans/#{URI.encode_uri_component(params[:plan_id].to_s)}/group-rollouts",
232
+ body: body,
233
+ request_options: request_options
234
+ )
235
+ begin
236
+ response = @client.send(request)
237
+ rescue Net::HTTPRequestTimeout
238
+ raise Schematic::Errors::TimeoutError
239
+ end
240
+ code = response.code.to_i
241
+ if code.between?(200, 299)
242
+ (response.body.to_s.empty? ? nil : Schematic::Customplangrouprollouts::Types::StartGroupRolloutResponse.load(response.body))
243
+ else
244
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
245
+ error_types = {
246
+ 400 => Schematic::Types::ApiError,
247
+ 401 => Schematic::Types::ApiError,
248
+ 403 => Schematic::Types::ApiError,
249
+ 404 => Schematic::Types::ApiError,
250
+ 500 => Schematic::Types::ApiError
251
+ }
252
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
253
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
254
+ end
255
+ end
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Customplangrouprollouts
5
+ module Types
6
+ class CopyCustomPlanRequestBody < Internal::Types::Model
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+
9
+ field :company_id, -> { String }, optional: false, nullable: false
10
+
11
+ field :name, -> { String }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Customplangrouprollouts
7
+ module Types
8
+ class CopyCustomPlanResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::PlanVersionResponseData }, optional: false, nullable: false
10
+
11
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Customplangrouprollouts
7
+ module Types
8
+ class GetGroupRolloutResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::GroupRolloutResponseData }, optional: false, nullable: false
10
+
11
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Customplangrouprollouts
7
+ module Types
8
+ # Input parameters
9
+ class ListGroupRolloutsParams < Internal::Types::Model
10
+ field :plan_id, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end