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,256 @@
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
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.create_item_sourcing_request_ext_data_type_0 import CreateItemSourcingRequestExtDataType0
13
+
14
+
15
+ T = TypeVar("T", bound="CreateItemSourcingRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class CreateItemSourcingRequest:
20
+ """Create a vendor-to-item sourcing relationship for the current project.
21
+
22
+ Attributes:
23
+ inventory_item_id (str):
24
+ vendor_id (str):
25
+ origin_country_code (str):
26
+ vendor_item_code (None | str | Unset):
27
+ hts_code (None | str | Unset):
28
+ uom_id (None | str | Unset):
29
+ min_order_qty (float | None | Unset):
30
+ order_multiple_qty (float | None | Unset):
31
+ lead_time_days (int | None | Unset):
32
+ is_primary (bool | Unset): Default: False.
33
+ is_active (bool | Unset): Default: True.
34
+ ext_data (CreateItemSourcingRequestExtDataType0 | None | Unset):
35
+ """
36
+
37
+ inventory_item_id: str
38
+ vendor_id: str
39
+ origin_country_code: str
40
+ vendor_item_code: None | str | Unset = UNSET
41
+ hts_code: None | str | Unset = UNSET
42
+ uom_id: None | str | Unset = UNSET
43
+ min_order_qty: float | None | Unset = UNSET
44
+ order_multiple_qty: float | None | Unset = UNSET
45
+ lead_time_days: int | None | Unset = UNSET
46
+ is_primary: bool | Unset = False
47
+ is_active: bool | Unset = True
48
+ ext_data: CreateItemSourcingRequestExtDataType0 | None | Unset = UNSET
49
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
50
+
51
+ def to_dict(self) -> dict[str, Any]:
52
+ from ..models.create_item_sourcing_request_ext_data_type_0 import CreateItemSourcingRequestExtDataType0
53
+
54
+ inventory_item_id = self.inventory_item_id
55
+
56
+ vendor_id = self.vendor_id
57
+
58
+ origin_country_code = self.origin_country_code
59
+
60
+ vendor_item_code: None | str | Unset
61
+ if isinstance(self.vendor_item_code, Unset):
62
+ vendor_item_code = UNSET
63
+ else:
64
+ vendor_item_code = self.vendor_item_code
65
+
66
+ hts_code: None | str | Unset
67
+ if isinstance(self.hts_code, Unset):
68
+ hts_code = UNSET
69
+ else:
70
+ hts_code = self.hts_code
71
+
72
+ uom_id: None | str | Unset
73
+ if isinstance(self.uom_id, Unset):
74
+ uom_id = UNSET
75
+ else:
76
+ uom_id = self.uom_id
77
+
78
+ min_order_qty: float | None | Unset
79
+ if isinstance(self.min_order_qty, Unset):
80
+ min_order_qty = UNSET
81
+ else:
82
+ min_order_qty = self.min_order_qty
83
+
84
+ order_multiple_qty: float | None | Unset
85
+ if isinstance(self.order_multiple_qty, Unset):
86
+ order_multiple_qty = UNSET
87
+ else:
88
+ order_multiple_qty = self.order_multiple_qty
89
+
90
+ lead_time_days: int | None | Unset
91
+ if isinstance(self.lead_time_days, Unset):
92
+ lead_time_days = UNSET
93
+ else:
94
+ lead_time_days = self.lead_time_days
95
+
96
+ is_primary = self.is_primary
97
+
98
+ is_active = self.is_active
99
+
100
+ ext_data: dict[str, Any] | None | Unset
101
+ if isinstance(self.ext_data, Unset):
102
+ ext_data = UNSET
103
+ elif isinstance(self.ext_data, CreateItemSourcingRequestExtDataType0):
104
+ ext_data = self.ext_data.to_dict()
105
+ else:
106
+ ext_data = self.ext_data
107
+
108
+ field_dict: dict[str, Any] = {}
109
+ field_dict.update(self.additional_properties)
110
+ field_dict.update(
111
+ {
112
+ "inventory_item_id": inventory_item_id,
113
+ "vendor_id": vendor_id,
114
+ "origin_country_code": origin_country_code,
115
+ }
116
+ )
117
+ if vendor_item_code is not UNSET:
118
+ field_dict["vendor_item_code"] = vendor_item_code
119
+ if hts_code is not UNSET:
120
+ field_dict["hts_code"] = hts_code
121
+ if uom_id is not UNSET:
122
+ field_dict["uom_id"] = uom_id
123
+ if min_order_qty is not UNSET:
124
+ field_dict["min_order_qty"] = min_order_qty
125
+ if order_multiple_qty is not UNSET:
126
+ field_dict["order_multiple_qty"] = order_multiple_qty
127
+ if lead_time_days is not UNSET:
128
+ field_dict["lead_time_days"] = lead_time_days
129
+ if is_primary is not UNSET:
130
+ field_dict["is_primary"] = is_primary
131
+ if is_active is not UNSET:
132
+ field_dict["is_active"] = is_active
133
+ if ext_data is not UNSET:
134
+ field_dict["ext_data"] = ext_data
135
+
136
+ return field_dict
137
+
138
+ @classmethod
139
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
140
+ from ..models.create_item_sourcing_request_ext_data_type_0 import CreateItemSourcingRequestExtDataType0
141
+
142
+ d = dict(src_dict)
143
+ inventory_item_id = d.pop("inventory_item_id")
144
+
145
+ vendor_id = d.pop("vendor_id")
146
+
147
+ origin_country_code = d.pop("origin_country_code")
148
+
149
+ def _parse_vendor_item_code(data: object) -> None | str | Unset:
150
+ if data is None:
151
+ return data
152
+ if isinstance(data, Unset):
153
+ return data
154
+ return cast(None | str | Unset, data)
155
+
156
+ vendor_item_code = _parse_vendor_item_code(d.pop("vendor_item_code", UNSET))
157
+
158
+ def _parse_hts_code(data: object) -> None | str | Unset:
159
+ if data is None:
160
+ return data
161
+ if isinstance(data, Unset):
162
+ return data
163
+ return cast(None | str | Unset, data)
164
+
165
+ hts_code = _parse_hts_code(d.pop("hts_code", UNSET))
166
+
167
+ def _parse_uom_id(data: object) -> None | str | Unset:
168
+ if data is None:
169
+ return data
170
+ if isinstance(data, Unset):
171
+ return data
172
+ return cast(None | str | Unset, data)
173
+
174
+ uom_id = _parse_uom_id(d.pop("uom_id", UNSET))
175
+
176
+ def _parse_min_order_qty(data: object) -> float | None | Unset:
177
+ if data is None:
178
+ return data
179
+ if isinstance(data, Unset):
180
+ return data
181
+ return cast(float | None | Unset, data)
182
+
183
+ min_order_qty = _parse_min_order_qty(d.pop("min_order_qty", UNSET))
184
+
185
+ def _parse_order_multiple_qty(data: object) -> float | None | Unset:
186
+ if data is None:
187
+ return data
188
+ if isinstance(data, Unset):
189
+ return data
190
+ return cast(float | None | Unset, data)
191
+
192
+ order_multiple_qty = _parse_order_multiple_qty(d.pop("order_multiple_qty", UNSET))
193
+
194
+ def _parse_lead_time_days(data: object) -> int | None | Unset:
195
+ if data is None:
196
+ return data
197
+ if isinstance(data, Unset):
198
+ return data
199
+ return cast(int | None | Unset, data)
200
+
201
+ lead_time_days = _parse_lead_time_days(d.pop("lead_time_days", UNSET))
202
+
203
+ is_primary = d.pop("is_primary", UNSET)
204
+
205
+ is_active = d.pop("is_active", UNSET)
206
+
207
+ def _parse_ext_data(data: object) -> CreateItemSourcingRequestExtDataType0 | None | Unset:
208
+ if data is None:
209
+ return data
210
+ if isinstance(data, Unset):
211
+ return data
212
+ try:
213
+ if not isinstance(data, dict):
214
+ raise TypeError()
215
+ ext_data_type_0 = CreateItemSourcingRequestExtDataType0.from_dict(data)
216
+
217
+ return ext_data_type_0
218
+ except (TypeError, ValueError, AttributeError, KeyError):
219
+ pass
220
+ return cast(CreateItemSourcingRequestExtDataType0 | None | Unset, data)
221
+
222
+ ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
223
+
224
+ create_item_sourcing_request = cls(
225
+ inventory_item_id=inventory_item_id,
226
+ vendor_id=vendor_id,
227
+ origin_country_code=origin_country_code,
228
+ vendor_item_code=vendor_item_code,
229
+ hts_code=hts_code,
230
+ uom_id=uom_id,
231
+ min_order_qty=min_order_qty,
232
+ order_multiple_qty=order_multiple_qty,
233
+ lead_time_days=lead_time_days,
234
+ is_primary=is_primary,
235
+ is_active=is_active,
236
+ ext_data=ext_data,
237
+ )
238
+
239
+ create_item_sourcing_request.additional_properties = d
240
+ return create_item_sourcing_request
241
+
242
+ @property
243
+ def additional_keys(self) -> list[str]:
244
+ return list(self.additional_properties.keys())
245
+
246
+ def __getitem__(self, key: str) -> Any:
247
+ return self.additional_properties[key]
248
+
249
+ def __setitem__(self, key: str, value: Any) -> None:
250
+ self.additional_properties[key] = value
251
+
252
+ def __delitem__(self, key: str) -> None:
253
+ del self.additional_properties[key]
254
+
255
+ def __contains__(self, key: str) -> bool:
256
+ 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="CreateItemSourcingRequestExtDataType0")
10
+
11
+
12
+ @_attrs_define
13
+ class CreateItemSourcingRequestExtDataType0:
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
+ create_item_sourcing_request_ext_data_type_0 = cls()
29
+
30
+ create_item_sourcing_request_ext_data_type_0.additional_properties = d
31
+ return create_item_sourcing_request_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,153 @@
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
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.pick_pack_ship_line_request import PickPackShipLineRequest
13
+
14
+
15
+ T = TypeVar("T", bound="CreatePickPackShipRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class CreatePickPackShipRequest:
20
+ """
21
+ Attributes:
22
+ sales_order_id (str):
23
+ warehouse_id (str):
24
+ lines (list[PickPackShipLineRequest]):
25
+ pick_number (None | str | Unset):
26
+ packing_slip_number (None | str | Unset):
27
+ notes (None | str | Unset):
28
+ """
29
+
30
+ sales_order_id: str
31
+ warehouse_id: str
32
+ lines: list[PickPackShipLineRequest]
33
+ pick_number: None | str | Unset = UNSET
34
+ packing_slip_number: None | str | Unset = UNSET
35
+ notes: None | str | Unset = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+ def to_dict(self) -> dict[str, Any]:
39
+ sales_order_id = self.sales_order_id
40
+
41
+ warehouse_id = self.warehouse_id
42
+
43
+ lines = []
44
+ for lines_item_data in self.lines:
45
+ lines_item = lines_item_data.to_dict()
46
+ lines.append(lines_item)
47
+
48
+ pick_number: None | str | Unset
49
+ if isinstance(self.pick_number, Unset):
50
+ pick_number = UNSET
51
+ else:
52
+ pick_number = self.pick_number
53
+
54
+ packing_slip_number: None | str | Unset
55
+ if isinstance(self.packing_slip_number, Unset):
56
+ packing_slip_number = UNSET
57
+ else:
58
+ packing_slip_number = self.packing_slip_number
59
+
60
+ notes: None | str | Unset
61
+ if isinstance(self.notes, Unset):
62
+ notes = UNSET
63
+ else:
64
+ notes = self.notes
65
+
66
+ field_dict: dict[str, Any] = {}
67
+ field_dict.update(self.additional_properties)
68
+ field_dict.update(
69
+ {
70
+ "sales_order_id": sales_order_id,
71
+ "warehouse_id": warehouse_id,
72
+ "lines": lines,
73
+ }
74
+ )
75
+ if pick_number is not UNSET:
76
+ field_dict["pick_number"] = pick_number
77
+ if packing_slip_number is not UNSET:
78
+ field_dict["packing_slip_number"] = packing_slip_number
79
+ if notes is not UNSET:
80
+ field_dict["notes"] = notes
81
+
82
+ return field_dict
83
+
84
+ @classmethod
85
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
86
+ from ..models.pick_pack_ship_line_request import PickPackShipLineRequest
87
+
88
+ d = dict(src_dict)
89
+ sales_order_id = d.pop("sales_order_id")
90
+
91
+ warehouse_id = d.pop("warehouse_id")
92
+
93
+ lines = []
94
+ _lines = d.pop("lines")
95
+ for lines_item_data in _lines:
96
+ lines_item = PickPackShipLineRequest.from_dict(lines_item_data)
97
+
98
+ lines.append(lines_item)
99
+
100
+ def _parse_pick_number(data: object) -> None | str | Unset:
101
+ if data is None:
102
+ return data
103
+ if isinstance(data, Unset):
104
+ return data
105
+ return cast(None | str | Unset, data)
106
+
107
+ pick_number = _parse_pick_number(d.pop("pick_number", UNSET))
108
+
109
+ def _parse_packing_slip_number(data: object) -> None | str | Unset:
110
+ if data is None:
111
+ return data
112
+ if isinstance(data, Unset):
113
+ return data
114
+ return cast(None | str | Unset, data)
115
+
116
+ packing_slip_number = _parse_packing_slip_number(d.pop("packing_slip_number", UNSET))
117
+
118
+ def _parse_notes(data: object) -> None | str | Unset:
119
+ if data is None:
120
+ return data
121
+ if isinstance(data, Unset):
122
+ return data
123
+ return cast(None | str | Unset, data)
124
+
125
+ notes = _parse_notes(d.pop("notes", UNSET))
126
+
127
+ create_pick_pack_ship_request = cls(
128
+ sales_order_id=sales_order_id,
129
+ warehouse_id=warehouse_id,
130
+ lines=lines,
131
+ pick_number=pick_number,
132
+ packing_slip_number=packing_slip_number,
133
+ notes=notes,
134
+ )
135
+
136
+ create_pick_pack_ship_request.additional_properties = d
137
+ return create_pick_pack_ship_request
138
+
139
+ @property
140
+ def additional_keys(self) -> list[str]:
141
+ return list(self.additional_properties.keys())
142
+
143
+ def __getitem__(self, key: str) -> Any:
144
+ return self.additional_properties[key]
145
+
146
+ def __setitem__(self, key: str, value: Any) -> None:
147
+ self.additional_properties[key] = value
148
+
149
+ def __delitem__(self, key: str) -> None:
150
+ del self.additional_properties[key]
151
+
152
+ def __contains__(self, key: str) -> bool:
153
+ return key in self.additional_properties
@@ -0,0 +1,116 @@
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
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.create_price_list_channel_assignment_request_ext_data_type_0 import (
13
+ CreatePriceListChannelAssignmentRequestExtDataType0,
14
+ )
15
+
16
+
17
+ T = TypeVar("T", bound="CreatePriceListChannelAssignmentRequest")
18
+
19
+
20
+ @_attrs_define
21
+ class CreatePriceListChannelAssignmentRequest:
22
+ """
23
+ Attributes:
24
+ sales_channel_id (str):
25
+ is_active (bool | Unset): Default: True.
26
+ ext_data (CreatePriceListChannelAssignmentRequestExtDataType0 | None | Unset):
27
+ """
28
+
29
+ sales_channel_id: str
30
+ is_active: bool | Unset = True
31
+ ext_data: CreatePriceListChannelAssignmentRequestExtDataType0 | None | Unset = UNSET
32
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
+
34
+ def to_dict(self) -> dict[str, Any]:
35
+ from ..models.create_price_list_channel_assignment_request_ext_data_type_0 import (
36
+ CreatePriceListChannelAssignmentRequestExtDataType0,
37
+ )
38
+
39
+ sales_channel_id = self.sales_channel_id
40
+
41
+ is_active = self.is_active
42
+
43
+ ext_data: dict[str, Any] | None | Unset
44
+ if isinstance(self.ext_data, Unset):
45
+ ext_data = UNSET
46
+ elif isinstance(self.ext_data, CreatePriceListChannelAssignmentRequestExtDataType0):
47
+ ext_data = self.ext_data.to_dict()
48
+ else:
49
+ ext_data = self.ext_data
50
+
51
+ field_dict: dict[str, Any] = {}
52
+ field_dict.update(self.additional_properties)
53
+ field_dict.update(
54
+ {
55
+ "sales_channel_id": sales_channel_id,
56
+ }
57
+ )
58
+ if is_active is not UNSET:
59
+ field_dict["is_active"] = is_active
60
+ if ext_data is not UNSET:
61
+ field_dict["ext_data"] = ext_data
62
+
63
+ return field_dict
64
+
65
+ @classmethod
66
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
67
+ from ..models.create_price_list_channel_assignment_request_ext_data_type_0 import (
68
+ CreatePriceListChannelAssignmentRequestExtDataType0,
69
+ )
70
+
71
+ d = dict(src_dict)
72
+ sales_channel_id = d.pop("sales_channel_id")
73
+
74
+ is_active = d.pop("is_active", UNSET)
75
+
76
+ def _parse_ext_data(data: object) -> CreatePriceListChannelAssignmentRequestExtDataType0 | None | Unset:
77
+ if data is None:
78
+ return data
79
+ if isinstance(data, Unset):
80
+ return data
81
+ try:
82
+ if not isinstance(data, dict):
83
+ raise TypeError()
84
+ ext_data_type_0 = CreatePriceListChannelAssignmentRequestExtDataType0.from_dict(data)
85
+
86
+ return ext_data_type_0
87
+ except (TypeError, ValueError, AttributeError, KeyError):
88
+ pass
89
+ return cast(CreatePriceListChannelAssignmentRequestExtDataType0 | None | Unset, data)
90
+
91
+ ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
92
+
93
+ create_price_list_channel_assignment_request = cls(
94
+ sales_channel_id=sales_channel_id,
95
+ is_active=is_active,
96
+ ext_data=ext_data,
97
+ )
98
+
99
+ create_price_list_channel_assignment_request.additional_properties = d
100
+ return create_price_list_channel_assignment_request
101
+
102
+ @property
103
+ def additional_keys(self) -> list[str]:
104
+ return list(self.additional_properties.keys())
105
+
106
+ def __getitem__(self, key: str) -> Any:
107
+ return self.additional_properties[key]
108
+
109
+ def __setitem__(self, key: str, value: Any) -> None:
110
+ self.additional_properties[key] = value
111
+
112
+ def __delitem__(self, key: str) -> None:
113
+ del self.additional_properties[key]
114
+
115
+ def __contains__(self, key: str) -> bool:
116
+ 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="CreatePriceListChannelAssignmentRequestExtDataType0")
10
+
11
+
12
+ @_attrs_define
13
+ class CreatePriceListChannelAssignmentRequestExtDataType0:
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
+ create_price_list_channel_assignment_request_ext_data_type_0 = cls()
29
+
30
+ create_price_list_channel_assignment_request_ext_data_type_0.additional_properties = d
31
+ return create_price_list_channel_assignment_request_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