Skip to content

Commit 268fdab

Browse files
feat(api): api update
1 parent 7c7a621 commit 268fdab

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
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: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-373ca3e805c414f75a90b0088c57cbb60ff207abdca0a8e397c551de88606c4a.yml
3-
openapi_spec_hash: 1c30d01bd9c38f8a2aa4bd088fbe69bc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-a44cccd16bb58080f7cc0669999403f6ed3f77287fad901caa6fd2523f2fbafd.yml
3+
openapi_spec_hash: af6444648d0b2a70b7f7ad234bd37541
44
config_hash: 1f535c1fa222aacf28b636eed21bec72

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class InvoiceServiceTest : Tests::TestBase
3434
UnitConfig = new Models::UnitConfig() { UnitAmount = "unit_amount" },
3535
},
3636
],
37-
NetTerms = 0,
3837
CustomerID = "4khy3nwzktxv7",
3938
Discount = Models::Discount.Create(
4039
new Models::PercentageDiscount()
@@ -57,6 +56,7 @@ public class InvoiceServiceTest : Tests::TestBase
5756
ExternalCustomerID = "external-customer-id",
5857
Memo = "An optional memo for my invoice.",
5958
Metadata = new() { { "foo", "string" } },
59+
NetTerms = 0,
6060
WillAutoIssue = false,
6161
}
6262
);

src/Orb/Models/Invoices/InvoiceCreateParams.cs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,6 @@ public required string Currency
7575
set { this.BodyProperties["line_items"] = Json::JsonSerializer.SerializeToElement(value); }
7676
}
7777

78-
/// <summary>
79-
/// Determines the difference between the invoice issue date for subscription invoices
80-
/// as the date that they are due. A value of '0' here represents that the invoice
81-
/// is due on issue, whereas a value of 30 represents that the customer has 30 days
82-
/// to pay the invoice.
83-
/// </summary>
84-
public required long NetTerms
85-
{
86-
get
87-
{
88-
if (!this.BodyProperties.TryGetValue("net_terms", out Json::JsonElement element))
89-
throw new System::ArgumentOutOfRangeException(
90-
"net_terms",
91-
"Missing required argument"
92-
);
93-
94-
return Json::JsonSerializer.Deserialize<long>(element);
95-
}
96-
set { this.BodyProperties["net_terms"] = Json::JsonSerializer.SerializeToElement(value); }
97-
}
98-
9978
/// <summary>
10079
/// The id of the `Customer` to create this invoice for. One of `customer_id` and
10180
/// `external_customer_id` are required.
@@ -185,6 +164,24 @@ public string? Memo
185164
set { this.BodyProperties["metadata"] = Json::JsonSerializer.SerializeToElement(value); }
186165
}
187166

167+
/// <summary>
168+
/// Determines the difference between the invoice issue date for subscription invoices
169+
/// as the date that they are due. A value of '0' here represents that the invoice
170+
/// is due on issue, whereas a value of 30 represents that the customer has 30 days
171+
/// to pay the invoice.
172+
/// </summary>
173+
public long? NetTerms
174+
{
175+
get
176+
{
177+
if (!this.BodyProperties.TryGetValue("net_terms", out Json::JsonElement element))
178+
return null;
179+
180+
return Json::JsonSerializer.Deserialize<long?>(element);
181+
}
182+
set { this.BodyProperties["net_terms"] = Json::JsonSerializer.SerializeToElement(value); }
183+
}
184+
188185
/// <summary>
189186
/// When true, this invoice will be submitted for issuance upon creation. When false,
190187
/// the resulting invoice will require manual review to issue. Defaulted to false.

0 commit comments

Comments
 (0)