Skip to content

Commit 2ee5350

Browse files
feat(api): api update
1 parent 5c40cf7 commit 2ee5350

File tree

12 files changed

+382438
-10910
lines changed

12 files changed

+382438
-10910
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-5bb582f84f0b4cf7bef84833fefd48a5f2734dc25805da2028fd8a6f1198da07.yml
3-
openapi_spec_hash: ced0e30dc67faa2414df511819408f12
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-dafe9f726a47bdf7e506af8f10c6abcf4321dcc58106ce2b806a918778dfe2be.yml
3+
openapi_spec_hash: 8e9827f2e8818d011e6afb203adb825f
44
config_hash: 3279841440b02d4e8303c961d6983492

src/Orb.Tests/Models/Beta/BetaCreatePlanVersionParamsTest.cs

Lines changed: 84980 additions & 2597 deletions
Large diffs are not rendered by default.

src/Orb.Tests/Models/Beta/ExternalPlanID/ExternalPlanIDCreatePlanVersionParamsTest.cs

Lines changed: 84980 additions & 2597 deletions
Large diffs are not rendered by default.

src/Orb.Tests/Models/Plans/PlanCreateParamsTest.cs

Lines changed: 41629 additions & 767 deletions
Large diffs are not rendered by default.

src/Orb.Tests/Services/PlanServiceTest.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Collections.Generic;
22
using System.Threading.Tasks;
33
using Orb.Models;
4+
using Plans = Orb.Models.Plans;
45

56
namespace Orb.Tests.Services;
67

@@ -42,6 +43,55 @@ public async Task Create_Works()
4243
LicenseTypeID = "license_type_id",
4344
PerUnitCostBasis = "per_unit_cost_basis",
4445
},
46+
LicenseAllocationPrice = new Plans::Unit()
47+
{
48+
Cadence = Plans::Cadence.Annual,
49+
ItemID = "item_id",
50+
LicenseAllocations =
51+
[
52+
new()
53+
{
54+
Amount = "amount",
55+
Currency = "currency",
56+
WriteOffOverage = true,
57+
},
58+
],
59+
Name = "Annual fee",
60+
UnitConfig = new() { UnitAmount = "unit_amount", Prorated = true },
61+
BillableMetricID = "billable_metric_id",
62+
BilledInAdvance = true,
63+
BillingCycleConfiguration = new()
64+
{
65+
Duration = 0,
66+
DurationUnit = NewBillingCycleConfigurationDurationUnit.Day,
67+
},
68+
ConversionRate = 0,
69+
ConversionRateConfig = new SharedUnitConversionRateConfig()
70+
{
71+
ConversionRateType =
72+
SharedUnitConversionRateConfigConversionRateType.Unit,
73+
UnitConfig = new("unit_amount"),
74+
},
75+
Currency = "currency",
76+
DimensionalPriceConfiguration = new()
77+
{
78+
DimensionValues = ["string"],
79+
DimensionalPriceGroupID = "dimensional_price_group_id",
80+
ExternalDimensionalPriceGroupID =
81+
"external_dimensional_price_group_id",
82+
},
83+
ExternalPriceID = "external_price_id",
84+
FixedPriceQuantity = 0,
85+
InvoiceGroupingKey = "x",
86+
InvoicingCycleConfiguration = new()
87+
{
88+
Duration = 0,
89+
DurationUnit = NewBillingCycleConfigurationDurationUnit.Day,
90+
},
91+
LicenseTypeID = "license_type_id",
92+
Metadata = new Dictionary<string, string?>() { { "foo", "string" } },
93+
ReferenceID = "reference_id",
94+
},
4595
PlanPhaseOrder = 0,
4696
PriceValue = new NewPlanUnitPrice()
4797
{

src/Orb/Core/ModelBase.cs

Lines changed: 323 additions & 0 deletions
Large diffs are not rendered by default.

src/Orb/Models/Beta/BetaCreatePlanVersionParams.cs

Lines changed: 68746 additions & 2170 deletions
Large diffs are not rendered by default.

src/Orb/Models/Beta/ExternalPlanID/ExternalPlanIDCreatePlanVersionParams.cs

Lines changed: 68746 additions & 2170 deletions
Large diffs are not rendered by default.

src/Orb/Models/Customers/Credits/Ledger/LedgerCreateEntryByExternalIDParams.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ namespace Orb.Models.Customers.Credits.Ledger;
4949
/// body of this request, Orb will also generate a one-off invoice for the customer
5050
/// for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`,
5151
/// since the total charges on the invoice are calculated by multiplying the cost
52-
/// basis with the number of credit units added. * if `per_unit_cost_basis` is greater
53-
/// than zero, an invoice will be generated and `invoice_settings` must be included
54-
/// * if `invoice_settings` is passed, one of either `custom_due_date` or `net_terms`
55-
/// is required to determine the due date</para>
52+
/// basis with the number of credit units added. If you invoice or handle payment
53+
/// of credits outside of Orb (i.e. marketplace customers), set `mark_as_paid` in
54+
/// the `invoice_settings` to `true` to prevent duplicate invoicing effects. * if
55+
/// `per_unit_cost_basis` is greater than zero, an invoice will be generated and `invoice_settings`
56+
/// must be included * if `invoice_settings` is passed, one of either `custom_due_date`
57+
/// or `net_terms` is required to determine the due date</para>
5658
///
5759
/// <para>## Deducting Credits Orb allows you to deduct credits from a customer by
5860
/// creating an entry of type `decrement`. Orb matches the algorithm for automatic

src/Orb/Models/Customers/Credits/Ledger/LedgerCreateEntryParams.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ namespace Orb.Models.Customers.Credits.Ledger;
4949
/// body of this request, Orb will also generate a one-off invoice for the customer
5050
/// for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`,
5151
/// since the total charges on the invoice are calculated by multiplying the cost
52-
/// basis with the number of credit units added. * if `per_unit_cost_basis` is greater
53-
/// than zero, an invoice will be generated and `invoice_settings` must be included
54-
/// * if `invoice_settings` is passed, one of either `custom_due_date` or `net_terms`
55-
/// is required to determine the due date</para>
52+
/// basis with the number of credit units added. If you invoice or handle payment
53+
/// of credits outside of Orb (i.e. marketplace customers), set `mark_as_paid` in
54+
/// the `invoice_settings` to `true` to prevent duplicate invoicing effects. * if
55+
/// `per_unit_cost_basis` is greater than zero, an invoice will be generated and `invoice_settings`
56+
/// must be included * if `invoice_settings` is passed, one of either `custom_due_date`
57+
/// or `net_terms` is required to determine the due date</para>
5658
///
5759
/// <para>## Deducting Credits Orb allows you to deduct credits from a customer by
5860
/// creating an entry of type `decrement`. Orb matches the algorithm for automatic

0 commit comments

Comments
 (0)