schematichq 1.5.4 → 1.5.6

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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +13 -1
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/accounts/client.rb +0 -271
  6. data/lib/schematic/billing/client.rb +447 -0
  7. data/lib/schematic/billing/types/count_billing_invoices_params.rb +28 -0
  8. data/lib/schematic/billing/types/count_billing_invoices_request.rb +27 -0
  9. data/lib/schematic/billing/types/count_billing_invoices_response.rb +13 -0
  10. data/lib/schematic/billing/types/create_payment_method_request_body.rb +2 -0
  11. data/lib/schematic/billing/types/finalize_native_invoice_response.rb +13 -0
  12. data/lib/schematic/{accounts/types/delete_environment_response.rb → billing/types/get_billing_invoice_response.rb} +3 -3
  13. data/lib/schematic/billing/types/get_company_native_subscription_response.rb +13 -0
  14. data/lib/schematic/billing/types/list_billing_invoices_params.rb +28 -0
  15. data/lib/schematic/billing/types/list_billing_invoices_request.rb +27 -0
  16. data/lib/schematic/billing/types/list_billing_invoices_response.rb +13 -0
  17. data/lib/schematic/billing/types/mark_billing_invoice_paid_response.rb +13 -0
  18. data/lib/schematic/billing/types/mark_invoice_paid_request_body.rb +19 -0
  19. data/lib/schematic/billing/types/void_native_invoice_response.rb +13 -0
  20. data/lib/schematic/catalogs/client.rb +82 -0
  21. data/lib/schematic/{accounts/types/create_api_key_response.rb → catalogs/types/get_public_catalog_by_id_response.rb} +3 -3
  22. data/lib/schematic/{accounts/types/delete_api_key_response.rb → catalogs/types/get_public_catalog_response.rb} +3 -3
  23. data/lib/schematic/client.rb +195 -1
  24. data/lib/schematic/credits/client.rb +48 -0
  25. data/lib/schematic/credits/types/count_credit_event_ledger_params.rb +2 -0
  26. data/lib/schematic/credits/types/count_credit_event_ledger_request.rb +2 -0
  27. data/lib/schematic/{accounts/types/create_environment_response.rb → credits/types/get_credit_event_ledger_entry_response.rb} +3 -3
  28. data/lib/schematic/credits/types/list_credit_event_ledger_params.rb +2 -0
  29. data/lib/schematic/credits/types/list_credit_event_ledger_request.rb +2 -0
  30. data/lib/schematic/features/client.rb +0 -2
  31. data/lib/schematic/internal/iterators/cursor_item_iterator.rb +2 -2
  32. data/lib/schematic/internal/iterators/cursor_page_iterator.rb +11 -2
  33. data/lib/schematic/internal/iterators/item_iterator.rb +11 -2
  34. data/lib/schematic/internal/iterators/offset_item_iterator.rb +2 -2
  35. data/lib/schematic/internal/iterators/offset_page_iterator.rb +15 -6
  36. data/lib/schematic/internal/types/model.rb +17 -1
  37. data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +2 -0
  38. data/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +2 -0
  39. data/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +2 -0
  40. data/lib/schematic/plans/client.rb +61 -5
  41. data/lib/schematic/plans/types/list_custom_plan_billings_params.rb +4 -0
  42. data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +4 -0
  43. data/lib/schematic/plans/types/preview_publish_plan_version_response.rb +13 -0
  44. data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +2 -0
  45. data/lib/schematic/types/amendment_proration_lands_on.rb +13 -0
  46. data/lib/schematic/types/billing_invoice_address_response_data.rb +19 -0
  47. data/lib/schematic/types/billing_invoice_billing_details_response_data.rb +15 -0
  48. data/lib/schematic/types/billing_invoice_detail_response_data.rb +65 -0
  49. data/lib/schematic/types/billing_invoice_line_response_data.rb +31 -0
  50. data/lib/schematic/types/billing_invoice_response_data.rb +51 -0
  51. data/lib/schematic/types/billing_invoice_settlement_response_data.rb +17 -0
  52. data/lib/schematic/types/billing_invoice_tax_id_response_data.rb +11 -0
  53. data/lib/schematic/types/billing_invoice_terms_response_data.rb +21 -0
  54. data/lib/schematic/types/billing_native_subscription_change_response_data.rb +15 -0
  55. data/lib/schematic/types/billing_native_subscription_line_response_data.rb +47 -0
  56. data/lib/schematic/types/billing_native_subscription_response_data.rb +31 -0
  57. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
  58. data/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb +13 -0
  59. data/lib/schematic/types/billing_statement_line_response_data.rb +21 -0
  60. data/lib/schematic/types/billing_statement_response_data.rb +19 -0
  61. data/lib/schematic/types/catalog_bundle_currency_price_response_data.rb +13 -0
  62. data/lib/schematic/types/catalog_capabilities_response_data.rb +11 -0
  63. data/lib/schematic/types/catalog_credit_bundle_response_data.rb +39 -0
  64. data/lib/schematic/types/catalog_credit_grant_response_data.rb +29 -0
  65. data/lib/schematic/types/catalog_currency_prices_response_data.rb +17 -0
  66. data/lib/schematic/types/catalog_custom_plan_cta_response_data.rb +13 -0
  67. data/lib/schematic/types/catalog_detail_response_data.rb +23 -0
  68. data/lib/schematic/types/catalog_entitlement_response_data.rb +61 -0
  69. data/lib/schematic/types/catalog_plan_entitlement_response_data.rb +63 -0
  70. data/lib/schematic/types/catalog_plan_response_data.rb +41 -0
  71. data/lib/schematic/types/catalog_price_response_data.rb +29 -0
  72. data/lib/schematic/types/catalog_price_tier_response_data.rb +17 -0
  73. data/lib/schematic/types/charge_timing.rb +12 -0
  74. data/lib/schematic/types/checkout_charge_timing.rb +13 -0
  75. data/lib/schematic/types/checkout_problem_code.rb +4 -0
  76. data/lib/schematic/types/collector.rb +13 -0
  77. data/lib/schematic/types/company_billing_profile_response_data.rb +12 -0
  78. data/lib/schematic/types/company_credit_balance.rb +4 -0
  79. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
  80. data/lib/schematic/types/create_flag_request_body.rb +1 -1
  81. data/lib/schematic/types/create_or_update_flag_request_body.rb +1 -1
  82. data/lib/schematic/types/credit_spend_policy.rb +2 -0
  83. data/lib/schematic/types/credit_spend_window_unit.rb +2 -0
  84. data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
  85. data/lib/schematic/types/entitlement_type.rb +1 -0
  86. data/lib/schematic/types/event_body.rb +3 -3
  87. data/lib/schematic/types/event_body_inference.rb +4 -0
  88. data/lib/schematic/types/flag_detail_response_data.rb +1 -1
  89. data/lib/schematic/types/flag_in_plan_response_data.rb +1 -1
  90. data/lib/schematic/types/flag_response_data.rb +1 -1
  91. data/lib/schematic/types/invoice_collection_state.rb +17 -0
  92. data/lib/schematic/types/invoice_document_state.rb +14 -0
  93. data/lib/schematic/types/invoice_line_kind.rb +15 -0
  94. data/lib/schematic/types/line_kind.rb +13 -0
  95. data/lib/schematic/types/payment_gating.rb +12 -0
  96. data/lib/schematic/types/payment_method_billing_details_request_body.rb +13 -0
  97. data/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb +11 -0
  98. data/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +2 -0
  99. data/lib/schematic/types/plan_version_migration_preview_note_response_data.rb +13 -0
  100. data/lib/schematic/types/plan_version_response_data.rb +2 -0
  101. data/lib/schematic/types/preflight_event_quantities_request_body.rb +13 -0
  102. data/lib/schematic/types/preflight_request_body.rb +2 -0
  103. data/lib/schematic/types/preview_subscription_finance_response_data.rb +6 -0
  104. data/lib/schematic/types/preview_subscription_proration_line_response_data.rb +21 -0
  105. data/lib/schematic/types/preview_subscription_proration_response_data.rb +21 -0
  106. data/lib/schematic/types/proration_line_kind.rb +12 -0
  107. data/lib/schematic/types/public_catalog_response_data.rb +29 -0
  108. data/lib/schematic/types/publish_plan_version_request_body.rb +45 -0
  109. data/lib/schematic/types/publish_preview_pay_in_advance_response_data.rb +15 -0
  110. data/lib/schematic/types/publish_preview_payment_method_response_data.rb +15 -0
  111. data/lib/schematic/types/publish_preview_proration_line_response_data.rb +19 -0
  112. data/lib/schematic/types/publish_preview_response_data.rb +55 -0
  113. data/lib/schematic/types/renewal_policy.rb +13 -0
  114. data/lib/schematic/types/rulesengine_credit_spend_policy.rb +2 -0
  115. data/lib/schematic/types/subscription_change_action.rb +14 -0
  116. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
  117. data/lib/schematic/types/webhook_request_type.rb +1 -0
  118. data/lib/schematic/version.rb +1 -1
  119. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  120. data/lib/schematic.rb +71 -18
  121. data/reference.md +1148 -506
  122. metadata +68 -15
  123. data/lib/schematic/accounts/types/create_api_key_request_body.rb +0 -19
  124. data/lib/schematic/accounts/types/create_environment_request_body.rb +0 -13
  125. data/lib/schematic/accounts/types/update_api_key_request_body.rb +0 -17
  126. data/lib/schematic/accounts/types/update_api_key_response.rb +0 -13
  127. data/lib/schematic/accounts/types/update_environment_request_body.rb +0 -17
  128. data/lib/schematic/accounts/types/update_environment_response.rb +0 -13
  129. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +0 -47
  130. data/lib/schematic/types/api_key_create_response_data.rb +0 -33
  131. data/lib/schematic/types/environment_detail_response_data.rb +0 -21
@@ -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
 
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PaymentMethodBillingDetailsRequestBody < Internal::Types::Model
6
+ field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
7
+
8
+ field :email, -> { String }, optional: true, nullable: false
9
+
10
+ field :phone, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanCreditGrantWarningTierRequestBody < Internal::Types::Model
6
+ field :key, -> { String }, optional: false, nullable: false
7
+
8
+ field :value, -> { Integer }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -11,6 +11,8 @@ module Schematic
11
11
 
12
12
  field :note, -> { String }, optional: true, nullable: false
13
13
 
14
+ field :notes, -> { Internal::Types::Array[Schematic::Types::PlanVersionMigrationPreviewNoteResponseData] }, optional: false, nullable: false
15
+
14
16
  field :plan_version_id_from, -> { String }, optional: true, nullable: false
15
17
 
16
18
  field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanVersionMigrationPreviewNoteResponseData < Internal::Types::Model
6
+ field :blocking, -> { Internal::Types::Boolean }, optional: false, nullable: false
7
+
8
+ field :code, -> { Schematic::Types::MigrationErrorCode }, optional: true, nullable: false
9
+
10
+ field :message, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -19,6 +19,8 @@ module Schematic
19
19
 
20
20
  field :plan_type, -> { Schematic::Types::PlanType }, optional: false, nullable: false
21
21
 
22
+ field :renewal_policy, -> { Schematic::Types::RenewalPolicy }, optional: false, nullable: false
23
+
22
24
  field :status, -> { Schematic::Types::PlanVersionStatus }, optional: false, nullable: false
23
25
 
24
26
  field :updated_at, -> { String }, 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
@@ -5,6 +5,8 @@ module Schematic
5
5
  class PreflightRequestBody < Internal::Types::Model
6
6
  field :credit_cost, -> { Internal::Types::Hash[String, Float] }, optional: true, nullable: false
7
7
 
8
+ field :event_quantities, -> { Schematic::Types::PreflightEventQuantitiesRequestBody }, optional: true, nullable: false
9
+
8
10
  field :event_usage, -> { Schematic::Types::PreflightEventUsageRequestBody }, optional: true, nullable: false
9
11
 
10
12
  field :usage, -> { Integer }, optional: true, nullable: false
@@ -7,6 +7,10 @@ module Schematic
7
7
 
8
8
  field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
9
9
 
10
+ field :customer_balance_applied, -> { Integer }, optional: false, nullable: false
11
+
12
+ field :customer_balance_remaining, -> { Integer }, optional: false, nullable: false
13
+
10
14
  field :discount_amount, -> { Integer }, optional: false, nullable: false
11
15
 
12
16
  field :discounts, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionDiscountResponseData] }, optional: false, nullable: false
@@ -27,6 +31,8 @@ module Schematic
27
31
 
28
32
  field :proration_billed_at, -> { String }, optional: true, nullable: false
29
33
 
34
+ field :proration_detail, -> { Schematic::Types::PreviewSubscriptionProrationResponseData }, optional: true, nullable: false
35
+
30
36
  field :tax_amount, -> { Integer }, optional: true, nullable: false
31
37
 
32
38
  field :tax_display_name, -> { String }, optional: true, nullable: false
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PreviewSubscriptionProrationLineResponseData < Internal::Types::Model
6
+ field :amount, -> { Integer }, optional: false, nullable: false
7
+
8
+ field :kind, -> { Schematic::Types::ProrationLineKind }, optional: false, nullable: false
9
+
10
+ field :period_end, -> { String }, optional: true, nullable: false
11
+
12
+ field :period_start, -> { String }, optional: true, nullable: false
13
+
14
+ field :plan_id, -> { String }, optional: true, nullable: false
15
+
16
+ field :price_id, -> { String }, optional: true, nullable: false
17
+
18
+ field :quantity, -> { Integer }, optional: true, nullable: false
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PreviewSubscriptionProrationResponseData < Internal::Types::Model
6
+ field :billed_at, -> { String }, optional: true, nullable: false
7
+
8
+ field :charge, -> { Integer }, optional: false, nullable: false
9
+
10
+ field :credit, -> { Integer }, optional: false, nullable: false
11
+
12
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
13
+
14
+ field :lines, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionProrationLineResponseData] }, optional: false, nullable: false
15
+
16
+ field :timing, -> { Schematic::Types::CheckoutChargeTiming }, optional: false, nullable: false
17
+
18
+ field :total, -> { Integer }, optional: false, nullable: false
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module ProrationLineKind
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ CHARGE = "charge"
9
+ CREDIT = "credit"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PublicCatalogResponseData < Internal::Types::Model
6
+ field :add_ons, -> { Internal::Types::Array[Schematic::Types::CatalogPlanResponseData] }, optional: false, nullable: false
7
+
8
+ field :capabilities, -> { Schematic::Types::CatalogCapabilitiesResponseData }, optional: false, nullable: false
9
+
10
+ field :credit_bundles, -> { Internal::Types::Array[Schematic::Types::CatalogCreditBundleResponseData] }, optional: false, nullable: false
11
+
12
+ field :custom_plan_cta, -> { Schematic::Types::CatalogCustomPlanCtaResponseData }, optional: true, nullable: false
13
+
14
+ field :default_currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
15
+
16
+ field :description, -> { String }, optional: true, nullable: false
17
+
18
+ field :id, -> { String }, optional: false, nullable: false
19
+
20
+ field :name, -> { String }, optional: false, nullable: false
21
+
22
+ field :plans, -> { Internal::Types::Array[Schematic::Types::CatalogPlanResponseData] }, optional: false, nullable: false
23
+
24
+ field :pricing_model, -> { String }, optional: true, nullable: false
25
+
26
+ field :pricing_url, -> { String }, optional: true, nullable: false
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PublishPlanVersionRequestBody < Internal::Types::Model
6
+ field :activation_strategy, -> { Schematic::Types::CustomPlanActivationStrategy }, optional: true, nullable: false
7
+
8
+ field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
9
+
10
+ field :billing_cycle_anchor, -> { String }, optional: true, nullable: false
11
+
12
+ field :billing_start_date, -> { String }, optional: true, nullable: false
13
+
14
+ field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: true, nullable: false
15
+
16
+ field :coupon_external_id, -> { String }, optional: true, nullable: false
17
+
18
+ field :custom_field_values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: true, nullable: false
19
+
20
+ field :customer_email, -> { String }, optional: true, nullable: false
21
+
22
+ field :days_until_due, -> { Integer }, optional: true, nullable: false
23
+
24
+ field :end_date, -> { String }, optional: true, nullable: false
25
+
26
+ field :excluded_company_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
27
+
28
+ field :migration_strategy, -> { Schematic::Types::PlanVersionMigrationStrategy }, optional: false, nullable: false
29
+
30
+ field :phone, -> { String }, optional: true, nullable: false
31
+
32
+ field :prorate_first_period, -> { Internal::Types::Boolean }, optional: true, nullable: false
33
+
34
+ field :proration_behavior, -> { Schematic::Types::MigrationProrationBehavior }, optional: true, nullable: false
35
+
36
+ field :require_no_migration, -> { Internal::Types::Boolean }, optional: true, nullable: false
37
+
38
+ field :scheduled_at, -> { String }, optional: true, nullable: false
39
+
40
+ field :send_invoice, -> { Internal::Types::Boolean }, optional: true, nullable: false
41
+
42
+ field :tax_id, -> { Schematic::Types::TaxIdInput }, optional: true, nullable: false
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PublishPreviewPayInAdvanceResponseData < Internal::Types::Model
6
+ field :committed_quantity, -> { Integer }, optional: false, nullable: false
7
+
8
+ field :current_quantity, -> { Integer }, optional: true, nullable: false
9
+
10
+ field :effective_quantity, -> { Integer }, optional: false, nullable: false
11
+
12
+ field :feature_id, -> { 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 PublishPreviewPaymentMethodResponseData < Internal::Types::Model
6
+ field :card_brand, -> { String }, optional: true, nullable: false
7
+
8
+ field :card_last_4, -> { String }, optional: true, nullable: false, api_name: "card_last4"
9
+
10
+ field :has_default, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
+
12
+ field :payment_method_type, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PublishPreviewProrationLineResponseData < Internal::Types::Model
6
+ field :amount, -> { Integer }, optional: false, nullable: false
7
+
8
+ field :description, -> { String }, optional: false, nullable: false
9
+
10
+ field :period_end, -> { String }, optional: false, nullable: false
11
+
12
+ field :period_start, -> { String }, optional: false, nullable: false
13
+
14
+ field :price_external_id, -> { String }, optional: true, nullable: false
15
+
16
+ field :quantity, -> { Integer }, optional: false, nullable: false
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PublishPreviewResponseData < Internal::Types::Model
6
+ field :billing_email, -> { String }, optional: true, nullable: false
7
+
8
+ field :currency, -> { Schematic::Types::Currency }, optional: true, nullable: false
9
+
10
+ field :current_period_end, -> { String }, optional: true, nullable: false
11
+
12
+ field :current_period_start, -> { String }, optional: true, nullable: false
13
+
14
+ field :default_collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: false, nullable: false
15
+
16
+ field :default_days_until_due, -> { Integer }, optional: false, nullable: false
17
+
18
+ field :default_send_invoice, -> { Internal::Types::Boolean }, optional: false, nullable: false
19
+
20
+ field :effective_at, -> { String }, optional: true, nullable: false
21
+
22
+ field :ends_at, -> { String }, optional: true, nullable: false
23
+
24
+ field :has_billing_changes, -> { Internal::Types::Boolean }, optional: false, nullable: false
25
+
26
+ field :immediate_invoice_amount, -> { Integer }, optional: true, nullable: false
27
+
28
+ field :lands_on, -> { Schematic::Types::AmendmentProrationLandsOn }, optional: false, nullable: false
29
+
30
+ field :new_recurring_amount, -> { Integer }, optional: true, nullable: false
31
+
32
+ field :next_invoice_amount, -> { Integer }, optional: true, nullable: false
33
+
34
+ field :next_invoice_at, -> { String }, optional: true, nullable: false
35
+
36
+ field :note, -> { String }, optional: true, nullable: false
37
+
38
+ field :pay_in_advance, -> { Internal::Types::Array[Schematic::Types::PublishPreviewPayInAdvanceResponseData] }, optional: false, nullable: false
39
+
40
+ field :payment_method, -> { Schematic::Types::PublishPreviewPaymentMethodResponseData }, optional: false, nullable: false
41
+
42
+ field :proration_charge, -> { Integer }, optional: false, nullable: false
43
+
44
+ field :proration_credit, -> { Integer }, optional: false, nullable: false
45
+
46
+ field :proration_lines, -> { Internal::Types::Array[Schematic::Types::PublishPreviewProrationLineResponseData] }, optional: false, nullable: false
47
+
48
+ field :proration_total, -> { Integer }, optional: false, nullable: false
49
+
50
+ field :will_update_subscription, -> { Internal::Types::Boolean }, optional: false, nullable: false
51
+
52
+ field :would_fail, -> { Internal::Types::Boolean }, optional: false, nullable: false
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module RenewalPolicy
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ AUTO_RENEW = "auto_renew"
9
+ EXPIRE_TO_DEFAULT = "expire_to_default"
10
+ HOLD_WITH_GRACE = "hold_with_grace"
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class RulesengineCreditSpendPolicy < Internal::Types::Model
6
+ field :company_id, -> { String }, optional: true, nullable: false
7
+
6
8
  field :consumed, -> { Float }, optional: true, nullable: false
7
9
 
8
10
  field :credit_id, -> { String }, optional: false, nullable: false
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ module SubscriptionChangeAction
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ ADD = "add"
9
+ CANCEL = "cancel"
10
+ REMOVE = "remove"
11
+ REPLACE = "replace"
12
+ end
13
+ end
14
+ end
@@ -70,6 +70,8 @@ module Schematic
70
70
  field :unit_price, -> { Integer }, optional: true, nullable: false
71
71
 
72
72
  field :unit_price_decimal, -> { String }, optional: true, nullable: false
73
+
74
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantWarningTierRequestBody] }, optional: true, nullable: false
73
75
  end
74
76
  end
75
77
  end
@@ -18,6 +18,7 @@ module Schematic
18
18
  CREDIT_LIMIT_REACHED = "credit.limit.reached"
19
19
  CREDIT_LIMIT_WARNING = "credit.limit.warning"
20
20
  CREDIT_PURCHASE_SUCCESS = "credit.purchase.success"
21
+ CREDIT_USAGE_WARNING_REACHED = "credit.usage_warning_reached"
21
22
  ENTITLEMENT_LIMIT_REACHED = "entitlement.limit.reached"
22
23
  ENTITLEMENT_LIMIT_WARNING = "entitlement.limit.warning"
23
24
  ENTITLEMENT_SOFT_LIMIT_REACHED = "entitlement.soft_limit.reached"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schematic
4
- VERSION = "1.5.4"
4
+ VERSION = "1.5.6"
5
5
  end
Binary file