Skip to content

Commit

Permalink
feat(api): api update (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Oct 17, 2024
1 parent f640907 commit af68f23
Show file tree
Hide file tree
Showing 8 changed files with 64 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: 56
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-9418c3aacd391fe595aef64b09e49dbb7c05b725a1538088cc91fdc9a870211e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-1b6308dde092cfae79814471e405412463b7624dd5013fb35b7993add71a0dd9.yml
6 changes: 4 additions & 2 deletions src/conductor/resources/qbd/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def create(
currency_id: The customer's currency. For built-in currencies, the name and code are standard
international values. For user-defined currencies, all values are editable.
custom_contact_fields: Additional custom contact fields for this customer.
custom_contact_fields: Additional custom contact fields for this customer, such as phone numbers or
email addresses.
customer_type_id: The customer's type, used for categorizing customers into meaningful segments,
such as industry or region.
Expand Down Expand Up @@ -661,7 +662,8 @@ async def create(
currency_id: The customer's currency. For built-in currencies, the name and code are standard
international values. For user-defined currencies, all values are editable.
custom_contact_fields: Additional custom contact fields for this customer.
custom_contact_fields: Additional custom contact fields for this customer, such as phone numbers or
email addresses.
customer_type_id: The customer's type, used for categorizing customers into meaningful segments,
such as industry or region.
Expand Down
6 changes: 4 additions & 2 deletions src/conductor/resources/qbd/vendors.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def create(
currency_id: The vendor's currency. For built-in currencies, the name and code are standard
international values. For user-defined currencies, all values are editable.
custom_contact_fields: Additional custom contact fields for this vendor.
custom_contact_fields: Additional custom contact fields for this vendor, such as phone numbers or email
addresses.
email: The vendor's email address.
Expand Down Expand Up @@ -621,7 +622,8 @@ async def create(
currency_id: The vendor's currency. For built-in currencies, the name and code are standard
international values. For user-defined currencies, all values are editable.
custom_contact_fields: Additional custom contact fields for this vendor.
custom_contact_fields: Additional custom contact fields for this vendor, such as phone numbers or email
addresses.
email: The vendor's email address.
Expand Down
5 changes: 4 additions & 1 deletion src/conductor/types/qbd/customer_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ class CustomerCreateParams(TypedDict, total=False):
"""

custom_contact_fields: Annotated[Iterable[CustomContactField], PropertyInfo(alias="customContactFields")]
"""Additional custom contact fields for this customer."""
"""
Additional custom contact fields for this customer, such as phone numbers or
email addresses.
"""

customer_type_id: Annotated[str, PropertyInfo(alias="customerTypeId")]
"""
Expand Down
35 changes: 23 additions & 12 deletions src/conductor/types/qbd/qbd_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,24 @@ class AdditionalContactCustomContactField(BaseModel):

class AdditionalContact(BaseModel):
id: str
"""
The QuickBooks-assigned identifier for this contact, unique across all contacts.
"""The unique identifier assigned by QuickBooks for this contact.
This ID is unique across all contacts but not across different QuickBooks object
types.
"""

created_at: str = FieldInfo(alias="createdAt")
"""
The date and time when the object was created, in ISO 8601 format
The date and time when this contact was created, in ISO 8601 format
(YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
in QuickBooks.
"""

custom_contact_fields: List[AdditionalContactCustomContactField] = FieldInfo(alias="customContactFields")
"""Additional custom contact fields, such as phone numbers or email addresses."""
"""
Additional custom contact fields for this contact, such as phone numbers or
email addresses.
"""

first_name: Optional[str] = FieldInfo(alias="firstName", default=None)
"""The contact's first name."""
Expand All @@ -76,21 +81,24 @@ class AdditionalContact(BaseModel):
"""The type of object. This value is always `"qbd_contact"`."""

salutation: Optional[str] = None
"""The contact's formal salutation that precedes their name."""
"""
The contact's formal salutation title that precedes their name, such as "Mr.",
"Ms.", or "Dr.".
"""

updated_at: str = FieldInfo(alias="updatedAt")
"""
The date and time when the object was last updated, in ISO 8601 format
The date and time when this contact was last updated, in ISO 8601 format
(YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
in QuickBooks.
"""

version: str
"""The current version identifier of the object that changes with each
modification.
Provide this value when updating the object to verify you are working with the
latest version; mismatched values will fail.
"""
The current version identifier for this contact, which changes each time the
object is modified. When updating this object, you must provide the most recent
`version` to ensure you're working with the latest data; otherwise, the update
will fail. This value is opaque and should not be interpreted.
"""


Expand Down Expand Up @@ -549,7 +557,10 @@ class QbdCustomer(BaseModel):
"""

custom_contact_fields: List[CustomContactField] = FieldInfo(alias="customContactFields")
"""Additional custom contact fields for this customer."""
"""
Additional custom contact fields for this customer, such as phone numbers or
email addresses.
"""

customer_type: Optional[CustomerType] = FieldInfo(alias="customerType", default=None)
"""
Expand Down
35 changes: 23 additions & 12 deletions src/conductor/types/qbd/qbd_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,24 @@ class AdditionalContactCustomContactField(BaseModel):

class AdditionalContact(BaseModel):
id: str
"""
The QuickBooks-assigned identifier for this contact, unique across all contacts.
"""The unique identifier assigned by QuickBooks for this contact.
This ID is unique across all contacts but not across different QuickBooks object
types.
"""

created_at: str = FieldInfo(alias="createdAt")
"""
The date and time when the object was created, in ISO 8601 format
The date and time when this contact was created, in ISO 8601 format
(YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
in QuickBooks.
"""

custom_contact_fields: List[AdditionalContactCustomContactField] = FieldInfo(alias="customContactFields")
"""Additional custom contact fields, such as phone numbers or email addresses."""
"""
Additional custom contact fields for this contact, such as phone numbers or
email addresses.
"""

first_name: Optional[str] = FieldInfo(alias="firstName", default=None)
"""The contact's first name."""
Expand All @@ -72,21 +77,24 @@ class AdditionalContact(BaseModel):
"""The type of object. This value is always `"qbd_contact"`."""

salutation: Optional[str] = None
"""The contact's formal salutation that precedes their name."""
"""
The contact's formal salutation title that precedes their name, such as "Mr.",
"Ms.", or "Dr.".
"""

updated_at: str = FieldInfo(alias="updatedAt")
"""
The date and time when the object was last updated, in ISO 8601 format
The date and time when this contact was last updated, in ISO 8601 format
(YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
in QuickBooks.
"""

version: str
"""The current version identifier of the object that changes with each
modification.
Provide this value when updating the object to verify you are working with the
latest version; mismatched values will fail.
"""
The current version identifier for this contact, which changes each time the
object is modified. When updating this object, you must provide the most recent
`version` to ensure you're working with the latest data; otherwise, the update
will fail. This value is opaque and should not be interpreted.
"""


Expand Down Expand Up @@ -461,7 +469,10 @@ class QbdVendor(BaseModel):
"""

custom_contact_fields: List[CustomContactField] = FieldInfo(alias="customContactFields")
"""Additional custom contact fields for this vendor."""
"""
Additional custom contact fields for this vendor, such as phone numbers or email
addresses.
"""

custom_fields: List[CustomField] = FieldInfo(alias="customFields")
"""The custom fields added by the user to this vendor object as a data extension.
Expand Down
5 changes: 4 additions & 1 deletion src/conductor/types/qbd/vendor_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ class VendorCreateParams(TypedDict, total=False):
"""

custom_contact_fields: Annotated[Iterable[CustomContactField], PropertyInfo(alias="customContactFields")]
"""Additional custom contact fields for this vendor."""
"""
Additional custom contact fields for this vendor, such as phone numbers or email
addresses.
"""

email: str
"""The vendor's email address."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Model(BaseModel):
assert m.foo is True

m = Model.construct(foo="CARD_HOLDER")
assert m.foo is "CARD_HOLDER"
assert m.foo == "CARD_HOLDER"

m = Model.construct(foo={"bar": False})
assert isinstance(m.foo, Submodel1)
Expand Down

0 comments on commit af68f23

Please sign in to comment.