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
@@ -51,7 +51,7 @@ module Schematic
51
51
  500 => Schematic::Types::ApiError
52
52
  }
53
53
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
54
- raise error_class.new(response.body, code: code, body: error_body)
54
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
55
55
  end
56
56
  end
57
57
 
@@ -109,7 +109,7 @@ module Schematic
109
109
  500 => Schematic::Types::ApiError
110
110
  }
111
111
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
112
- raise error_class.new(response.body, code: code, body: error_body)
112
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
113
113
  end
114
114
  end
115
115
 
@@ -179,7 +179,7 @@ module Schematic
179
179
  500 => Schematic::Types::ApiError
180
180
  }
181
181
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
182
- raise error_class.new(response.body, code: code, body: error_body)
182
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
183
183
  end
184
184
  end
185
185
 
@@ -222,7 +222,7 @@ module Schematic
222
222
  500 => Schematic::Types::ApiError
223
223
  }
224
224
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
225
- raise error_class.new(response.body, code: code, body: error_body)
225
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
226
226
  end
227
227
  end
228
228
 
@@ -264,7 +264,211 @@ module Schematic
264
264
  500 => Schematic::Types::ApiError
265
265
  }
266
266
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
267
- raise error_class.new(response.body, code: code, body: error_body)
267
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
268
+ end
269
+ end
270
+
271
+ # @param request_options [Hash]
272
+ # @param params [Hash]
273
+ # @option request_options [String] :base_url
274
+ # @option request_options [Hash{String => Object}] :additional_headers
275
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
276
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
277
+ # @option request_options [Integer] :timeout_in_seconds
278
+ # @option params [String, nil] :provider
279
+ # @option params [String, nil] :response_model
280
+ # @option params [Integer, nil] :limit
281
+ # @option params [Integer, nil] :offset
282
+ #
283
+ # @example
284
+ # client.events.list_account_inference_cost_rates(
285
+ # provider: "provider",
286
+ # response_model: "response_model",
287
+ # limit: 1000000,
288
+ # offset: 1000000
289
+ # )
290
+ #
291
+ # @return [Schematic::Events::Types::ListAccountInferenceCostRatesResponse]
292
+ def list_account_inference_cost_rates(request_options: {}, **params)
293
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
294
+ query_params = {}
295
+ query_params["provider"] = params[:provider] if params.key?(:provider)
296
+ query_params["response_model"] = params[:response_model] if params.key?(:response_model)
297
+ query_params["limit"] = params[:limit] if params.key?(:limit)
298
+ query_params["offset"] = params[:offset] if params.key?(:offset)
299
+
300
+ request = Schematic::Internal::JSON::Request.new(
301
+ base_url: request_options[:base_url],
302
+ method: "GET",
303
+ path: "inference-rate-sheet",
304
+ query: query_params,
305
+ request_options: request_options
306
+ )
307
+ begin
308
+ response = @client.send(request)
309
+ rescue Net::HTTPRequestTimeout
310
+ raise Schematic::Errors::TimeoutError
311
+ end
312
+ code = response.code.to_i
313
+ if code.between?(200, 299)
314
+ (response.body.to_s.empty? ? nil : Schematic::Events::Types::ListAccountInferenceCostRatesResponse.load(response.body))
315
+ else
316
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
317
+ error_types = {
318
+ 400 => Schematic::Types::ApiError,
319
+ 401 => Schematic::Types::ApiError,
320
+ 403 => Schematic::Types::ApiError,
321
+ 404 => Schematic::Types::ApiError,
322
+ 500 => Schematic::Types::ApiError
323
+ }
324
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
325
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
326
+ end
327
+ end
328
+
329
+ # @param request_options [Hash]
330
+ # @param params [Schematic::Events::Types::CreateAccountInferenceCostRateRequestBody]
331
+ # @option request_options [String] :base_url
332
+ # @option request_options [Hash{String => Object}] :additional_headers
333
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
334
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
335
+ # @option request_options [Integer] :timeout_in_seconds
336
+ #
337
+ # @example
338
+ # client.events.create_account_inference_cost_rate(
339
+ # provider: "provider",
340
+ # rates: {
341
+ # key: 1.1
342
+ # },
343
+ # response_model: "response_model",
344
+ # starting_at: "2024-01-15T09:30:00Z"
345
+ # )
346
+ #
347
+ # @return [Schematic::Events::Types::CreateAccountInferenceCostRateResponse]
348
+ def create_account_inference_cost_rate(request_options: {}, **params)
349
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
350
+ request = Schematic::Internal::JSON::Request.new(
351
+ base_url: request_options[:base_url],
352
+ method: "POST",
353
+ path: "inference-rate-sheet",
354
+ body: Schematic::Events::Types::CreateAccountInferenceCostRateRequestBody.new(params).to_h,
355
+ request_options: request_options
356
+ )
357
+ begin
358
+ response = @client.send(request)
359
+ rescue Net::HTTPRequestTimeout
360
+ raise Schematic::Errors::TimeoutError
361
+ end
362
+ code = response.code.to_i
363
+ if code.between?(200, 299)
364
+ (response.body.to_s.empty? ? nil : Schematic::Events::Types::CreateAccountInferenceCostRateResponse.load(response.body))
365
+ else
366
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
367
+ error_types = {
368
+ 400 => Schematic::Types::ApiError,
369
+ 401 => Schematic::Types::ApiError,
370
+ 403 => Schematic::Types::ApiError,
371
+ 404 => Schematic::Types::ApiError,
372
+ 500 => Schematic::Types::ApiError
373
+ }
374
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
375
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
376
+ end
377
+ end
378
+
379
+ # @param request_options [Hash]
380
+ # @param params [Schematic::Events::Types::UpdateAccountInferenceCostRateRequestBody]
381
+ # @option request_options [String] :base_url
382
+ # @option request_options [Hash{String => Object}] :additional_headers
383
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
384
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
385
+ # @option request_options [Integer] :timeout_in_seconds
386
+ # @option params [String] :inference_rate_sheet_id
387
+ #
388
+ # @example
389
+ # client.events.update_account_inference_cost_rate(
390
+ # inference_rate_sheet_id: "inference_rate_sheet_id",
391
+ # rates: {
392
+ # key: 1.1
393
+ # }
394
+ # )
395
+ #
396
+ # @return [Schematic::Events::Types::UpdateAccountInferenceCostRateResponse]
397
+ def update_account_inference_cost_rate(request_options: {}, **params)
398
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
399
+ request_data = Schematic::Events::Types::UpdateAccountInferenceCostRateRequestBody.new(params).to_h
400
+ non_body_param_names = %w[inference_rate_sheet_id]
401
+ body = request_data.except(*non_body_param_names)
402
+
403
+ request = Schematic::Internal::JSON::Request.new(
404
+ base_url: request_options[:base_url],
405
+ method: "PUT",
406
+ path: "inference-rate-sheet/#{URI.encode_uri_component(params[:inference_rate_sheet_id].to_s)}",
407
+ body: body,
408
+ request_options: request_options
409
+ )
410
+ begin
411
+ response = @client.send(request)
412
+ rescue Net::HTTPRequestTimeout
413
+ raise Schematic::Errors::TimeoutError
414
+ end
415
+ code = response.code.to_i
416
+ if code.between?(200, 299)
417
+ (response.body.to_s.empty? ? nil : Schematic::Events::Types::UpdateAccountInferenceCostRateResponse.load(response.body))
418
+ else
419
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
420
+ error_types = {
421
+ 400 => Schematic::Types::ApiError,
422
+ 401 => Schematic::Types::ApiError,
423
+ 403 => Schematic::Types::ApiError,
424
+ 404 => Schematic::Types::ApiError,
425
+ 500 => Schematic::Types::ApiError
426
+ }
427
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
428
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
429
+ end
430
+ end
431
+
432
+ # @param request_options [Hash]
433
+ # @param params [Hash]
434
+ # @option request_options [String] :base_url
435
+ # @option request_options [Hash{String => Object}] :additional_headers
436
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
437
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
438
+ # @option request_options [Integer] :timeout_in_seconds
439
+ # @option params [String] :inference_rate_sheet_id
440
+ #
441
+ # @example
442
+ # client.events.delete_account_inference_cost_rate(inference_rate_sheet_id: "inference_rate_sheet_id")
443
+ #
444
+ # @return [Schematic::Events::Types::DeleteAccountInferenceCostRateResponse]
445
+ def delete_account_inference_cost_rate(request_options: {}, **params)
446
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
447
+ request = Schematic::Internal::JSON::Request.new(
448
+ base_url: request_options[:base_url],
449
+ method: "DELETE",
450
+ path: "inference-rate-sheet/#{URI.encode_uri_component(params[:inference_rate_sheet_id].to_s)}",
451
+ request_options: request_options
452
+ )
453
+ begin
454
+ response = @client.send(request)
455
+ rescue Net::HTTPRequestTimeout
456
+ raise Schematic::Errors::TimeoutError
457
+ end
458
+ code = response.code.to_i
459
+ if code.between?(200, 299)
460
+ (response.body.to_s.empty? ? nil : Schematic::Events::Types::DeleteAccountInferenceCostRateResponse.load(response.body))
461
+ else
462
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
463
+ error_types = {
464
+ 400 => Schematic::Types::ApiError,
465
+ 401 => Schematic::Types::ApiError,
466
+ 403 => Schematic::Types::ApiError,
467
+ 404 => Schematic::Types::ApiError,
468
+ 500 => Schematic::Types::ApiError
469
+ }
470
+ error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
471
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
268
472
  end
269
473
  end
270
474
 
@@ -304,7 +508,7 @@ module Schematic
304
508
  500 => Schematic::Types::ApiError
305
509
  }
306
510
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
307
- raise error_class.new(response.body, code: code, body: error_body)
511
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
308
512
  end
309
513
  end
310
514
 
@@ -347,7 +551,7 @@ module Schematic
347
551
  500 => Schematic::Types::ApiError
348
552
  }
349
553
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
350
- raise error_class.new(response.body, code: code, body: error_body)
554
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
351
555
  end
352
556
  end
353
557
 
@@ -388,7 +592,7 @@ module Schematic
388
592
  500 => Schematic::Types::ApiError
389
593
  }
390
594
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
391
- raise error_class.new(response.body, code: code, body: error_body)
595
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
392
596
  end
393
597
  end
394
598
 
@@ -428,7 +632,7 @@ module Schematic
428
632
  500 => Schematic::Types::ApiError
429
633
  }
430
634
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
431
- raise error_class.new(response.body, code: code, body: error_body)
635
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
432
636
  end
433
637
  end
434
638
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Events
5
+ module Types
6
+ class CreateAccountInferenceCostRateRequestBody < Internal::Types::Model
7
+ field :currency, -> { String }, optional: true, nullable: false
8
+
9
+ field :provider, -> { String }, optional: false, nullable: false
10
+
11
+ field :rates, -> { Internal::Types::Hash[String, Float] }, optional: false, nullable: false
12
+
13
+ field :response_model, -> { String }, optional: false, nullable: false
14
+
15
+ field :starting_at, -> { String }, optional: false, nullable: false
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Events
7
+ module Types
8
+ class CreateAccountInferenceCostRateResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::AccountInferenceCostRateResponseData }, 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 Events
7
+ module Types
8
+ class DeleteAccountInferenceCostRateResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::DeleteResponse }, 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,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Events
7
+ module Types
8
+ # Input parameters
9
+ class ListAccountInferenceCostRatesParams < Internal::Types::Model
10
+ field :limit, -> { Integer }, optional: true, nullable: false
11
+
12
+ field :offset, -> { Integer }, optional: true, nullable: false
13
+
14
+ field :provider, -> { String }, optional: true, nullable: false
15
+
16
+ field :response_model, -> { String }, optional: true, nullable: false
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Events
5
+ module Types
6
+ class ListAccountInferenceCostRatesRequest < Internal::Types::Model
7
+ field :provider, -> { String }, optional: true, nullable: false
8
+
9
+ field :response_model, -> { String }, optional: true, nullable: false
10
+
11
+ field :limit, -> { Integer }, optional: true, nullable: false
12
+
13
+ field :offset, -> { Integer }, 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 Events
7
+ module Types
8
+ class ListAccountInferenceCostRatesResponse < Internal::Types::Model
9
+ field :data, -> { Internal::Types::Array[Schematic::Types::AccountInferenceCostRateResponseData] }, optional: false, nullable: false
10
+
11
+ field :params, -> { Schematic::Events::Types::ListAccountInferenceCostRatesParams }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Events
5
+ module Types
6
+ class UpdateAccountInferenceCostRateRequestBody < Internal::Types::Model
7
+ field :inference_rate_sheet_id, -> { String }, optional: false, nullable: false
8
+
9
+ field :rates, -> { Internal::Types::Hash[String, Float] }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../schematic"
4
+
5
+ module Schematic
6
+ module Events
7
+ module Types
8
+ class UpdateAccountInferenceCostRateResponse < Internal::Types::Model
9
+ field :data, -> { Schematic::Types::AccountInferenceCostRateResponseData }, 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
@@ -82,7 +82,7 @@ module Schematic
82
82
  500 => Schematic::Types::ApiError
83
83
  }
84
84
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
85
- raise error_class.new(response.body, code: code, body: error_body)
85
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
86
86
  end
87
87
  end
88
88
 
@@ -129,7 +129,7 @@ module Schematic
129
129
  500 => Schematic::Types::ApiError
130
130
  }
131
131
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
132
- raise error_class.new(response.body, code: code, body: error_body)
132
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
133
133
  end
134
134
  end
135
135
 
@@ -171,7 +171,7 @@ module Schematic
171
171
  500 => Schematic::Types::ApiError
172
172
  }
173
173
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
174
- raise error_class.new(response.body, code: code, body: error_body)
174
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
175
175
  end
176
176
  end
177
177
 
@@ -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
 
@@ -311,7 +311,7 @@ module Schematic
311
311
  500 => Schematic::Types::ApiError
312
312
  }
313
313
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
314
- raise error_class.new(response.body, code: code, body: error_body)
314
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
315
315
  end
316
316
  end
317
317
 
@@ -387,7 +387,7 @@ module Schematic
387
387
  500 => Schematic::Types::ApiError
388
388
  }
389
389
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
390
- raise error_class.new(response.body, code: code, body: error_body)
390
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
391
391
  end
392
392
  end
393
393
 
@@ -448,7 +448,7 @@ module Schematic
448
448
  500 => Schematic::Types::ApiError
449
449
  }
450
450
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
451
- raise error_class.new(response.body, code: code, body: error_body)
451
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
452
452
  end
453
453
  end
454
454
 
@@ -496,7 +496,7 @@ module Schematic
496
496
  500 => Schematic::Types::ApiError
497
497
  }
498
498
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
499
- raise error_class.new(response.body, code: code, body: error_body)
499
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
500
500
  end
501
501
  end
502
502
 
@@ -538,7 +538,7 @@ module Schematic
538
538
  500 => Schematic::Types::ApiError
539
539
  }
540
540
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
541
- raise error_class.new(response.body, code: code, body: error_body)
541
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
542
542
  end
543
543
  end
544
544
 
@@ -591,7 +591,7 @@ module Schematic
591
591
  500 => Schematic::Types::ApiError
592
592
  }
593
593
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
594
- raise error_class.new(response.body, code: code, body: error_body)
594
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
595
595
  end
596
596
  end
597
597
 
@@ -634,7 +634,7 @@ module Schematic
634
634
  500 => Schematic::Types::ApiError
635
635
  }
636
636
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
637
- raise error_class.new(response.body, code: code, body: error_body)
637
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
638
638
  end
639
639
  end
640
640
 
@@ -701,7 +701,7 @@ module Schematic
701
701
  500 => Schematic::Types::ApiError
702
702
  }
703
703
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
704
- raise error_class.new(response.body, code: code, body: error_body)
704
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
705
705
  end
706
706
  end
707
707
 
@@ -748,7 +748,7 @@ module Schematic
748
748
  500 => Schematic::Types::ApiError
749
749
  }
750
750
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
751
- raise error_class.new(response.body, code: code, body: error_body)
751
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
752
752
  end
753
753
  end
754
754
 
@@ -796,7 +796,7 @@ module Schematic
796
796
  500 => Schematic::Types::ApiError
797
797
  }
798
798
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
799
- raise error_class.new(response.body, code: code, body: error_body)
799
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
800
800
  end
801
801
  end
802
802
 
@@ -839,7 +839,7 @@ module Schematic
839
839
  500 => Schematic::Types::ApiError
840
840
  }
841
841
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
842
- raise error_class.new(response.body, code: code, body: error_body)
842
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
843
843
  end
844
844
  end
845
845
 
@@ -882,7 +882,7 @@ module Schematic
882
882
  500 => Schematic::Types::ApiError
883
883
  }
884
884
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
885
- raise error_class.new(response.body, code: code, body: error_body)
885
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
886
886
  end
887
887
  end
888
888
 
@@ -943,7 +943,7 @@ module Schematic
943
943
  500 => Schematic::Types::ApiError
944
944
  }
945
945
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
946
- raise error_class.new(response.body, code: code, body: error_body)
946
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
947
947
  end
948
948
  end
949
949
  end
@@ -52,7 +52,7 @@ module Schematic
52
52
  500 => Schematic::Types::ApiError
53
53
  }
54
54
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
55
- raise error_class.new(response.body, code: code, body: error_body)
55
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
56
56
  end
57
57
  end
58
58
 
@@ -109,7 +109,7 @@ module Schematic
109
109
  500 => Schematic::Types::ApiError
110
110
  }
111
111
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
112
- raise error_class.new(response.body, code: code, body: error_body)
112
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
113
113
  end
114
114
  end
115
115
 
@@ -155,7 +155,7 @@ module Schematic
155
155
  500 => Schematic::Types::ApiError
156
156
  }
157
157
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
158
- raise error_class.new(response.body, code: code, body: error_body)
158
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
159
159
  end
160
160
  end
161
161
 
@@ -195,7 +195,7 @@ module Schematic
195
195
  500 => Schematic::Types::ApiError
196
196
  }
197
197
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
198
- raise error_class.new(response.body, code: code, body: error_body)
198
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
199
199
  end
200
200
  end
201
201
 
@@ -249,7 +249,7 @@ module Schematic
249
249
  500 => Schematic::Types::ApiError
250
250
  }
251
251
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
252
- raise error_class.new(response.body, code: code, body: error_body)
252
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
253
253
  end
254
254
  end
255
255
 
@@ -306,7 +306,7 @@ module Schematic
306
306
  500 => Schematic::Types::ApiError
307
307
  }
308
308
  error_body = Schematic::Errors::ResponseError.load_error_body(code, response.body, error_types)
309
- raise error_class.new(response.body, code: code, body: error_body)
309
+ raise error_class.new(response.body, code: code, body: error_body, headers: response.to_hash)
310
310
  end
311
311
  end
312
312
  end