Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Oct 8, 2024
1 parent 45d59e1 commit d8b2520
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 47
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-4ca93a32ea3ad6872cb231c5f097a9099ffdd67a9607dcd6ce717d4b76d5a3bf.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-982a4af6cedb8c9611819a4aff9770de59d9157b557926ca26f360077f49e1df.yml
8 changes: 4 additions & 4 deletions src/conductor/resources/qbd/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create(
vendor_id: str,
conductor_end_user_id: str,
accounts_payable_account_id: str | NotGiven = NOT_GIVEN,
due_date: str | NotGiven = NOT_GIVEN,
due_date: Union[str, date] | NotGiven = NOT_GIVEN,
exchange_rate: float | NotGiven = NOT_GIVEN,
expense_lines: Iterable[bill_create_params.ExpenseLine] | NotGiven = NOT_GIVEN,
external_id: str | NotGiven = NOT_GIVEN,
Expand All @@ -66,7 +66,7 @@ def create(
ref_number: str | NotGiven = NOT_GIVEN,
sales_tax_code_id: str | NotGiven = NOT_GIVEN,
terms_id: str | NotGiven = NOT_GIVEN,
transaction_date: str | NotGiven = NOT_GIVEN,
transaction_date: Union[str, date] | NotGiven = NOT_GIVEN,
vendor_address: bill_create_params.VendorAddress | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -347,7 +347,7 @@ async def create(
vendor_id: str,
conductor_end_user_id: str,
accounts_payable_account_id: str | NotGiven = NOT_GIVEN,
due_date: str | NotGiven = NOT_GIVEN,
due_date: Union[str, date] | NotGiven = NOT_GIVEN,
exchange_rate: float | NotGiven = NOT_GIVEN,
expense_lines: Iterable[bill_create_params.ExpenseLine] | NotGiven = NOT_GIVEN,
external_id: str | NotGiven = NOT_GIVEN,
Expand All @@ -358,7 +358,7 @@ async def create(
ref_number: str | NotGiven = NOT_GIVEN,
sales_tax_code_id: str | NotGiven = NOT_GIVEN,
terms_id: str | NotGiven = NOT_GIVEN,
transaction_date: str | NotGiven = NOT_GIVEN,
transaction_date: Union[str, date] | NotGiven = NOT_GIVEN,
vendor_address: bill_create_params.VendorAddress | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
7 changes: 4 additions & 3 deletions src/conductor/types/qbd/bill_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from __future__ import annotations

from typing import List, Iterable
from typing import List, Union, Iterable
from datetime import date
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo
Expand Down Expand Up @@ -31,7 +32,7 @@ class BillCreateParams(TypedDict, total=False):

accounts_payable_account_id: Annotated[str, PropertyInfo(alias="accountsPayableAccountId")]

due_date: Annotated[str, PropertyInfo(alias="dueDate")]
due_date: Annotated[Union[str, date], PropertyInfo(alias="dueDate", format="iso8601")]
"""The date when the payment is due, in ISO 8601 format (YYYY-MM-DD)."""

exchange_rate: Annotated[float, PropertyInfo(alias="exchangeRate")]
Expand Down Expand Up @@ -64,7 +65,7 @@ class BillCreateParams(TypedDict, total=False):

terms_id: Annotated[str, PropertyInfo(alias="termsId")]

transaction_date: Annotated[str, PropertyInfo(alias="transactionDate")]
transaction_date: Annotated[Union[str, date], PropertyInfo(alias="transactionDate", format="iso8601")]

vendor_address: Annotated[VendorAddress, PropertyInfo(alias="vendorAddress")]

Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/qbd/test_bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_method_create_with_all_params(self, client: Conductor) -> None:
vendor_id="vendorId",
conductor_end_user_id="end_usr_1234567abcdefg",
accounts_payable_account_id="accountsPayableAccountId",
due_date="dueDate",
due_date=parse_date("2019-12-27"),
exchange_rate=0,
expense_lines=[
{
Expand Down Expand Up @@ -320,7 +320,7 @@ def test_method_create_with_all_params(self, client: Conductor) -> None:
ref_number="CHARGE-1234",
sales_tax_code_id="salesTaxCodeId",
terms_id="termsId",
transaction_date="transactionDate",
transaction_date=parse_date("2019-12-27"),
vendor_address={
"city": "San Francisco",
"country": "United States",
Expand Down Expand Up @@ -479,7 +479,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncConductor)
vendor_id="vendorId",
conductor_end_user_id="end_usr_1234567abcdefg",
accounts_payable_account_id="accountsPayableAccountId",
due_date="dueDate",
due_date=parse_date("2019-12-27"),
exchange_rate=0,
expense_lines=[
{
Expand Down Expand Up @@ -766,7 +766,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncConductor)
ref_number="CHARGE-1234",
sales_tax_code_id="salesTaxCodeId",
terms_id="termsId",
transaction_date="transactionDate",
transaction_date=parse_date("2019-12-27"),
vendor_address={
"city": "San Francisco",
"country": "United States",
Expand Down

0 comments on commit d8b2520

Please sign in to comment.