schematichq 1.5.5 → 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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +7 -1
  4. data/lib/schematic/accounts/client.rb +0 -271
  5. data/lib/schematic/billing/client.rb +40 -16
  6. data/lib/schematic/billing/types/{count_native_invoices_params.rb → count_billing_invoices_params.rb} +9 -1
  7. data/lib/schematic/billing/types/{count_native_invoices_request.rb → count_billing_invoices_request.rb} +9 -1
  8. data/lib/schematic/billing/types/{count_native_invoices_response.rb → count_billing_invoices_response.rb} +2 -2
  9. data/lib/schematic/billing/types/create_payment_method_request_body.rb +2 -0
  10. data/lib/schematic/billing/types/{get_native_invoice_response.rb → get_billing_invoice_response.rb} +1 -1
  11. data/lib/schematic/billing/types/{list_native_invoices_params.rb → list_billing_invoices_params.rb} +9 -1
  12. data/lib/schematic/billing/types/{list_native_invoices_request.rb → list_billing_invoices_request.rb} +9 -1
  13. data/lib/schematic/billing/types/{list_native_invoices_response.rb → list_billing_invoices_response.rb} +2 -2
  14. data/lib/schematic/billing/types/{mark_native_invoice_paid_response.rb → mark_billing_invoice_paid_response.rb} +1 -1
  15. data/lib/schematic/catalogs/client.rb +82 -0
  16. data/lib/schematic/{accounts/types/create_api_key_response.rb → catalogs/types/get_public_catalog_by_id_response.rb} +3 -3
  17. data/lib/schematic/{accounts/types/delete_api_key_response.rb → catalogs/types/get_public_catalog_response.rb} +3 -3
  18. data/lib/schematic/client.rb +195 -1
  19. data/lib/schematic/credits/client.rb +48 -0
  20. data/lib/schematic/credits/types/count_credit_event_ledger_params.rb +2 -0
  21. data/lib/schematic/credits/types/count_credit_event_ledger_request.rb +2 -0
  22. data/lib/schematic/{accounts/types/create_environment_response.rb → credits/types/get_credit_event_ledger_entry_response.rb} +3 -3
  23. data/lib/schematic/credits/types/list_credit_event_ledger_params.rb +2 -0
  24. data/lib/schematic/credits/types/list_credit_event_ledger_request.rb +2 -0
  25. data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +2 -0
  26. data/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +2 -0
  27. data/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +2 -0
  28. data/lib/schematic/plans/types/retry_custom_plan_billing_request_body.rb +2 -0
  29. data/lib/schematic/types/billing_invoice_address_response_data.rb +19 -0
  30. data/lib/schematic/types/billing_invoice_billing_details_response_data.rb +15 -0
  31. data/lib/schematic/types/billing_invoice_detail_response_data.rb +20 -4
  32. data/lib/schematic/types/billing_invoice_line_response_data.rb +5 -1
  33. data/lib/schematic/types/billing_invoice_response_data.rb +12 -4
  34. data/lib/schematic/types/billing_invoice_settlement_response_data.rb +1 -1
  35. data/lib/schematic/types/billing_invoice_tax_id_response_data.rb +11 -0
  36. data/lib/schematic/types/billing_invoice_terms_response_data.rb +2 -0
  37. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +2 -0
  38. data/lib/schematic/types/billing_plan_credit_grant_warning_tier_response_data.rb +13 -0
  39. data/lib/schematic/types/catalog_bundle_currency_price_response_data.rb +13 -0
  40. data/lib/schematic/types/catalog_capabilities_response_data.rb +11 -0
  41. data/lib/schematic/types/catalog_credit_bundle_response_data.rb +39 -0
  42. data/lib/schematic/types/catalog_credit_grant_response_data.rb +29 -0
  43. data/lib/schematic/types/catalog_currency_prices_response_data.rb +17 -0
  44. data/lib/schematic/types/catalog_custom_plan_cta_response_data.rb +13 -0
  45. data/lib/schematic/types/catalog_detail_response_data.rb +23 -0
  46. data/lib/schematic/types/catalog_entitlement_response_data.rb +61 -0
  47. data/lib/schematic/types/catalog_plan_entitlement_response_data.rb +63 -0
  48. data/lib/schematic/types/catalog_plan_response_data.rb +41 -0
  49. data/lib/schematic/types/catalog_price_response_data.rb +29 -0
  50. data/lib/schematic/types/catalog_price_tier_response_data.rb +17 -0
  51. data/lib/schematic/types/checkout_charge_timing.rb +13 -0
  52. data/lib/schematic/types/checkout_problem_code.rb +4 -0
  53. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +2 -0
  54. data/lib/schematic/types/credit_spend_window_unit.rb +2 -0
  55. data/lib/schematic/types/custom_plan_billing_response_data.rb +2 -0
  56. data/lib/schematic/types/entitlement_type.rb +1 -0
  57. data/lib/schematic/types/event_body.rb +3 -3
  58. data/lib/schematic/types/payment_method_billing_details_request_body.rb +13 -0
  59. data/lib/schematic/types/plan_credit_grant_warning_tier_request_body.rb +11 -0
  60. data/lib/schematic/types/plan_version_migration_preview_company_response_data.rb +2 -0
  61. data/lib/schematic/types/plan_version_migration_preview_note_response_data.rb +13 -0
  62. data/lib/schematic/types/plan_version_response_data.rb +2 -0
  63. data/lib/schematic/types/preview_subscription_finance_response_data.rb +6 -0
  64. data/lib/schematic/types/preview_subscription_proration_line_response_data.rb +21 -0
  65. data/lib/schematic/types/preview_subscription_proration_response_data.rb +21 -0
  66. data/lib/schematic/types/proration_line_kind.rb +12 -0
  67. data/lib/schematic/types/public_catalog_response_data.rb +29 -0
  68. data/lib/schematic/types/publish_plan_version_request_body.rb +2 -0
  69. data/lib/schematic/types/publish_preview_response_data.rb +2 -0
  70. data/lib/schematic/types/renewal_policy.rb +13 -0
  71. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +2 -0
  72. data/lib/schematic/types/webhook_request_type.rb +1 -0
  73. data/lib/schematic/version.rb +1 -1
  74. data/lib/schematic.rb +38 -22
  75. data/reference.md +434 -275
  76. metadata +38 -22
  77. data/lib/schematic/accounts/types/create_api_key_request_body.rb +0 -19
  78. data/lib/schematic/accounts/types/create_environment_request_body.rb +0 -13
  79. data/lib/schematic/accounts/types/delete_environment_response.rb +0 -13
  80. data/lib/schematic/accounts/types/update_api_key_request_body.rb +0 -17
  81. data/lib/schematic/accounts/types/update_api_key_response.rb +0 -13
  82. data/lib/schematic/accounts/types/update_environment_request_body.rb +0 -17
  83. data/lib/schematic/accounts/types/update_environment_response.rb +0 -13
  84. data/lib/schematic/types/api_key_create_response_data.rb +0 -33
  85. data/lib/schematic/types/environment_detail_response_data.rb +0 -21
@@ -7,7 +7,7 @@ module Schematic
7
7
 
8
8
  field :collector, -> { Schematic::Types::Collector }, optional: false, nullable: false
9
9
 
10
- field :id, -> { String }, optional: false, nullable: false
10
+ field :id, -> { String }, optional: true, nullable: false
11
11
 
12
12
  field :reference, -> { String }, optional: true, nullable: false
13
13
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class BillingInvoiceTaxIdResponseData < Internal::Types::Model
6
+ field :type, -> { Schematic::Types::TaxIdType }, optional: false, nullable: false
7
+
8
+ field :value, -> { String }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class BillingInvoiceTermsResponseData < Internal::Types::Model
6
+ field :billing_details, -> { Schematic::Types::BillingInvoiceBillingDetailsResponseData }, optional: true, nullable: false
7
+
6
8
  field :collection_method, -> { Schematic::Types::BillingCollectionMethod }, optional: false, nullable: false
7
9
 
8
10
  field :collector, -> { Schematic::Types::Collector }, optional: false, nullable: false
@@ -94,6 +94,8 @@ module Schematic
94
94
  field :unit_price_decimal, -> { String }, optional: true, nullable: false
95
95
 
96
96
  field :updated_at, -> { String }, optional: false, nullable: false
97
+
98
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::BillingPlanCreditGrantWarningTierResponseData] }, optional: false, nullable: false
97
99
  end
98
100
  end
99
101
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class BillingPlanCreditGrantWarningTierResponseData < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+
8
+ field :key, -> { String }, optional: false, nullable: false
9
+
10
+ field :value, -> { Integer }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogBundleCurrencyPriceResponseData < Internal::Types::Model
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
+
8
+ field :price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
9
+
10
+ field :unit_price, -> { Schematic::Types::CatalogPriceResponseData }, 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 CatalogCapabilitiesResponseData < Internal::Types::Model
6
+ field :badge_visibility, -> { Internal::Types::Boolean }, optional: false, nullable: false
7
+
8
+ field :checkout, -> { Internal::Types::Boolean }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogCreditBundleResponseData < Internal::Types::Model
6
+ field :bundle_type, -> { String }, optional: false, nullable: false
7
+
8
+ field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+
10
+ field :credit_icon, -> { String }, optional: true, nullable: false
11
+
12
+ field :credit_id, -> { String }, optional: false, nullable: false
13
+
14
+ field :credit_name, -> { String }, optional: false, nullable: false
15
+
16
+ field :credit_plural_name, -> { String }, optional: true, nullable: false
17
+
18
+ field :credit_singular_name, -> { String }, optional: true, nullable: false
19
+
20
+ field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogBundleCurrencyPriceResponseData] }, optional: false, nullable: false
21
+
22
+ field :expiry_type, -> { Schematic::Types::BillingCreditExpiryType }, optional: false, nullable: false
23
+
24
+ field :expiry_unit, -> { Schematic::Types::BillingCreditExpiryUnit }, optional: false, nullable: false
25
+
26
+ field :expiry_unit_count, -> { Integer }, optional: true, nullable: false
27
+
28
+ field :id, -> { String }, optional: false, nullable: false
29
+
30
+ field :name, -> { String }, optional: false, nullable: false
31
+
32
+ field :price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
33
+
34
+ field :quantity, -> { Integer }, optional: true, nullable: false
35
+
36
+ field :unit_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogCreditGrantResponseData < Internal::Types::Model
6
+ field :company_credit_amount, -> { Integer }, optional: false, nullable: false
7
+
8
+ field :credit_amount, -> { Integer }, optional: false, nullable: false
9
+
10
+ field :credit_icon, -> { String }, optional: true, nullable: false
11
+
12
+ field :credit_id, -> { String }, optional: false, nullable: false
13
+
14
+ field :credit_name, -> { String }, optional: false, nullable: false
15
+
16
+ field :credit_plural_name, -> { String }, optional: true, nullable: false
17
+
18
+ field :credit_singular_name, -> { String }, optional: true, nullable: false
19
+
20
+ field :id, -> { String }, optional: false, nullable: false
21
+
22
+ field :license_id, -> { String }, optional: true, nullable: false
23
+
24
+ field :reset_cadence, -> { Schematic::Types::BillingPlanCreditGrantResetCadence }, optional: true, nullable: false
25
+
26
+ field :scaling, -> { Schematic::Types::PlanCreditGrantScaling }, optional: false, nullable: false
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogCurrencyPricesResponseData < Internal::Types::Model
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
+
8
+ field :monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
9
+
10
+ field :one_time_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
11
+
12
+ field :quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
13
+
14
+ field :yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, 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 CatalogCustomPlanCtaResponseData < Internal::Types::Model
6
+ field :cta_text, -> { String }, optional: true, nullable: false
7
+
8
+ field :cta_url, -> { String }, optional: true, nullable: false
9
+
10
+ field :price_text, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogDetailResponseData < Internal::Types::Model
6
+ field :capabilities, -> { Schematic::Types::CatalogCapabilitiesResponseData }, optional: false, nullable: false
7
+
8
+ field :custom_plan_cta, -> { Schematic::Types::CatalogCustomPlanCtaResponseData }, optional: true, nullable: false
9
+
10
+ field :default_currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
11
+
12
+ field :description, -> { String }, optional: true, nullable: false
13
+
14
+ field :id, -> { String }, optional: false, nullable: false
15
+
16
+ field :name, -> { String }, optional: false, nullable: false
17
+
18
+ field :pricing_model, -> { String }, optional: true, nullable: false
19
+
20
+ field :pricing_url, -> { String }, optional: true, nullable: false
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogEntitlementResponseData < Internal::Types::Model
6
+ field :consumption_rate, -> { Float }, optional: true, nullable: false
7
+
8
+ field :credit_equivalent_limit, -> { Integer }, optional: true, nullable: false
9
+
10
+ field :credit_icon, -> { String }, optional: true, nullable: false
11
+
12
+ field :credit_id, -> { String }, optional: true, nullable: false
13
+
14
+ field :credit_name, -> { String }, optional: true, nullable: false
15
+
16
+ field :credit_plural_name, -> { String }, optional: true, nullable: false
17
+
18
+ field :credit_singular_name, -> { String }, optional: true, nullable: false
19
+
20
+ field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false
21
+
22
+ field :feature_description, -> { String }, optional: false, nullable: false
23
+
24
+ field :feature_icon, -> { String }, optional: false, nullable: false
25
+
26
+ field :feature_id, -> { String }, optional: false, nullable: false
27
+
28
+ field :feature_name, -> { String }, optional: false, nullable: false
29
+
30
+ field :feature_plural_name, -> { String }, optional: true, nullable: false
31
+
32
+ field :feature_singular_name, -> { String }, optional: true, nullable: false
33
+
34
+ field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false
35
+
36
+ field :license_id, -> { String }, optional: true, nullable: false
37
+
38
+ field :metered_monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
39
+
40
+ field :metered_quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
41
+
42
+ field :metered_yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
43
+
44
+ field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false
45
+
46
+ field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
47
+
48
+ field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false
49
+
50
+ field :soft_limit, -> { Integer }, optional: true, nullable: false
51
+
52
+ field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false
53
+
54
+ field :value_numeric, -> { Integer }, optional: true, nullable: false
55
+
56
+ field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
57
+
58
+ field :warning_threshold, -> { Integer }, optional: true, nullable: false
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogPlanEntitlementResponseData < Internal::Types::Model
6
+ field :consumption_rate, -> { Float }, optional: true, nullable: false
7
+
8
+ field :credit_equivalent_limit, -> { Integer }, optional: true, nullable: false
9
+
10
+ field :credit_icon, -> { String }, optional: true, nullable: false
11
+
12
+ field :credit_id, -> { String }, optional: true, nullable: false
13
+
14
+ field :credit_name, -> { String }, optional: true, nullable: false
15
+
16
+ field :credit_plural_name, -> { String }, optional: true, nullable: false
17
+
18
+ field :credit_singular_name, -> { String }, optional: true, nullable: false
19
+
20
+ field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false
21
+
22
+ field :feature_description, -> { String }, optional: false, nullable: false
23
+
24
+ field :feature_icon, -> { String }, optional: false, nullable: false
25
+
26
+ field :feature_id, -> { String }, optional: false, nullable: false
27
+
28
+ field :feature_name, -> { String }, optional: false, nullable: false
29
+
30
+ field :feature_plural_name, -> { String }, optional: true, nullable: false
31
+
32
+ field :feature_singular_name, -> { String }, optional: true, nullable: false
33
+
34
+ field :feature_type, -> { Schematic::Types::FeatureType }, optional: false, nullable: false
35
+
36
+ field :id, -> { String }, optional: false, nullable: false
37
+
38
+ field :license_id, -> { String }, optional: true, nullable: false
39
+
40
+ field :metered_monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
41
+
42
+ field :metered_quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
43
+
44
+ field :metered_yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
45
+
46
+ field :metric_period, -> { Schematic::Types::MetricPeriod }, optional: true, nullable: false
47
+
48
+ field :metric_period_month_reset, -> { Schematic::Types::MetricPeriodMonthReset }, optional: true, nullable: false
49
+
50
+ field :price_behavior, -> { Schematic::Types::EntitlementPriceBehavior }, optional: true, nullable: false
51
+
52
+ field :soft_limit, -> { Integer }, optional: true, nullable: false
53
+
54
+ field :value_bool, -> { Internal::Types::Boolean }, optional: true, nullable: false
55
+
56
+ field :value_numeric, -> { Integer }, optional: true, nullable: false
57
+
58
+ field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
59
+
60
+ field :warning_threshold, -> { Integer }, optional: true, nullable: false
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogPlanResponseData < Internal::Types::Model
6
+ field :available_periods, -> { Internal::Types::Array[Schematic::Types::PlanPriceCadence] }, optional: false, nullable: false
7
+
8
+ field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false
9
+
10
+ field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
11
+
12
+ field :compatible_plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
13
+
14
+ field :currency_prices, -> { Internal::Types::Array[Schematic::Types::CatalogCurrencyPricesResponseData] }, optional: false, nullable: false
15
+
16
+ field :description, -> { String }, optional: false, nullable: false
17
+
18
+ field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogPlanEntitlementResponseData] }, optional: false, nullable: false
19
+
20
+ field :icon, -> { String }, optional: false, nullable: false
21
+
22
+ field :id, -> { String }, optional: false, nullable: false
23
+
24
+ field :included_credit_grants, -> { Internal::Types::Array[Schematic::Types::CatalogCreditGrantResponseData] }, optional: false, nullable: false
25
+
26
+ field :is_trialable, -> { Internal::Types::Boolean }, optional: false, nullable: false
27
+
28
+ field :monthly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
29
+
30
+ field :name, -> { String }, optional: false, nullable: false
31
+
32
+ field :one_time_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
33
+
34
+ field :quarterly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
35
+
36
+ field :trial_days, -> { Integer }, optional: true, nullable: false
37
+
38
+ field :yearly_price, -> { Schematic::Types::CatalogPriceResponseData }, optional: true, nullable: false
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogPriceResponseData < Internal::Types::Model
6
+ field :currency, -> { Schematic::Types::Currency }, optional: false, nullable: false
7
+
8
+ field :id, -> { String }, optional: false, nullable: false
9
+
10
+ field :interval, -> { Schematic::Types::BillingProductPriceInterval }, optional: false, nullable: false
11
+
12
+ field :interval_count, -> { Integer }, optional: false, nullable: false
13
+
14
+ field :overage_unit_price_decimal, -> { String }, optional: true, nullable: false
15
+
16
+ field :package_size, -> { Integer }, optional: false, nullable: false
17
+
18
+ field :price, -> { Integer }, optional: false, nullable: false
19
+
20
+ field :price_decimal, -> { String }, optional: true, nullable: false
21
+
22
+ field :price_tiers, -> { Internal::Types::Array[Schematic::Types::CatalogPriceTierResponseData] }, optional: false, nullable: false
23
+
24
+ field :scheme, -> { Schematic::Types::BillingPriceScheme }, optional: false, nullable: false
25
+
26
+ field :tiers_mode, -> { Schematic::Types::BillingTiersMode }, optional: true, nullable: false
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogPriceTierResponseData < Internal::Types::Model
6
+ field :flat_price, -> { Integer }, optional: true, nullable: false
7
+
8
+ field :from, -> { Integer }, optional: false, nullable: false
9
+
10
+ field :per_unit_price, -> { Integer }, optional: true, nullable: false
11
+
12
+ field :per_unit_price_decimal, -> { String }, optional: true, nullable: false
13
+
14
+ field :to, -> { Integer }, 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 CheckoutChargeTiming
6
+ extend Schematic::Internal::Types::Enum
7
+
8
+ AT_RENEWAL = "at_renewal"
9
+ NONE = "none"
10
+ NOW = "now"
11
+ end
12
+ end
13
+ end
@@ -18,6 +18,7 @@ module Schematic
18
18
  BILLING_START_DATE_NEEDS_RENEWAL_DATE = "billing_start_date_needs_renewal_date"
19
19
  BILLING_START_DATE_NOT_BEFORE_RENEWAL_DATE = "billing_start_date_not_before_renewal_date"
20
20
  BILLING_START_DATE_TOO_FAR_IN_PAST = "billing_start_date_too_far_in_past"
21
+ CHECKOUT_SUPERSEDED = "checkout_superseded"
21
22
  CREDIT_BUNDLE_INCOMPATIBLE = "credit_bundle_incompatible"
22
23
  CREDIT_BUNDLE_UNAVAILABLE = "credit_bundle_unavailable"
23
24
  CREDIT_BUNDLES_ACTIVATE_ON_PAYMENT = "credit_bundles_activate_on_payment"
@@ -25,6 +26,9 @@ module Schematic
25
26
  CUSTOM_FIELD_REQUIRED = "custom_field_required"
26
27
  DISCOUNT_INELIGIBLE = "discount_ineligible"
27
28
  DOWNGRADE_NOT_PERMITTED = "downgrade_not_permitted"
29
+ END_DATE_MUST_BE_FUTURE = "end_date_must_be_future"
30
+ END_DATE_NEEDS_NEW_SUBSCRIPTION = "end_date_needs_new_subscription"
31
+ END_DATE_NOT_AFTER_RENEWAL_DATE = "end_date_not_after_renewal_date"
28
32
  FREE_FIRST_PERIOD_ACTIVATES_ON_PAYMENT = "free_first_period_activates_on_payment"
29
33
  INVOICE_EMAIL_REQUIRED = "invoice_email_required"
30
34
  INVOICED_SUBSCRIPTION_CONFLICTS_WITH_TRIAL = "invoiced_subscription_conflicts_with_trial"
@@ -76,6 +76,8 @@ module Schematic
76
76
  field :unit_price, -> { Integer }, optional: true, nullable: false
77
77
 
78
78
  field :unit_price_decimal, -> { String }, optional: true, nullable: false
79
+
80
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::PlanCreditGrantWarningTierRequestBody] }, optional: true, nullable: false
79
81
  end
80
82
  end
81
83
  end
@@ -7,6 +7,8 @@ module Schematic
7
7
 
8
8
  HOUR = "hour"
9
9
  DAY = "day"
10
+ WEEK = "week"
11
+ MONTH = "month"
10
12
  BILLING_PERIOD = "billing_period"
11
13
  end
12
14
  end
@@ -17,6 +17,8 @@ module Schematic
17
17
 
18
18
  field :days_until_due, -> { Integer }, optional: false, nullable: false
19
19
 
20
+ field :end_date, -> { String }, optional: true, nullable: false
21
+
20
22
  field :external_invoice_id, -> { String }, optional: true, nullable: false
21
23
 
22
24
  field :id, -> { String }, optional: false, nullable: false
@@ -6,6 +6,7 @@ module Schematic
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
8
  COMPANY_OVERRIDE = "company_override"
9
+ PLAN_CREDIT_GRANT = "plan_credit_grant"
9
10
  PLAN_ENTITLEMENT = "plan_entitlement"
10
11
  UNKNOWN = "unknown"
11
12
  end
@@ -5,13 +5,13 @@ module Schematic
5
5
  class EventBody < Internal::Types::Model
6
6
  extend Schematic::Internal::Types::Union
7
7
 
8
- member -> { Schematic::Types::EventBodyTrack }
8
+ member -> { Schematic::Types::EventBodyInference }
9
9
 
10
10
  member -> { Schematic::Types::EventBodyFlagCheck }
11
11
 
12
- member -> { Schematic::Types::EventBodyIdentify }
12
+ member -> { Schematic::Types::EventBodyTrack }
13
13
 
14
- member -> { Schematic::Types::EventBodyInference }
14
+ member -> { Schematic::Types::EventBodyIdentify }
15
15
  end
16
16
  end
17
17
  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
@@ -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