schematichq 1.5.4 → 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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +7 -1
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/billing/client.rb +423 -0
  6. data/lib/schematic/billing/types/count_native_invoices_params.rb +20 -0
  7. data/lib/schematic/billing/types/count_native_invoices_request.rb +19 -0
  8. data/lib/schematic/billing/types/count_native_invoices_response.rb +13 -0
  9. data/lib/schematic/billing/types/finalize_native_invoice_response.rb +13 -0
  10. data/lib/schematic/billing/types/get_company_native_subscription_response.rb +13 -0
  11. data/lib/schematic/billing/types/get_native_invoice_response.rb +13 -0
  12. data/lib/schematic/billing/types/list_native_invoices_params.rb +20 -0
  13. data/lib/schematic/billing/types/list_native_invoices_request.rb +19 -0
  14. data/lib/schematic/billing/types/list_native_invoices_response.rb +13 -0
  15. data/lib/schematic/billing/types/mark_invoice_paid_request_body.rb +19 -0
  16. data/lib/schematic/billing/types/mark_native_invoice_paid_response.rb +13 -0
  17. data/lib/schematic/billing/types/void_native_invoice_response.rb +13 -0
  18. data/lib/schematic/client.rb +1 -1
  19. data/lib/schematic/features/client.rb +0 -2
  20. data/lib/schematic/internal/iterators/cursor_item_iterator.rb +2 -2
  21. data/lib/schematic/internal/iterators/cursor_page_iterator.rb +11 -2
  22. data/lib/schematic/internal/iterators/item_iterator.rb +11 -2
  23. data/lib/schematic/internal/iterators/offset_item_iterator.rb +2 -2
  24. data/lib/schematic/internal/iterators/offset_page_iterator.rb +15 -6
  25. data/lib/schematic/internal/types/model.rb +17 -1
  26. data/lib/schematic/plans/client.rb +61 -5
  27. data/lib/schematic/plans/types/list_custom_plan_billings_params.rb +4 -0
  28. data/lib/schematic/plans/types/list_custom_plan_billings_request.rb +4 -0
  29. data/lib/schematic/plans/types/preview_publish_plan_version_response.rb +13 -0
  30. data/lib/schematic/types/amendment_proration_lands_on.rb +13 -0
  31. data/lib/schematic/types/billing_invoice_detail_response_data.rb +49 -0
  32. data/lib/schematic/types/billing_invoice_line_response_data.rb +27 -0
  33. data/lib/schematic/types/billing_invoice_response_data.rb +43 -0
  34. data/lib/schematic/types/billing_invoice_settlement_response_data.rb +17 -0
  35. data/lib/schematic/types/billing_invoice_terms_response_data.rb +19 -0
  36. data/lib/schematic/types/billing_native_subscription_change_response_data.rb +15 -0
  37. data/lib/schematic/types/billing_native_subscription_line_response_data.rb +47 -0
  38. data/lib/schematic/types/billing_native_subscription_response_data.rb +31 -0
  39. data/lib/schematic/types/billing_statement_line_response_data.rb +21 -0
  40. data/lib/schematic/types/billing_statement_response_data.rb +19 -0
  41. data/lib/schematic/types/charge_timing.rb +12 -0
  42. data/lib/schematic/types/collector.rb +13 -0
  43. data/lib/schematic/types/company_billing_profile_response_data.rb +12 -0
  44. data/lib/schematic/types/company_credit_balance.rb +4 -0
  45. data/lib/schematic/types/create_flag_request_body.rb +1 -1
  46. data/lib/schematic/types/create_or_update_flag_request_body.rb +1 -1
  47. data/lib/schematic/types/credit_spend_policy.rb +2 -0
  48. data/lib/schematic/types/event_body_inference.rb +4 -0
  49. data/lib/schematic/types/flag_detail_response_data.rb +1 -1
  50. data/lib/schematic/types/flag_in_plan_response_data.rb +1 -1
  51. data/lib/schematic/types/flag_response_data.rb +1 -1
  52. data/lib/schematic/types/invoice_collection_state.rb +17 -0
  53. data/lib/schematic/types/invoice_document_state.rb +14 -0
  54. data/lib/schematic/types/invoice_line_kind.rb +15 -0
  55. data/lib/schematic/types/line_kind.rb +13 -0
  56. data/lib/schematic/types/payment_gating.rb +12 -0
  57. data/lib/schematic/types/preflight_event_quantities_request_body.rb +13 -0
  58. data/lib/schematic/types/preflight_request_body.rb +2 -0
  59. data/lib/schematic/types/publish_plan_version_request_body.rb +43 -0
  60. data/lib/schematic/types/publish_preview_pay_in_advance_response_data.rb +15 -0
  61. data/lib/schematic/types/publish_preview_payment_method_response_data.rb +15 -0
  62. data/lib/schematic/types/publish_preview_proration_line_response_data.rb +19 -0
  63. data/lib/schematic/types/publish_preview_response_data.rb +53 -0
  64. data/lib/schematic/types/rulesengine_credit_spend_policy.rb +2 -0
  65. data/lib/schematic/types/subscription_change_action.rb +14 -0
  66. data/lib/schematic/version.rb +1 -1
  67. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  68. data/lib/schematic.rb +42 -5
  69. data/reference.md +586 -103
  70. metadata +40 -3
  71. data/lib/schematic/plans/types/publish_plan_version_request_body.rb +0 -47
data/reference.md CHANGED
@@ -4334,6 +4334,549 @@ client.billing.upsert_billing_subscription(
4334
4334
  </dl>
4335
4335
 
4336
4336
 
4337
+ </dd>
4338
+ </dl>
4339
+ </details>
4340
+
4341
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">get_company_native_subscription</a>(company_id:) -> Schematic::Billing::Types::GetCompanyNativeSubscriptionResponse</code></summary>
4342
+ <dl>
4343
+ <dd>
4344
+
4345
+ #### 🔌 Usage
4346
+
4347
+ <dl>
4348
+ <dd>
4349
+
4350
+ <dl>
4351
+ <dd>
4352
+
4353
+ ```ruby
4354
+ client.billing.get_company_native_subscription(company_id: "company_id")
4355
+ ```
4356
+ </dd>
4357
+ </dl>
4358
+ </dd>
4359
+ </dl>
4360
+
4361
+ #### ⚙️ Parameters
4362
+
4363
+ <dl>
4364
+ <dd>
4365
+
4366
+ <dl>
4367
+ <dd>
4368
+
4369
+ **company_id:** `String` — company_id
4370
+
4371
+ </dd>
4372
+ </dl>
4373
+
4374
+ <dl>
4375
+ <dd>
4376
+
4377
+ **request_options:** `Schematic::Billing::RequestOptions`
4378
+
4379
+ </dd>
4380
+ </dl>
4381
+ </dd>
4382
+ </dl>
4383
+
4384
+
4385
+ </dd>
4386
+ </dl>
4387
+ </details>
4388
+
4389
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">list_native_invoices</a>() -> Schematic::Billing::Types::ListNativeInvoicesResponse</code></summary>
4390
+ <dl>
4391
+ <dd>
4392
+
4393
+ #### 🔌 Usage
4394
+
4395
+ <dl>
4396
+ <dd>
4397
+
4398
+ <dl>
4399
+ <dd>
4400
+
4401
+ ```ruby
4402
+ client.billing.list_native_invoices(
4403
+ company_id: "company_id",
4404
+ contract_id: "contract_id",
4405
+ document_state: "credited",
4406
+ limit: 1000000,
4407
+ offset: 1000000
4408
+ )
4409
+ ```
4410
+ </dd>
4411
+ </dl>
4412
+ </dd>
4413
+ </dl>
4414
+
4415
+ #### ⚙️ Parameters
4416
+
4417
+ <dl>
4418
+ <dd>
4419
+
4420
+ <dl>
4421
+ <dd>
4422
+
4423
+ **company_id:** `String`
4424
+
4425
+ </dd>
4426
+ </dl>
4427
+
4428
+ <dl>
4429
+ <dd>
4430
+
4431
+ **contract_id:** `String`
4432
+
4433
+ </dd>
4434
+ </dl>
4435
+
4436
+ <dl>
4437
+ <dd>
4438
+
4439
+ **document_state:** `Schematic::Types::InvoiceDocumentState`
4440
+
4441
+ </dd>
4442
+ </dl>
4443
+
4444
+ <dl>
4445
+ <dd>
4446
+
4447
+ **limit:** `Integer` — Page limit (default 100)
4448
+
4449
+ </dd>
4450
+ </dl>
4451
+
4452
+ <dl>
4453
+ <dd>
4454
+
4455
+ **offset:** `Integer` — Page offset (default 0)
4456
+
4457
+ </dd>
4458
+ </dl>
4459
+
4460
+ <dl>
4461
+ <dd>
4462
+
4463
+ **request_options:** `Schematic::Billing::RequestOptions`
4464
+
4465
+ </dd>
4466
+ </dl>
4467
+ </dd>
4468
+ </dl>
4469
+
4470
+
4471
+ </dd>
4472
+ </dl>
4473
+ </details>
4474
+
4475
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">get_native_invoice</a>(invoice_id:) -> Schematic::Billing::Types::GetNativeInvoiceResponse</code></summary>
4476
+ <dl>
4477
+ <dd>
4478
+
4479
+ #### 🔌 Usage
4480
+
4481
+ <dl>
4482
+ <dd>
4483
+
4484
+ <dl>
4485
+ <dd>
4486
+
4487
+ ```ruby
4488
+ client.billing.get_native_invoice(invoice_id: "invoice_id")
4489
+ ```
4490
+ </dd>
4491
+ </dl>
4492
+ </dd>
4493
+ </dl>
4494
+
4495
+ #### ⚙️ Parameters
4496
+
4497
+ <dl>
4498
+ <dd>
4499
+
4500
+ <dl>
4501
+ <dd>
4502
+
4503
+ **invoice_id:** `String` — invoice_id
4504
+
4505
+ </dd>
4506
+ </dl>
4507
+
4508
+ <dl>
4509
+ <dd>
4510
+
4511
+ **request_options:** `Schematic::Billing::RequestOptions`
4512
+
4513
+ </dd>
4514
+ </dl>
4515
+ </dd>
4516
+ </dl>
4517
+
4518
+
4519
+ </dd>
4520
+ </dl>
4521
+ </details>
4522
+
4523
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">export_native_invoice</a>(invoice_id:) -> String</code></summary>
4524
+ <dl>
4525
+ <dd>
4526
+
4527
+ #### 🔌 Usage
4528
+
4529
+ <dl>
4530
+ <dd>
4531
+
4532
+ <dl>
4533
+ <dd>
4534
+
4535
+ ```ruby
4536
+ client.billing.export_native_invoice(invoice_id: "invoice_id")
4537
+ ```
4538
+ </dd>
4539
+ </dl>
4540
+ </dd>
4541
+ </dl>
4542
+
4543
+ #### ⚙️ Parameters
4544
+
4545
+ <dl>
4546
+ <dd>
4547
+
4548
+ <dl>
4549
+ <dd>
4550
+
4551
+ **invoice_id:** `String` — invoice_id
4552
+
4553
+ </dd>
4554
+ </dl>
4555
+
4556
+ <dl>
4557
+ <dd>
4558
+
4559
+ **request_options:** `Schematic::Billing::RequestOptions`
4560
+
4561
+ </dd>
4562
+ </dl>
4563
+ </dd>
4564
+ </dl>
4565
+
4566
+
4567
+ </dd>
4568
+ </dl>
4569
+ </details>
4570
+
4571
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">finalize_native_invoice</a>(invoice_id:) -> Schematic::Billing::Types::FinalizeNativeInvoiceResponse</code></summary>
4572
+ <dl>
4573
+ <dd>
4574
+
4575
+ #### 🔌 Usage
4576
+
4577
+ <dl>
4578
+ <dd>
4579
+
4580
+ <dl>
4581
+ <dd>
4582
+
4583
+ ```ruby
4584
+ client.billing.finalize_native_invoice(invoice_id: "invoice_id")
4585
+ ```
4586
+ </dd>
4587
+ </dl>
4588
+ </dd>
4589
+ </dl>
4590
+
4591
+ #### ⚙️ Parameters
4592
+
4593
+ <dl>
4594
+ <dd>
4595
+
4596
+ <dl>
4597
+ <dd>
4598
+
4599
+ **invoice_id:** `String` — invoice_id
4600
+
4601
+ </dd>
4602
+ </dl>
4603
+
4604
+ <dl>
4605
+ <dd>
4606
+
4607
+ **request_options:** `Schematic::Billing::RequestOptions`
4608
+
4609
+ </dd>
4610
+ </dl>
4611
+ </dd>
4612
+ </dl>
4613
+
4614
+
4615
+ </dd>
4616
+ </dl>
4617
+ </details>
4618
+
4619
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">mark_native_invoice_paid</a>(invoice_id:, request) -> Schematic::Billing::Types::MarkNativeInvoicePaidResponse</code></summary>
4620
+ <dl>
4621
+ <dd>
4622
+
4623
+ #### 🔌 Usage
4624
+
4625
+ <dl>
4626
+ <dd>
4627
+
4628
+ <dl>
4629
+ <dd>
4630
+
4631
+ ```ruby
4632
+ client.billing.mark_native_invoice_paid(
4633
+ invoice_id: "invoice_id",
4634
+ idempotency_key: "idempotency_key"
4635
+ )
4636
+ ```
4637
+ </dd>
4638
+ </dl>
4639
+ </dd>
4640
+ </dl>
4641
+
4642
+ #### ⚙️ Parameters
4643
+
4644
+ <dl>
4645
+ <dd>
4646
+
4647
+ <dl>
4648
+ <dd>
4649
+
4650
+ **invoice_id:** `String` — invoice_id
4651
+
4652
+ </dd>
4653
+ </dl>
4654
+
4655
+ <dl>
4656
+ <dd>
4657
+
4658
+ **amount:** `Integer` — Amount paid, in minor units of the invoice's currency. Leave empty to mark the whole remaining amount as paid.
4659
+
4660
+ </dd>
4661
+ </dl>
4662
+
4663
+ <dl>
4664
+ <dd>
4665
+
4666
+ **idempotency_key:** `String` — A retry with the same key records the payment once.
4667
+
4668
+ </dd>
4669
+ </dl>
4670
+
4671
+ <dl>
4672
+ <dd>
4673
+
4674
+ **reference:** `String` — A note that identifies the payment, such as a bank transfer reference.
4675
+
4676
+ </dd>
4677
+ </dl>
4678
+
4679
+ <dl>
4680
+ <dd>
4681
+
4682
+ **settled_at:** `String` — When the payment arrived. Defaults to now, and cannot be in the future.
4683
+
4684
+ </dd>
4685
+ </dl>
4686
+
4687
+ <dl>
4688
+ <dd>
4689
+
4690
+ **request_options:** `Schematic::Billing::RequestOptions`
4691
+
4692
+ </dd>
4693
+ </dl>
4694
+ </dd>
4695
+ </dl>
4696
+
4697
+
4698
+ </dd>
4699
+ </dl>
4700
+ </details>
4701
+
4702
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">download_native_invoice_pdf</a>(invoice_id:) -> String</code></summary>
4703
+ <dl>
4704
+ <dd>
4705
+
4706
+ #### 🔌 Usage
4707
+
4708
+ <dl>
4709
+ <dd>
4710
+
4711
+ <dl>
4712
+ <dd>
4713
+
4714
+ ```ruby
4715
+ client.billing.download_native_invoice_pdf(invoice_id: "invoice_id")
4716
+ ```
4717
+ </dd>
4718
+ </dl>
4719
+ </dd>
4720
+ </dl>
4721
+
4722
+ #### ⚙️ Parameters
4723
+
4724
+ <dl>
4725
+ <dd>
4726
+
4727
+ <dl>
4728
+ <dd>
4729
+
4730
+ **invoice_id:** `String` — invoice_id
4731
+
4732
+ </dd>
4733
+ </dl>
4734
+
4735
+ <dl>
4736
+ <dd>
4737
+
4738
+ **request_options:** `Schematic::Billing::RequestOptions`
4739
+
4740
+ </dd>
4741
+ </dl>
4742
+ </dd>
4743
+ </dl>
4744
+
4745
+
4746
+ </dd>
4747
+ </dl>
4748
+ </details>
4749
+
4750
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">void_native_invoice</a>(invoice_id:) -> Schematic::Billing::Types::VoidNativeInvoiceResponse</code></summary>
4751
+ <dl>
4752
+ <dd>
4753
+
4754
+ #### 🔌 Usage
4755
+
4756
+ <dl>
4757
+ <dd>
4758
+
4759
+ <dl>
4760
+ <dd>
4761
+
4762
+ ```ruby
4763
+ client.billing.void_native_invoice(invoice_id: "invoice_id")
4764
+ ```
4765
+ </dd>
4766
+ </dl>
4767
+ </dd>
4768
+ </dl>
4769
+
4770
+ #### ⚙️ Parameters
4771
+
4772
+ <dl>
4773
+ <dd>
4774
+
4775
+ <dl>
4776
+ <dd>
4777
+
4778
+ **invoice_id:** `String` — invoice_id
4779
+
4780
+ </dd>
4781
+ </dl>
4782
+
4783
+ <dl>
4784
+ <dd>
4785
+
4786
+ **request_options:** `Schematic::Billing::RequestOptions`
4787
+
4788
+ </dd>
4789
+ </dl>
4790
+ </dd>
4791
+ </dl>
4792
+
4793
+
4794
+ </dd>
4795
+ </dl>
4796
+ </details>
4797
+
4798
+ <details><summary><code>client.billing.<a href="/lib/schematic/billing/client.rb">count_native_invoices</a>() -> Schematic::Billing::Types::CountNativeInvoicesResponse</code></summary>
4799
+ <dl>
4800
+ <dd>
4801
+
4802
+ #### 🔌 Usage
4803
+
4804
+ <dl>
4805
+ <dd>
4806
+
4807
+ <dl>
4808
+ <dd>
4809
+
4810
+ ```ruby
4811
+ client.billing.count_native_invoices(
4812
+ company_id: "company_id",
4813
+ contract_id: "contract_id",
4814
+ document_state: "credited",
4815
+ limit: 1000000,
4816
+ offset: 1000000
4817
+ )
4818
+ ```
4819
+ </dd>
4820
+ </dl>
4821
+ </dd>
4822
+ </dl>
4823
+
4824
+ #### ⚙️ Parameters
4825
+
4826
+ <dl>
4827
+ <dd>
4828
+
4829
+ <dl>
4830
+ <dd>
4831
+
4832
+ **company_id:** `String`
4833
+
4834
+ </dd>
4835
+ </dl>
4836
+
4837
+ <dl>
4838
+ <dd>
4839
+
4840
+ **contract_id:** `String`
4841
+
4842
+ </dd>
4843
+ </dl>
4844
+
4845
+ <dl>
4846
+ <dd>
4847
+
4848
+ **document_state:** `Schematic::Types::InvoiceDocumentState`
4849
+
4850
+ </dd>
4851
+ </dl>
4852
+
4853
+ <dl>
4854
+ <dd>
4855
+
4856
+ **limit:** `Integer` — Page limit (default 100)
4857
+
4858
+ </dd>
4859
+ </dl>
4860
+
4861
+ <dl>
4862
+ <dd>
4863
+
4864
+ **offset:** `Integer` — Page offset (default 0)
4865
+
4866
+ </dd>
4867
+ </dl>
4868
+
4869
+ <dl>
4870
+ <dd>
4871
+
4872
+ **request_options:** `Schematic::Billing::RequestOptions`
4873
+
4874
+ </dd>
4875
+ </dl>
4876
+ </dd>
4877
+ </dl>
4878
+
4879
+
4337
4880
  </dd>
4338
4881
  </dl>
4339
4882
  </details>
@@ -7042,7 +7585,7 @@ client.credits.create_credit_spend_policy(billing_credit_id: "billing_credit_id"
7042
7585
  <dl>
7043
7586
  <dd>
7044
7587
 
7045
- **company_id:** `String` — The company the cap applies to. Set exactly one of company_id and user_id.
7588
+ **company_id:** `String` — The company the cap applies in. Alone, it caps the whole company. With user_id, it caps that user's spend in this company. Required with user_id when the user belongs to more than one company.
7046
7589
 
7047
7590
  </dd>
7048
7591
  </dl>
@@ -7066,7 +7609,7 @@ client.credits.create_credit_spend_policy(billing_credit_id: "billing_credit_id"
7066
7609
  <dl>
7067
7610
  <dd>
7068
7611
 
7069
- **user_id:** `String` — The user the cap applies to. Set exactly one of company_id and user_id.
7612
+ **user_id:** `String` — The user the cap applies to. The user must belong to company_id, and with no company_id, to exactly one company.
7070
7613
 
7071
7614
  </dd>
7072
7615
  </dl>
@@ -9298,7 +9841,7 @@ client.companies.list_companies(
9298
9841
  <dl>
9299
9842
  <dd>
9300
9843
 
9301
- **without_feature_override_for:** `String` — Filter out companies that already have a company override for the specified feature ID
9844
+ **without_feature_override_for:** `String` — Filter out companies that have an unexpired company override for the specified feature ID
9302
9845
 
9303
9846
  </dd>
9304
9847
  </dl>
@@ -9694,7 +10237,7 @@ client.companies.count_companies(
9694
10237
  <dl>
9695
10238
  <dd>
9696
10239
 
9697
- **without_feature_override_for:** `String` — Filter out companies that already have a company override for the specified feature ID
10240
+ **without_feature_override_for:** `String` — Filter out companies that have an unexpired company override for the specified feature ID
9698
10241
 
9699
10242
  </dd>
9700
10243
  </dl>
@@ -15657,7 +16200,9 @@ client.plans.update_company_plans(
15657
16200
  client.plans.list_custom_plan_billings(
15658
16201
  company_id: "company_id",
15659
16202
  plan_id: "plan_id",
16203
+ plan_version_id: "plan_version_id",
15660
16204
  plan_billing_source: "amendment",
16205
+ plan_billing_sources: ["amendment"],
15661
16206
  status: "active",
15662
16207
  statuses: ["active"],
15663
16208
  limit: 1000000,
@@ -15693,7 +16238,23 @@ client.plans.list_custom_plan_billings(
15693
16238
  <dl>
15694
16239
  <dd>
15695
16240
 
15696
- **plan_billing_source:** `Schematic::Types::PlanBillingSource` — Filter by the flow that created the billing record: custom_plan for a first publish, amendment for a republish, manage_plan for a standard plan assigned by invoice. Defaults to custom_plan.
16241
+ **plan_version_id:** `String` — Filter by the plan version the billing record was created for
16242
+
16243
+ </dd>
16244
+ </dl>
16245
+
16246
+ <dl>
16247
+ <dd>
16248
+
16249
+ **plan_billing_source:** `Schematic::Types::PlanBillingSource` — Filter by the flow that created the billing record: custom_plan for a first publish, amendment for a republish, manage_plan for a standard plan assigned by invoice. Defaults to custom_plan unless plan_billing_sources is set.
16250
+
16251
+ </dd>
16252
+ </dl>
16253
+
16254
+ <dl>
16255
+ <dd>
16256
+
16257
+ **plan_billing_sources:** `Schematic::Types::PlanBillingSource` — Filter by multiple billing sources. Takes precedence over plan_billing_source.
15697
16258
 
15698
16259
  </dd>
15699
16260
  </dl>
@@ -17195,47 +17756,7 @@ client.plans.publish_plan_version(
17195
17756
  <dl>
17196
17757
  <dd>
17197
17758
 
17198
- **activation_strategy:** `Schematic::Types::CustomPlanActivationStrategy` — When the company gets the plan. On a custom-plan republish, on_payment is only accepted when the amendment is invoiced today (migration_strategy immediate, proration_behavior always_invoice, collection_method send_invoice): the company stays on its current version until that invoice is paid.
17199
-
17200
- </dd>
17201
- </dl>
17202
-
17203
- <dl>
17204
- <dd>
17205
-
17206
- **address:** `Schematic::Types::CustomerBillingAddress`
17207
-
17208
- </dd>
17209
- </dl>
17210
-
17211
- <dl>
17212
- <dd>
17213
-
17214
- **billing_cycle_anchor:** `String` — The date the subscription's billing period renews on. Only honored on a first publish that starts a subscription.
17215
-
17216
- </dd>
17217
- </dl>
17218
-
17219
- <dl>
17220
- <dd>
17221
-
17222
- **billing_start_date:** `String` — The date the contract term starts. A past date backdates the subscription so the first invoice covers the term from this date to the renewal date. Requires billing_cycle_anchor. Only honored on a first publish that starts a subscription.
17223
-
17224
- </dd>
17225
- </dl>
17226
-
17227
- <dl>
17228
- <dd>
17229
-
17230
- **collection_method:** `Schematic::Types::BillingCollectionMethod` — How the invoice a custom-plan republish raises today is collected. send_invoice (the default) issues it for the company to pay; charge_automatically charges the default payment method straight away. Only accepted on a custom-plan republish with migration_strategy immediate and proration_behavior always_invoice.
17231
-
17232
- </dd>
17233
- </dl>
17234
-
17235
- <dl>
17236
- <dd>
17237
-
17238
- **coupon_external_id:** `String` — A Stripe coupon to apply. On a custom-plan republish it discounts the amendment invoice and is only used when that invoice is raised today; it must exist in Stripe. It is attached to the subscription, so a repeating or forever coupon also discounts the renewals that follow.
17759
+ **request:** `Schematic::Types::PublishPlanVersionRequestBody`
17239
17760
 
17240
17761
  </dd>
17241
17762
  </dl>
@@ -17243,87 +17764,51 @@ client.plans.publish_plan_version(
17243
17764
  <dl>
17244
17765
  <dd>
17245
17766
 
17246
- **custom_field_values:** `Internal::Types::Array[Schematic::Types::CheckoutFieldValue]`
17247
-
17248
- </dd>
17249
- </dl>
17250
-
17251
- <dl>
17252
- <dd>
17253
-
17254
- **customer_email:** `String`
17767
+ **request_options:** `Schematic::Plans::RequestOptions`
17255
17768
 
17256
17769
  </dd>
17257
17770
  </dl>
17258
-
17259
- <dl>
17260
- <dd>
17261
-
17262
- **days_until_due:** `Integer` — Payment terms in days. On a custom-plan republish they apply to the amendment invoice only, leave the subscription's renewal terms unchanged, and are only used when that invoice is raised today and sent rather than charged. Defaults to the subscription's terms.
17263
-
17264
17771
  </dd>
17265
17772
  </dl>
17266
17773
 
17267
- <dl>
17268
- <dd>
17269
17774
 
17270
- **excluded_company_ids:** `Internal::Types::Array[String]`
17271
-
17272
17775
  </dd>
17273
17776
  </dl>
17777
+ </details>
17274
17778
 
17779
+ <details><summary><code>client.plans.<a href="/lib/schematic/plans/client.rb">preview_publish_plan_version</a>(plan_version_id:, request) -> Schematic::Plans::Types::PreviewPublishPlanVersionResponse</code></summary>
17275
17780
  <dl>
17276
17781
  <dd>
17277
17782
 
17278
- **migration_strategy:** `Schematic::Types::PlanVersionMigrationStrategy`
17279
-
17280
- </dd>
17281
- </dl>
17783
+ #### 🔌 Usage
17282
17784
 
17283
17785
  <dl>
17284
17786
  <dd>
17285
17787
 
17286
- **phone:** `String`
17287
-
17288
- </dd>
17289
- </dl>
17290
-
17291
17788
  <dl>
17292
17789
  <dd>
17293
17790
 
17294
- **prorate_first_period:** `Internal::Types::Boolean` — When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true.
17295
-
17791
+ ```ruby
17792
+ client.plans.preview_publish_plan_version(
17793
+ plan_version_id: "plan_version_id",
17794
+ excluded_company_ids: ["excluded_company_ids"],
17795
+ migration_strategy: "end_of_billing_period"
17796
+ )
17797
+ ```
17296
17798
  </dd>
17297
17799
  </dl>
17298
-
17299
- <dl>
17300
- <dd>
17301
-
17302
- **proration_behavior:** `Schematic::Types::MigrationProrationBehavior` — How Stripe handles the price difference when companies are migrated. With migration_strategy immediate, omitted means create_prorations. With end_of_billing_period only none is accepted and means the same as omitting it: the change lands on the renewal boundary, so there is nothing to prorate. With scheduled any value is accepted and omitted means none. Not accepted with leave.
17303
-
17304
17800
  </dd>
17305
17801
  </dl>
17306
17802
 
17307
- <dl>
17308
- <dd>
17309
-
17310
- **require_no_migration:** `Internal::Types::Boolean` — Refuse the publish if any company would be migrated onto the new version
17311
-
17312
- </dd>
17313
- </dl>
17803
+ #### ⚙️ Parameters
17314
17804
 
17315
17805
  <dl>
17316
17806
  <dd>
17317
17807
 
17318
- **scheduled_at:** `String` — When every company moves, for migration_strategy scheduled. Must be in the future; the migration runs within about a minute of this time. Not accepted with other strategies.
17319
-
17320
- </dd>
17321
- </dl>
17322
-
17323
17808
  <dl>
17324
17809
  <dd>
17325
17810
 
17326
- **send_invoice:** `Internal::Types::Boolean` — Whether Stripe emails the invoice when it is finalized. Defaults to true.
17811
+ **plan_version_id:** `String` — plan_version_id
17327
17812
 
17328
17813
  </dd>
17329
17814
  </dl>
@@ -17331,7 +17816,7 @@ client.plans.publish_plan_version(
17331
17816
  <dl>
17332
17817
  <dd>
17333
17818
 
17334
- **tax_id:** `Schematic::Types::TaxIdInput`
17819
+ **request:** `Schematic::Types::PublishPlanVersionRequestBody`
17335
17820
 
17336
17821
  </dd>
17337
17822
  </dl>
@@ -18973,7 +19458,7 @@ client.features.list_features(
18973
19458
  <dl>
18974
19459
  <dd>
18975
19460
 
18976
- **without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID
19461
+ **without_company_override_for:** `String` — Filter out features that have an unexpired company override for the specified company ID
18977
19462
 
18978
19463
  </dd>
18979
19464
  </dl>
@@ -19642,7 +20127,7 @@ client.features.count_features(
19642
20127
  <dl>
19643
20128
  <dd>
19644
20129
 
19645
- **without_company_override_for:** `String` — Filter out features that already have a company override for the specified company ID
20130
+ **without_company_override_for:** `String` — Filter out features that have an unexpired company override for the specified company ID
19646
20131
 
19647
20132
  </dd>
19648
20133
  </dl>
@@ -19786,7 +20271,6 @@ client.features.list_flags(
19786
20271
 
19787
20272
  ```ruby
19788
20273
  client.features.create_flag(
19789
- default_value: true,
19790
20274
  description: "description",
19791
20275
  flag_type: "boolean",
19792
20276
  key: "key",
@@ -19889,7 +20373,6 @@ client.features.get_flag(flag_id: "flag_id")
19889
20373
  ```ruby
19890
20374
  client.features.update_flag(
19891
20375
  flag_id: "flag_id",
19892
- default_value: true,
19893
20376
  description: "description",
19894
20377
  flag_type: "boolean",
19895
20378
  key: "key",
@@ -20160,7 +20643,7 @@ client.features.check_and_reserve_flag(key: "key")
20160
20643
  <dl>
20161
20644
  <dd>
20162
20645
 
20163
- **expires_at:** `String` — When the hold lapses if no track event settles it; defaults to one minute from now and may be at most one hour out. The unspent hold is refunded on expiry
20646
+ **expires_at:** `String` — When the hold lapses if no track or inference event settles it; defaults to one minute from now and may be at most one hour out. The unspent hold is refunded on expiry
20164
20647
 
20165
20648
  </dd>
20166
20649
  </dl>
@@ -20176,7 +20659,7 @@ client.features.check_and_reserve_flag(key: "key")
20176
20659
  <dl>
20177
20660
  <dd>
20178
20661
 
20179
- **preflight:** `Schematic::Types::PreflightRequestBody` — Hypothetical usage to evaluate the flag against. When credit_cost names the entitlement's credit, that cost is what gets held; otherwise the hold is the entitlement's consumption rate times quantity, or, when quantity is omitted, times the usage stated here
20662
+ **preflight:** `Schematic::Types::PreflightRequestBody` — Hypothetical usage to evaluate the flag against. When credit_cost names the entitlement's credit, that cost is what gets held; otherwise, when event_quantities names the entitlement's event subtype, the hold is that event priced at the entitlement's consumption rate and quantity rates, and quantity is ignored; otherwise the hold is the entitlement's consumption rate times quantity, or, when quantity is omitted, times the usage stated here
20180
20663
 
20181
20664
  </dd>
20182
20665
  </dl>
@@ -20184,7 +20667,7 @@ client.features.check_and_reserve_flag(key: "key")
20184
20667
  <dl>
20185
20668
  <dd>
20186
20669
 
20187
- **quantity:** `Float` — Units of the feature the operation will consume. Sets the hold size together with the entitlement's consumption rate, and is echoed back on the reservation for the settling track event. When it is omitted the units come from preflight.event_usage.quantity, if that event subtype is the entitlement's, else from preflight.usage, else 1
20670
+ **quantity:** `Float` — Units of the feature the operation will consume. Sets the hold size together with the entitlement's consumption rate, and is echoed back on the reservation for the settling track event. When it is omitted the units come from preflight.event_usage.quantity, if that event subtype is the entitlement's, else from preflight.usage, else 1. Ignored when preflight.event_quantities names the entitlement's event subtype, whose quantity is used instead
20188
20671
 
20189
20672
  </dd>
20190
20673
  </dl>