Skip to content

Commit 5859f81

Browse files
feat(api): api update
1 parent 49c904a commit 5859f81

File tree

6 files changed

+38
-66
lines changed

6 files changed

+38
-66
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-d1abf71a1a70a43bdcc4da7104dabcbd67aa7e2d3e6cf21e33f50904b6997bb2.yml
3-
openapi_spec_hash: 28b0b31a997588cf3692458889321e1b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d74790c0b5540235e8387ccad7b806c11bcbb968fbdf99ea7dfbfc004bceb9dc.yml
3+
openapi_spec_hash: eae212fa0114d8c3b4293c35f6ed7f7f
44
config_hash: dd4343ce95871032ef6e0735a4ca038c

src/orb/resources/beta/beta.py

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,9 @@ def fetch_plan_version(
141141
extra_body: Body | None = None,
142142
timeout: float | httpx.Timeout | None | NotGiven = not_given,
143143
) -> PlanVersion:
144-
"""This API endpoint is in beta and its interface may change.
144+
"""This endpoint is used to fetch a plan version.
145145
146-
It is recommended for
147-
use only in test mode.
148-
149-
This endpoint is used to fetch a plan version. It returns the phases, prices,
146+
It returns the phases, prices,
150147
and adjustments present on this version of the plan.
151148
152149
Args:
@@ -183,11 +180,7 @@ def set_default_plan_version(
183180
timeout: float | httpx.Timeout | None | NotGiven = not_given,
184181
idempotency_key: str | None = None,
185182
) -> Plan:
186-
"""This API endpoint is in beta and its interface may change.
187-
188-
It is recommended for
189-
use only in test mode.
190-
183+
"""
191184
This endpoint allows setting the default version of a plan.
192185
193186
Args:
@@ -334,12 +327,9 @@ async def fetch_plan_version(
334327
extra_body: Body | None = None,
335328
timeout: float | httpx.Timeout | None | NotGiven = not_given,
336329
) -> PlanVersion:
337-
"""This API endpoint is in beta and its interface may change.
330+
"""This endpoint is used to fetch a plan version.
338331
339-
It is recommended for
340-
use only in test mode.
341-
342-
This endpoint is used to fetch a plan version. It returns the phases, prices,
332+
It returns the phases, prices,
343333
and adjustments present on this version of the plan.
344334
345335
Args:
@@ -376,11 +366,7 @@ async def set_default_plan_version(
376366
timeout: float | httpx.Timeout | None | NotGiven = not_given,
377367
idempotency_key: str | None = None,
378368
) -> Plan:
379-
"""This API endpoint is in beta and its interface may change.
380-
381-
It is recommended for
382-
use only in test mode.
383-
369+
"""
384370
This endpoint allows setting the default version of a plan.
385371
386372
Args:

src/orb/resources/beta/external_plan_id.py

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,9 @@ def fetch_plan_version(
131131
extra_body: Body | None = None,
132132
timeout: float | httpx.Timeout | None | NotGiven = not_given,
133133
) -> PlanVersion:
134-
"""This API endpoint is in beta and its interface may change.
134+
"""This endpoint is used to fetch a plan version.
135135
136-
It is recommended for
137-
use only in test mode.
138-
139-
This endpoint is used to fetch a plan version. It returns the phases, prices,
136+
It returns the phases, prices,
140137
and adjustments present on this version of the plan.
141138
142139
Args:
@@ -173,11 +170,7 @@ def set_default_plan_version(
173170
timeout: float | httpx.Timeout | None | NotGiven = not_given,
174171
idempotency_key: str | None = None,
175172
) -> Plan:
176-
"""This API endpoint is in beta and its interface may change.
177-
178-
It is recommended for
179-
use only in test mode.
180-
173+
"""
181174
This endpoint allows setting the default version of a plan.
182175
183176
Args:
@@ -323,12 +316,9 @@ async def fetch_plan_version(
323316
extra_body: Body | None = None,
324317
timeout: float | httpx.Timeout | None | NotGiven = not_given,
325318
) -> PlanVersion:
326-
"""This API endpoint is in beta and its interface may change.
319+
"""This endpoint is used to fetch a plan version.
327320
328-
It is recommended for
329-
use only in test mode.
330-
331-
This endpoint is used to fetch a plan version. It returns the phases, prices,
321+
It returns the phases, prices,
332322
and adjustments present on this version of the plan.
333323
334324
Args:
@@ -365,11 +355,7 @@ async def set_default_plan_version(
365355
timeout: float | httpx.Timeout | None | NotGiven = not_given,
366356
idempotency_key: str | None = None,
367357
) -> Plan:
368-
"""This API endpoint is in beta and its interface may change.
369-
370-
It is recommended for
371-
use only in test mode.
372-
358+
"""
373359
This endpoint allows setting the default version of a plan.
374360
375361
Args:

src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
100100
saved payment method.
101101
"""
102102

103-
net_terms: Required[Optional[int]]
104-
"""The net terms determines the due date of the invoice.
105-
106-
Due date is calculated based on the invoice or issuance date, depending on the
107-
account's configured due date calculation method. A value of '0' here represents
108-
that the invoice is due on issue, whereas a value of '30' represents that the
109-
customer has 30 days to pay the invoice. Do not set this field if you want to
110-
set a custom due date.
111-
"""
112-
113103
custom_due_date: Annotated[Union[Union[str, date], Union[str, datetime], None], PropertyInfo(format="iso8601")]
114104
"""An optional custom due date for the invoice.
115105
@@ -132,6 +122,16 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
132122
memo: Optional[str]
133123
"""An optional memo to display on the invoice."""
134124

125+
net_terms: Optional[int]
126+
"""The net terms determines the due date of the invoice.
127+
128+
Due date is calculated based on the invoice or issuance date, depending on the
129+
account's configured due date calculation method. A value of '0' here represents
130+
that the invoice is due on issue, whereas a value of '30' represents that the
131+
customer has 30 days to pay the invoice. Do not set this field if you want to
132+
set a custom due date.
133+
"""
134+
135135
require_successful_payment: bool
136136
"""
137137
If true, the new credit block will require that the corresponding invoice is

src/orb/types/customers/credits/ledger_create_entry_params.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
100100
saved payment method.
101101
"""
102102

103-
net_terms: Required[Optional[int]]
104-
"""The net terms determines the due date of the invoice.
105-
106-
Due date is calculated based on the invoice or issuance date, depending on the
107-
account's configured due date calculation method. A value of '0' here represents
108-
that the invoice is due on issue, whereas a value of '30' represents that the
109-
customer has 30 days to pay the invoice. Do not set this field if you want to
110-
set a custom due date.
111-
"""
112-
113103
custom_due_date: Annotated[Union[Union[str, date], Union[str, datetime], None], PropertyInfo(format="iso8601")]
114104
"""An optional custom due date for the invoice.
115105
@@ -132,6 +122,16 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
132122
memo: Optional[str]
133123
"""An optional memo to display on the invoice."""
134124

125+
net_terms: Optional[int]
126+
"""The net terms determines the due date of the invoice.
127+
128+
Due date is calculated based on the invoice or issuance date, depending on the
129+
account's configured due date calculation method. A value of '0' here represents
130+
that the invoice is due on issue, whereas a value of '30' represents that the
131+
customer has 30 days to pay the invoice. Do not set this field if you want to
132+
set a custom due date.
133+
"""
134+
135135
require_successful_payment: bool
136136
"""
137137
If true, the new credit block will require that the corresponding invoice is

tests/api_resources/customers/credits/test_ledger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ def test_method_create_entry_with_all_params_overload_1(self, client: Orb) -> No
107107
],
108108
invoice_settings={
109109
"auto_collection": True,
110-
"net_terms": 0,
111110
"custom_due_date": parse_date("2019-12-27"),
112111
"invoice_date": parse_date("2019-12-27"),
113112
"item_id": "item_id",
114113
"memo": "memo",
114+
"net_terms": 0,
115115
"require_successful_payment": True,
116116
},
117117
metadata={"foo": "string"},
@@ -430,11 +430,11 @@ def test_method_create_entry_by_external_id_with_all_params_overload_1(self, cli
430430
],
431431
invoice_settings={
432432
"auto_collection": True,
433-
"net_terms": 0,
434433
"custom_due_date": parse_date("2019-12-27"),
435434
"invoice_date": parse_date("2019-12-27"),
436435
"item_id": "item_id",
437436
"memo": "memo",
437+
"net_terms": 0,
438438
"require_successful_payment": True,
439439
},
440440
metadata={"foo": "string"},
@@ -869,11 +869,11 @@ async def test_method_create_entry_with_all_params_overload_1(self, async_client
869869
],
870870
invoice_settings={
871871
"auto_collection": True,
872-
"net_terms": 0,
873872
"custom_due_date": parse_date("2019-12-27"),
874873
"invoice_date": parse_date("2019-12-27"),
875874
"item_id": "item_id",
876875
"memo": "memo",
876+
"net_terms": 0,
877877
"require_successful_payment": True,
878878
},
879879
metadata={"foo": "string"},
@@ -1192,11 +1192,11 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_1(sel
11921192
],
11931193
invoice_settings={
11941194
"auto_collection": True,
1195-
"net_terms": 0,
11961195
"custom_due_date": parse_date("2019-12-27"),
11971196
"invoice_date": parse_date("2019-12-27"),
11981197
"item_id": "item_id",
11991198
"memo": "memo",
1199+
"net_terms": 0,
12001200
"require_successful_payment": True,
12011201
},
12021202
metadata={"foo": "string"},

0 commit comments

Comments
 (0)