Skip to content

Commit abb7452

Browse files
feat(api): api update
1 parent cd5e090 commit abb7452

File tree

5 files changed

+5
-27
lines changed

5 files changed

+5
-27
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: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b6ec9a6bf40b74575d917ab145b2413bc61dcd6989bb9d1aa41624bf3437599e.yml
3-
openapi_spec_hash: 53cf9363c3bd9649e0af5f713abdcba7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b330498c2bfb80605f4c406e8b228c0a4ece85247b21f62f93273a00abb53d35.yml
3+
openapi_spec_hash: 16a82d0eb23b68218d584e385bee43da
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

src/Orb.Tests/Services/Invoices/InvoiceServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public async Task Create_Works()
2424
Name = "Line Item Name",
2525
Quantity = 1,
2626
StartDate = DateOnly.Parse("2023-09-22"),
27-
UnitConfig = new() { UnitAmount = "unit_amount", ScalingFactor = 0 },
27+
UnitConfig = new("unit_amount"),
2828
},
2929
],
3030
}

src/Orb.Tests/Services/Plans/PlanServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task Create_Works()
4242
ItemID = "item_id",
4343
ModelType = NewPlanUnitPriceProperties::ModelType.Unit,
4444
Name = "Annual fee",
45-
UnitConfig = new() { UnitAmount = "unit_amount", ScalingFactor = 0 },
45+
UnitConfig = new("unit_amount"),
4646
BillableMetricID = "billable_metric_id",
4747
BilledInAdvance = true,
4848
BillingCycleConfiguration = new()

src/Orb.Tests/Services/Prices/PriceServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public async Task Create_Works()
2323
ItemID = "item_id",
2424
ModelType = ModelType.Unit,
2525
Name = "Annual fee",
26-
UnitConfig = new() { UnitAmount = "unit_amount", ScalingFactor = 0 },
26+
UnitConfig = new("unit_amount"),
2727
BillableMetricID = "billable_metric_id",
2828
BilledInAdvance = true,
2929
BillingCycleConfiguration = new()

src/Orb/Models/UnitConfig.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,9 @@ public required string UnitAmount
4242
}
4343
}
4444

45-
/// <summary>
46-
/// Multiplier to scale rated quantity by
47-
/// </summary>
48-
public double? ScalingFactor
49-
{
50-
get
51-
{
52-
if (!this.Properties.TryGetValue("scaling_factor", out JsonElement element))
53-
return null;
54-
55-
return JsonSerializer.Deserialize<double?>(element, ModelBase.SerializerOptions);
56-
}
57-
set
58-
{
59-
this.Properties["scaling_factor"] = JsonSerializer.SerializeToElement(
60-
value,
61-
ModelBase.SerializerOptions
62-
);
63-
}
64-
}
65-
6645
public override void Validate()
6746
{
6847
_ = this.UnitAmount;
69-
_ = this.ScalingFactor;
7048
}
7149

7250
public UnitConfig() { }

0 commit comments

Comments
 (0)