Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xvantage-integration committed Jan 7, 2025
1 parent 9486930 commit 591aa8f
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/OrderCreateV7RequestEndUserInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**state** | **str** | The end user/customer's state. Required for Impulse countries but optional for EMEA countries. | [optional]
**postal_code** | **str** | The end user/customer's zip or postal code. Required for Impulse countries. | [optional]
**country_code** | **str** | The end user/customer's two-character ISO country code. | [optional]
**phone_number** | **int** | The end user/customer's phone number. | [optional]
**phone_number** | **str** | The end user/customer's phone number. | [optional]
**email** | **str** | The end user/customer's email. | [optional]

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/OrderCreateV7RequestResellerInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**state** | **str** | The reseller's state. | [optional]
**postal_code** | **str** | The reseller's zip or postal code. | [optional]
**country_code** | **str** | The reseller's two-character ISO country code. | [optional]
**phone_number** | **int** | The reseller's phone number. | [optional]
**phone_number** | **str** | The reseller's phone number. | [optional]
**email** | **str** | The reseller's email address. | [optional]

## Example
Expand Down
4 changes: 2 additions & 2 deletions test/test_order_create_v7_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> OrderCreateV7Request:
state = '',
postal_code = '',
country_code = '',
phone_number = 56,
phone_number = '',
email = '', ),
end_user_info = xi.sdk.resellers.models.order_create_v7_request_end_user_info.order_create_v7_request_endUserInfo(
end_user_id = '',
Expand All @@ -65,7 +65,7 @@ def make_instance(self, include_optional) -> OrderCreateV7Request:
state = '',
postal_code = '',
country_code = '',
phone_number = 56,
phone_number = '',
email = '', ),
ship_to_info = xi.sdk.resellers.models.order_create_v7_request_ship_to_info.order_create_v7_request_shipToInfo(
address_id = '',
Expand Down
2 changes: 1 addition & 1 deletion test/test_order_create_v7_request_end_user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def make_instance(self, include_optional) -> OrderCreateV7RequestEndUserInfo:
state = '',
postal_code = '',
country_code = '',
phone_number = 56,
phone_number = '',
email = ''
)
else:
Expand Down
2 changes: 1 addition & 1 deletion test/test_order_create_v7_request_reseller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def make_instance(self, include_optional) -> OrderCreateV7RequestResellerInfo:
state = '',
postal_code = '',
country_code = '',
phone_number = 56,
phone_number = '',
email = ''
)
else:
Expand Down
49 changes: 47 additions & 2 deletions xi/sdk/resellers/models/order_create_v7_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class OrderCreateV7Request(BaseModel):
end_user_info: Optional[OrderCreateV7RequestEndUserInfo] = Field(default=None, alias="endUserInfo")
ship_to_info: Optional[OrderCreateV7RequestShipToInfo] = Field(default=None, alias="shipToInfo")
shipment_details: Optional[OrderCreateV7RequestShipmentDetails] = Field(default=None, alias="shipmentDetails")
additional_attributes: Optional[List[OrderCreateV7RequestAdditionalAttributesInner]] = Field(default=None, description="Shipment-level additional attributes.", alias="additionalAttributes")
vmf_additional_attributes: Optional[List[OrderCreateV7RequestVmfAdditionalAttributesInner]] = Field(default=None, description="The object containing the list of fields required at a header level by the vendor.", alias="vmfAdditionalAttributes")
additional_attributes: Optional[List[Optional[OrderCreateV7RequestAdditionalAttributesInner]]] = Field(default=None, description="Shipment-level additional attributes.", alias="additionalAttributes")
vmf_additional_attributes: Optional[List[Optional[OrderCreateV7RequestVmfAdditionalAttributesInner]]] = Field(default=None, description="The object containing the list of fields required at a header level by the vendor.", alias="vmfAdditionalAttributes")
lines: Optional[List[OrderCreateV7RequestLinesInner]] = None
__properties: ClassVar[List[str]] = ["quoteNumber", "customerOrderNumber", "endCustomerOrderNumber", "notes", "billToAddressId", "specialBidNumber", "acceptBackOrder", "vendAuthNumber", "resellerInfo", "endUserInfo", "shipToInfo", "shipmentDetails", "additionalAttributes", "vmfAdditionalAttributes", "lines"]

Expand Down Expand Up @@ -123,11 +123,56 @@ def to_dict(self) -> Dict[str, Any]:
if _item_lines:
_items.append(_item_lines.to_dict())
_dict['lines'] = _items
# set to None if quote_number (nullable) is None
# and model_fields_set contains the field
if self.quote_number is None and "quote_number" in self.model_fields_set:
_dict['quoteNumber'] = None

# set to None if end_customer_order_number (nullable) is None
# and model_fields_set contains the field
if self.end_customer_order_number is None and "end_customer_order_number" in self.model_fields_set:
_dict['endCustomerOrderNumber'] = None

# set to None if special_bid_number (nullable) is None
# and model_fields_set contains the field
if self.special_bid_number is None and "special_bid_number" in self.model_fields_set:
_dict['specialBidNumber'] = None

# set to None if accept_back_order (nullable) is None
# and model_fields_set contains the field
if self.accept_back_order is None and "accept_back_order" in self.model_fields_set:
_dict['acceptBackOrder'] = None

# set to None if vend_auth_number (nullable) is None
# and model_fields_set contains the field
if self.vend_auth_number is None and "vend_auth_number" in self.model_fields_set:
_dict['vendAuthNumber'] = None

# set to None if reseller_info (nullable) is None
# and model_fields_set contains the field
if self.reseller_info is None and "reseller_info" in self.model_fields_set:
_dict['resellerInfo'] = None

# set to None if ship_to_info (nullable) is None
# and model_fields_set contains the field
if self.ship_to_info is None and "ship_to_info" in self.model_fields_set:
_dict['shipToInfo'] = None

# set to None if shipment_details (nullable) is None
# and model_fields_set contains the field
if self.shipment_details is None and "shipment_details" in self.model_fields_set:
_dict['shipmentDetails'] = None

# set to None if additional_attributes (nullable) is None
# and model_fields_set contains the field
if self.additional_attributes is None and "additional_attributes" in self.model_fields_set:
_dict['additionalAttributes'] = None

# set to None if vmf_additional_attributes (nullable) is None
# and model_fields_set contains the field
if self.vmf_additional_attributes is None and "vmf_additional_attributes" in self.model_fields_set:
_dict['vmfAdditionalAttributes'] = None

return _dict

@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if attribute_name (nullable) is None
# and model_fields_set contains the field
if self.attribute_name is None and "attribute_name" in self.model_fields_set:
_dict['attributeName'] = None

# set to None if attribute_value (nullable) is None
# and model_fields_set contains the field
if self.attribute_value is None and "attribute_value" in self.model_fields_set:
_dict['attributeValue'] = None

return _dict

@classmethod
Expand Down
59 changes: 57 additions & 2 deletions xi/sdk/resellers/models/order_create_v7_request_end_user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
Expand All @@ -36,7 +36,7 @@ class OrderCreateV7RequestEndUserInfo(BaseModel):
state: Optional[Annotated[str, Field(strict=True, max_length=3)]] = Field(default=None, description="The end user/customer's state. Required for Impulse countries but optional for EMEA countries.")
postal_code: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The end user/customer's zip or postal code. Required for Impulse countries.", alias="postalCode")
country_code: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The end user/customer's two-character ISO country code.", alias="countryCode")
phone_number: Optional[StrictInt] = Field(default=None, description="The end user/customer's phone number.", alias="phoneNumber")
phone_number: Optional[StrictStr] = Field(default=None, description="The end user/customer's phone number.", alias="phoneNumber")
email: Optional[StrictStr] = Field(default=None, description="The end user/customer's email.")
__properties: ClassVar[List[str]] = ["endUserId", "contact", "companyName", "addressLine1", "addressLine2", "city", "state", "postalCode", "countryCode", "phoneNumber", "email"]

Expand Down Expand Up @@ -79,6 +79,61 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if end_user_id (nullable) is None
# and model_fields_set contains the field
if self.end_user_id is None and "end_user_id" in self.model_fields_set:
_dict['endUserId'] = None

# set to None if contact (nullable) is None
# and model_fields_set contains the field
if self.contact is None and "contact" in self.model_fields_set:
_dict['contact'] = None

# set to None if company_name (nullable) is None
# and model_fields_set contains the field
if self.company_name is None and "company_name" in self.model_fields_set:
_dict['companyName'] = None

# set to None if address_line1 (nullable) is None
# and model_fields_set contains the field
if self.address_line1 is None and "address_line1" in self.model_fields_set:
_dict['addressLine1'] = None

# set to None if address_line2 (nullable) is None
# and model_fields_set contains the field
if self.address_line2 is None and "address_line2" in self.model_fields_set:
_dict['addressLine2'] = None

# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None

# set to None if state (nullable) is None
# and model_fields_set contains the field
if self.state is None and "state" in self.model_fields_set:
_dict['state'] = None

# set to None if postal_code (nullable) is None
# and model_fields_set contains the field
if self.postal_code is None and "postal_code" in self.model_fields_set:
_dict['postalCode'] = None

# set to None if country_code (nullable) is None
# and model_fields_set contains the field
if self.country_code is None and "country_code" in self.model_fields_set:
_dict['countryCode'] = None

# set to None if phone_number (nullable) is None
# and model_fields_set contains the field
if self.phone_number is None and "phone_number" in self.model_fields_set:
_dict['phoneNumber'] = None

# set to None if email (nullable) is None
# and model_fields_set contains the field
if self.email is None and "email" in self.model_fields_set:
_dict['email'] = None

return _dict

@classmethod
Expand Down
35 changes: 35 additions & 0 deletions xi/sdk/resellers/models/order_create_v7_request_lines_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,41 @@ def to_dict(self) -> Dict[str, Any]:
if _item_vmf_additional_attributes_lines:
_items.append(_item_vmf_additional_attributes_lines.to_dict())
_dict['vmfAdditionalAttributesLines'] = _items
# set to None if ingram_part_number (nullable) is None
# and model_fields_set contains the field
if self.ingram_part_number is None and "ingram_part_number" in self.model_fields_set:
_dict['ingramPartNumber'] = None

# set to None if vendor_part_number (nullable) is None
# and model_fields_set contains the field
if self.vendor_part_number is None and "vendor_part_number" in self.model_fields_set:
_dict['vendorPartNumber'] = None

# set to None if unit_price (nullable) is None
# and model_fields_set contains the field
if self.unit_price is None and "unit_price" in self.model_fields_set:
_dict['unitPrice'] = None

# set to None if special_bid_number (nullable) is None
# and model_fields_set contains the field
if self.special_bid_number is None and "special_bid_number" in self.model_fields_set:
_dict['specialBidNumber'] = None

# set to None if end_user_price (nullable) is None
# and model_fields_set contains the field
if self.end_user_price is None and "end_user_price" in self.model_fields_set:
_dict['endUserPrice'] = None

# set to None if notes (nullable) is None
# and model_fields_set contains the field
if self.notes is None and "notes" in self.model_fields_set:
_dict['notes'] = None

# set to None if end_user_info (nullable) is None
# and model_fields_set contains the field
if self.end_user_info is None and "end_user_info" in self.model_fields_set:
_dict['endUserInfo'] = None

return _dict

@classmethod
Expand Down
59 changes: 57 additions & 2 deletions xi/sdk/resellers/models/order_create_v7_request_reseller_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
Expand All @@ -36,7 +36,7 @@ class OrderCreateV7RequestResellerInfo(BaseModel):
state: Optional[StrictStr] = Field(default=None, description="The reseller's state.")
postal_code: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The reseller's zip or postal code.", alias="postalCode")
country_code: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, description="The reseller's two-character ISO country code.", alias="countryCode")
phone_number: Optional[StrictInt] = Field(default=None, description="The reseller's phone number.", alias="phoneNumber")
phone_number: Optional[StrictStr] = Field(default=None, description="The reseller's phone number.", alias="phoneNumber")
email: Optional[StrictStr] = Field(default=None, description="The reseller's email address.")
__properties: ClassVar[List[str]] = ["resellerId", "companyName", "contact", "addressLine1", "addressLine2", "city", "state", "postalCode", "countryCode", "phoneNumber", "email"]

Expand Down Expand Up @@ -79,6 +79,61 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if reseller_id (nullable) is None
# and model_fields_set contains the field
if self.reseller_id is None and "reseller_id" in self.model_fields_set:
_dict['resellerId'] = None

# set to None if company_name (nullable) is None
# and model_fields_set contains the field
if self.company_name is None and "company_name" in self.model_fields_set:
_dict['companyName'] = None

# set to None if contact (nullable) is None
# and model_fields_set contains the field
if self.contact is None and "contact" in self.model_fields_set:
_dict['contact'] = None

# set to None if address_line1 (nullable) is None
# and model_fields_set contains the field
if self.address_line1 is None and "address_line1" in self.model_fields_set:
_dict['addressLine1'] = None

# set to None if address_line2 (nullable) is None
# and model_fields_set contains the field
if self.address_line2 is None and "address_line2" in self.model_fields_set:
_dict['addressLine2'] = None

# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None

# set to None if state (nullable) is None
# and model_fields_set contains the field
if self.state is None and "state" in self.model_fields_set:
_dict['state'] = None

# set to None if postal_code (nullable) is None
# and model_fields_set contains the field
if self.postal_code is None and "postal_code" in self.model_fields_set:
_dict['postalCode'] = None

# set to None if country_code (nullable) is None
# and model_fields_set contains the field
if self.country_code is None and "country_code" in self.model_fields_set:
_dict['countryCode'] = None

# set to None if phone_number (nullable) is None
# and model_fields_set contains the field
if self.phone_number is None and "phone_number" in self.model_fields_set:
_dict['phoneNumber'] = None

# set to None if email (nullable) is None
# and model_fields_set contains the field
if self.email is None and "email" in self.model_fields_set:
_dict['email'] = None

return _dict

@classmethod
Expand Down
Loading

0 comments on commit 591aa8f

Please sign in to comment.