Skip to content

Commit 68861a7

Browse files
feat(api): api update
1 parent 5e17454 commit 68861a7

File tree

4 files changed

+43
-44
lines changed

4 files changed

+43
-44
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-e79a36262fa3c577305a43717398fb70482bb2dca47cdb3e201cbb2a590c359c.yml
3-
openapi_spec_hash: 1e04880dccbcc082ba451083e421a471
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml
3+
openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

src/orb/resources/credit_notes.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ def create(
9090
Args:
9191
reason: An optional reason for the credit note.
9292
93-
end_date: An optional date string to specify the global credit note service period end
94-
date in the customer's timezone. This will be applied to all line items. If not
95-
provided, line items will use their original invoice line item service periods.
96-
This date is inclusive.
93+
end_date: A date string to specify the global credit note service period end date in the
94+
customer's timezone. This will be applied to all line items that don't have
95+
their own individual service periods specified. If not provided, line items will
96+
use their original invoice line item service periods. This date is inclusive.
9797
9898
memo: An optional memo to attach to the credit note.
9999
100-
start_date: An optional date string to specify the global credit note service period end
101-
date in the customer's timezone. This will be applied to all line items. If not
102-
provided, line items will use their original invoice line item service periods.
103-
This date is inclusive.
100+
start_date: A date string to specify the global credit note service period start date in the
101+
customer's timezone. This will be applied to all line items that don't have
102+
their own individual service periods specified. If not provided, line items will
103+
use their original invoice line item service periods. This date is inclusive.
104104
105105
extra_headers: Send extra headers
106106
@@ -296,17 +296,17 @@ async def create(
296296
Args:
297297
reason: An optional reason for the credit note.
298298
299-
end_date: An optional date string to specify the global credit note service period end
300-
date in the customer's timezone. This will be applied to all line items. If not
301-
provided, line items will use their original invoice line item service periods.
302-
This date is inclusive.
299+
end_date: A date string to specify the global credit note service period end date in the
300+
customer's timezone. This will be applied to all line items that don't have
301+
their own individual service periods specified. If not provided, line items will
302+
use their original invoice line item service periods. This date is inclusive.
303303
304304
memo: An optional memo to attach to the credit note.
305305
306-
start_date: An optional date string to specify the global credit note service period end
307-
date in the customer's timezone. This will be applied to all line items. If not
308-
provided, line items will use their original invoice line item service periods.
309-
This date is inclusive.
306+
start_date: A date string to specify the global credit note service period start date in the
307+
customer's timezone. This will be applied to all line items that don't have
308+
their own individual service periods specified. If not provided, line items will
309+
use their original invoice line item service periods. This date is inclusive.
310310
311311
extra_headers: Send extra headers
312312

src/orb/types/credit_note_create_params.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ class CreditNoteCreateParams(TypedDict, total=False):
1919

2020
end_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")]
2121
"""
22-
An optional date string to specify the global credit note service period end
23-
date in the customer's timezone. This will be applied to all line items. If not
24-
provided, line items will use their original invoice line item service periods.
25-
This date is inclusive.
22+
A date string to specify the global credit note service period end date in the
23+
customer's timezone. This will be applied to all line items that don't have
24+
their own individual service periods specified. If not provided, line items will
25+
use their original invoice line item service periods. This date is inclusive.
2626
"""
2727

2828
memo: Optional[str]
2929
"""An optional memo to attach to the credit note."""
3030

3131
start_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")]
3232
"""
33-
An optional date string to specify the global credit note service period end
34-
date in the customer's timezone. This will be applied to all line items. If not
35-
provided, line items will use their original invoice line item service periods.
36-
This date is inclusive.
33+
A date string to specify the global credit note service period start date in the
34+
customer's timezone. This will be applied to all line items that don't have
35+
their own individual service periods specified. If not provided, line items will
36+
use their original invoice line item service periods. This date is inclusive.
3737
"""
3838

3939

@@ -46,18 +46,17 @@ class LineItem(TypedDict, total=False):
4646

4747
end_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")]
4848
"""
49-
An optional date string to specify this line item's credit note service period
50-
end date in the customer's timezone. If provided, this will be used for this
51-
specific line item. If not provided, will use the global end_date if available,
52-
otherwise defaults to the original invoice line item's end date. This date is
53-
inclusive.
49+
A date string to specify this line item's credit note service period end date in
50+
the customer's timezone. If provided, this will be used for this specific line
51+
item. If not provided, will use the global end_date if available, otherwise
52+
defaults to the original invoice line item's end date. This date is inclusive.
5453
"""
5554

5655
start_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")]
5756
"""
58-
An optional date string to specify this line item's credit note service period
59-
start date in the customer's timezone. If provided, this will be used for this
60-
specific line item. If not provided, will use the global start_date if
61-
available, otherwise defaults to the original invoice line item's start date.
62-
This date is inclusive.
57+
A date string to specify this line item's credit note service period start date
58+
in the customer's timezone. If provided, this will be used for this specific
59+
line item. If not provided, will use the global start_date if available,
60+
otherwise defaults to the original invoice line item's start date. This date is
61+
inclusive.
6362
"""

tests/api_resources/test_credit_notes.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
3939
{
4040
"amount": "amount",
4141
"invoice_line_item_id": "4khy3nwzktxv7",
42-
"end_date": parse_date("2023-01-31"),
43-
"start_date": parse_date("2023-01-01"),
42+
"end_date": parse_date("2023-09-22"),
43+
"start_date": parse_date("2023-09-22"),
4444
}
4545
],
4646
reason="duplicate",
47-
end_date=parse_date("2023-01-31"),
47+
end_date=parse_date("2023-09-22"),
4848
memo="An optional memo for my credit note.",
49-
start_date=parse_date("2023-01-01"),
49+
start_date=parse_date("2023-09-22"),
5050
)
5151
assert_matches_type(CreditNote, credit_note, path=["response"])
5252

@@ -187,14 +187,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
187187
{
188188
"amount": "amount",
189189
"invoice_line_item_id": "4khy3nwzktxv7",
190-
"end_date": parse_date("2023-01-31"),
191-
"start_date": parse_date("2023-01-01"),
190+
"end_date": parse_date("2023-09-22"),
191+
"start_date": parse_date("2023-09-22"),
192192
}
193193
],
194194
reason="duplicate",
195-
end_date=parse_date("2023-01-31"),
195+
end_date=parse_date("2023-09-22"),
196196
memo="An optional memo for my credit note.",
197-
start_date=parse_date("2023-01-01"),
197+
start_date=parse_date("2023-09-22"),
198198
)
199199
assert_matches_type(CreditNote, credit_note, path=["response"])
200200

0 commit comments

Comments
 (0)