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,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_customer_assignment_response import PriceListCustomerAssignmentResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListPriceListCustomerAssignmentsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListPriceListCustomerAssignmentsResponse:
18
+ """
19
+ Attributes:
20
+ assignments (list[PriceListCustomerAssignmentResponse]):
21
+ total (int):
22
+ """
23
+
24
+ assignments: list[PriceListCustomerAssignmentResponse]
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_customer_assignment_response import PriceListCustomerAssignmentResponse
50
+
51
+ d = dict(src_dict)
52
+ assignments = []
53
+ _assignments = d.pop("assignments")
54
+ for assignments_item_data in _assignments:
55
+ assignments_item = PriceListCustomerAssignmentResponse.from_dict(assignments_item_data)
56
+
57
+ assignments.append(assignments_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_price_list_customer_assignments_response = cls(
62
+ assignments=assignments,
63
+ total=total,
64
+ )
65
+
66
+ list_price_list_customer_assignments_response.additional_properties = d
67
+ return list_price_list_customer_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.price_list_entry_response import PriceListEntryResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListPriceListEntriesResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListPriceListEntriesResponse:
18
+ """
19
+ Attributes:
20
+ entries (list[PriceListEntryResponse]):
21
+ total (int):
22
+ """
23
+
24
+ entries: list[PriceListEntryResponse]
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.price_list_entry_response import PriceListEntryResponse
50
+
51
+ d = dict(src_dict)
52
+ entries = []
53
+ _entries = d.pop("entries")
54
+ for entries_item_data in _entries:
55
+ entries_item = PriceListEntryResponse.from_dict(entries_item_data)
56
+
57
+ entries.append(entries_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_price_list_entries_response = cls(
62
+ entries=entries,
63
+ total=total,
64
+ )
65
+
66
+ list_price_list_entries_response.additional_properties = d
67
+ return list_price_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.sales_rep_response import SalesRepResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListSalesRepsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListSalesRepsResponse:
18
+ """
19
+ Attributes:
20
+ sales_reps (list[SalesRepResponse]):
21
+ total (int):
22
+ """
23
+
24
+ sales_reps: list[SalesRepResponse]
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
+ sales_reps = []
30
+ for sales_reps_item_data in self.sales_reps:
31
+ sales_reps_item = sales_reps_item_data.to_dict()
32
+ sales_reps.append(sales_reps_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
+ "sales_reps": sales_reps,
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.sales_rep_response import SalesRepResponse
50
+
51
+ d = dict(src_dict)
52
+ sales_reps = []
53
+ _sales_reps = d.pop("sales_reps")
54
+ for sales_reps_item_data in _sales_reps:
55
+ sales_reps_item = SalesRepResponse.from_dict(sales_reps_item_data)
56
+
57
+ sales_reps.append(sales_reps_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_sales_reps_response = cls(
62
+ sales_reps=sales_reps,
63
+ total=total,
64
+ )
65
+
66
+ list_sales_reps_response.additional_properties = d
67
+ return list_sales_reps_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.warehouse_location_item_response import WarehouseLocationItemResponse
11
+
12
+
13
+ T = TypeVar("T", bound="ListWarehouseLocationItemsResponse")
14
+
15
+
16
+ @_attrs_define
17
+ class ListWarehouseLocationItemsResponse:
18
+ """
19
+ Attributes:
20
+ items (list[WarehouseLocationItemResponse]):
21
+ total (int):
22
+ """
23
+
24
+ items: list[WarehouseLocationItemResponse]
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.warehouse_location_item_response import WarehouseLocationItemResponse
50
+
51
+ d = dict(src_dict)
52
+ items = []
53
+ _items = d.pop("items")
54
+ for items_item_data in _items:
55
+ items_item = WarehouseLocationItemResponse.from_dict(items_item_data)
56
+
57
+ items.append(items_item)
58
+
59
+ total = d.pop("total")
60
+
61
+ list_warehouse_location_items_response = cls(
62
+ items=items,
63
+ total=total,
64
+ )
65
+
66
+ list_warehouse_location_items_response.additional_properties = d
67
+ return list_warehouse_location_items_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,84 @@
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 ..types import UNSET, Unset
11
+
12
+ T = TypeVar("T", bound="MarkPickPackShipShippedRequest")
13
+
14
+
15
+ @_attrs_define
16
+ class MarkPickPackShipShippedRequest:
17
+ """
18
+ Attributes:
19
+ shipped_at (datetime.datetime | None | Unset):
20
+ """
21
+
22
+ shipped_at: datetime.datetime | None | Unset = UNSET
23
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> dict[str, Any]:
26
+ shipped_at: None | str | Unset
27
+ if isinstance(self.shipped_at, Unset):
28
+ shipped_at = UNSET
29
+ elif isinstance(self.shipped_at, datetime.datetime):
30
+ shipped_at = self.shipped_at.isoformat()
31
+ else:
32
+ shipped_at = self.shipped_at
33
+
34
+ field_dict: dict[str, Any] = {}
35
+ field_dict.update(self.additional_properties)
36
+ field_dict.update({})
37
+ if shipped_at is not UNSET:
38
+ field_dict["shipped_at"] = shipped_at
39
+
40
+ return field_dict
41
+
42
+ @classmethod
43
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
44
+ d = dict(src_dict)
45
+
46
+ def _parse_shipped_at(data: object) -> datetime.datetime | None | Unset:
47
+ if data is None:
48
+ return data
49
+ if isinstance(data, Unset):
50
+ return data
51
+ try:
52
+ if not isinstance(data, str):
53
+ raise TypeError()
54
+ shipped_at_type_0 = datetime.datetime.fromisoformat(data)
55
+
56
+ return shipped_at_type_0
57
+ except (TypeError, ValueError, AttributeError, KeyError):
58
+ pass
59
+ return cast(datetime.datetime | None | Unset, data)
60
+
61
+ shipped_at = _parse_shipped_at(d.pop("shipped_at", UNSET))
62
+
63
+ mark_pick_pack_ship_shipped_request = cls(
64
+ shipped_at=shipped_at,
65
+ )
66
+
67
+ mark_pick_pack_ship_shipped_request.additional_properties = d
68
+ return mark_pick_pack_ship_shipped_request
69
+
70
+ @property
71
+ def additional_keys(self) -> list[str]:
72
+ return list(self.additional_properties.keys())
73
+
74
+ def __getitem__(self, key: str) -> Any:
75
+ return self.additional_properties[key]
76
+
77
+ def __setitem__(self, key: str, value: Any) -> None:
78
+ self.additional_properties[key] = value
79
+
80
+ def __delitem__(self, key: str) -> None:
81
+ del self.additional_properties[key]
82
+
83
+ def __contains__(self, key: str) -> bool:
84
+ return key in self.additional_properties
@@ -0,0 +1,100 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import 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
+ T = TypeVar("T", bound="PickPackShipLineRequest")
12
+
13
+
14
+ @_attrs_define
15
+ class PickPackShipLineRequest:
16
+ """A planned fulfillment quantity. ``stock_quantity`` is canonical.
17
+
18
+ Attributes:
19
+ sales_order_line_id (str):
20
+ source_location_id (str):
21
+ quantity (float):
22
+ stock_quantity (float | None | Unset):
23
+ """
24
+
25
+ sales_order_line_id: str
26
+ source_location_id: str
27
+ quantity: float
28
+ stock_quantity: float | None | Unset = UNSET
29
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ sales_order_line_id = self.sales_order_line_id
33
+
34
+ source_location_id = self.source_location_id
35
+
36
+ quantity = self.quantity
37
+
38
+ stock_quantity: float | None | Unset
39
+ if isinstance(self.stock_quantity, Unset):
40
+ stock_quantity = UNSET
41
+ else:
42
+ stock_quantity = self.stock_quantity
43
+
44
+ field_dict: dict[str, Any] = {}
45
+ field_dict.update(self.additional_properties)
46
+ field_dict.update(
47
+ {
48
+ "sales_order_line_id": sales_order_line_id,
49
+ "source_location_id": source_location_id,
50
+ "quantity": quantity,
51
+ }
52
+ )
53
+ if stock_quantity is not UNSET:
54
+ field_dict["stock_quantity"] = stock_quantity
55
+
56
+ return field_dict
57
+
58
+ @classmethod
59
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
60
+ d = dict(src_dict)
61
+ sales_order_line_id = d.pop("sales_order_line_id")
62
+
63
+ source_location_id = d.pop("source_location_id")
64
+
65
+ quantity = d.pop("quantity")
66
+
67
+ def _parse_stock_quantity(data: object) -> float | None | Unset:
68
+ if data is None:
69
+ return data
70
+ if isinstance(data, Unset):
71
+ return data
72
+ return cast(float | None | Unset, data)
73
+
74
+ stock_quantity = _parse_stock_quantity(d.pop("stock_quantity", UNSET))
75
+
76
+ pick_pack_ship_line_request = cls(
77
+ sales_order_line_id=sales_order_line_id,
78
+ source_location_id=source_location_id,
79
+ quantity=quantity,
80
+ stock_quantity=stock_quantity,
81
+ )
82
+
83
+ pick_pack_ship_line_request.additional_properties = d
84
+ return pick_pack_ship_line_request
85
+
86
+ @property
87
+ def additional_keys(self) -> list[str]:
88
+ return list(self.additional_properties.keys())
89
+
90
+ def __getitem__(self, key: str) -> Any:
91
+ return self.additional_properties[key]
92
+
93
+ def __setitem__(self, key: str, value: Any) -> None:
94
+ self.additional_properties[key] = value
95
+
96
+ def __delitem__(self, key: str) -> None:
97
+ del self.additional_properties[key]
98
+
99
+ def __contains__(self, key: str) -> bool:
100
+ return key in self.additional_properties
@@ -0,0 +1,111 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import 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
+ T = TypeVar("T", bound="PickPackShipPackedLineRequest")
12
+
13
+
14
+ @_attrs_define
15
+ class PickPackShipPackedLineRequest:
16
+ """
17
+ Attributes:
18
+ packing_slip_line_id (str):
19
+ packed_quantity (float):
20
+ packed_stock_quantity (float | None | Unset):
21
+ package_id (None | str | Unset):
22
+ """
23
+
24
+ packing_slip_line_id: str
25
+ packed_quantity: float
26
+ packed_stock_quantity: float | None | Unset = UNSET
27
+ package_id: None | str | Unset = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ packing_slip_line_id = self.packing_slip_line_id
32
+
33
+ packed_quantity = self.packed_quantity
34
+
35
+ packed_stock_quantity: float | None | Unset
36
+ if isinstance(self.packed_stock_quantity, Unset):
37
+ packed_stock_quantity = UNSET
38
+ else:
39
+ packed_stock_quantity = self.packed_stock_quantity
40
+
41
+ package_id: None | str | Unset
42
+ if isinstance(self.package_id, Unset):
43
+ package_id = UNSET
44
+ else:
45
+ package_id = self.package_id
46
+
47
+ field_dict: dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update(
50
+ {
51
+ "packing_slip_line_id": packing_slip_line_id,
52
+ "packed_quantity": packed_quantity,
53
+ }
54
+ )
55
+ if packed_stock_quantity is not UNSET:
56
+ field_dict["packed_stock_quantity"] = packed_stock_quantity
57
+ if package_id is not UNSET:
58
+ field_dict["package_id"] = package_id
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
64
+ d = dict(src_dict)
65
+ packing_slip_line_id = d.pop("packing_slip_line_id")
66
+
67
+ packed_quantity = d.pop("packed_quantity")
68
+
69
+ def _parse_packed_stock_quantity(data: object) -> float | None | Unset:
70
+ if data is None:
71
+ return data
72
+ if isinstance(data, Unset):
73
+ return data
74
+ return cast(float | None | Unset, data)
75
+
76
+ packed_stock_quantity = _parse_packed_stock_quantity(d.pop("packed_stock_quantity", UNSET))
77
+
78
+ def _parse_package_id(data: object) -> None | str | Unset:
79
+ if data is None:
80
+ return data
81
+ if isinstance(data, Unset):
82
+ return data
83
+ return cast(None | str | Unset, data)
84
+
85
+ package_id = _parse_package_id(d.pop("package_id", UNSET))
86
+
87
+ pick_pack_ship_packed_line_request = cls(
88
+ packing_slip_line_id=packing_slip_line_id,
89
+ packed_quantity=packed_quantity,
90
+ packed_stock_quantity=packed_stock_quantity,
91
+ package_id=package_id,
92
+ )
93
+
94
+ pick_pack_ship_packed_line_request.additional_properties = d
95
+ return pick_pack_ship_packed_line_request
96
+
97
+ @property
98
+ def additional_keys(self) -> list[str]:
99
+ return list(self.additional_properties.keys())
100
+
101
+ def __getitem__(self, key: str) -> Any:
102
+ return self.additional_properties[key]
103
+
104
+ def __setitem__(self, key: str, value: Any) -> None:
105
+ self.additional_properties[key] = value
106
+
107
+ def __delitem__(self, key: str) -> None:
108
+ del self.additional_properties[key]
109
+
110
+ def __contains__(self, key: str) -> bool:
111
+ return key in self.additional_properties