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
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Customplangrouprollouts
5
+ module Types
6
+ class ListGroupRolloutsRequest < Internal::Types::Model
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ 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 ListGroupRolloutsResponse < Internal::Types::Model
9
+ field :data, -> { Internal::Types::Array[Schematic::Types::GroupRolloutResponseData] }, optional: false, nullable: false
10
+
11
+ field :params, -> { Schematic::Customplangrouprollouts::Types::ListGroupRolloutsParams }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
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 PreviewGroupRolloutParams < Internal::Types::Model
10
+ field :from_plan_version_id, -> { String }, optional: true, nullable: false
11
+
12
+ field :to_plan_version_id, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Customplangrouprollouts
5
+ module Types
6
+ class PreviewGroupRolloutRequest < Internal::Types::Model
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+
9
+ field :from_plan_version_id, -> { String }, optional: true, nullable: false
10
+
11
+ field :to_plan_version_id, -> { 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 PreviewGroupRolloutResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::GroupRolloutPreviewResponseData }, optional: false, nullable: false
10
+
11
+ field :params, -> { Schematic::Customplangrouprollouts::Types::PreviewGroupRolloutParams }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Customplangrouprollouts
5
+ module Types
6
+ class StartGroupRolloutRequestBody < Internal::Types::Model
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+
9
+ field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
10
+
11
+ field :from_plan_version_id, -> { String }, optional: true, nullable: false
12
+
13
+ field :to_plan_version_id, -> { String }, optional: true, nullable: false
14
+ end
15
+ end
16
+ end
17
+ 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 StartGroupRolloutResponse < 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
@@ -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
 
@@ -110,7 +110,7 @@ module Schematic
110
110
  500 => Schematic::Types::ApiError
111
111
  }
112
112
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
113
- raise error_class.new(response.body, code: code, body: error_body)
113
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
114
114
  end
115
115
  end
116
116
 
@@ -152,7 +152,7 @@ module Schematic
152
152
  500 => Schematic::Types::ApiError
153
153
  }
154
154
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
155
- raise error_class.new(response.body, code: code, body: error_body)
155
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
156
156
  end
157
157
  end
158
158
 
@@ -193,7 +193,7 @@ module Schematic
193
193
  500 => Schematic::Types::ApiError
194
194
  }
195
195
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
196
- raise error_class.new(response.body, code: code, body: error_body)
196
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
197
197
  end
198
198
  end
199
199
  end
@@ -79,7 +79,7 @@ module Schematic
79
79
  500 => Schematic::Types::ApiError
80
80
  }
81
81
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
82
- raise error_class.new(response.body, code: code, body: error_body)
82
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
83
83
  end
84
84
  end
85
85
 
@@ -126,7 +126,7 @@ module Schematic
126
126
  500 => Schematic::Types::ApiError
127
127
  }
128
128
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
129
- raise error_class.new(response.body, code: code, body: error_body)
129
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
130
130
  end
131
131
  end
132
132
 
@@ -168,7 +168,7 @@ module Schematic
168
168
  500 => Schematic::Types::ApiError
169
169
  }
170
170
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
171
- raise error_class.new(response.body, code: code, body: error_body)
171
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
172
172
  end
173
173
  end
174
174
 
@@ -219,7 +219,7 @@ module Schematic
219
219
  500 => Schematic::Types::ApiError
220
220
  }
221
221
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
222
- raise error_class.new(response.body, code: code, body: error_body)
222
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
223
223
  end
224
224
  end
225
225
 
@@ -262,7 +262,7 @@ module Schematic
262
262
  500 => Schematic::Types::ApiError
263
263
  }
264
264
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
265
- raise error_class.new(response.body, code: code, body: error_body)
265
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
266
266
  end
267
267
  end
268
268
 
@@ -335,7 +335,7 @@ module Schematic
335
335
  500 => Schematic::Types::ApiError
336
336
  }
337
337
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
338
- raise error_class.new(response.body, code: code, body: error_body)
338
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
339
339
  end
340
340
  end
341
341
 
@@ -393,7 +393,7 @@ module Schematic
393
393
  500 => Schematic::Types::ApiError
394
394
  }
395
395
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
396
- raise error_class.new(response.body, code: code, body: error_body)
396
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
397
397
  end
398
398
  end
399
399
 
@@ -451,7 +451,7 @@ module Schematic
451
451
  500 => Schematic::Types::ApiError
452
452
  }
453
453
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
454
- raise error_class.new(response.body, code: code, body: error_body)
454
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
455
455
  end
456
456
  end
457
457
 
@@ -523,7 +523,7 @@ module Schematic
523
523
  500 => Schematic::Types::ApiError
524
524
  }
525
525
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
526
- raise error_class.new(response.body, code: code, body: error_body)
526
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
527
527
  end
528
528
  end
529
529
 
@@ -590,7 +590,7 @@ module Schematic
590
590
  500 => Schematic::Types::ApiError
591
591
  }
592
592
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
593
- raise error_class.new(response.body, code: code, body: error_body)
593
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
594
594
  end
595
595
  end
596
596
 
@@ -650,7 +650,7 @@ module Schematic
650
650
  500 => Schematic::Types::ApiError
651
651
  }
652
652
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
653
- raise error_class.new(response.body, code: code, body: error_body)
653
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
654
654
  end
655
655
  end
656
656
 
@@ -722,7 +722,7 @@ module Schematic
722
722
  500 => Schematic::Types::ApiError
723
723
  }
724
724
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
725
- raise error_class.new(response.body, code: code, body: error_body)
725
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
726
726
  end
727
727
  end
728
728
 
@@ -780,7 +780,7 @@ module Schematic
780
780
  500 => Schematic::Types::ApiError
781
781
  }
782
782
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
783
- raise error_class.new(response.body, code: code, body: error_body)
783
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
784
784
  end
785
785
  end
786
786
 
@@ -838,7 +838,7 @@ module Schematic
838
838
  500 => Schematic::Types::ApiError
839
839
  }
840
840
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
841
- raise error_class.new(response.body, code: code, body: error_body)
841
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
842
842
  end
843
843
  end
844
844
 
@@ -917,7 +917,7 @@ module Schematic
917
917
  500 => Schematic::Types::ApiError
918
918
  }
919
919
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
920
- raise error_class.new(response.body, code: code, body: error_body)
920
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
921
921
  end
922
922
  end
923
923
 
@@ -964,7 +964,7 @@ module Schematic
964
964
  500 => Schematic::Types::ApiError
965
965
  }
966
966
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
967
- raise error_class.new(response.body, code: code, body: error_body)
967
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
968
968
  end
969
969
  end
970
970
 
@@ -1006,7 +1006,7 @@ module Schematic
1006
1006
  500 => Schematic::Types::ApiError
1007
1007
  }
1008
1008
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1009
- raise error_class.new(response.body, code: code, body: error_body)
1009
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1010
1010
  end
1011
1011
  end
1012
1012
 
@@ -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
 
@@ -1100,7 +1100,7 @@ module Schematic
1100
1100
  500 => Schematic::Types::ApiError
1101
1101
  }
1102
1102
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1103
- raise error_class.new(response.body, code: code, body: error_body)
1103
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1104
1104
  end
1105
1105
  end
1106
1106
 
@@ -1149,7 +1149,7 @@ module Schematic
1149
1149
  500 => Schematic::Types::ApiError
1150
1150
  }
1151
1151
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1152
- raise error_class.new(response.body, code: code, body: error_body)
1152
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1153
1153
  end
1154
1154
  end
1155
1155
 
@@ -1228,7 +1228,7 @@ module Schematic
1228
1228
  500 => Schematic::Types::ApiError
1229
1229
  }
1230
1230
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1231
- raise error_class.new(response.body, code: code, body: error_body)
1231
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1232
1232
  end
1233
1233
  end
1234
1234
 
@@ -1274,7 +1274,7 @@ module Schematic
1274
1274
  500 => Schematic::Types::ApiError
1275
1275
  }
1276
1276
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1277
- raise error_class.new(response.body, code: code, body: error_body)
1277
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1278
1278
  end
1279
1279
  end
1280
1280
 
@@ -1322,7 +1322,7 @@ module Schematic
1322
1322
  500 => Schematic::Types::ApiError
1323
1323
  }
1324
1324
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1325
- raise error_class.new(response.body, code: code, body: error_body)
1325
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1326
1326
  end
1327
1327
  end
1328
1328
 
@@ -1379,7 +1379,7 @@ module Schematic
1379
1379
  500 => Schematic::Types::ApiError
1380
1380
  }
1381
1381
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1382
- raise error_class.new(response.body, code: code, body: error_body)
1382
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1383
1383
  end
1384
1384
  end
1385
1385
 
@@ -1433,7 +1433,7 @@ module Schematic
1433
1433
  500 => Schematic::Types::ApiError
1434
1434
  }
1435
1435
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1436
- raise error_class.new(response.body, code: code, body: error_body)
1436
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1437
1437
  end
1438
1438
  end
1439
1439
 
@@ -1499,7 +1499,7 @@ module Schematic
1499
1499
  500 => Schematic::Types::ApiError
1500
1500
  }
1501
1501
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1502
- raise error_class.new(response.body, code: code, body: error_body)
1502
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1503
1503
  end
1504
1504
  end
1505
1505
 
@@ -1566,7 +1566,7 @@ module Schematic
1566
1566
  500 => Schematic::Types::ApiError
1567
1567
  }
1568
1568
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1569
- raise error_class.new(response.body, code: code, body: error_body)
1569
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1570
1570
  end
1571
1571
  end
1572
1572
 
@@ -1623,7 +1623,7 @@ module Schematic
1623
1623
  500 => Schematic::Types::ApiError
1624
1624
  }
1625
1625
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
1626
- raise error_class.new(response.body, code: code, body: error_body)
1626
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
1627
1627
  end
1628
1628
  end
1629
1629
  end
@@ -24,6 +24,8 @@ module Schematic
24
24
 
25
25
  field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
26
26
 
27
+ field :model_rates, -> { Internal::Types::Array[Schematic::Types::CreditModelRate] }, optional: true, nullable: false
28
+
27
29
  field :monthly_metered_price_id, -> { String }, optional: true, nullable: false
28
30
 
29
31
  field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
@@ -16,6 +16,8 @@ module Schematic
16
16
 
17
17
  field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
18
18
 
19
+ field :model_rates, -> { Internal::Types::Array[Schematic::Types::CreditModelRate] }, optional: true, nullable: false
20
+
19
21
  field :note, -> { String }, optional: true, nullable: false
20
22
 
21
23
  field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
@@ -20,6 +20,8 @@ module Schematic
20
20
 
21
21
  field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
22
22
 
23
+ field :model_rates, -> { Internal::Types::Array[Schematic::Types::CreditModelRate] }, optional: true, nullable: false
24
+
23
25
  field :monthly_metered_price_id, -> { String }, optional: true, nullable: false
24
26
 
25
27
  field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
@@ -14,6 +14,8 @@ module Schematic
14
14
 
15
15
  field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
16
16
 
17
+ field :model_rates, -> { Internal::Types::Array[Schematic::Types::CreditModelRate] }, optional: true, nullable: false
18
+
17
19
  field :note, -> { String }, optional: true, nullable: false
18
20
 
19
21
  field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
@@ -20,6 +20,8 @@ module Schematic
20
20
 
21
21
  field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
22
22
 
23
+ field :model_rates, -> { Internal::Types::Array[Schematic::Types::CreditModelRate] }, optional: true, nullable: false
24
+
23
25
  field :monthly_metered_price_id, -> { String }, optional: true, nullable: false
24
26
 
25
27
  field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
@@ -3,14 +3,16 @@
3
3
  module Schematic
4
4
  module Errors
5
5
  class ResponseError < ApiError
6
- attr_reader :code, :body
6
+ attr_reader :code, :body, :headers
7
7
 
8
8
  # @param msg [String] The raw response body.
9
9
  # @param code [Integer] The HTTP status code.
10
10
  # @param body [Object, nil] The response body parsed into the endpoint's declared error type, if any.
11
- def initialize(msg, code:, body: nil)
11
+ # @param headers [Hash{String => Array<String>}] The response headers, with lowercase names.
12
+ def initialize(msg, code:, body: nil, headers: {})
12
13
  @code = code
13
14
  @body = body
15
+ @headers = headers
14
16
  super(msg)
15
17
  end
16
18