Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xvantage-integration committed Jan 3, 2025
1 parent 35a44e6 commit 23cde72
Show file tree
Hide file tree
Showing 18 changed files with 410 additions and 0 deletions.
20 changes: 20 additions & 0 deletions xi/sdk/resellers/models/price_and_availability_response_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,21 @@ def to_dict(self) -> Dict[str, Any]:
if _item_subscription_price:
_items.append(_item_subscription_price.to_dict())
_dict['subscriptionPrice'] = _items
# set to None if product_status_code (nullable) is None
# and model_fields_set contains the field
if self.product_status_code is None and "product_status_code" in self.model_fields_set:
_dict['productStatusCode'] = None

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

# 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:
Expand All @@ -151,6 +166,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.customer_part_number is None and "customer_part_number" in self.model_fields_set:
_dict['customerPartNumber'] = None

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

# set to None if part_number_type (nullable) is None
# and model_fields_set contains the field
if self.part_number_type is None and "part_number_type" in self.model_fields_set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]:
if _item_availability_by_warehouse:
_items.append(_item_availability_by_warehouse.to_dict())
_dict['availabilityByWarehouse'] = _items
# set to None if total_availability (nullable) is None
# and model_fields_set contains the field
if self.total_availability is None and "total_availability" in self.model_fields_set:
_dict['totalAvailability'] = None

# set to None if availability_by_warehouse (nullable) is None
# and model_fields_set contains the field
if self.availability_by_warehouse is None and "availability_by_warehouse" in self.model_fields_set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,36 @@ def to_dict(self) -> Dict[str, Any]:
if _item_back_order_info:
_items.append(_item_back_order_info.to_dict())
_dict['backOrderInfo'] = _items
# set to None if location (nullable) is None
# and model_fields_set contains the field
if self.location is None and "location" in self.model_fields_set:
_dict['location'] = None

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

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

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

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

# set to None if quantity_on_order (nullable) is None
# and model_fields_set contains the field
if self.quantity_on_order is None and "quantity_on_order" in self.model_fields_set:
_dict['quantityOnOrder'] = 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 quantity (nullable) is None
# and model_fields_set contains the field
if self.quantity is None and "quantity" in self.model_fields_set:
_dict['quantity'] = None

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

return _dict

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

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

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

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

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

return _dict

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

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

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

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

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

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

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

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

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

return _dict

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

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

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

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

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

return _dict

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

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

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

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

return _dict

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

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

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

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

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

return _dict

@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,31 @@ def to_dict(self) -> Dict[str, Any]:
if _item_options:
_items.append(_item_options.to_dict())
_dict['options'] = _items
# set to None if index (nullable) is None
# and model_fields_set contains the field
if self.index is None and "index" in self.model_fields_set:
_dict['index'] = None

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

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

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

# set to None if plan_description (nullable) is None
# and model_fields_set contains the field
if self.plan_description is None and "plan_description" in self.model_fields_set:
_dict['planDescription'] = 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 billing_period_unit (nullable) is None
# and model_fields_set contains the field
if self.billing_period_unit is None and "billing_period_unit" in self.model_fields_set:
_dict['billingPeriodUnit'] = None

# set to None if billing_period (nullable) is None
# and model_fields_set contains the field
if self.billing_period is None and "billing_period" in self.model_fields_set:
_dict['billingPeriod'] = 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 group_name (nullable) is None
# and model_fields_set contains the field
if self.group_name is None and "group_name" in self.model_fields_set:
_dict['groupName'] = None

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

return _dict

@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,46 @@ def to_dict(self) -> Dict[str, Any]:
if _item_fees:
_items.append(_item_fees.to_dict())
_dict['fees'] = _items
# set to None if resource_id (nullable) is None
# and model_fields_set contains the field
if self.resource_id is None and "resource_id" in self.model_fields_set:
_dict['resourceId'] = None

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

# set to None if resource_name (nullable) is None
# and model_fields_set contains the field
if self.resource_name is None and "resource_name" in self.model_fields_set:
_dict['resourceName'] = 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 min_units (nullable) is None
# and model_fields_set contains the field
if self.min_units is None and "min_units" in self.model_fields_set:
_dict['minUnits'] = None

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

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

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

return _dict

@classmethod
Expand Down
Loading

0 comments on commit 23cde72

Please sign in to comment.