schematichq 1.5.3 → 1.5.5

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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +13 -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 +748 -34
  11. data/lib/schematic/billing/types/count_native_invoices_params.rb +20 -0
  12. data/lib/schematic/billing/types/count_native_invoices_request.rb +19 -0
  13. data/lib/schematic/billing/types/count_native_invoices_response.rb +13 -0
  14. data/lib/schematic/billing/types/create_billing_price_request_body.rb +1 -1
  15. data/lib/schematic/billing/types/create_billing_product_request_body.rb +1 -1
  16. data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +1 -1
  17. data/lib/schematic/billing/types/create_coupon_request_body.rb +2 -2
  18. data/lib/schematic/billing/types/create_invoice_request_body.rb +1 -1
  19. data/lib/schematic/billing/types/finalize_native_invoice_response.rb +13 -0
  20. data/lib/schematic/billing/types/get_billing_settings_response.rb +13 -0
  21. data/lib/schematic/billing/types/get_company_native_subscription_response.rb +13 -0
  22. data/lib/schematic/billing/types/get_native_invoice_response.rb +13 -0
  23. data/lib/schematic/billing/types/list_billing_prices_params.rb +1 -1
  24. data/lib/schematic/billing/types/list_billing_prices_request.rb +1 -1
  25. data/lib/schematic/billing/types/list_billing_product_prices_params.rb +1 -1
  26. data/lib/schematic/billing/types/list_billing_product_prices_request.rb +1 -1
  27. data/lib/schematic/billing/types/list_native_invoices_params.rb +20 -0
  28. data/lib/schematic/billing/types/list_native_invoices_request.rb +19 -0
  29. data/lib/schematic/billing/types/list_native_invoices_response.rb +13 -0
  30. data/lib/schematic/billing/types/mark_invoice_paid_request_body.rb +19 -0
  31. data/lib/schematic/billing/types/mark_native_invoice_paid_response.rb +13 -0
  32. data/lib/schematic/billing/types/update_billing_settings_request_body.rb +11 -0
  33. data/lib/schematic/billing/types/update_billing_settings_response.rb +13 -0
  34. data/lib/schematic/billing/types/void_native_invoice_response.rb +13 -0
  35. data/lib/schematic/catalogs/client.rb +121 -14
  36. data/lib/schematic/checkout/client.rb +80 -9
  37. data/lib/schematic/checkout/types/checkout_data_request_body.rb +1 -1
  38. data/lib/schematic/client.rb +5 -3
  39. data/lib/schematic/companies/client.rb +380 -44
  40. data/lib/schematic/components/client.rb +70 -8
  41. data/lib/schematic/components/types/create_component_request_body.rb +1 -1
  42. data/lib/schematic/components/types/update_component_request_body.rb +1 -1
  43. data/lib/schematic/componentspublic/client.rb +8 -1
  44. data/lib/schematic/credits/client.rb +409 -41
  45. data/lib/schematic/credits/types/acquire_credit_lease_request_body.rb +1 -1
  46. data/lib/schematic/credits/types/create_billing_credit_request_body.rb +1 -1
  47. data/lib/schematic/credits/types/create_company_credit_grant.rb +1 -1
  48. data/lib/schematic/credits/types/create_credit_bundle_request_body.rb +1 -1
  49. data/lib/schematic/credits/types/create_credit_spend_policy_request_body.rb +2 -2
  50. data/lib/schematic/credits/types/extend_credit_lease_request_body.rb +1 -1
  51. data/lib/schematic/credits/types/get_credit_balance_time_series_params.rb +18 -0
  52. data/lib/schematic/credits/types/get_credit_balance_time_series_request.rb +17 -0
  53. data/lib/schematic/credits/types/get_credit_balance_time_series_response.rb +13 -0
  54. data/lib/schematic/credits/types/reserve_credits_request_body.rb +1 -1
  55. data/lib/schematic/credits/types/update_credit_spend_policy_request_body.rb +2 -2
  56. data/lib/schematic/dataexports/client.rb +36 -6
  57. data/lib/schematic/entitlements/client.rb +244 -28
  58. data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +4 -2
  59. data/lib/schematic/entitlements/types/create_company_override_request_body.rb +3 -1
  60. data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +4 -2
  61. data/lib/schematic/entitlements/types/update_company_override_request_body.rb +3 -1
  62. data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +4 -2
  63. data/lib/schematic/errors/connection_error.rb +11 -0
  64. data/lib/schematic/errors/response_error.rb +23 -2
  65. data/lib/schematic/events/client.rb +78 -9
  66. data/lib/schematic/features/client.rb +160 -20
  67. data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +1 -1
  68. data/lib/schematic/features/types/create_billing_linked_feature_request_body.rb +2 -0
  69. data/lib/schematic/features/types/create_feature_request_body.rb +2 -0
  70. data/lib/schematic/features/types/update_feature_request_body.rb +2 -0
  71. data/lib/schematic/insights/client.rb +48 -6
  72. data/lib/schematic/integrationsapi/client.rb +120 -14
  73. data/lib/schematic/internal/http/base_request.rb +30 -0
  74. data/lib/schematic/internal/http/raw_client.rb +35 -5
  75. data/lib/schematic/internal/iterators/cursor_item_iterator.rb +9 -4
  76. data/lib/schematic/internal/iterators/cursor_page_iterator.rb +78 -15
  77. data/lib/schematic/internal/iterators/item_iterator.rb +70 -15
  78. data/lib/schematic/internal/iterators/offset_item_iterator.rb +9 -4
  79. data/lib/schematic/internal/iterators/offset_page_iterator.rb +71 -14
  80. data/lib/schematic/internal/json/request.rb +11 -2
  81. data/lib/schematic/internal/multipart/multipart_request.rb +1 -0
  82. data/lib/schematic/internal/types/model.rb +24 -4
  83. data/lib/schematic/internal/types/utils.rb +7 -0
  84. data/lib/schematic/licenses/client.rb +26 -3
  85. data/lib/schematic/planbundle/client.rb +27 -3
  86. data/lib/schematic/plangroups/client.rb +26 -3
  87. data/lib/schematic/planmigrations/client.rb +98 -11
  88. data/lib/schematic/plans/client.rb +274 -28
  89. data/lib/schematic/plans/types/get_plan_version_diff_params.rb +12 -0
  90. data/lib/schematic/plans/types/get_plan_version_diff_request.rb +13 -0
  91. data/lib/schematic/plans/types/get_plan_version_diff_response.rb +13 -0
  92. data/lib/schematic/plans/types/list_custom_plan_billings_params.rb +4 -0
  93. data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +4 -0
  94. data/lib/schematic/plans/types/preview_publish_plan_version_response.rb +13 -0
  95. data/lib/schematic/rules_engine.rb +14 -2
  96. data/lib/schematic/scheduledcheckout/client.rb +35 -4
  97. data/lib/schematic/schematic_client.rb +22 -11
  98. data/lib/schematic/types/amendment_proration_lands_on.rb +13 -0
  99. data/lib/schematic/types/billing_coupon_response_data.rb +2 -2
  100. data/lib/schematic/types/billing_credit_grant_response_data.rb +8 -8
  101. data/lib/schematic/types/billing_customer_subscription.rb +1 -1
  102. data/lib/schematic/types/billing_invoice_detail_response_data.rb +49 -0
  103. data/lib/schematic/types/billing_invoice_line_response_data.rb +27 -0
  104. data/lib/schematic/types/billing_invoice_response_data.rb +43 -0
  105. data/lib/schematic/types/billing_invoice_settlement_response_data.rb +17 -0
  106. data/lib/schematic/types/billing_invoice_terms_response_data.rb +19 -0
  107. data/lib/schematic/types/billing_native_subscription_change_response_data.rb +15 -0
  108. data/lib/schematic/types/billing_native_subscription_line_response_data.rb +47 -0
  109. data/lib/schematic/types/billing_native_subscription_response_data.rb +31 -0
  110. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +1 -1
  111. data/lib/schematic/types/billing_price_response_data.rb +1 -1
  112. data/lib/schematic/types/billing_price_view.rb +1 -1
  113. data/lib/schematic/types/billing_product_detail_response_data.rb +2 -2
  114. data/lib/schematic/types/billing_product_for_subscription_response_data.rb +2 -2
  115. data/lib/schematic/types/billing_product_price_response_data.rb +1 -1
  116. data/lib/schematic/types/billing_product_pricing.rb +1 -1
  117. data/lib/schematic/types/billing_product_response_data.rb +2 -2
  118. data/lib/schematic/types/billing_settings_response_data.rb +9 -0
  119. data/lib/schematic/types/billing_statement_line_response_data.rb +21 -0
  120. data/lib/schematic/types/billing_statement_response_data.rb +19 -0
  121. data/lib/schematic/types/billing_subscription_discount_view.rb +2 -2
  122. data/lib/schematic/types/billing_subscription_response_data.rb +1 -1
  123. data/lib/schematic/types/billing_subscription_view.rb +1 -1
  124. data/lib/schematic/types/catalog_config_ordered_plan.rb +2 -0
  125. data/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +2 -0
  126. data/lib/schematic/types/catalog_config_plan_credit.rb +11 -0
  127. data/lib/schematic/types/catalog_config_plan_credit_response_data.rb +11 -0
  128. data/lib/schematic/types/change_subscription_internal_request_body.rb +1 -1
  129. data/lib/schematic/types/change_subscription_request_body.rb +1 -1
  130. data/lib/schematic/types/charge_timing.rb +12 -0
  131. data/lib/schematic/types/checkout_problem_code.rb +54 -0
  132. data/lib/schematic/types/checkout_problem_response_data.rb +31 -0
  133. data/lib/schematic/types/checkout_problem_source.rb +13 -0
  134. data/lib/schematic/types/checkout_subscription.rb +1 -1
  135. data/lib/schematic/types/collector.rb +13 -0
  136. data/lib/schematic/types/company_billing_entity_subscription_response_data.rb +1 -1
  137. data/lib/schematic/types/company_billing_profile_response_data.rb +12 -0
  138. data/lib/schematic/types/company_credit_balance.rb +7 -3
  139. data/lib/schematic/types/company_credit_balance_response_data.rb +4 -4
  140. data/lib/schematic/types/company_detail_response_data.rb +1 -1
  141. data/lib/schematic/types/company_override_response_data.rb +3 -1
  142. data/lib/schematic/types/company_plan_credit_grant_view.rb +1 -1
  143. data/lib/schematic/types/company_plan_detail_response_data.rb +2 -0
  144. data/lib/schematic/types/company_subscription_response_data.rb +1 -1
  145. data/lib/schematic/types/company_user_usage_response_data.rb +2 -2
  146. data/lib/schematic/types/company_user_usage_row_response_data.rb +2 -2
  147. data/lib/schematic/types/component_response_data.rb +1 -1
  148. data/lib/schematic/types/condition.rb +3 -1
  149. data/lib/schematic/types/condition_response_data.rb +3 -1
  150. data/lib/schematic/types/condition_view.rb +3 -1
  151. data/lib/schematic/types/coupon_request_body.rb +2 -2
  152. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +1 -1
  153. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +4 -2
  154. data/lib/schematic/types/create_entitlement_req_common.rb +3 -1
  155. data/lib/schematic/types/create_flag_request_body.rb +1 -1
  156. data/lib/schematic/types/create_or_update_condition_request_body.rb +1 -1
  157. data/lib/schematic/types/create_or_update_flag_request_body.rb +1 -1
  158. data/lib/schematic/types/credit_balance_event_response_data.rb +21 -0
  159. data/lib/schematic/types/credit_balance_feature_consumption_response_data.rb +13 -0
  160. data/lib/schematic/types/credit_balance_point_response_data.rb +15 -0
  161. data/lib/schematic/types/credit_balance_time_series_response_data.rb +15 -0
  162. data/lib/schematic/types/credit_bundle_currency_price.rb +1 -1
  163. data/lib/schematic/types/credit_bundle_currency_price_request_body.rb +1 -1
  164. data/lib/schematic/types/credit_bundle_currency_price_response_data.rb +1 -1
  165. data/lib/schematic/types/credit_burn_breakdown_line.rb +15 -0
  166. data/lib/schematic/types/credit_company_grant_view.rb +8 -8
  167. data/lib/schematic/types/credit_currency_price.rb +1 -1
  168. data/lib/schematic/types/credit_currency_price_request_body.rb +1 -1
  169. data/lib/schematic/types/credit_currency_price_response_data.rb +1 -1
  170. data/lib/schematic/types/credit_event_ledger_response_data.rb +10 -6
  171. data/lib/schematic/types/credit_grant_detail.rb +1 -1
  172. data/lib/schematic/types/credit_lease_response_data.rb +2 -2
  173. data/lib/schematic/types/credit_reservation_response_data.rb +2 -2
  174. data/lib/schematic/types/credit_spend_policy.rb +4 -2
  175. data/lib/schematic/types/credit_spend_policy_response_data.rb +4 -4
  176. data/lib/schematic/types/credit_transfer_response_data.rb +1 -1
  177. data/lib/schematic/types/credit_transfer_view.rb +1 -1
  178. data/lib/schematic/types/credit_usage.rb +5 -5
  179. data/lib/schematic/types/credit_usage_aggregation.rb +4 -4
  180. data/lib/schematic/types/credit_usage_reason.rb +1 -0
  181. data/lib/schematic/types/credits_in_plan.rb +11 -0
  182. data/lib/schematic/types/currency.rb +144 -0
  183. data/lib/schematic/types/currency_price_request_body.rb +1 -1
  184. data/lib/schematic/types/custom_plan_billing_response_data.rb +6 -0
  185. data/lib/schematic/types/entitlement_currency_prices_response_data.rb +1 -1
  186. data/lib/schematic/types/estimated_plan_total.rb +1 -1
  187. data/lib/schematic/types/event_body_inference.rb +4 -0
  188. data/lib/schematic/types/feature_company_response_data.rb +7 -7
  189. data/lib/schematic/types/feature_detail_response_data.rb +2 -0
  190. data/lib/schematic/types/feature_entitlement.rb +8 -6
  191. data/lib/schematic/types/feature_event_source.rb +12 -0
  192. data/lib/schematic/types/feature_in_plan_response_data.rb +2 -0
  193. data/lib/schematic/types/feature_response_data.rb +2 -0
  194. data/lib/schematic/types/feature_usage_response_data.rb +7 -7
  195. data/lib/schematic/types/feature_view.rb +2 -0
  196. data/lib/schematic/types/flag_check_reservation_response_data.rb +3 -3
  197. data/lib/schematic/types/flag_detail_response_data.rb +1 -1
  198. data/lib/schematic/types/flag_in_plan_response_data.rb +1 -1
  199. data/lib/schematic/types/flag_response_data.rb +1 -1
  200. data/lib/schematic/types/insights_summary_response_data.rb +1 -1
  201. data/lib/schematic/types/invoice_collection_state.rb +17 -0
  202. data/lib/schematic/types/invoice_document_state.rb +14 -0
  203. data/lib/schematic/types/invoice_line_kind.rb +15 -0
  204. data/lib/schematic/types/invoice_request_body.rb +1 -1
  205. data/lib/schematic/types/invoice_response_data.rb +1 -1
  206. data/lib/schematic/types/line_kind.rb +13 -0
  207. data/lib/schematic/types/manage_plan_preview_response_response_data.rb +2 -0
  208. data/lib/schematic/types/manage_plan_request.rb +3 -1
  209. data/lib/schematic/types/manage_plan_response_response_data.rb +4 -0
  210. data/lib/schematic/types/mrr_response_data.rb +1 -1
  211. data/lib/schematic/types/onboarding_milestone_view.rb +1 -1
  212. data/lib/schematic/types/ordered_plans_in_group.rb +2 -0
  213. data/lib/schematic/types/payment_gating.rb +12 -0
  214. data/lib/schematic/types/plan_billing_source.rb +1 -0
  215. data/lib/schematic/types/plan_change_action.rb +1 -0
  216. data/lib/schematic/types/plan_change_amendment_status.rb +15 -0
  217. data/lib/schematic/types/plan_change_response_data.rb +4 -0
  218. data/lib/schematic/types/plan_credit_grant_view.rb +1 -1
  219. data/lib/schematic/types/plan_credit_order.rb +11 -0
  220. data/lib/schematic/types/plan_credit_visibility.rb +11 -0
  221. data/lib/schematic/types/plan_currency_price_request_body.rb +1 -1
  222. data/lib/schematic/types/plan_currency_prices_response_data.rb +1 -1
  223. data/lib/schematic/types/plan_entitlement_response_data.rb +3 -1
  224. data/lib/schematic/types/plan_group_plan_entitlements_order.rb +2 -0
  225. data/lib/schematic/types/plan_version_billing_product_change_response_data.rb +11 -0
  226. data/lib/schematic/types/plan_version_credit_grant_change_response_data.rb +17 -0
  227. data/lib/schematic/types/plan_version_diff_change_type.rb +13 -0
  228. data/lib/schematic/types/plan_version_diff_price_cadence.rb +14 -0
  229. data/lib/schematic/types/plan_version_diff_response_data.rb +23 -0
  230. data/lib/schematic/types/plan_version_entitlement_change_response_data.rb +17 -0
  231. data/lib/schematic/types/plan_version_field_change_response_data.rb +13 -0
  232. data/lib/schematic/types/plan_version_price_change_response_data.rb +15 -0
  233. data/lib/schematic/types/plan_view_public_response_data.rb +2 -0
  234. data/lib/schematic/types/preflight_event_quantities_request_body.rb +13 -0
  235. data/lib/schematic/types/preflight_request_body.rb +3 -1
  236. data/lib/schematic/types/preview_subscription_change_response_data.rb +3 -1
  237. data/lib/schematic/types/preview_subscription_discount_response_data.rb +2 -2
  238. data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -2
  239. data/lib/schematic/types/publish_plan_version_request_body.rb +43 -0
  240. data/lib/schematic/types/publish_preview_pay_in_advance_response_data.rb +15 -0
  241. data/lib/schematic/types/publish_preview_payment_method_response_data.rb +15 -0
  242. data/lib/schematic/types/publish_preview_proration_line_response_data.rb +19 -0
  243. data/lib/schematic/types/publish_preview_response_data.rb +53 -0
  244. data/lib/schematic/types/rulesengine_company.rb +1 -1
  245. data/lib/schematic/types/rulesengine_condition.rb +3 -1
  246. data/lib/schematic/types/rulesengine_credit_postpaid_config.rb +1 -1
  247. data/lib/schematic/types/rulesengine_credit_spend_policy.rb +4 -2
  248. data/lib/schematic/types/rulesengine_feature_entitlement.rb +8 -6
  249. data/lib/schematic/types/scheduled_downgrade_response_data.rb +1 -1
  250. data/lib/schematic/types/subscription_change_action.rb +14 -0
  251. data/lib/schematic/types/top_feature_by_usage_response_data.rb +1 -1
  252. data/lib/schematic/types/upcoming_invoice_response_data.rb +1 -1
  253. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +1 -1
  254. data/lib/schematic/types/update_entitlement_req_common.rb +3 -1
  255. data/lib/schematic/types/upsert_billing_product_request_body.rb +1 -1
  256. data/lib/schematic/types/usage_based_entitlement_request_body.rb +1 -1
  257. data/lib/schematic/types/usage_based_entitlement_response_data.rb +1 -1
  258. data/lib/schematic/types/user_credit_usage_response_data.rb +2 -2
  259. data/lib/schematic/types/user_daily_credit_point_response_data.rb +1 -1
  260. data/lib/schematic/types/user_feature_usage_response_data.rb +1 -1
  261. data/lib/schematic/version.rb +1 -1
  262. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  263. data/lib/schematic/webhooks/client.rb +88 -10
  264. data/lib/schematic.rb +80 -8
  265. data/reference.md +892 -113
  266. metadata +75 -3
  267. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +0 -45
@@ -11,27 +11,27 @@ module Schematic
11
11
 
12
12
  field :company_override, -> { Schematic::Types::CompanyOverrideResponseData }, optional: true, nullable: false
13
13
 
14
- field :credit_consumption_rate, -> { Integer }, optional: true, nullable: false
14
+ field :credit_consumption_rate, -> { Float }, optional: true, nullable: false
15
15
 
16
- field :credit_grant_counts, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
16
+ field :credit_grant_counts, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
17
17
 
18
18
  field :credit_grant_details, -> { Internal::Types::Array[Schematic::Types::CreditGrantDetail] }, optional: true, nullable: false
19
19
 
20
20
  field :credit_grant_reason, -> { Schematic::Types::BillingCreditGrantReason }, optional: true, nullable: false
21
21
 
22
- field :credit_remaining, -> { Integer }, optional: true, nullable: false
22
+ field :credit_remaining, -> { Float }, optional: true, nullable: false
23
23
 
24
- field :credit_total, -> { Integer }, optional: true, nullable: false
24
+ field :credit_total, -> { Float }, optional: true, nullable: false
25
25
 
26
26
  field :credit_type_icon, -> { String }, optional: true, nullable: false
27
27
 
28
28
  field :credit_usage_aggregation, -> { Schematic::Types::CreditUsageAggregation }, optional: true, nullable: false
29
29
 
30
- field :credit_used, -> { Integer }, optional: true, nullable: false
30
+ field :credit_used, -> { Float }, optional: true, nullable: false
31
31
 
32
32
  field :effective_limit, -> { Integer }, optional: true, nullable: false
33
33
 
34
- field :effective_price, -> { Integer }, optional: true, nullable: false
34
+ field :effective_price, -> { Float }, optional: true, nullable: false
35
35
 
36
36
  field :entitlement_expiration_date, -> { String }, optional: true, nullable: false
37
37
 
@@ -55,7 +55,7 @@ module Schematic
55
55
 
56
56
  field :overuse, -> { Integer }, optional: true, nullable: false
57
57
 
58
- field :percent_used, -> { Integer }, optional: true, nullable: false
58
+ field :percent_used, -> { Float }, optional: true, nullable: false
59
59
 
60
60
  field :period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false
61
61
 
@@ -13,6 +13,8 @@ module Schematic
13
13
 
14
14
  field :description, -> { String }, optional: false, nullable: false
15
15
 
16
+ field :event_source, -> { Schematic::Types::FeatureEventSource }, optional: false, nullable: false
17
+
16
18
  field :event_subtype, -> { String }, optional: true, nullable: false
17
19
 
18
20
  field :event_summary, -> { Schematic::Types::EventSummaryResponseData }, optional: true, nullable: false
@@ -5,11 +5,11 @@ module Schematic
5
5
  class FlagCheckReservationResponseData < Internal::Types::Model
6
6
  field :company_id, -> { String }, optional: false, nullable: false
7
7
 
8
- field :consumption_rate, -> { Integer }, optional: false, nullable: false
8
+ field :consumption_rate, -> { Float }, optional: false, nullable: false
9
9
 
10
10
  field :credit_type_id, -> { String }, optional: false, nullable: false
11
11
 
12
- field :credits_reserved, -> { Integer }, optional: false, nullable: false
12
+ field :credits_reserved, -> { Float }, optional: false, nullable: false
13
13
 
14
14
  field :event_subtype, -> { String }, optional: true, nullable: false
15
15
 
@@ -17,7 +17,7 @@ module Schematic
17
17
 
18
18
  field :id, -> { String }, optional: false, nullable: false
19
19
 
20
- field :quantity_reserved, -> { Integer }, optional: false, nullable: false
20
+ field :quantity_reserved, -> { Float }, optional: false, nullable: false
21
21
  end
22
22
  end
23
23
  end
@@ -5,7 +5,7 @@ module Schematic
5
5
  class FlagDetailResponseData < Internal::Types::Model
6
6
  field :created_at, -> { String }, optional: false, nullable: false
7
7
 
8
- field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ field :default_value, -> { Internal::Types::Boolean }, optional: true, nullable: false
9
9
 
10
10
  field :description, -> { String }, optional: false, nullable: false
11
11
 
@@ -5,7 +5,7 @@ module Schematic
5
5
  class FlagInPlanResponseData < Internal::Types::Model
6
6
  field :created_at, -> { String }, optional: false, nullable: false
7
7
 
8
- field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ field :default_value, -> { Internal::Types::Boolean }, optional: true, nullable: false
9
9
 
10
10
  field :description, -> { String }, optional: false, nullable: false
11
11
 
@@ -5,7 +5,7 @@ module Schematic
5
5
  class FlagResponseData < Internal::Types::Model
6
6
  field :created_at, -> { String }, optional: false, nullable: false
7
7
 
8
- field :default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ field :default_value, -> { Internal::Types::Boolean }, optional: true, nullable: false
9
9
 
10
10
  field :description, -> { String }, optional: false, nullable: false
11
11
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class InsightsSummaryResponseData < Internal::Types::Model
6
- field :active_credits, -> { Integer }, optional: false, nullable: false
6
+ field :active_credits, -> { Float }, optional: false, nullable: false
7
7
 
8
8
  field :mrr, -> { Internal::Types::Array[Schematic::Types::MrrResponseData] }, optional: false, nullable: false
9
9
 
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module InvoiceCollectionState
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ EXPORTED = "exported"
9
+ PAID = "paid"
10
+ PARTIALLY_PAID = "partially_paid"
11
+ PAST_DUE = "past_due"
12
+ PAYMENT_FAILED = "payment_failed"
13
+ QUEUED = "queued"
14
+ SENT = "sent"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module InvoiceDocumentState
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ CREDITED = "credited"
9
+ DRAFT = "draft"
10
+ FINALIZED = "finalized"
11
+ VOID = "void"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module InvoiceLineKind
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ ADJUSTMENT = "adjustment"
9
+ PURCHASE = "purchase"
10
+ RECONCILIATION = "reconciliation"
11
+ SUBSCRIPTION = "subscription"
12
+ TRUE_UP = "true_up"
13
+ end
14
+ end
15
+ end
@@ -11,7 +11,7 @@ module Schematic
11
11
 
12
12
  field :collection_method, -> { String }, optional: false, nullable: false
13
13
 
14
- field :currency, -> { String }, optional: false, nullable: false
14
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
15
15
 
16
16
  field :customer_external_id, -> { String }, optional: false, nullable: false
17
17
 
@@ -15,7 +15,7 @@ module Schematic
15
15
 
16
16
  field :created_at, -> { String }, optional: false, nullable: false
17
17
 
18
- field :currency, -> { String }, optional: false, nullable: false
18
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
19
19
 
20
20
  field :customer_external_id, -> { String }, optional: false, nullable: false
21
21
 
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module LineKind
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ ALLOWANCE = "allowance"
9
+ CAPACITY = "capacity"
10
+ RATE = "rate"
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class ManagePlanPreviewResponseResponseData < Internal::Types::Model
6
+ field :problems, -> { Internal::Types::Array[Schematic::Types::CheckoutProblemResponseData] }, optional: false, nullable: false
7
+
6
8
  field :subscription_change_preview, -> { Schematic::Types::PreviewSubscriptionChangeResponseData }, optional: true, nullable: false
7
9
  end
8
10
  end
@@ -29,12 +29,14 @@ module Schematic
29
29
 
30
30
  field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::UpdateCreditBundleRequestBody] }, optional: false, nullable: false
31
31
 
32
- field :currency, -> { String }, optional: true, nullable: false
32
+ field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
33
33
 
34
34
  field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
35
35
 
36
36
  field :days_until_due, -> { Integer }, optional: true, nullable: false
37
37
 
38
+ field :paid_outside_stripe, -> { Internal::Types::Boolean }, optional: true, nullable: false
39
+
38
40
  field :pay_in_advance_entitlements, -> { Internal::Types::Array[Schematic::Types::UpdatePayInAdvanceRequestBody] }, optional: false, nullable: false
39
41
 
40
42
  field :payment_method_external_id, -> { String }, optional: true, nullable: false
@@ -3,8 +3,12 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class ManagePlanResponseResponseData < Internal::Types::Model
6
+ field :checkout_id, -> { String }, optional: true, nullable: false
7
+
6
8
  field :company, -> { Schematic::Types::CompanyDetailResponseData }, optional: true, nullable: false
7
9
 
10
+ field :problems, -> { Internal::Types::Array[Schematic::Types::CheckoutProblemResponseData] }, optional: false, nullable: false
11
+
8
12
  field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
13
  end
10
14
  end
@@ -5,7 +5,7 @@ module Schematic
5
5
  class MrrResponseData < 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
  end
10
10
  end
11
11
  end
@@ -7,7 +7,7 @@ module Schematic
7
7
 
8
8
  field :missing, -> { Internal::Types::Array[Schematic::Types::OnboardingRequirement] }, optional: false, nullable: false
9
9
 
10
- field :progress, -> { Integer }, optional: false, nullable: false
10
+ field :progress, -> { Float }, optional: false, nullable: false
11
11
 
12
12
  field :reached_at, -> { String }, optional: true, nullable: false
13
13
  end
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class OrderedPlansInGroup < Internal::Types::Model
6
+ field :credits, -> { Internal::Types::Array[Schematic::Types::CreditsInPlan] }, optional: true, nullable: false
7
+
6
8
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::EntitlementsInPlan] }, optional: true, nullable: false
7
9
 
8
10
  field :plan_id, -> { String }, optional: false, nullable: false
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module PaymentGating
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ KEEP_SERVING = "keep_serving"
9
+ REVOKE_AFTER = "revoke_after"
10
+ end
11
+ end
12
+ end
@@ -5,6 +5,7 @@ module Schematic
5
5
  module PlanBillingSource
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
+ AMENDMENT = "amendment"
8
9
  CUSTOM_PLAN = "custom_plan"
9
10
  MANAGE_PLAN = "manage_plan"
10
11
  end
@@ -5,6 +5,7 @@ module Schematic
5
5
  module PlanChangeAction
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
+ AMENDMENT = "amendment"
8
9
  CHECKOUT = "checkout"
9
10
  COMPANY_UPSERT = "company_upsert"
10
11
  FALLBACK_PLAN = "fallback_plan"
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module PlanChangeAmendmentStatus
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ APPLIED = "applied"
9
+ CANCELLED = "cancelled"
10
+ FAILED = "failed"
11
+ SCHEDULED = "scheduled"
12
+ SKIPPED = "skipped"
13
+ end
14
+ end
15
+ end
@@ -11,6 +11,8 @@ module Schematic
11
11
 
12
12
  field :add_ons_removed, -> { Internal::Types::Array[Schematic::Types::PlanSnapshotView] }, optional: false, nullable: false
13
13
 
14
+ field :amendment_status, -> { Schematic::Types::PlanChangeAmendmentStatus }, optional: true, nullable: false
15
+
14
16
  field :api_key, -> { Schematic::Types::ApiKeyResponseData }, optional: true, nullable: false
15
17
 
16
18
  field :audit_log, -> { Schematic::Types::AuditLogListResponseData }, optional: true, nullable: false
@@ -35,6 +37,8 @@ module Schematic
35
37
 
36
38
  field :is_version_upgrade, -> { Internal::Types::Boolean }, optional: false, nullable: false
37
39
 
40
+ field :migration_id, -> { String }, optional: true, nullable: false
41
+
38
42
  field :previous_base_plan, -> { Schematic::Types::PlanSnapshotView }, optional: true, nullable: false
39
43
 
40
44
  field :previous_base_plan_version, -> { Schematic::Types::PlanVersionSnapshotView }, optional: true, nullable: false
@@ -29,7 +29,7 @@ module Schematic
29
29
 
30
30
  field :billing_credit_can_buy_bundles, -> { Internal::Types::Boolean }, optional: false, nullable: false
31
31
 
32
- field :billing_credit_overdraft_limit, -> { Integer }, optional: true, nullable: false
32
+ field :billing_credit_overdraft_limit, -> { Float }, optional: true, nullable: false
33
33
 
34
34
  field :billing_credit_postpaid_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
35
35
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanCreditOrder < Internal::Types::Model
6
+ field :credit_id, -> { String }, optional: false, nullable: false
7
+
8
+ field :visible, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanCreditVisibility < Internal::Types::Model
6
+ field :credit_id, -> { String }, optional: false, nullable: false
7
+
8
+ field :visible, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class PlanCurrencyPriceRequestBody < 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, -> { Integer }, optional: true, nullable: false
9
9
 
@@ -3,7 +3,7 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class PlanCurrencyPricesResponseData < 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::BillingPriceResponseData }, optional: true, nullable: false
9
9
 
@@ -7,7 +7,7 @@ module Schematic
7
7
 
8
8
  field :billing_threshold, -> { Integer }, optional: true, nullable: false
9
9
 
10
- field :consumption_rate, -> { Integer }, optional: true, nullable: false
10
+ field :consumption_rate, -> { Float }, optional: true, nullable: false
11
11
 
12
12
  field :created_at, -> { String }, optional: false, nullable: false
13
13
 
@@ -41,6 +41,8 @@ module Schematic
41
41
 
42
42
  field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false
43
43
 
44
+ field :quantity_rates, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
45
+
44
46
  field :rule_id, -> { String }, optional: false, nullable: false
45
47
 
46
48
  field :rule_id_usage_exceeded, -> { String }, optional: true, nullable: false
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class PlanGroupPlanEntitlementsOrder < Internal::Types::Model
6
+ field :credits, -> { Internal::Types::Array[Schematic::Types::PlanCreditOrder] }, optional: false, nullable: false
7
+
6
8
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanEntitlementsOrder] }, optional: true, nullable: false
7
9
 
8
10
  field :plan_id, -> { String }, optional: false, nullable: false
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionBillingProductChangeResponseData < Internal::Types::Model
6
+ field :new, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
7
+
8
+ field :old, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionCreditGrantChangeResponseData < Internal::Types::Model
6
+ field :change_type, -> { Schematic::Types::PlanVersionDiffChangeType }, optional: false, nullable: false
7
+
8
+ field :changed_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+
10
+ field :credit_id, -> { String }, optional: false, nullable: false
11
+
12
+ field :new, -> { Schematic::Types::BillingPlanCreditGrantResponseData }, optional: true, nullable: false
13
+
14
+ field :old, -> { Schematic::Types::BillingPlanCreditGrantResponseData }, optional: true, nullable: false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module PlanVersionDiffChangeType
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ ADDED = "added"
9
+ CHANGED = "changed"
10
+ REMOVED = "removed"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module PlanVersionDiffPriceCadence
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ MONTHLY = "monthly"
9
+ ONE_TIME = "one_time"
10
+ QUARTERLY = "quarterly"
11
+ YEARLY = "yearly"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionDiffResponseData < Internal::Types::Model
6
+ field :billing_product, -> { Schematic::Types::PlanVersionBillingProductChangeResponseData }, optional: true, nullable: false
7
+
8
+ field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanVersionCreditGrantChangeResponseData] }, optional: false, nullable: false
9
+
10
+ field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanVersionEntitlementChangeResponseData] }, optional: false, nullable: false
11
+
12
+ field :from, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false
13
+
14
+ field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false
15
+
16
+ field :plan_fields, -> { Internal::Types::Array[Schematic::Types::PlanVersionFieldChangeResponseData] }, optional: false, nullable: false
17
+
18
+ field :prices, -> { Internal::Types::Array[Schematic::Types::PlanVersionPriceChangeResponseData] }, optional: false, nullable: false
19
+
20
+ field :to, -> { Schematic::Types::PlanVersionResponseData }, optional: true, nullable: false
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionEntitlementChangeResponseData < Internal::Types::Model
6
+ field :change_type, -> { Schematic::Types::PlanVersionDiffChangeType }, optional: false, nullable: false
7
+
8
+ field :changed_fields, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+
10
+ field :feature_id, -> { String }, optional: false, nullable: false
11
+
12
+ field :new, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false
13
+
14
+ field :old, -> { Schematic::Types::PlanEntitlementResponseData }, optional: true, nullable: false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionFieldChangeResponseData < Internal::Types::Model
6
+ field :field, -> { String }, optional: false, nullable: false
7
+
8
+ field :new, -> { String }, optional: false, nullable: false
9
+
10
+ field :old, -> { 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 PlanVersionPriceChangeResponseData < Internal::Types::Model
6
+ field :cadence, -> { Schematic::Types::PlanVersionDiffPriceCadence }, optional: false, nullable: false
7
+
8
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
9
+
10
+ field :new, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
11
+
12
+ field :old, -> { Schematic::Types::BillingPriceResponseData }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
@@ -35,6 +35,8 @@ module Schematic
35
35
 
36
36
  field :created_at, -> { String }, optional: false, nullable: false
37
37
 
38
+ field :credit_visibility, -> { Internal::Types::Array[Schematic::Types::PlanCreditVisibility] }, optional: true, nullable: false
39
+
38
40
  field :credits, -> { Internal::Types::Array[Schematic::Types::BillingCreditResponseData] }, optional: false, nullable: false
39
41
 
40
42
  field :currency_prices, -> { Internal::Types::Array[Schematic::Types::PlanCurrencyPricesResponseData] }, optional: false, nullable: false
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PreflightEventQuantitiesRequestBody < Internal::Types::Model
6
+ field :event_subtype, -> { String }, optional: false, nullable: false
7
+
8
+ field :quantities, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
9
+
10
+ field :quantity, -> { Float }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -3,7 +3,9 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class PreflightRequestBody < Internal::Types::Model
6
- field :credit_cost, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
6
+ field :credit_cost, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
7
+
8
+ field :event_quantities, -> { Schematic::Types::PreflightEventQuantitiesRequestBody }, optional: true, nullable: false
7
9
 
8
10
  field :event_usage, -> { Schematic::Types::PreflightEventUsageRequestBody }, optional: true, nullable: false
9
11
 
@@ -21,10 +21,12 @@ module Schematic
21
21
 
22
22
  field :payment_method_required, -> { Internal::Types::Boolean }, optional: false, nullable: false
23
23
 
24
- field :percent_off, -> { Integer }, optional: false, nullable: false
24
+ field :percent_off, -> { Float }, optional: false, nullable: false
25
25
 
26
26
  field :period_start, -> { String }, optional: false, nullable: false
27
27
 
28
+ field :problems, -> { Internal::Types::Array[Schematic::Types::CheckoutProblemResponseData] }, optional: false, nullable: false
29
+
28
30
  field :promo_code_applied, -> { Internal::Types::Boolean }, optional: false, nullable: false
29
31
 
30
32
  field :proration, -> { Integer }, optional: false, nullable: false
@@ -7,7 +7,7 @@ module Schematic
7
7
 
8
8
  field :coupon_name, -> { String }, optional: false, nullable: false
9
9
 
10
- field :currency, -> { String }, optional: true, nullable: false
10
+ field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
11
11
 
12
12
  field :customer_facing_code, -> { String }, optional: true, nullable: false
13
13
 
@@ -19,7 +19,7 @@ module Schematic
19
19
 
20
20
  field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false
21
21
 
22
- field :percent_off, -> { Integer }, optional: true, nullable: false
22
+ field :percent_off, -> { Float }, optional: true, nullable: false
23
23
 
24
24
  field :promo_code_external_id, -> { String }, optional: true, nullable: false
25
25