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,248 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from collections.abc import Mapping
5
+ from typing import Any, TypeVar, cast
6
+
7
+ from attrs import define as _attrs_define
8
+ from attrs import field as _attrs_field
9
+
10
+ from ..models.location_kind import LocationKind
11
+ from ..models.location_type import LocationType
12
+
13
+ T = TypeVar("T", bound="ItemWarehouseLocationResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ItemWarehouseLocationResponse:
18
+ """A warehouse location assigned to or currently stocking an item.
19
+
20
+ Attributes:
21
+ warehouse_id (str):
22
+ warehouse_code (str):
23
+ warehouse_name (str):
24
+ warehouse_location_id (str):
25
+ parent_id (None | str):
26
+ location_name (str):
27
+ location_code (None | str):
28
+ location_type (LocationType):
29
+ location_kind (LocationKind | None):
30
+ location_path (str):
31
+ location_depth (int):
32
+ is_assigned (bool):
33
+ on_hand_qty (float):
34
+ available_qty (float):
35
+ reserved_qty (float):
36
+ on_order_qty (float):
37
+ in_transit_qty (float):
38
+ last_transaction_at (datetime.datetime | None):
39
+ """
40
+
41
+ warehouse_id: str
42
+ warehouse_code: str
43
+ warehouse_name: str
44
+ warehouse_location_id: str
45
+ parent_id: None | str
46
+ location_name: str
47
+ location_code: None | str
48
+ location_type: LocationType
49
+ location_kind: LocationKind | None
50
+ location_path: str
51
+ location_depth: int
52
+ is_assigned: bool
53
+ on_hand_qty: float
54
+ available_qty: float
55
+ reserved_qty: float
56
+ on_order_qty: float
57
+ in_transit_qty: float
58
+ last_transaction_at: datetime.datetime | None
59
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
60
+
61
+ def to_dict(self) -> dict[str, Any]:
62
+ warehouse_id = self.warehouse_id
63
+
64
+ warehouse_code = self.warehouse_code
65
+
66
+ warehouse_name = self.warehouse_name
67
+
68
+ warehouse_location_id = self.warehouse_location_id
69
+
70
+ parent_id: None | str
71
+ parent_id = self.parent_id
72
+
73
+ location_name = self.location_name
74
+
75
+ location_code: None | str
76
+ location_code = self.location_code
77
+
78
+ location_type = self.location_type.value
79
+
80
+ location_kind: None | str
81
+ if isinstance(self.location_kind, LocationKind):
82
+ location_kind = self.location_kind.value
83
+ else:
84
+ location_kind = self.location_kind
85
+
86
+ location_path = self.location_path
87
+
88
+ location_depth = self.location_depth
89
+
90
+ is_assigned = self.is_assigned
91
+
92
+ on_hand_qty = self.on_hand_qty
93
+
94
+ available_qty = self.available_qty
95
+
96
+ reserved_qty = self.reserved_qty
97
+
98
+ on_order_qty = self.on_order_qty
99
+
100
+ in_transit_qty = self.in_transit_qty
101
+
102
+ last_transaction_at: None | str
103
+ if isinstance(self.last_transaction_at, datetime.datetime):
104
+ last_transaction_at = self.last_transaction_at.isoformat()
105
+ else:
106
+ last_transaction_at = self.last_transaction_at
107
+
108
+ field_dict: dict[str, Any] = {}
109
+ field_dict.update(self.additional_properties)
110
+ field_dict.update(
111
+ {
112
+ "warehouse_id": warehouse_id,
113
+ "warehouse_code": warehouse_code,
114
+ "warehouse_name": warehouse_name,
115
+ "warehouse_location_id": warehouse_location_id,
116
+ "parent_id": parent_id,
117
+ "location_name": location_name,
118
+ "location_code": location_code,
119
+ "location_type": location_type,
120
+ "location_kind": location_kind,
121
+ "location_path": location_path,
122
+ "location_depth": location_depth,
123
+ "is_assigned": is_assigned,
124
+ "on_hand_qty": on_hand_qty,
125
+ "available_qty": available_qty,
126
+ "reserved_qty": reserved_qty,
127
+ "on_order_qty": on_order_qty,
128
+ "in_transit_qty": in_transit_qty,
129
+ "last_transaction_at": last_transaction_at,
130
+ }
131
+ )
132
+
133
+ return field_dict
134
+
135
+ @classmethod
136
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
137
+ d = dict(src_dict)
138
+ warehouse_id = d.pop("warehouse_id")
139
+
140
+ warehouse_code = d.pop("warehouse_code")
141
+
142
+ warehouse_name = d.pop("warehouse_name")
143
+
144
+ warehouse_location_id = d.pop("warehouse_location_id")
145
+
146
+ def _parse_parent_id(data: object) -> None | str:
147
+ if data is None:
148
+ return data
149
+ return cast(None | str, data)
150
+
151
+ parent_id = _parse_parent_id(d.pop("parent_id"))
152
+
153
+ location_name = d.pop("location_name")
154
+
155
+ def _parse_location_code(data: object) -> None | str:
156
+ if data is None:
157
+ return data
158
+ return cast(None | str, data)
159
+
160
+ location_code = _parse_location_code(d.pop("location_code"))
161
+
162
+ location_type = LocationType(d.pop("location_type"))
163
+
164
+ def _parse_location_kind(data: object) -> LocationKind | None:
165
+ if data is None:
166
+ return data
167
+ try:
168
+ if not isinstance(data, str):
169
+ raise TypeError()
170
+ location_kind_type_0 = LocationKind(data)
171
+
172
+ return location_kind_type_0
173
+ except (TypeError, ValueError, AttributeError, KeyError):
174
+ pass
175
+ return cast(LocationKind | None, data)
176
+
177
+ location_kind = _parse_location_kind(d.pop("location_kind"))
178
+
179
+ location_path = d.pop("location_path")
180
+
181
+ location_depth = d.pop("location_depth")
182
+
183
+ is_assigned = d.pop("is_assigned")
184
+
185
+ on_hand_qty = d.pop("on_hand_qty")
186
+
187
+ available_qty = d.pop("available_qty")
188
+
189
+ reserved_qty = d.pop("reserved_qty")
190
+
191
+ on_order_qty = d.pop("on_order_qty")
192
+
193
+ in_transit_qty = d.pop("in_transit_qty")
194
+
195
+ def _parse_last_transaction_at(data: object) -> datetime.datetime | None:
196
+ if data is None:
197
+ return data
198
+ try:
199
+ if not isinstance(data, str):
200
+ raise TypeError()
201
+ last_transaction_at_type_0 = datetime.datetime.fromisoformat(data)
202
+
203
+ return last_transaction_at_type_0
204
+ except (TypeError, ValueError, AttributeError, KeyError):
205
+ pass
206
+ return cast(datetime.datetime | None, data)
207
+
208
+ last_transaction_at = _parse_last_transaction_at(d.pop("last_transaction_at"))
209
+
210
+ item_warehouse_location_response = cls(
211
+ warehouse_id=warehouse_id,
212
+ warehouse_code=warehouse_code,
213
+ warehouse_name=warehouse_name,
214
+ warehouse_location_id=warehouse_location_id,
215
+ parent_id=parent_id,
216
+ location_name=location_name,
217
+ location_code=location_code,
218
+ location_type=location_type,
219
+ location_kind=location_kind,
220
+ location_path=location_path,
221
+ location_depth=location_depth,
222
+ is_assigned=is_assigned,
223
+ on_hand_qty=on_hand_qty,
224
+ available_qty=available_qty,
225
+ reserved_qty=reserved_qty,
226
+ on_order_qty=on_order_qty,
227
+ in_transit_qty=in_transit_qty,
228
+ last_transaction_at=last_transaction_at,
229
+ )
230
+
231
+ item_warehouse_location_response.additional_properties = d
232
+ return item_warehouse_location_response
233
+
234
+ @property
235
+ def additional_keys(self) -> list[str]:
236
+ return list(self.additional_properties.keys())
237
+
238
+ def __getitem__(self, key: str) -> Any:
239
+ return self.additional_properties[key]
240
+
241
+ def __setitem__(self, key: str, value: Any) -> None:
242
+ self.additional_properties[key] = value
243
+
244
+ def __delitem__(self, key: str) -> None:
245
+ del self.additional_properties[key]
246
+
247
+ def __contains__(self, key: str) -> bool:
248
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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.cost_list_entry_response import CostListEntryResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListCostListEntriesResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListCostListEntriesResponse:
18
+ """
19
+ Attributes:
20
+ entries (list[CostListEntryResponse]):
21
+ total (int):
22
+ """
23
+
24
+ entries: list[CostListEntryResponse]
25
+ total: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ entries = []
30
+ for entries_item_data in self.entries:
31
+ entries_item = entries_item_data.to_dict()
32
+ entries.append(entries_item)
33
+
34
+ total = self.total
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "entries": entries,
41
+ "total": total,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.cost_list_entry_response import CostListEntryResponse
50
+
51
+ d = dict(src_dict)
52
+ entries = []
53
+ _entries = d.pop("entries")
54
+ for entries_item_data in _entries:
55
+ entries_item = CostListEntryResponse.from_dict(entries_item_data)
56
+
57
+ entries.append(entries_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_cost_list_entries_response = cls(
62
+ entries=entries,
63
+ total=total,
64
+ )
65
+
66
+ list_cost_list_entries_response.additional_properties = d
67
+ return list_cost_list_entries_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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.cost_list_vendor_assignment_response import CostListVendorAssignmentResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListCostListVendorAssignmentsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListCostListVendorAssignmentsResponse:
18
+ """
19
+ Attributes:
20
+ assignments (list[CostListVendorAssignmentResponse]):
21
+ total (int):
22
+ """
23
+
24
+ assignments: list[CostListVendorAssignmentResponse]
25
+ total: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ assignments = []
30
+ for assignments_item_data in self.assignments:
31
+ assignments_item = assignments_item_data.to_dict()
32
+ assignments.append(assignments_item)
33
+
34
+ total = self.total
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "assignments": assignments,
41
+ "total": total,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.cost_list_vendor_assignment_response import CostListVendorAssignmentResponse
50
+
51
+ d = dict(src_dict)
52
+ assignments = []
53
+ _assignments = d.pop("assignments")
54
+ for assignments_item_data in _assignments:
55
+ assignments_item = CostListVendorAssignmentResponse.from_dict(assignments_item_data)
56
+
57
+ assignments.append(assignments_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_cost_list_vendor_assignments_response = cls(
62
+ assignments=assignments,
63
+ total=total,
64
+ )
65
+
66
+ list_cost_list_vendor_assignments_response.additional_properties = d
67
+ return list_cost_list_vendor_assignments_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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_response import ItemSourcingResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListItemSourcingResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListItemSourcingResponse:
18
+ """
19
+ Attributes:
20
+ sourcing (list[ItemSourcingResponse]):
21
+ total (int):
22
+ """
23
+
24
+ sourcing: list[ItemSourcingResponse]
25
+ total: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ sourcing = []
30
+ for sourcing_item_data in self.sourcing:
31
+ sourcing_item = sourcing_item_data.to_dict()
32
+ sourcing.append(sourcing_item)
33
+
34
+ total = self.total
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "sourcing": sourcing,
41
+ "total": total,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.item_sourcing_response import ItemSourcingResponse
50
+
51
+ d = dict(src_dict)
52
+ sourcing = []
53
+ _sourcing = d.pop("sourcing")
54
+ for sourcing_item_data in _sourcing:
55
+ sourcing_item = ItemSourcingResponse.from_dict(sourcing_item_data)
56
+
57
+ sourcing.append(sourcing_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_item_sourcing_response = cls(
62
+ sourcing=sourcing,
63
+ total=total,
64
+ )
65
+
66
+ list_item_sourcing_response.additional_properties = d
67
+ return list_item_sourcing_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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_warehouse_location_response import ItemWarehouseLocationResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListItemWarehouseLocationsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListItemWarehouseLocationsResponse:
18
+ """
19
+ Attributes:
20
+ items (list[ItemWarehouseLocationResponse]):
21
+ total (int):
22
+ """
23
+
24
+ items: list[ItemWarehouseLocationResponse]
25
+ total: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ items = []
30
+ for items_item_data in self.items:
31
+ items_item = items_item_data.to_dict()
32
+ items.append(items_item)
33
+
34
+ total = self.total
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "items": items,
41
+ "total": total,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.item_warehouse_location_response import ItemWarehouseLocationResponse
50
+
51
+ d = dict(src_dict)
52
+ items = []
53
+ _items = d.pop("items")
54
+ for items_item_data in _items:
55
+ items_item = ItemWarehouseLocationResponse.from_dict(items_item_data)
56
+
57
+ items.append(items_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_item_warehouse_locations_response = cls(
62
+ items=items,
63
+ total=total,
64
+ )
65
+
66
+ list_item_warehouse_locations_response.additional_properties = d
67
+ return list_item_warehouse_locations_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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.price_list_channel_assignment_response import PriceListChannelAssignmentResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListPriceListChannelAssignmentsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListPriceListChannelAssignmentsResponse:
18
+ """
19
+ Attributes:
20
+ assignments (list[PriceListChannelAssignmentResponse]):
21
+ total (int):
22
+ """
23
+
24
+ assignments: list[PriceListChannelAssignmentResponse]
25
+ total: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ assignments = []
30
+ for assignments_item_data in self.assignments:
31
+ assignments_item = assignments_item_data.to_dict()
32
+ assignments.append(assignments_item)
33
+
34
+ total = self.total
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "assignments": assignments,
41
+ "total": total,
42
+ }
43
+ )
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.price_list_channel_assignment_response import PriceListChannelAssignmentResponse
50
+
51
+ d = dict(src_dict)
52
+ assignments = []
53
+ _assignments = d.pop("assignments")
54
+ for assignments_item_data in _assignments:
55
+ assignments_item = PriceListChannelAssignmentResponse.from_dict(assignments_item_data)
56
+
57
+ assignments.append(assignments_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_price_list_channel_assignments_response = cls(
62
+ assignments=assignments,
63
+ total=total,
64
+ )
65
+
66
+ list_price_list_channel_assignments_response.additional_properties = d
67
+ return list_price_list_channel_assignments_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties