Skip to content

Commit

Permalink
feat(api): api update (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and DannyNemer committed Oct 18, 2024
1 parent 7f3f28f commit c8754fc
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 87 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: 56
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-84d1c45b95d43a335421cd15de601c5f728fb0dfa5aad629ab5abe504a62f419.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-1420bc561460d22dc5f05dea6e1fbf208cf4f57788f7f86a65d423186238177c.yml
44 changes: 21 additions & 23 deletions src/conductor/types/qbd/non_inventory_item_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,43 +97,43 @@ class Barcode(TypedDict, total=False):

class SalesAndPurchaseDetails(TypedDict, total=False):
expense_account_id: Annotated[str, PropertyInfo(alias="expenseAccountId")]
"""The expense account to use when purchasing this item."""
"""The expense account used to track expenses from purchases of this item."""

income_account_id: Annotated[str, PropertyInfo(alias="incomeAccountId")]
"""The income account to use when selling this item."""
"""The income account used to track revenue from sales of this item."""

preferred_vendor_id: Annotated[str, PropertyInfo(alias="preferredVendorId")]
"""The preferred vendor for this item."""
"""The preferred vendor from whom this item is typically purchased."""

purchase_cost: Annotated[str, PropertyInfo(alias="purchaseCost")]
"""The cost of this item when purchased, represented as a decimal string.
This is the amount the business expects to pay when ordering or buying this
item, or the amount that was actually paid.
"""
The cost at which this item is purchased from vendors, represented as a decimal
string.
"""

purchase_description: Annotated[str, PropertyInfo(alias="purchaseDescription")]
"""
The description that appears on purchase forms (e.g., checks, bills, item
receipts) when this item is bought. For fixed assets, this describes the item as
it was when purchased.
The description of this item that appears on purchase forms (e.g., checks,
bills, item receipts) when it is ordered or bought from vendors.
"""

purchase_tax_code_id: Annotated[str, PropertyInfo(alias="purchaseTaxCodeId")]
"""The tax code to use when purchasing this item.
"""The tax code applied to purchases of this item.
Applicable in regions where purchase taxes are used, such as Canada or the UK.
"""

sales_description: Annotated[str, PropertyInfo(alias="salesDescription")]
"""
The description that appears on sales forms (e.g., invoices, sales receipts)
when selling this item. For fixed assets, this describes the sale of the asset
for accounting purposes.
The description of this item that appears on sales forms (e.g., invoices, sales
receipts) when sold to customers.
"""

sales_price: Annotated[str, PropertyInfo(alias="salesPrice")]
"""The price to charge for this item, represented as a decimal string."""
"""
The price at which this item is sold to customers, represented as a decimal
string.
"""


class SalesOrPurchaseDetails(TypedDict, total=False):
Expand All @@ -145,19 +145,17 @@ class SalesOrPurchaseDetails(TypedDict, total=False):
"""

description: str
"""
A description of the item that appears on sales or purchase forms, depending on
whether the item is being sold or purchased.
"""
"""A description of this item."""

price: str
"""
The purchase price or sales price of this item, represented as a decimal string.
The price at which this item is purchased or sold, represented as a decimal
string.
"""

price_percentage: Annotated[str, PropertyInfo(alias="pricePercentage")]
"""
The price expressed as a percentage, used instead of `price` when the item's
cost is calculated as a percentage of another amount. For example, a service
item that costs a percentage of another item's price.
The price of this item expressed as a percentage, used instead of `price` when
the item's cost is calculated as a percentage of another amount. For example, a
service item that costs a percentage of another item's price.
"""
44 changes: 21 additions & 23 deletions src/conductor/types/qbd/service_item_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,43 +92,43 @@ class Barcode(TypedDict, total=False):

class SalesAndPurchaseDetails(TypedDict, total=False):
expense_account_id: Annotated[str, PropertyInfo(alias="expenseAccountId")]
"""The expense account to use when purchasing this item."""
"""The expense account used to track expenses from purchases of this item."""

income_account_id: Annotated[str, PropertyInfo(alias="incomeAccountId")]
"""The income account to use when selling this item."""
"""The income account used to track revenue from sales of this item."""

preferred_vendor_id: Annotated[str, PropertyInfo(alias="preferredVendorId")]
"""The preferred vendor for this item."""
"""The preferred vendor from whom this item is typically purchased."""

purchase_cost: Annotated[str, PropertyInfo(alias="purchaseCost")]
"""The cost of this item when purchased, represented as a decimal string.
This is the amount the business expects to pay when ordering or buying this
item, or the amount that was actually paid.
"""
The cost at which this item is purchased from vendors, represented as a decimal
string.
"""

purchase_description: Annotated[str, PropertyInfo(alias="purchaseDescription")]
"""
The description that appears on purchase forms (e.g., checks, bills, item
receipts) when this item is bought. For fixed assets, this describes the item as
it was when purchased.
The description of this item that appears on purchase forms (e.g., checks,
bills, item receipts) when it is ordered or bought from vendors.
"""

purchase_tax_code_id: Annotated[str, PropertyInfo(alias="purchaseTaxCodeId")]
"""The tax code to use when purchasing this item.
"""The tax code applied to purchases of this item.
Applicable in regions where purchase taxes are used, such as Canada or the UK.
"""

sales_description: Annotated[str, PropertyInfo(alias="salesDescription")]
"""
The description that appears on sales forms (e.g., invoices, sales receipts)
when selling this item. For fixed assets, this describes the sale of the asset
for accounting purposes.
The description of this item that appears on sales forms (e.g., invoices, sales
receipts) when sold to customers.
"""

sales_price: Annotated[str, PropertyInfo(alias="salesPrice")]
"""The price to charge for this item, represented as a decimal string."""
"""
The price at which this item is sold to customers, represented as a decimal
string.
"""


class SalesOrPurchaseDetails(TypedDict, total=False):
Expand All @@ -140,19 +140,17 @@ class SalesOrPurchaseDetails(TypedDict, total=False):
"""

description: str
"""
A description of the item that appears on sales or purchase forms, depending on
whether the item is being sold or purchased.
"""
"""A description of this item."""

price: str
"""
The purchase price or sales price of this item, represented as a decimal string.
The price at which this item is purchased or sold, represented as a decimal
string.
"""

price_percentage: Annotated[str, PropertyInfo(alias="pricePercentage")]
"""
The price expressed as a percentage, used instead of `price` when the item's
cost is calculated as a percentage of another amount. For example, a service
item that costs a percentage of another item's price.
The price of this item expressed as a percentage, used instead of `price` when
the item's cost is calculated as a percentage of another amount. For example, a
service item that costs a percentage of another item's price.
"""
40 changes: 20 additions & 20 deletions tests/api_resources/qbd/test_non_inventory_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ def test_method_create_with_all_params(self, client: Conductor) -> None:
manufacturer_part_number="MPN-123456",
parent_id="80000002-1234567890",
sales_and_purchase_details={
"expense_account_id": "80000003-1234567890",
"income_account_id": "80000001-1234567890",
"preferred_vendor_id": "80000004-1234567890",
"purchase_cost": "80.00",
"purchase_description": "Wireless Mouse - Model X200",
"purchase_tax_code_id": "80000002-1234567890",
"sales_description": "Wireless Mouse - Model X200",
"sales_price": "100.00",
"expense_account_id": "80000006-1234567890",
"income_account_id": "80000005-1234567890",
"preferred_vendor_id": "80000008-1234567890",
"purchase_cost": "15.75",
"purchase_description": "Bulk purchase of steel bolts for inventory",
"purchase_tax_code_id": "80000006-1234567890",
"sales_description": "High-quality steel bolts suitable for construction",
"sales_price": "19.99",
},
sales_or_purchase_details={
"account_id": "80000005-1234567890",
"account_id": "80000001-1234567890",
"description": "Hourly Consulting Service",
"price": "150.00",
"price": "19.99",
"price_percentage": "10.5",
},
sales_tax_code_id="80000004-1234567890",
Expand Down Expand Up @@ -209,19 +209,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncConductor)
manufacturer_part_number="MPN-123456",
parent_id="80000002-1234567890",
sales_and_purchase_details={
"expense_account_id": "80000003-1234567890",
"income_account_id": "80000001-1234567890",
"preferred_vendor_id": "80000004-1234567890",
"purchase_cost": "80.00",
"purchase_description": "Wireless Mouse - Model X200",
"purchase_tax_code_id": "80000002-1234567890",
"sales_description": "Wireless Mouse - Model X200",
"sales_price": "100.00",
"expense_account_id": "80000006-1234567890",
"income_account_id": "80000005-1234567890",
"preferred_vendor_id": "80000008-1234567890",
"purchase_cost": "15.75",
"purchase_description": "Bulk purchase of steel bolts for inventory",
"purchase_tax_code_id": "80000006-1234567890",
"sales_description": "High-quality steel bolts suitable for construction",
"sales_price": "19.99",
},
sales_or_purchase_details={
"account_id": "80000005-1234567890",
"account_id": "80000001-1234567890",
"description": "Hourly Consulting Service",
"price": "150.00",
"price": "19.99",
"price_percentage": "10.5",
},
sales_tax_code_id="80000004-1234567890",
Expand Down
40 changes: 20 additions & 20 deletions tests/api_resources/qbd/test_service_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ def test_method_create_with_all_params(self, client: Conductor) -> None:
is_active=True,
parent_id="80000002-1234567890",
sales_and_purchase_details={
"expense_account_id": "80000003-1234567890",
"income_account_id": "80000001-1234567890",
"preferred_vendor_id": "80000004-1234567890",
"purchase_cost": "80.00",
"purchase_description": "Wireless Mouse - Model X200",
"purchase_tax_code_id": "80000002-1234567890",
"sales_description": "Wireless Mouse - Model X200",
"sales_price": "100.00",
"expense_account_id": "80000006-1234567890",
"income_account_id": "80000005-1234567890",
"preferred_vendor_id": "80000008-1234567890",
"purchase_cost": "15.75",
"purchase_description": "Bulk purchase of steel bolts for inventory",
"purchase_tax_code_id": "80000006-1234567890",
"sales_description": "High-quality steel bolts suitable for construction",
"sales_price": "19.99",
},
sales_or_purchase_details={
"account_id": "80000005-1234567890",
"account_id": "80000001-1234567890",
"description": "Hourly Consulting Service",
"price": "150.00",
"price": "19.99",
"price_percentage": "10.5",
},
sales_tax_code_id="80000004-1234567890",
Expand Down Expand Up @@ -207,19 +207,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncConductor)
is_active=True,
parent_id="80000002-1234567890",
sales_and_purchase_details={
"expense_account_id": "80000003-1234567890",
"income_account_id": "80000001-1234567890",
"preferred_vendor_id": "80000004-1234567890",
"purchase_cost": "80.00",
"purchase_description": "Wireless Mouse - Model X200",
"purchase_tax_code_id": "80000002-1234567890",
"sales_description": "Wireless Mouse - Model X200",
"sales_price": "100.00",
"expense_account_id": "80000006-1234567890",
"income_account_id": "80000005-1234567890",
"preferred_vendor_id": "80000008-1234567890",
"purchase_cost": "15.75",
"purchase_description": "Bulk purchase of steel bolts for inventory",
"purchase_tax_code_id": "80000006-1234567890",
"sales_description": "High-quality steel bolts suitable for construction",
"sales_price": "19.99",
},
sales_or_purchase_details={
"account_id": "80000005-1234567890",
"account_id": "80000001-1234567890",
"description": "Hourly Consulting Service",
"price": "150.00",
"price": "19.99",
"price_percentage": "10.5",
},
sales_tax_code_id="80000004-1234567890",
Expand Down

0 comments on commit c8754fc

Please sign in to comment.