Skip to content

Commit

Permalink
feat(api): api update (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 20, 2024
1 parent bae2c8d commit e6a2a7b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 32 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: 113
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-e19bfdca4eaab58e520be6d6900eeb0b7bdf42c50c51fbb2146102d3d511163b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-4481860ebba66b701b2e180e0b19be433346da7cc66fbfba305da3dcfb01a590.yml
4 changes: 2 additions & 2 deletions src/conductor/resources/qbd/journal_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def update(
exchange_rate: float | NotGiven = NOT_GIVEN,
is_adjustment: bool | NotGiven = NOT_GIVEN,
is_amounts_entered_in_home_currency: bool | NotGiven = NOT_GIVEN,
lines: journal_entry_update_params.Lines | NotGiven = NOT_GIVEN,
lines: Iterable[journal_entry_update_params.Line] | NotGiven = NOT_GIVEN,
ref_number: str | NotGiven = NOT_GIVEN,
transaction_date: Union[str, date] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -597,7 +597,7 @@ async def update(
exchange_rate: float | NotGiven = NOT_GIVEN,
is_adjustment: bool | NotGiven = NOT_GIVEN,
is_amounts_entered_in_home_currency: bool | NotGiven = NOT_GIVEN,
lines: journal_entry_update_params.Lines | NotGiven = NOT_GIVEN,
lines: Iterable[journal_entry_update_params.Line] | NotGiven = NOT_GIVEN,
ref_number: str | NotGiven = NOT_GIVEN,
transaction_date: Union[str, date] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
4 changes: 2 additions & 2 deletions src/conductor/resources/qbd/receive_payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def create(
receive-payment is applied to the oldest outstanding transaction for the
customer-job. When `false`, QuickBooks records the payment but does not apply it
to any specific transaction, causing the amount to appear as a credit on the
customer-jobs next transaction.
customer-job's next transaction.
**IMPORTANT**: You must specify either `isAutoApply` or `applyToTransactions`
when creating a receive-payment, but never both.
Expand Down Expand Up @@ -605,7 +605,7 @@ async def create(
receive-payment is applied to the oldest outstanding transaction for the
customer-job. When `false`, QuickBooks records the payment but does not apply it
to any specific transaction, causing the amount to appear as a credit on the
customer-jobs next transaction.
customer-job's next transaction.
**IMPORTANT**: You must specify either `isAutoApply` or `applyToTransactions`
when creating a receive-payment, but never both.
Expand Down
8 changes: 4 additions & 4 deletions src/conductor/types/qbd/journal_entry_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from __future__ import annotations

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

from ..._utils import PropertyInfo

__all__ = ["JournalEntryUpdateParams", "Lines"]
__all__ = ["JournalEntryUpdateParams", "Line"]


class JournalEntryUpdateParams(TypedDict, total=False):
Expand Down Expand Up @@ -54,7 +54,7 @@ class JournalEntryUpdateParams(TypedDict, total=False):
in the home currency regardless of the `currency` field.
"""

lines: Lines
lines: Iterable[Line]
"""The journal entry's credit and debit lines.
**IMPORTANT:** When updating journal entries, you must include ALL existing
Expand All @@ -75,7 +75,7 @@ class JournalEntryUpdateParams(TypedDict, total=False):
"""The date of this journal entry, in ISO 8601 format (YYYY-MM-DD)."""


class Lines(TypedDict, total=False):
class Line(TypedDict, total=False):
id: Required[str]
"""
The QuickBooks-assigned unique identifier of an existing journal line you wish
Expand Down
2 changes: 1 addition & 1 deletion src/conductor/types/qbd/receive_payment_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ReceivePaymentCreateParams(TypedDict, total=False):
receive-payment is applied to the oldest outstanding transaction for the
customer-job. When `false`, QuickBooks records the payment but does not apply it
to any specific transaction, causing the amount to appear as a credit on the
customer-jobs next transaction.
customer-job's next transaction.
**IMPORTANT**: You must specify either `isAutoApply` or `applyToTransactions`
when creating a receive-payment, but never both.
Expand Down
48 changes: 26 additions & 22 deletions tests/api_resources/qbd/test_journal_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,19 @@ def test_method_update_with_all_params(self, client: Conductor) -> None:
exchange_rate=1.2345,
is_adjustment=False,
is_amounts_entered_in_home_currency=False,
lines={
"id": "456DEF-1234567890",
"account_id": "80000001-1234567890",
"amount": "1000.00",
"billing_status": "billable",
"class_id": "80000001-1234567890",
"entity_id": "80000001-1234567890",
"journal_line_type": "debit",
"memo": "Allocated funds for office lease payment",
"sales_tax_item_id": "80000010-1234567890",
},
lines=[
{
"id": "456DEF-1234567890",
"account_id": "80000001-1234567890",
"amount": "1000.00",
"billing_status": "billable",
"class_id": "80000001-1234567890",
"entity_id": "80000001-1234567890",
"journal_line_type": "debit",
"memo": "Allocated funds for office lease payment",
"sales_tax_item_id": "80000010-1234567890",
}
],
ref_number="JE-1234",
transaction_date=parse_date("2019-12-27"),
)
Expand Down Expand Up @@ -397,17 +399,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncConductor)
exchange_rate=1.2345,
is_adjustment=False,
is_amounts_entered_in_home_currency=False,
lines={
"id": "456DEF-1234567890",
"account_id": "80000001-1234567890",
"amount": "1000.00",
"billing_status": "billable",
"class_id": "80000001-1234567890",
"entity_id": "80000001-1234567890",
"journal_line_type": "debit",
"memo": "Allocated funds for office lease payment",
"sales_tax_item_id": "80000010-1234567890",
},
lines=[
{
"id": "456DEF-1234567890",
"account_id": "80000001-1234567890",
"amount": "1000.00",
"billing_status": "billable",
"class_id": "80000001-1234567890",
"entity_id": "80000001-1234567890",
"journal_line_type": "debit",
"memo": "Allocated funds for office lease payment",
"sales_tax_item_id": "80000010-1234567890",
}
],
ref_number="JE-1234",
transaction_date=parse_date("2019-12-27"),
)
Expand Down

0 comments on commit e6a2a7b

Please sign in to comment.