convexity-api-client 0.21.0.dev332__py3-none-any.whl → 0.21.0.dev336__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. convexity_api_client/api/v1/crm_create_sales_rep.py +186 -0
  2. convexity_api_client/api/v1/crm_delete_sales_rep.py +182 -0
  3. convexity_api_client/api/v1/crm_get_sales_rep.py +182 -0
  4. convexity_api_client/api/v1/crm_list_sales_reps.py +236 -0
  5. convexity_api_client/api/v1/crm_update_sales_rep.py +202 -0
  6. convexity_api_client/api/v1/inventory_assign_item_warehouse_location.py +206 -0
  7. convexity_api_client/api/v1/inventory_create_cost_list_vendor_assignment.py +202 -0
  8. convexity_api_client/api/v1/inventory_create_price_list_channel_assignment.py +202 -0
  9. convexity_api_client/api/v1/inventory_create_price_list_customer_assignment.py +202 -0
  10. convexity_api_client/api/v1/inventory_delete_cost_list_vendor_assignment.py +196 -0
  11. convexity_api_client/api/v1/inventory_delete_price_list_channel_assignment.py +196 -0
  12. convexity_api_client/api/v1/inventory_delete_price_list_customer_assignment.py +196 -0
  13. convexity_api_client/api/v1/inventory_list_cost_list_vendor_assignments.py +202 -0
  14. convexity_api_client/api/v1/inventory_list_item_cost_list_entries.py +182 -0
  15. convexity_api_client/api/v1/inventory_list_item_price_list_entries.py +182 -0
  16. convexity_api_client/api/v1/inventory_list_item_warehouse_locations.py +212 -0
  17. convexity_api_client/api/v1/inventory_list_price_list_channel_assignments.py +202 -0
  18. convexity_api_client/api/v1/inventory_list_price_list_customer_assignments.py +202 -0
  19. convexity_api_client/api/v1/inventory_list_warehouse_location_items.py +226 -0
  20. convexity_api_client/api/v1/inventory_update_cost_list_vendor_assignment.py +216 -0
  21. convexity_api_client/api/v1/inventory_update_price_list_channel_assignment.py +216 -0
  22. convexity_api_client/api/v1/inventory_update_price_list_customer_assignment.py +216 -0
  23. convexity_api_client/api/v1/purchasing_create_item_sourcing.py +190 -0
  24. convexity_api_client/api/v1/purchasing_deactivate_item_sourcing.py +182 -0
  25. convexity_api_client/api/v1/purchasing_get_item_sourcing_options.py +166 -0
  26. convexity_api_client/api/v1/purchasing_list_item_sourcing.py +382 -0
  27. convexity_api_client/api/v1/purchasing_update_item_sourcing.py +202 -0
  28. convexity_api_client/api/v1/purchasing_upsert_item_sourcing_cost.py +206 -0
  29. convexity_api_client/api/v1/sales_list_orders.py +20 -0
  30. convexity_api_client/api/v1/warehouse_workflow_cancel_pick_pack_ship.py +182 -0
  31. convexity_api_client/api/v1/warehouse_workflow_complete_pick_pack_ship_pack.py +202 -0
  32. convexity_api_client/api/v1/warehouse_workflow_complete_pick_pack_ship_pick.py +202 -0
  33. convexity_api_client/api/v1/warehouse_workflow_create_pick_pack_ship.py +186 -0
  34. convexity_api_client/api/v1/warehouse_workflow_generate_pick_pack_ship_pdf.py +188 -0
  35. convexity_api_client/api/v1/warehouse_workflow_get_pick_pack_ship.py +182 -0
  36. convexity_api_client/api/v1/warehouse_workflow_mark_pick_pack_ship_shipped.py +202 -0
  37. convexity_api_client/api/v1/warehouse_workflow_save_pick_pack_ship_shipment.py +202 -0
  38. convexity_api_client/models/__init__.py +134 -0
  39. convexity_api_client/models/adjust_stock_request.py +20 -8
  40. convexity_api_client/models/assign_inventory_item_location_request.py +108 -0
  41. convexity_api_client/models/assign_inventory_item_location_request_ext_data_type_0.py +47 -0
  42. convexity_api_client/models/bulk_upsert_customer_payload.py +20 -0
  43. convexity_api_client/models/bulk_upsert_sales_order_payload.py +40 -0
  44. convexity_api_client/models/complete_pick_pack_ship_pack_request.py +75 -0
  45. convexity_api_client/models/complete_pick_pack_ship_request.py +97 -0
  46. convexity_api_client/models/cost_list_entry_response.py +77 -0
  47. convexity_api_client/models/cost_list_vendor_assignment_response.py +149 -0
  48. convexity_api_client/models/cost_list_vendor_assignment_response_ext_data_type_0.py +47 -0
  49. convexity_api_client/models/cost_rule.py +53 -0
  50. convexity_api_client/models/cost_rule_response.py +22 -0
  51. convexity_api_client/models/cost_source_type.py +9 -0
  52. convexity_api_client/models/create_cost_list_request.py +4 -5
  53. convexity_api_client/models/create_cost_list_vendor_assignment_request.py +116 -0
  54. convexity_api_client/models/create_cost_list_vendor_assignment_request_ext_data_type_0.py +47 -0
  55. convexity_api_client/models/create_customer_request.py +20 -0
  56. convexity_api_client/models/create_item_sourcing_request.py +256 -0
  57. convexity_api_client/models/create_item_sourcing_request_ext_data_type_0.py +47 -0
  58. convexity_api_client/models/create_pick_pack_ship_request.py +153 -0
  59. convexity_api_client/models/create_price_list_channel_assignment_request.py +116 -0
  60. convexity_api_client/models/create_price_list_channel_assignment_request_ext_data_type_0.py +47 -0
  61. convexity_api_client/models/create_price_list_customer_assignment_request.py +116 -0
  62. convexity_api_client/models/create_price_list_customer_assignment_request_ext_data_type_0.py +47 -0
  63. convexity_api_client/models/create_price_list_request.py +4 -5
  64. convexity_api_client/models/create_sales_order_line_request.py +40 -8
  65. convexity_api_client/models/create_sales_order_request.py +40 -0
  66. convexity_api_client/models/create_sales_rep_request.py +181 -0
  67. convexity_api_client/models/create_sales_rep_request_ext_data_type_0.py +47 -0
  68. convexity_api_client/models/customer.py +53 -0
  69. convexity_api_client/models/customer_response.py +14 -0
  70. convexity_api_client/models/inventory_config.py +53 -0
  71. convexity_api_client/models/inventory_config_response.py +28 -0
  72. convexity_api_client/models/inventory_item.py +43 -0
  73. convexity_api_client/models/inventory_item_location.py +237 -0
  74. convexity_api_client/models/inventory_item_location_assignment_response.py +150 -0
  75. convexity_api_client/models/inventory_item_location_assignment_response_ext_data_type_0.py +47 -0
  76. convexity_api_client/models/inventory_item_type.py +0 -1
  77. convexity_api_client/models/item_sourcing.py +41 -0
  78. convexity_api_client/models/item_sourcing_item_option.py +107 -0
  79. convexity_api_client/models/item_sourcing_options_response.py +120 -0
  80. convexity_api_client/models/item_sourcing_response.py +360 -0
  81. convexity_api_client/models/item_sourcing_response_ext_data_type_0.py +47 -0
  82. convexity_api_client/models/item_sourcing_uom_option.py +77 -0
  83. convexity_api_client/models/item_sourcing_vendor_option.py +77 -0
  84. convexity_api_client/models/item_warehouse_location_response.py +248 -0
  85. convexity_api_client/models/list_cost_list_entries_response.py +83 -0
  86. convexity_api_client/models/list_cost_list_vendor_assignments_response.py +83 -0
  87. convexity_api_client/models/list_item_sourcing_response.py +83 -0
  88. convexity_api_client/models/list_item_warehouse_locations_response.py +83 -0
  89. convexity_api_client/models/list_price_list_channel_assignments_response.py +83 -0
  90. convexity_api_client/models/list_price_list_customer_assignments_response.py +83 -0
  91. convexity_api_client/models/list_price_list_entries_response.py +83 -0
  92. convexity_api_client/models/list_sales_reps_response.py +83 -0
  93. convexity_api_client/models/list_warehouse_location_items_response.py +83 -0
  94. convexity_api_client/models/mark_pick_pack_ship_shipped_request.py +84 -0
  95. convexity_api_client/models/pick_pack_ship_line_request.py +100 -0
  96. convexity_api_client/models/pick_pack_ship_packed_line_request.py +111 -0
  97. convexity_api_client/models/pick_pack_ship_picked_line_request.py +91 -0
  98. convexity_api_client/models/pick_pack_ship_response.py +111 -0
  99. convexity_api_client/models/price_list.py +41 -0
  100. convexity_api_client/models/price_list_channel_assignment_response.py +149 -0
  101. convexity_api_client/models/price_list_channel_assignment_response_ext_data_type_0.py +47 -0
  102. convexity_api_client/models/price_list_customer_assignment_response.py +149 -0
  103. convexity_api_client/models/price_list_customer_assignment_response_ext_data_type_0.py +47 -0
  104. convexity_api_client/models/price_list_entry_response.py +77 -0
  105. convexity_api_client/models/price_source_type.py +9 -0
  106. convexity_api_client/models/project.py +43 -0
  107. convexity_api_client/models/purchase_order_line.py +101 -0
  108. convexity_api_client/models/purchase_order_line_request.py +20 -8
  109. convexity_api_client/models/purchase_order_line_response.py +103 -0
  110. convexity_api_client/models/purchasing_list_item_sourcing_filter_operator_type_0.py +19 -0
  111. convexity_api_client/models/purchasing_list_item_sourcing_sort_direction_type_0.py +9 -0
  112. convexity_api_client/models/resolve_cost_response.py +22 -0
  113. convexity_api_client/models/resolve_price_response.py +20 -0
  114. convexity_api_client/models/sales_invoice_line.py +121 -0
  115. convexity_api_client/models/sales_invoice_line_request.py +40 -8
  116. convexity_api_client/models/sales_invoice_line_response.py +121 -0
  117. convexity_api_client/models/sales_order.py +73 -0
  118. convexity_api_client/models/sales_order_line.py +121 -0
  119. convexity_api_client/models/sales_order_line_response.py +123 -0
  120. convexity_api_client/models/sales_order_response.py +28 -0
  121. convexity_api_client/models/sales_rep.py +279 -0
  122. convexity_api_client/models/sales_rep_response.py +185 -0
  123. convexity_api_client/models/sales_rep_response_ext_data_type_0.py +47 -0
  124. convexity_api_client/models/save_pick_pack_ship_shipment_request.py +163 -0
  125. convexity_api_client/models/stock_balance.py +20 -8
  126. convexity_api_client/models/update_customer_request.py +20 -0
  127. convexity_api_client/models/update_item_sourcing_request.py +312 -0
  128. convexity_api_client/models/update_item_sourcing_request_ext_data_type_0.py +47 -0
  129. convexity_api_client/models/update_list_assignment_request.py +111 -0
  130. convexity_api_client/models/update_list_assignment_request_ext_data_type_0.py +47 -0
  131. convexity_api_client/models/update_sales_order_request.py +40 -0
  132. convexity_api_client/models/update_sales_rep_request.py +211 -0
  133. convexity_api_client/models/update_sales_rep_request_ext_data_type_0.py +47 -0
  134. convexity_api_client/models/upsert_inventory_config_request.py +40 -0
  135. convexity_api_client/models/upsert_item_sourcing_cost_request.py +62 -0
  136. convexity_api_client/models/warehouse_location.py +43 -0
  137. convexity_api_client/models/warehouse_location_item_response.py +160 -0
  138. {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/METADATA +1 -1
  139. {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/RECORD +140 -41
  140. {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/WHEEL +1 -1
@@ -0,0 +1,120 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.item_sourcing_item_option import ItemSourcingItemOption
11
+ from ..models.item_sourcing_uom_option import ItemSourcingUomOption
12
+ from ..models.item_sourcing_vendor_option import ItemSourcingVendorOption
13
+
14
+
15
+ T = TypeVar("T", bound="ItemSourcingOptionsResponse")
16
+
17
+
18
+ @_attrs_define
19
+ class ItemSourcingOptionsResponse:
20
+ """Project-owned values used by the sourcing table's inline selectors.
21
+
22
+ Attributes:
23
+ items (list[ItemSourcingItemOption]):
24
+ vendors (list[ItemSourcingVendorOption]):
25
+ uoms (list[ItemSourcingUomOption]):
26
+ origin_country_codes (list[str]):
27
+ """
28
+
29
+ items: list[ItemSourcingItemOption]
30
+ vendors: list[ItemSourcingVendorOption]
31
+ uoms: list[ItemSourcingUomOption]
32
+ origin_country_codes: list[str]
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ items = []
37
+ for items_item_data in self.items:
38
+ items_item = items_item_data.to_dict()
39
+ items.append(items_item)
40
+
41
+ vendors = []
42
+ for vendors_item_data in self.vendors:
43
+ vendors_item = vendors_item_data.to_dict()
44
+ vendors.append(vendors_item)
45
+
46
+ uoms = []
47
+ for uoms_item_data in self.uoms:
48
+ uoms_item = uoms_item_data.to_dict()
49
+ uoms.append(uoms_item)
50
+
51
+ origin_country_codes = self.origin_country_codes
52
+
53
+ field_dict: dict[str, Any] = {}
54
+ field_dict.update(self.additional_properties)
55
+ field_dict.update(
56
+ {
57
+ "items": items,
58
+ "vendors": vendors,
59
+ "uoms": uoms,
60
+ "origin_country_codes": origin_country_codes,
61
+ }
62
+ )
63
+
64
+ return field_dict
65
+
66
+ @classmethod
67
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
68
+ from ..models.item_sourcing_item_option import ItemSourcingItemOption
69
+ from ..models.item_sourcing_uom_option import ItemSourcingUomOption
70
+ from ..models.item_sourcing_vendor_option import ItemSourcingVendorOption
71
+
72
+ d = dict(src_dict)
73
+ items = []
74
+ _items = d.pop("items")
75
+ for items_item_data in _items:
76
+ items_item = ItemSourcingItemOption.from_dict(items_item_data)
77
+
78
+ items.append(items_item)
79
+
80
+ vendors = []
81
+ _vendors = d.pop("vendors")
82
+ for vendors_item_data in _vendors:
83
+ vendors_item = ItemSourcingVendorOption.from_dict(vendors_item_data)
84
+
85
+ vendors.append(vendors_item)
86
+
87
+ uoms = []
88
+ _uoms = d.pop("uoms")
89
+ for uoms_item_data in _uoms:
90
+ uoms_item = ItemSourcingUomOption.from_dict(uoms_item_data)
91
+
92
+ uoms.append(uoms_item)
93
+
94
+ origin_country_codes = cast(list[str], d.pop("origin_country_codes"))
95
+
96
+ item_sourcing_options_response = cls(
97
+ items=items,
98
+ vendors=vendors,
99
+ uoms=uoms,
100
+ origin_country_codes=origin_country_codes,
101
+ )
102
+
103
+ item_sourcing_options_response.additional_properties = d
104
+ return item_sourcing_options_response
105
+
106
+ @property
107
+ def additional_keys(self) -> list[str]:
108
+ return list(self.additional_properties.keys())
109
+
110
+ def __getitem__(self, key: str) -> Any:
111
+ return self.additional_properties[key]
112
+
113
+ def __setitem__(self, key: str, value: Any) -> None:
114
+ self.additional_properties[key] = value
115
+
116
+ def __delitem__(self, key: str) -> None:
117
+ del self.additional_properties[key]
118
+
119
+ def __contains__(self, key: str) -> bool:
120
+ return key in self.additional_properties
@@ -0,0 +1,360 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from collections.abc import Mapping
5
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
6
+
7
+ from attrs import define as _attrs_define
8
+ from attrs import field as _attrs_field
9
+
10
+ if TYPE_CHECKING:
11
+ from ..models.item_sourcing_response_ext_data_type_0 import ItemSourcingResponseExtDataType0
12
+
13
+
14
+ T = TypeVar("T", bound="ItemSourcingResponse")
15
+
16
+
17
+ @_attrs_define
18
+ class ItemSourcingResponse:
19
+ """Sourcing row with the display data required by the purchasing table.
20
+
21
+ Attributes:
22
+ id (str):
23
+ project_id (str):
24
+ inventory_item_id (str):
25
+ item_sku (str):
26
+ item_name (str):
27
+ vendor_id (str):
28
+ vendor_code (str):
29
+ vendor_name (str):
30
+ vendor_item_code (None | str):
31
+ origin_country_code (str):
32
+ hts_code (None | str):
33
+ uom_id (None | str):
34
+ uom_code (None | str):
35
+ uom_name (None | str):
36
+ min_order_qty (float | None):
37
+ order_multiple_qty (float | None):
38
+ lead_time_days (int | None):
39
+ unit_cost (float | None):
40
+ cost_currency (None | str):
41
+ cost_list_id (None | str):
42
+ cost_rule_id (None | str):
43
+ is_primary (bool):
44
+ is_active (bool):
45
+ ext_data (ItemSourcingResponseExtDataType0 | None):
46
+ created_at (datetime.datetime):
47
+ updated_at (datetime.datetime):
48
+ """
49
+
50
+ id: str
51
+ project_id: str
52
+ inventory_item_id: str
53
+ item_sku: str
54
+ item_name: str
55
+ vendor_id: str
56
+ vendor_code: str
57
+ vendor_name: str
58
+ vendor_item_code: None | str
59
+ origin_country_code: str
60
+ hts_code: None | str
61
+ uom_id: None | str
62
+ uom_code: None | str
63
+ uom_name: None | str
64
+ min_order_qty: float | None
65
+ order_multiple_qty: float | None
66
+ lead_time_days: int | None
67
+ unit_cost: float | None
68
+ cost_currency: None | str
69
+ cost_list_id: None | str
70
+ cost_rule_id: None | str
71
+ is_primary: bool
72
+ is_active: bool
73
+ ext_data: ItemSourcingResponseExtDataType0 | None
74
+ created_at: datetime.datetime
75
+ updated_at: datetime.datetime
76
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
77
+
78
+ def to_dict(self) -> dict[str, Any]:
79
+ from ..models.item_sourcing_response_ext_data_type_0 import ItemSourcingResponseExtDataType0
80
+
81
+ id = self.id
82
+
83
+ project_id = self.project_id
84
+
85
+ inventory_item_id = self.inventory_item_id
86
+
87
+ item_sku = self.item_sku
88
+
89
+ item_name = self.item_name
90
+
91
+ vendor_id = self.vendor_id
92
+
93
+ vendor_code = self.vendor_code
94
+
95
+ vendor_name = self.vendor_name
96
+
97
+ vendor_item_code: None | str
98
+ vendor_item_code = self.vendor_item_code
99
+
100
+ origin_country_code = self.origin_country_code
101
+
102
+ hts_code: None | str
103
+ hts_code = self.hts_code
104
+
105
+ uom_id: None | str
106
+ uom_id = self.uom_id
107
+
108
+ uom_code: None | str
109
+ uom_code = self.uom_code
110
+
111
+ uom_name: None | str
112
+ uom_name = self.uom_name
113
+
114
+ min_order_qty: float | None
115
+ min_order_qty = self.min_order_qty
116
+
117
+ order_multiple_qty: float | None
118
+ order_multiple_qty = self.order_multiple_qty
119
+
120
+ lead_time_days: int | None
121
+ lead_time_days = self.lead_time_days
122
+
123
+ unit_cost: float | None
124
+ unit_cost = self.unit_cost
125
+
126
+ cost_currency: None | str
127
+ cost_currency = self.cost_currency
128
+
129
+ cost_list_id: None | str
130
+ cost_list_id = self.cost_list_id
131
+
132
+ cost_rule_id: None | str
133
+ cost_rule_id = self.cost_rule_id
134
+
135
+ is_primary = self.is_primary
136
+
137
+ is_active = self.is_active
138
+
139
+ ext_data: dict[str, Any] | None
140
+ if isinstance(self.ext_data, ItemSourcingResponseExtDataType0):
141
+ ext_data = self.ext_data.to_dict()
142
+ else:
143
+ ext_data = self.ext_data
144
+
145
+ created_at = self.created_at.isoformat()
146
+
147
+ updated_at = self.updated_at.isoformat()
148
+
149
+ field_dict: dict[str, Any] = {}
150
+ field_dict.update(self.additional_properties)
151
+ field_dict.update(
152
+ {
153
+ "id": id,
154
+ "project_id": project_id,
155
+ "inventory_item_id": inventory_item_id,
156
+ "item_sku": item_sku,
157
+ "item_name": item_name,
158
+ "vendor_id": vendor_id,
159
+ "vendor_code": vendor_code,
160
+ "vendor_name": vendor_name,
161
+ "vendor_item_code": vendor_item_code,
162
+ "origin_country_code": origin_country_code,
163
+ "hts_code": hts_code,
164
+ "uom_id": uom_id,
165
+ "uom_code": uom_code,
166
+ "uom_name": uom_name,
167
+ "min_order_qty": min_order_qty,
168
+ "order_multiple_qty": order_multiple_qty,
169
+ "lead_time_days": lead_time_days,
170
+ "unit_cost": unit_cost,
171
+ "cost_currency": cost_currency,
172
+ "cost_list_id": cost_list_id,
173
+ "cost_rule_id": cost_rule_id,
174
+ "is_primary": is_primary,
175
+ "is_active": is_active,
176
+ "ext_data": ext_data,
177
+ "created_at": created_at,
178
+ "updated_at": updated_at,
179
+ }
180
+ )
181
+
182
+ return field_dict
183
+
184
+ @classmethod
185
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
186
+ from ..models.item_sourcing_response_ext_data_type_0 import ItemSourcingResponseExtDataType0
187
+
188
+ d = dict(src_dict)
189
+ id = d.pop("id")
190
+
191
+ project_id = d.pop("project_id")
192
+
193
+ inventory_item_id = d.pop("inventory_item_id")
194
+
195
+ item_sku = d.pop("item_sku")
196
+
197
+ item_name = d.pop("item_name")
198
+
199
+ vendor_id = d.pop("vendor_id")
200
+
201
+ vendor_code = d.pop("vendor_code")
202
+
203
+ vendor_name = d.pop("vendor_name")
204
+
205
+ def _parse_vendor_item_code(data: object) -> None | str:
206
+ if data is None:
207
+ return data
208
+ return cast(None | str, data)
209
+
210
+ vendor_item_code = _parse_vendor_item_code(d.pop("vendor_item_code"))
211
+
212
+ origin_country_code = d.pop("origin_country_code")
213
+
214
+ def _parse_hts_code(data: object) -> None | str:
215
+ if data is None:
216
+ return data
217
+ return cast(None | str, data)
218
+
219
+ hts_code = _parse_hts_code(d.pop("hts_code"))
220
+
221
+ def _parse_uom_id(data: object) -> None | str:
222
+ if data is None:
223
+ return data
224
+ return cast(None | str, data)
225
+
226
+ uom_id = _parse_uom_id(d.pop("uom_id"))
227
+
228
+ def _parse_uom_code(data: object) -> None | str:
229
+ if data is None:
230
+ return data
231
+ return cast(None | str, data)
232
+
233
+ uom_code = _parse_uom_code(d.pop("uom_code"))
234
+
235
+ def _parse_uom_name(data: object) -> None | str:
236
+ if data is None:
237
+ return data
238
+ return cast(None | str, data)
239
+
240
+ uom_name = _parse_uom_name(d.pop("uom_name"))
241
+
242
+ def _parse_min_order_qty(data: object) -> float | None:
243
+ if data is None:
244
+ return data
245
+ return cast(float | None, data)
246
+
247
+ min_order_qty = _parse_min_order_qty(d.pop("min_order_qty"))
248
+
249
+ def _parse_order_multiple_qty(data: object) -> float | None:
250
+ if data is None:
251
+ return data
252
+ return cast(float | None, data)
253
+
254
+ order_multiple_qty = _parse_order_multiple_qty(d.pop("order_multiple_qty"))
255
+
256
+ def _parse_lead_time_days(data: object) -> int | None:
257
+ if data is None:
258
+ return data
259
+ return cast(int | None, data)
260
+
261
+ lead_time_days = _parse_lead_time_days(d.pop("lead_time_days"))
262
+
263
+ def _parse_unit_cost(data: object) -> float | None:
264
+ if data is None:
265
+ return data
266
+ return cast(float | None, data)
267
+
268
+ unit_cost = _parse_unit_cost(d.pop("unit_cost"))
269
+
270
+ def _parse_cost_currency(data: object) -> None | str:
271
+ if data is None:
272
+ return data
273
+ return cast(None | str, data)
274
+
275
+ cost_currency = _parse_cost_currency(d.pop("cost_currency"))
276
+
277
+ def _parse_cost_list_id(data: object) -> None | str:
278
+ if data is None:
279
+ return data
280
+ return cast(None | str, data)
281
+
282
+ cost_list_id = _parse_cost_list_id(d.pop("cost_list_id"))
283
+
284
+ def _parse_cost_rule_id(data: object) -> None | str:
285
+ if data is None:
286
+ return data
287
+ return cast(None | str, data)
288
+
289
+ cost_rule_id = _parse_cost_rule_id(d.pop("cost_rule_id"))
290
+
291
+ is_primary = d.pop("is_primary")
292
+
293
+ is_active = d.pop("is_active")
294
+
295
+ def _parse_ext_data(data: object) -> ItemSourcingResponseExtDataType0 | None:
296
+ if data is None:
297
+ return data
298
+ try:
299
+ if not isinstance(data, dict):
300
+ raise TypeError()
301
+ ext_data_type_0 = ItemSourcingResponseExtDataType0.from_dict(data)
302
+
303
+ return ext_data_type_0
304
+ except (TypeError, ValueError, AttributeError, KeyError):
305
+ pass
306
+ return cast(ItemSourcingResponseExtDataType0 | None, data)
307
+
308
+ ext_data = _parse_ext_data(d.pop("ext_data"))
309
+
310
+ created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
311
+
312
+ updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
313
+
314
+ item_sourcing_response = cls(
315
+ id=id,
316
+ project_id=project_id,
317
+ inventory_item_id=inventory_item_id,
318
+ item_sku=item_sku,
319
+ item_name=item_name,
320
+ vendor_id=vendor_id,
321
+ vendor_code=vendor_code,
322
+ vendor_name=vendor_name,
323
+ vendor_item_code=vendor_item_code,
324
+ origin_country_code=origin_country_code,
325
+ hts_code=hts_code,
326
+ uom_id=uom_id,
327
+ uom_code=uom_code,
328
+ uom_name=uom_name,
329
+ min_order_qty=min_order_qty,
330
+ order_multiple_qty=order_multiple_qty,
331
+ lead_time_days=lead_time_days,
332
+ unit_cost=unit_cost,
333
+ cost_currency=cost_currency,
334
+ cost_list_id=cost_list_id,
335
+ cost_rule_id=cost_rule_id,
336
+ is_primary=is_primary,
337
+ is_active=is_active,
338
+ ext_data=ext_data,
339
+ created_at=created_at,
340
+ updated_at=updated_at,
341
+ )
342
+
343
+ item_sourcing_response.additional_properties = d
344
+ return item_sourcing_response
345
+
346
+ @property
347
+ def additional_keys(self) -> list[str]:
348
+ return list(self.additional_properties.keys())
349
+
350
+ def __getitem__(self, key: str) -> Any:
351
+ return self.additional_properties[key]
352
+
353
+ def __setitem__(self, key: str, value: Any) -> None:
354
+ self.additional_properties[key] = value
355
+
356
+ def __delitem__(self, key: str) -> None:
357
+ del self.additional_properties[key]
358
+
359
+ def __contains__(self, key: str) -> bool:
360
+ return key in self.additional_properties
@@ -0,0 +1,47 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="ItemSourcingResponseExtDataType0")
10
+
11
+
12
+ @_attrs_define
13
+ class ItemSourcingResponseExtDataType0:
14
+ """ """
15
+
16
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+
20
+ field_dict: dict[str, Any] = {}
21
+ field_dict.update(self.additional_properties)
22
+
23
+ return field_dict
24
+
25
+ @classmethod
26
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
27
+ d = dict(src_dict)
28
+ item_sourcing_response_ext_data_type_0 = cls()
29
+
30
+ item_sourcing_response_ext_data_type_0.additional_properties = d
31
+ return item_sourcing_response_ext_data_type_0
32
+
33
+ @property
34
+ def additional_keys(self) -> list[str]:
35
+ return list(self.additional_properties.keys())
36
+
37
+ def __getitem__(self, key: str) -> Any:
38
+ return self.additional_properties[key]
39
+
40
+ def __setitem__(self, key: str, value: Any) -> None:
41
+ self.additional_properties[key] = value
42
+
43
+ def __delitem__(self, key: str) -> None:
44
+ del self.additional_properties[key]
45
+
46
+ def __contains__(self, key: str) -> bool:
47
+ return key in self.additional_properties
@@ -0,0 +1,77 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="ItemSourcingUomOption")
10
+
11
+
12
+ @_attrs_define
13
+ class ItemSourcingUomOption:
14
+ """
15
+ Attributes:
16
+ id (str):
17
+ code (str):
18
+ name (str):
19
+ """
20
+
21
+ id: str
22
+ code: str
23
+ name: str
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ id = self.id
28
+
29
+ code = self.code
30
+
31
+ name = self.name
32
+
33
+ field_dict: dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update(
36
+ {
37
+ "id": id,
38
+ "code": code,
39
+ "name": name,
40
+ }
41
+ )
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ d = dict(src_dict)
48
+ id = d.pop("id")
49
+
50
+ code = d.pop("code")
51
+
52
+ name = d.pop("name")
53
+
54
+ item_sourcing_uom_option = cls(
55
+ id=id,
56
+ code=code,
57
+ name=name,
58
+ )
59
+
60
+ item_sourcing_uom_option.additional_properties = d
61
+ return item_sourcing_uom_option
62
+
63
+ @property
64
+ def additional_keys(self) -> list[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties
@@ -0,0 +1,77 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="ItemSourcingVendorOption")
10
+
11
+
12
+ @_attrs_define
13
+ class ItemSourcingVendorOption:
14
+ """
15
+ Attributes:
16
+ id (str):
17
+ code (str):
18
+ name (str):
19
+ """
20
+
21
+ id: str
22
+ code: str
23
+ name: str
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ id = self.id
28
+
29
+ code = self.code
30
+
31
+ name = self.name
32
+
33
+ field_dict: dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update(
36
+ {
37
+ "id": id,
38
+ "code": code,
39
+ "name": name,
40
+ }
41
+ )
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ d = dict(src_dict)
48
+ id = d.pop("id")
49
+
50
+ code = d.pop("code")
51
+
52
+ name = d.pop("name")
53
+
54
+ item_sourcing_vendor_option = cls(
55
+ id=id,
56
+ code=code,
57
+ name=name,
58
+ )
59
+
60
+ item_sourcing_vendor_option.additional_properties = d
61
+ return item_sourcing_vendor_option
62
+
63
+ @property
64
+ def additional_keys(self) -> list[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties