schematichq 1.5.3 → 1.5.4

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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +7 -1
  4. data/.fernignore +2 -0
  5. data/.rubocop.yml +4 -0
  6. data/README.md +1 -1
  7. data/WASM_VERSION +1 -1
  8. data/lib/schematic/accesstokens/client.rb +9 -1
  9. data/lib/schematic/accounts/client.rb +183 -21
  10. data/lib/schematic/billing/client.rb +325 -34
  11. data/lib/schematic/billing/types/create_billing_price_request_body.rb +1 -1
  12. data/lib/schematic/billing/types/create_billing_product_request_body.rb +1 -1
  13. data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +1 -1
  14. data/lib/schematic/billing/types/create_coupon_request_body.rb +2 -2
  15. data/lib/schematic/billing/types/create_invoice_request_body.rb +1 -1
  16. data/lib/schematic/billing/types/get_billing_settings_response.rb +13 -0
  17. data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -1
  18. data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -1
  19. data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -1
  20. data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -1
  21. data/lib/schematic/billing/types/update_billing_settings_request_body.rb +11 -0
  22. data/lib/schematic/billing/types/update_billing_settings_response.rb +13 -0
  23. data/lib/schematic/catalogs/client.rb +121 -14
  24. data/lib/schematic/checkout/client.rb +80 -9
  25. data/lib/schematic/checkout/types/checkout_data_request_body.rb +1 -1
  26. data/lib/schematic/client.rb +5 -3
  27. data/lib/schematic/companies/client.rb +380 -44
  28. data/lib/schematic/components/client.rb +70 -8
  29. data/lib/schematic/components/types/create_component_request_body.rb +1 -1
  30. data/lib/schematic/components/types/update_component_request_body.rb +1 -1
  31. data/lib/schematic/componentspublic/client.rb +8 -1
  32. data/lib/schematic/credits/client.rb +409 -41
  33. data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +1 -1
  34. data/lib/schematic/credits/types/create_billing_credit_request_body.rb +1 -1
  35. data/lib/schematic/credits/types/create_company_credit_grant.rb +1 -1
  36. data/lib/schematic/credits/types/create_credit_bundle_request_body.rb +1 -1
  37. data/lib/schematic/credits/types/create_credit_spend_policy_request_body.rb +2 -2
  38. data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +1 -1
  39. data/lib/schematic/credits/types/get_credit_balance_time_series_params.rb +18 -0
  40. data/lib/schematic/credits/types/get_credit_balance_time_series_request.rb +17 -0
  41. data/lib/schematic/credits/types/get_credit_balance_time_series_response.rb +13 -0
  42. data/lib/schematic/credits/types/reserve_credits_request_body.rb +1 -1
  43. data/lib/schematic/credits/types/update_credit_spend_policy_request_body.rb +2 -2
  44. data/lib/schematic/dataexports/client.rb +36 -6
  45. data/lib/schematic/entitlements/client.rb +244 -28
  46. data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +4 -2
  47. data/lib/schematic/entitlements/types/create_company_override_request_body.rb +3 -1
  48. data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +4 -2
  49. data/lib/schematic/entitlements/types/update_company_override_request_body.rb +3 -1
  50. data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +4 -2
  51. data/lib/schematic/errors/connection_error.rb +11 -0
  52. data/lib/schematic/errors/response_error.rb +23 -2
  53. data/lib/schematic/events/client.rb +78 -9
  54. data/lib/schematic/features/client.rb +160 -18
  55. data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +1 -1
  56. data/lib/schematic/features/types/create_billing_linked_feature_request_body.rb +2 -0
  57. data/lib/schematic/features/types/create_feature_request_body.rb +2 -0
  58. data/lib/schematic/features/types/update_feature_request_body.rb +2 -0
  59. data/lib/schematic/insights/client.rb +48 -6
  60. data/lib/schematic/integrationsapi/client.rb +120 -14
  61. data/lib/schematic/internal/http/base_request.rb +30 -0
  62. data/lib/schematic/internal/http/raw_client.rb +35 -5
  63. data/lib/schematic/internal/iterators/cursor_item_iterator.rb +7 -2
  64. data/lib/schematic/internal/iterators/cursor_page_iterator.rb +68 -14
  65. data/lib/schematic/internal/iterators/item_iterator.rb +61 -15
  66. data/lib/schematic/internal/iterators/offset_item_iterator.rb +7 -2
  67. data/lib/schematic/internal/iterators/offset_page_iterator.rb +57 -9
  68. data/lib/schematic/internal/json/request.rb +11 -2
  69. data/lib/schematic/internal/multipart/multipart_request.rb +1 -0
  70. data/lib/schematic/internal/types/model.rb +7 -3
  71. data/lib/schematic/internal/types/utils.rb +7 -0
  72. data/lib/schematic/licenses/client.rb +26 -3
  73. data/lib/schematic/planbundle/client.rb +27 -3
  74. data/lib/schematic/plangroups/client.rb +26 -3
  75. data/lib/schematic/planmigrations/client.rb +98 -11
  76. data/lib/schematic/plans/client.rb +213 -23
  77. data/lib/schematic/plans/types/get_plan_version_diff_params.rb +12 -0
  78. data/lib/schematic/plans/types/get_plan_version_diff_request.rb +13 -0
  79. data/lib/schematic/plans/types/get_plan_version_diff_response.rb +13 -0
  80. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +2 -0
  81. data/lib/schematic/rules_engine.rb +14 -2
  82. data/lib/schematic/scheduledcheckout/client.rb +35 -4
  83. data/lib/schematic/schematic_client.rb +22 -11
  84. data/lib/schematic/types/billing_coupon_response_data.rb +2 -2
  85. data/lib/schematic/types/billing_credit_grant_response_data.rb +8 -8
  86. data/lib/schematic/types/billing_customer_subscription.rb +1 -1
  87. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -1
  88. data/lib/schematic/types/billing_price_response_data.rb +1 -1
  89. data/lib/schematic/types/billing_price_view.rb +1 -1
  90. data/lib/schematic/types/billing_product_detail_response_data.rb +2 -2
  91. data/lib/schematic/types/billing_product_for_subscription_response_data.rb +2 -2
  92. data/lib/schematic/types/billing_product_price_response_data.rb +1 -1
  93. data/lib/schematic/types/billing_product_pricing.rb +1 -1
  94. data/lib/schematic/types/billing_product_response_data.rb +2 -2
  95. data/lib/schematic/types/billing_settings_response_data.rb +9 -0
  96. data/lib/schematic/types/billing_subscription_discount_view.rb +2 -2
  97. data/lib/schematic/types/billing_subscription_response_data.rb +1 -1
  98. data/lib/schematic/types/billing_subscription_view.rb +1 -1
  99. data/lib/schematic/types/catalog_config_ordered_plan.rb +2 -0
  100. data/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +2 -0
  101. data/lib/schematic/types/catalog_config_plan_credit.rb +11 -0
  102. data/lib/schematic/types/catalog_config_plan_credit_response_data.rb +11 -0
  103. data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -1
  104. data/lib/schematic/types/change_subscription_request_body.rb +1 -1
  105. data/lib/schematic/types/checkout_problem_code.rb +54 -0
  106. data/lib/schematic/types/checkout_problem_response_data.rb +31 -0
  107. data/lib/schematic/types/checkout_problem_source.rb +13 -0
  108. data/lib/schematic/types/checkout_subscription.rb +1 -1
  109. data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +1 -1
  110. data/lib/schematic/types/company_credit_balance.rb +3 -3
  111. data/lib/schematic/types/company_credit_balance_response_data.rb +4 -4
  112. data/lib/schematic/types/company_detail_response_data.rb +1 -1
  113. data/lib/schematic/types/company_override_response_data.rb +3 -1
  114. data/lib/schematic/types/company_plan_credit_grant_view.rb +1 -1
  115. data/lib/schematic/types/company_plan_detail_response_data.rb +2 -0
  116. data/lib/schematic/types/company_subscription_response_data.rb +1 -1
  117. data/lib/schematic/types/company_user_usage_response_data.rb +2 -2
  118. data/lib/schematic/types/company_user_usage_row_response_data.rb +2 -2
  119. data/lib/schematic/types/component_response_data.rb +1 -1
  120. data/lib/schematic/types/condition.rb +3 -1
  121. data/lib/schematic/types/condition_response_data.rb +3 -1
  122. data/lib/schematic/types/condition_view.rb +3 -1
  123. data/lib/schematic/types/coupon_request_body.rb +2 -2
  124. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -1
  125. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +4 -2
  126. data/lib/schematic/types/create_entitlement_req_common.rb +3 -1
  127. data/lib/schematic/types/create_or_update_condition_request_body.rb +1 -1
  128. data/lib/schematic/types/credit_balance_event_response_data.rb +21 -0
  129. data/lib/schematic/types/credit_balance_feature_consumption_response_data.rb +13 -0
  130. data/lib/schematic/types/credit_balance_point_response_data.rb +15 -0
  131. data/lib/schematic/types/credit_balance_time_series_response_data.rb +15 -0
  132. data/lib/schematic/types/credit_bundle_currency_price.rb +1 -1
  133. data/lib/schematic/types/credit_bundle_currency_price_request_body.rb +1 -1
  134. data/lib/schematic/types/credit_bundle_currency_price_response_data.rb +1 -1
  135. data/lib/schematic/types/credit_burn_breakdown_line.rb +15 -0
  136. data/lib/schematic/types/credit_company_grant_view.rb +8 -8
  137. data/lib/schematic/types/credit_currency_price.rb +1 -1
  138. data/lib/schematic/types/credit_currency_price_request_body.rb +1 -1
  139. data/lib/schematic/types/credit_currency_price_response_data.rb +1 -1
  140. data/lib/schematic/types/credit_event_ledger_response_data.rb +10 -6
  141. data/lib/schematic/types/credit_grant_detail.rb +1 -1
  142. data/lib/schematic/types/credit_lease_response_data.rb +2 -2
  143. data/lib/schematic/types/credit_reservation_response_data.rb +2 -2
  144. data/lib/schematic/types/credit_spend_policy.rb +2 -2
  145. data/lib/schematic/types/credit_spend_policy_response_data.rb +4 -4
  146. data/lib/schematic/types/credit_transfer_response_data.rb +1 -1
  147. data/lib/schematic/types/credit_transfer_view.rb +1 -1
  148. data/lib/schematic/types/credit_usage.rb +5 -5
  149. data/lib/schematic/types/credit_usage_aggregation.rb +4 -4
  150. data/lib/schematic/types/credit_usage_reason.rb +1 -0
  151. data/lib/schematic/types/credits_in_plan.rb +11 -0
  152. data/lib/schematic/types/currency.rb +144 -0
  153. data/lib/schematic/types/currency_price_request_body.rb +1 -1
  154. data/lib/schematic/types/custom_plan_billing_response_data.rb +6 -0
  155. data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -1
  156. data/lib/schematic/types/estimated_plan_total.rb +1 -1
  157. data/lib/schematic/types/feature_company_response_data.rb +7 -7
  158. data/lib/schematic/types/feature_detail_response_data.rb +2 -0
  159. data/lib/schematic/types/feature_entitlement.rb +8 -6
  160. data/lib/schematic/types/feature_event_source.rb +12 -0
  161. data/lib/schematic/types/feature_in_plan_response_data.rb +2 -0
  162. data/lib/schematic/types/feature_response_data.rb +2 -0
  163. data/lib/schematic/types/feature_usage_response_data.rb +7 -7
  164. data/lib/schematic/types/feature_view.rb +2 -0
  165. data/lib/schematic/types/flag_check_reservation_response_data.rb +3 -3
  166. data/lib/schematic/types/insights_summary_response_data.rb +1 -1
  167. data/lib/schematic/types/invoice_request_body.rb +1 -1
  168. data/lib/schematic/types/invoice_response_data.rb +1 -1
  169. data/lib/schematic/types/manage_plan_preview_response_response_data.rb +2 -0
  170. data/lib/schematic/types/manage_plan_request.rb +3 -1
  171. data/lib/schematic/types/manage_plan_response_response_data.rb +4 -0
  172. data/lib/schematic/types/mrr_response_data.rb +1 -1
  173. data/lib/schematic/types/onboarding_milestone_view.rb +1 -1
  174. data/lib/schematic/types/ordered_plans_in_group.rb +2 -0
  175. data/lib/schematic/types/plan_billing_source.rb +1 -0
  176. data/lib/schematic/types/plan_change_action.rb +1 -0
  177. data/lib/schematic/types/plan_change_amendment_status.rb +15 -0
  178. data/lib/schematic/types/plan_change_response_data.rb +4 -0
  179. data/lib/schematic/types/plan_credit_grant_view.rb +1 -1
  180. data/lib/schematic/types/plan_credit_order.rb +11 -0
  181. data/lib/schematic/types/plan_credit_visibility.rb +11 -0
  182. data/lib/schematic/types/plan_currency_price_request_body.rb +1 -1
  183. data/lib/schematic/types/plan_currency_prices_response_data.rb +1 -1
  184. data/lib/schematic/types/plan_entitlement_response_data.rb +3 -1
  185. data/lib/schematic/types/plan_group_plan_entitlements_order.rb +2 -0
  186. data/lib/schematic/types/plan_version_billing_product_change_response_data.rb +11 -0
  187. data/lib/schematic/types/plan_version_credit_grant_change_response_data.rb +17 -0
  188. data/lib/schematic/types/plan_version_diff_change_type.rb +13 -0
  189. data/lib/schematic/types/plan_version_diff_price_cadence.rb +14 -0
  190. data/lib/schematic/types/plan_version_diff_response_data.rb +23 -0
  191. data/lib/schematic/types/plan_version_entitlement_change_response_data.rb +17 -0
  192. data/lib/schematic/types/plan_version_field_change_response_data.rb +13 -0
  193. data/lib/schematic/types/plan_version_price_change_response_data.rb +15 -0
  194. data/lib/schematic/types/plan_view_public_response_data.rb +2 -0
  195. data/lib/schematic/types/preflight_request_body.rb +1 -1
  196. data/lib/schematic/types/preview_subscription_change_response_data.rb +3 -1
  197. data/lib/schematic/types/preview_subscription_discount_response_data.rb +2 -2
  198. data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -2
  199. data/lib/schematic/types/rulesengine_company.rb +1 -1
  200. data/lib/schematic/types/rulesengine_condition.rb +3 -1
  201. data/lib/schematic/types/rulesengine_credit_postpaid_config.rb +1 -1
  202. data/lib/schematic/types/rulesengine_credit_spend_policy.rb +2 -2
  203. data/lib/schematic/types/rulesengine_feature_entitlement.rb +8 -6
  204. data/lib/schematic/types/scheduled_downgrade_response_data.rb +1 -1
  205. data/lib/schematic/types/top_feature_by_usage_response_data.rb +1 -1
  206. data/lib/schematic/types/upcoming_invoice_response_data.rb +1 -1
  207. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -1
  208. data/lib/schematic/types/update_entitlement_req_common.rb +3 -1
  209. data/lib/schematic/types/upsert_billing_product_request_body.rb +1 -1
  210. data/lib/schematic/types/usage_based_entitlement_request_body.rb +1 -1
  211. data/lib/schematic/types/usage_based_entitlement_response_data.rb +1 -1
  212. data/lib/schematic/types/user_credit_usage_response_data.rb +2 -2
  213. data/lib/schematic/types/user_daily_credit_point_response_data.rb +1 -1
  214. data/lib/schematic/types/user_feature_usage_response_data.rb +1 -1
  215. data/lib/schematic/version.rb +1 -1
  216. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  217. data/lib/schematic/webhooks/client.rb +88 -10
  218. data/lib/schematic.rb +38 -3
  219. data/reference.md +340 -44
  220. metadata +37 -2
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditBalanceFeatureConsumptionResponseData < Internal::Types::Model
6
+ field :amount, -> { Float }, optional: false, nullable: false
7
+
8
+ field :feature_id, -> { String }, optional: false, nullable: false
9
+
10
+ field :feature_name, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditBalancePointResponseData < Internal::Types::Model
6
+ field :balance, -> { Float }, optional: false, nullable: false
7
+
8
+ field :consumed, -> { Float }, optional: false, nullable: false
9
+
10
+ field :consumed_by_feature, -> { Internal::Types::Array[Schematic::Types::CreditBalanceFeatureConsumptionResponseData] }, optional: false, nullable: false
11
+
12
+ field :timestamp, -> { String }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditBalanceTimeSeriesResponseData < Internal::Types::Model
6
+ field :balance_points, -> { Internal::Types::Array[Schematic::Types::CreditBalancePointResponseData] }, optional: false, nullable: false
7
+
8
+ field :billing_credit_id, -> { String }, optional: false, nullable: false
9
+
10
+ field :events, -> { Internal::Types::Array[Schematic::Types::CreditBalanceEventResponseData] }, optional: false, nullable: false
11
+
12
+ field :external, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditBundleCurrencyPrice < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditBundleCurrencyPriceRequestBody < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price_per_unit, -> { Integer }, optional: true, nullable: false
9
9
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditBundleCurrencyPriceResponseData < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
9
9
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditBurnBreakdownLine < Internal::Types::Model
6
+ field :credits, -> { Float }, optional: false, nullable: false
7
+
8
+ field :key, -> { String }, optional: false, nullable: false
9
+
10
+ field :quantity, -> { Float }, optional: false, nullable: false
11
+
12
+ field :rate, -> { Float }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end
@@ -23,7 +23,7 @@ module Schematic
23
23
 
24
24
  field :credit_name, -> { String }, optional: false, nullable: false
25
25
 
26
- field :currency, -> { String }, optional: true, nullable: false
26
+ field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
27
27
 
28
28
  field :exhausted_at, -> { String }, optional: true, nullable: false
29
29
 
@@ -49,9 +49,9 @@ module Schematic
49
49
 
50
50
  field :postpaid_charge_amount, -> { Integer }, optional: true, nullable: false
51
51
 
52
- field :postpaid_charge_currency, -> { String }, optional: true, nullable: false
52
+ field :postpaid_charge_currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
53
53
 
54
- field :postpaid_charged_credits, -> { Integer }, optional: true, nullable: false
54
+ field :postpaid_charged_credits, -> { Float }, optional: true, nullable: false
55
55
 
56
56
  field :postpaid_period_end, -> { String }, optional: true, nullable: false
57
57
 
@@ -61,19 +61,19 @@ module Schematic
61
61
 
62
62
  field :price, -> { Schematic::Types::BillingProductPriceResponseData }, optional: true, nullable: false
63
63
 
64
- field :quantity, -> { Integer }, optional: false, nullable: false
64
+ field :quantity, -> { Float }, optional: false, nullable: false
65
65
 
66
- field :quantity_remaining, -> { Integer }, optional: false, nullable: false
66
+ field :quantity_remaining, -> { Float }, optional: false, nullable: false
67
67
 
68
- field :quantity_used, -> { Integer }, optional: false, nullable: false
68
+ field :quantity_used, -> { Float }, optional: false, nullable: false
69
69
 
70
70
  field :renewal_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
71
71
 
72
72
  field :renewal_period, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
73
73
 
74
- field :reserved, -> { Integer }, optional: true, nullable: false
74
+ field :reserved, -> { Float }, optional: true, nullable: false
75
75
 
76
- field :settled, -> { Integer }, optional: true, nullable: false
76
+ field :settled, -> { Float }, optional: true, nullable: false
77
77
 
78
78
  field :singular_name, -> { String }, optional: true, nullable: false
79
79
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditCurrencyPrice < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditCurrencyPriceRequestBody < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price_per_unit, -> { Integer }, optional: true, nullable: false
9
9
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditCurrencyPriceResponseData < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :price, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditEventLedgerResponseData < Internal::Types::Model
6
- field :amount, -> { Integer }, optional: false, nullable: false
6
+ field :amount, -> { Float }, optional: false, nullable: false
7
7
 
8
8
  field :auto_topup_log_id, -> { String }, optional: true, nullable: false
9
9
 
@@ -11,6 +11,8 @@ module Schematic
11
11
 
12
12
  field :billing_credit_id, -> { String }, optional: true, nullable: false
13
13
 
14
+ field :burn_breakdown, -> { Internal::Types::Array[Schematic::Types::CreditBurnBreakdownLine] }, optional: true, nullable: false
15
+
14
16
  field :company, -> { Schematic::Types::CompanyLedgerResponseData }, optional: true, nullable: false
15
17
 
16
18
  field :company_id, -> { String }, optional: false, nullable: false
@@ -19,7 +21,7 @@ module Schematic
19
21
 
20
22
  field :credit_name, -> { String }, optional: false, nullable: false
21
23
 
22
- field :currency, -> { String }, optional: true, nullable: false
24
+ field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
23
25
 
24
26
  field :environment_id, -> { String }, optional: false, nullable: false
25
27
 
@@ -27,6 +29,8 @@ module Schematic
27
29
 
28
30
  field :event_id, -> { String }, optional: false, nullable: false
29
31
 
32
+ field :event_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
33
+
30
34
  field :event_type, -> { Schematic::Types::CreditEventType }, optional: false, nullable: false
31
35
 
32
36
  field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: true, nullable: false
@@ -45,9 +49,9 @@ module Schematic
45
49
 
46
50
  field :grant_id, -> { String }, optional: true, nullable: false
47
51
 
48
- field :grant_quantity, -> { Integer }, optional: true, nullable: false
52
+ field :grant_quantity, -> { Float }, optional: true, nullable: false
49
53
 
50
- field :grant_quantity_remaining, -> { Integer }, optional: true, nullable: false
54
+ field :grant_quantity_remaining, -> { Float }, optional: true, nullable: false
51
55
 
52
56
  field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false
53
57
 
@@ -57,9 +61,9 @@ module Schematic
57
61
 
58
62
  field :plan_id, -> { String }, optional: true, nullable: false
59
63
 
60
- field :quantity_consumed, -> { Integer }, optional: true, nullable: false
64
+ field :quantity_consumed, -> { Float }, optional: true, nullable: false
61
65
 
62
- field :quantity_remaining_at_zero_out, -> { Integer }, optional: true, nullable: false
66
+ field :quantity_remaining_at_zero_out, -> { Float }, optional: true, nullable: false
63
67
 
64
68
  field :source_id, -> { Integer }, optional: false, nullable: false
65
69
 
@@ -9,7 +9,7 @@ module Schematic
9
9
 
10
10
  field :grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: false, nullable: false
11
11
 
12
- field :quantity, -> { Integer }, optional: false, nullable: false
12
+ field :quantity, -> { Float }, optional: false, nullable: false
13
13
  end
14
14
  end
15
15
  end
@@ -11,13 +11,13 @@ module Schematic
11
11
 
12
12
  field :expires_at, -> { String }, optional: false, nullable: false
13
13
 
14
- field :granted_amount, -> { Integer }, optional: false, nullable: false
14
+ field :granted_amount, -> { Float }, optional: false, nullable: false
15
15
 
16
16
  field :id, -> { String }, optional: false, nullable: false
17
17
 
18
18
  field :released_at, -> { String }, optional: true, nullable: false
19
19
 
20
- field :tracked_amount, -> { Integer }, optional: false, nullable: false
20
+ field :tracked_amount, -> { Float }, optional: false, nullable: false
21
21
 
22
22
  field :updated_at, -> { String }, optional: false, nullable: false
23
23
  end
@@ -15,9 +15,9 @@ module Schematic
15
15
 
16
16
  field :released_at, -> { String }, optional: true, nullable: false
17
17
 
18
- field :reserved_amount, -> { Integer }, optional: false, nullable: false
18
+ field :reserved_amount, -> { Float }, optional: false, nullable: false
19
19
 
20
- field :settled_amount, -> { Integer }, optional: false, nullable: false
20
+ field :settled_amount, -> { Float }, optional: false, nullable: false
21
21
 
22
22
  field :updated_at, -> { String }, optional: false, nullable: false
23
23
  end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditSpendPolicy < Internal::Types::Model
6
- field :consumed, -> { Integer }, optional: true, nullable: false
6
+ field :consumed, -> { Float }, optional: true, nullable: false
7
7
 
8
8
  field :credit_id, -> { String }, optional: false, nullable: false
9
9
 
@@ -13,7 +13,7 @@ module Schematic
13
13
 
14
14
  field :label, -> { String }, optional: true, nullable: false
15
15
 
16
- field :limit, -> { Integer }, optional: false, nullable: false
16
+ field :limit, -> { Float }, optional: false, nullable: false
17
17
 
18
18
  field :resets_at, -> { String }, optional: true, nullable: false
19
19
 
@@ -7,17 +7,17 @@ module Schematic
7
7
 
8
8
  field :company_id, -> { String }, optional: true, nullable: false
9
9
 
10
- field :consumed, -> { Integer }, optional: true, nullable: false
10
+ field :consumed, -> { Float }, optional: true, nullable: false
11
11
 
12
12
  field :created_at, -> { String }, optional: false, nullable: false
13
13
 
14
- field :headroom, -> { Integer }, optional: true, nullable: false
14
+ field :headroom, -> { Float }, optional: true, nullable: false
15
15
 
16
16
  field :id, -> { String }, optional: false, nullable: false
17
17
 
18
18
  field :label, -> { String }, optional: true, nullable: false
19
19
 
20
- field :max_per_draw, -> { Integer }, optional: true, nullable: false
20
+ field :max_per_draw, -> { Float }, optional: true, nullable: false
21
21
 
22
22
  field :resets_at, -> { String }, optional: true, nullable: false
23
23
 
@@ -27,7 +27,7 @@ module Schematic
27
27
 
28
28
  field :user_id, -> { String }, optional: true, nullable: false
29
29
 
30
- field :window_amount, -> { Integer }, optional: true, nullable: false
30
+ field :window_amount, -> { Float }, optional: true, nullable: false
31
31
 
32
32
  field :window_count, -> { Integer }, optional: false, nullable: false
33
33
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditTransferResponseData < Internal::Types::Model
6
- field :amount, -> { Integer }, optional: false, nullable: false
6
+ field :amount, -> { Float }, optional: false, nullable: false
7
7
 
8
8
  field :created_at, -> { String }, optional: false, nullable: false
9
9
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditTransferView < Internal::Types::Model
6
- field :amount, -> { Integer }, optional: false, nullable: false
6
+ field :amount, -> { Float }, optional: false, nullable: false
7
7
 
8
8
  field :created_at, -> { String }, optional: false, nullable: false
9
9
 
@@ -3,21 +3,21 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditUsage < Internal::Types::Model
6
- field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false
6
+ field :credit_consumption_rate, -> { Float }, optional: true, nullable: false
7
7
 
8
- field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
8
+ field :credit_grant_counts, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
9
9
 
10
10
  field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false
11
11
 
12
- field :credit_remaining, -> { Integer }, optional: true, nullable: false
12
+ field :credit_remaining, -> { Float }, optional: true, nullable: false
13
13
 
14
- field :credit_total, -> { Integer }, optional: true, nullable: false
14
+ field :credit_total, -> { Float }, optional: true, nullable: false
15
15
 
16
16
  field :credit_type_icon, -> { String }, optional: true, nullable: false
17
17
 
18
18
  field :credit_type_name, -> { String }, optional: true, nullable: false
19
19
 
20
- field :credit_used, -> { Integer }, optional: true, nullable: false
20
+ field :credit_used, -> { Float }, optional: true, nullable: false
21
21
 
22
22
  field :usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false
23
23
  end
@@ -3,13 +3,13 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CreditUsageAggregation < Internal::Types::Model
6
- field :usage_this_billing_period, -> { Integer }, optional: true, nullable: false
6
+ field :usage_this_billing_period, -> { Float }, optional: true, nullable: false
7
7
 
8
- field :usage_this_calendar_month, -> { Integer }, optional: true, nullable: false
8
+ field :usage_this_calendar_month, -> { Float }, optional: true, nullable: false
9
9
 
10
- field :usage_this_week, -> { Integer }, optional: true, nullable: false
10
+ field :usage_this_week, -> { Float }, optional: true, nullable: false
11
11
 
12
- field :usage_today, -> { Integer }, optional: true, nullable: false
12
+ field :usage_today, -> { Float }, optional: true, nullable: false
13
13
  end
14
14
  end
15
15
  end
@@ -5,6 +5,7 @@ module Schematic
5
5
  module CreditUsageReason
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
+ INFERENCE = "inference"
8
9
  LEASE_HOLD = "lease_hold"
9
10
  LEASE_RELEASE = "lease_release"
10
11
  MANUAL_ADJUSTMENT = "manual_adjustment"
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditsInPlan < Internal::Types::Model
6
+ field :credit_id, -> { String }, optional: false, nullable: false
7
+
8
+ field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module Currency
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ AED = "aed"
9
+ AFN = "afn"
10
+ ALL = "all"
11
+ AMD = "amd"
12
+ ANG = "ang"
13
+ AOA = "aoa"
14
+ ARS = "ars"
15
+ AUD = "aud"
16
+ AWG = "awg"
17
+ AZN = "azn"
18
+ BAM = "bam"
19
+ BBD = "bbd"
20
+ BDT = "bdt"
21
+ BIF = "bif"
22
+ BMD = "bmd"
23
+ BND = "bnd"
24
+ BOB = "bob"
25
+ BRL = "brl"
26
+ BSD = "bsd"
27
+ BWP = "bwp"
28
+ BYN = "byn"
29
+ BZD = "bzd"
30
+ CAD = "cad"
31
+ CDF = "cdf"
32
+ CHF = "chf"
33
+ CLP = "clp"
34
+ CNY = "cny"
35
+ COP = "cop"
36
+ CRC = "crc"
37
+ CVE = "cve"
38
+ CZK = "czk"
39
+ DJF = "djf"
40
+ DKK = "dkk"
41
+ DOP = "dop"
42
+ DZD = "dzd"
43
+ EGP = "egp"
44
+ ETB = "etb"
45
+ EUR = "eur"
46
+ FJD = "fjd"
47
+ FKP = "fkp"
48
+ GBP = "gbp"
49
+ GEL = "gel"
50
+ GIP = "gip"
51
+ GMD = "gmd"
52
+ GNF = "gnf"
53
+ GTQ = "gtq"
54
+ GYD = "gyd"
55
+ HKD = "hkd"
56
+ HNL = "hnl"
57
+ HTG = "htg"
58
+ HUF = "huf"
59
+ IDR = "idr"
60
+ ILS = "ils"
61
+ INR = "inr"
62
+ ISK = "isk"
63
+ JMD = "jmd"
64
+ JPY = "jpy"
65
+ KES = "kes"
66
+ KGS = "kgs"
67
+ KHR = "khr"
68
+ KMF = "kmf"
69
+ KRW = "krw"
70
+ KYD = "kyd"
71
+ KZT = "kzt"
72
+ LAK = "lak"
73
+ LBP = "lbp"
74
+ LKR = "lkr"
75
+ LRD = "lrd"
76
+ LSL = "lsl"
77
+ MAD = "mad"
78
+ MDL = "mdl"
79
+ MGA = "mga"
80
+ MKD = "mkd"
81
+ MMK = "mmk"
82
+ MNT = "mnt"
83
+ MOP = "mop"
84
+ MUR = "mur"
85
+ MVR = "mvr"
86
+ MWK = "mwk"
87
+ MXN = "mxn"
88
+ MYR = "myr"
89
+ MZN = "mzn"
90
+ NAD = "nad"
91
+ NGN = "ngn"
92
+ NIO = "nio"
93
+ NOK = "nok"
94
+ NPR = "npr"
95
+ NZD = "nzd"
96
+ PAB = "pab"
97
+ PEN = "pen"
98
+ PGK = "pgk"
99
+ PHP = "php"
100
+ PKR = "pkr"
101
+ PLN = "pln"
102
+ PYG = "pyg"
103
+ QAR = "qar"
104
+ RON = "ron"
105
+ RSD = "rsd"
106
+ RUB = "rub"
107
+ RWF = "rwf"
108
+ SAR = "sar"
109
+ SBD = "sbd"
110
+ SCR = "scr"
111
+ SEK = "sek"
112
+ SGD = "sgd"
113
+ SHP = "shp"
114
+ SLE = "sle"
115
+ SOS = "sos"
116
+ SRD = "srd"
117
+ STD = "std"
118
+ SZL = "szl"
119
+ THB = "thb"
120
+ TJS = "tjs"
121
+ TOP = "top"
122
+ TRY = "try"
123
+ TTD = "ttd"
124
+ TWD = "twd"
125
+ TZS = "tzs"
126
+ UAH = "uah"
127
+ UGX = "ugx"
128
+ USD = "usd"
129
+ UYU = "uyu"
130
+ UZS = "uzs"
131
+ VND = "vnd"
132
+ VUV = "vuv"
133
+ WST = "wst"
134
+ XAF = "xaf"
135
+ XCD = "xcd"
136
+ XCG = "xcg"
137
+ XOF = "xof"
138
+ XPF = "xpf"
139
+ YER = "yer"
140
+ ZAR = "zar"
141
+ ZMW = "zmw"
142
+ end
143
+ end
144
+ end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class CurrencyPriceRequestBody < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :monthly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
9
9
 
@@ -9,6 +9,8 @@ module Schematic
9
9
 
10
10
  field :billing_start_date, -> { String }, optional: true, nullable: false
11
11
 
12
+ field :checkout_id, -> { String }, optional: true, nullable: false
13
+
12
14
  field :company_id, -> { String }, optional: false, nullable: false
13
15
 
14
16
  field :created_at, -> { String }, optional: false, nullable: false
@@ -19,12 +21,16 @@ module Schematic
19
21
 
20
22
  field :id, -> { String }, optional: false, nullable: false
21
23
 
24
+ field :migration_id, -> { String }, optional: true, nullable: false
25
+
22
26
  field :paid_at, -> { String }, optional: true, nullable: false
23
27
 
24
28
  field :plan_billing_source, -> { Schematic::Types::PlanBillingSource }, optional: false, nullable: false
25
29
 
26
30
  field :plan_id, -> { String }, optional: false, nullable: false
27
31
 
32
+ field :problems, -> { Internal::Types::Array[Schematic::Types::CheckoutProblemResponseData] }, optional: false, nullable: false
33
+
28
34
  field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false
29
35
 
30
36
  field :published_at, -> { String }, optional: true, nullable: false
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class EntitlementCurrencyPricesResponseData < Internal::Types::Model
6
- field :currency, -> { String }, optional: false, nullable: false
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
7
 
8
8
  field :monthly_price, -> { Schematic::Types::BillingPriceView }, optional: true, nullable: false
9
9
 
@@ -5,7 +5,7 @@ module Schematic
5
5
  class EstimatedPlanTotal < Internal::Types::Model
6
6
  field :amount, -> { Integer }, optional: false, nullable: false
7
7
 
8
- field :currency, -> { String }, optional: false, nullable: false
8
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
9
9
 
10
10
  field :period, -> { Schematic::Types::PlanPriceCadence }, optional: false, nullable: false
11
11
  end
@@ -13,17 +13,17 @@ module Schematic
13
13
 
14
14
  field :company_override, -> { Schematic::Types::CompanyOverrideResponseData }, optional: true, nullable: false
15
15
 
16
- field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false
16
+ field :credit_consumption_rate, -> { Float }, optional: true, nullable: false
17
17
 
18
- field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
18
+ field :credit_grant_counts, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
19
19
 
20
20
  field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false
21
21
 
22
22
  field :credit_grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false
23
23
 
24
- field :credit_remaining, -> { Integer }, optional: true, nullable: false
24
+ field :credit_remaining, -> { Float }, optional: true, nullable: false
25
25
 
26
- field :credit_total, -> { Integer }, optional: true, nullable: false
26
+ field :credit_total, -> { Float }, optional: true, nullable: false
27
27
 
28
28
  field :credit_type_icon, -> { String }, optional: true, nullable: false
29
29
 
@@ -31,11 +31,11 @@ module Schematic
31
31
 
32
32
  field :credit_usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false
33
33
 
34
- field :credit_used, -> { Integer }, optional: true, nullable: false
34
+ field :credit_used, -> { Float }, optional: true, nullable: false
35
35
 
36
36
  field :effective_limit, -> { Integer }, optional: true, nullable: false
37
37
 
38
- field :effective_price, -> { Integer }, optional: true, nullable: false
38
+ field :effective_price, -> { Float }, optional: true, nullable: false
39
39
 
40
40
  field :entitlement_expiration_date, -> { String }, optional: true, nullable: false
41
41
 
@@ -59,7 +59,7 @@ module Schematic
59
59
 
60
60
  field :overuse, -> { Integer }, optional: true, nullable: false
61
61
 
62
- field :percent_used, -> { Integer }, optional: true, nullable: false
62
+ field :percent_used, -> { Float }, optional: true, nullable: false
63
63
 
64
64
  field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false
65
65