etsy-python 1.1.7__tar.gz → 1.1.9__tar.gz
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.
- {etsy_python-1.1.7/etsy_python.egg-info → etsy_python-1.1.9}/PKG-INFO +1 -1
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/_version.py +1 -1
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Listing.py +46 -26
- etsy_python-1.1.9/etsy_python/v3/models/Receipt.py +102 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9/etsy_python.egg-info}/PKG-INFO +1 -1
- etsy_python-1.1.7/etsy_python/v3/models/Receipt.py +0 -46
- {etsy_python-1.1.7 → etsy_python-1.1.9}/LICENSE +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/MANIFEST.in +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/README.md +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/auth/OAuth.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/auth/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/common/Env.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/common/Request.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/common/Utils.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/common/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/HolidayPreferences.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/Language.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/Listing.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/ListingInventory.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/ProcessingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/ShippingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/ShopReceipt.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/enums/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/exceptions/BaseAPIException.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/exceptions/RequestException.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/exceptions/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/FileRequest.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/HolidayPreferences.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Miscellaneous.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/ProcessingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Product.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Request.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/ShippingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Shop.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/ShopReturnPolicy.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/Utils.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/models/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/HolidayPreferences.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Listing.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingFile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingImage.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingInventory.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingOffering.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingProduct.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingTranslation.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingVariationImages.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ListingVideo.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Miscellaneous.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Payment.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/PaymentLedgerEntry.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ProcessingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Receipt.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ReceiptTransactions.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Response.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Review.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Session.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ShippingProfile.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Shop.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ShopProductionPartner.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ShopReturnPolicy.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/ShopSection.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/Taxonomy.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/User.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/UserAddress.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/enums/RateLimit.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/enums/Request.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python/v3/resources/enums/__init__.py +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python.egg-info/SOURCES.txt +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python.egg-info/dependency_links.txt +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python.egg-info/requires.txt +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/etsy_python.egg-info/top_level.txt +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/setup.cfg +0 -0
- {etsy_python-1.1.7 → etsy_python-1.1.9}/setup.py +0 -0
|
@@ -14,6 +14,42 @@ from etsy_python.v3.models.Request import Request
|
|
|
14
14
|
from etsy_python.v3.models.FileRequest import FileRequest
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
_PERSONALIZATION_DEPRECATION_MSG = (
|
|
18
|
+
"is_personalizable, personalization_is_required, "
|
|
19
|
+
"personalization_char_count_max, and personalization_instructions "
|
|
20
|
+
"are deprecated by the Etsy API and scheduled for removal. "
|
|
21
|
+
"Use the personalization endpoint (update_listing_personalization) "
|
|
22
|
+
"instead. See "
|
|
23
|
+
"https://developers.etsy.com/documentation/tutorials/personalization-migration "
|
|
24
|
+
"for migration details."
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _warn_if_personalization_used(
|
|
29
|
+
is_personalizable: Optional[bool],
|
|
30
|
+
personalization_is_required: Optional[bool],
|
|
31
|
+
personalization_char_count_max: Optional[int],
|
|
32
|
+
personalization_instructions: Optional[str],
|
|
33
|
+
) -> None:
|
|
34
|
+
"""Emit DeprecationWarning when a deprecated personalization field is actively set.
|
|
35
|
+
|
|
36
|
+
Falsy values (False, 0, empty string, None) match the API's documented
|
|
37
|
+
defaults and remain no-ops after the fields are removed, so they do not
|
|
38
|
+
trigger the warning.
|
|
39
|
+
"""
|
|
40
|
+
if any([
|
|
41
|
+
is_personalizable,
|
|
42
|
+
personalization_is_required,
|
|
43
|
+
personalization_char_count_max,
|
|
44
|
+
personalization_instructions,
|
|
45
|
+
]):
|
|
46
|
+
warnings.warn(
|
|
47
|
+
_PERSONALIZATION_DEPRECATION_MSG,
|
|
48
|
+
DeprecationWarning,
|
|
49
|
+
stacklevel=3,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
17
53
|
class CreateDraftListingRequest(Request):
|
|
18
54
|
nullable = [
|
|
19
55
|
"shipping_profile_id",
|
|
@@ -105,20 +141,12 @@ class CreateDraftListingRequest(Request):
|
|
|
105
141
|
self.personalization_is_required = personalization_is_required
|
|
106
142
|
self.personalization_char_count_max = personalization_char_count_max
|
|
107
143
|
self.personalization_instructions = personalization_instructions
|
|
108
|
-
|
|
109
|
-
|
|
144
|
+
_warn_if_personalization_used(
|
|
145
|
+
is_personalizable,
|
|
146
|
+
personalization_is_required,
|
|
147
|
+
personalization_char_count_max,
|
|
110
148
|
personalization_instructions,
|
|
111
|
-
|
|
112
|
-
warnings.warn(
|
|
113
|
-
"personalization_is_required, personalization_char_count_max, and "
|
|
114
|
-
"personalization_instructions are deprecated by the Etsy API and "
|
|
115
|
-
"scheduled for removal. Use the personalization endpoint "
|
|
116
|
-
"(update_listing_personalization) instead. See "
|
|
117
|
-
"https://developers.etsy.com/documentation/tutorials/personalization-migration "
|
|
118
|
-
"for migration details.",
|
|
119
|
-
DeprecationWarning,
|
|
120
|
-
stacklevel=2,
|
|
121
|
-
)
|
|
149
|
+
)
|
|
122
150
|
self.production_partner_ids = production_partner_ids
|
|
123
151
|
self.image_ids = image_ids
|
|
124
152
|
self.is_supply = is_supply
|
|
@@ -208,20 +236,12 @@ class UpdateListingRequest(Request):
|
|
|
208
236
|
self.personalization_is_required = personalization_is_required
|
|
209
237
|
self.personalization_char_count_max = personalization_char_count_max
|
|
210
238
|
self.personalization_instructions = personalization_instructions
|
|
211
|
-
|
|
212
|
-
|
|
239
|
+
_warn_if_personalization_used(
|
|
240
|
+
is_personalizable,
|
|
241
|
+
personalization_is_required,
|
|
242
|
+
personalization_char_count_max,
|
|
213
243
|
personalization_instructions,
|
|
214
|
-
|
|
215
|
-
warnings.warn(
|
|
216
|
-
"personalization_is_required, personalization_char_count_max, and "
|
|
217
|
-
"personalization_instructions are deprecated by the Etsy API and "
|
|
218
|
-
"scheduled for removal. Use the personalization endpoint "
|
|
219
|
-
"(update_listing_personalization) instead. See "
|
|
220
|
-
"https://developers.etsy.com/documentation/tutorials/personalization-migration "
|
|
221
|
-
"for migration details.",
|
|
222
|
-
DeprecationWarning,
|
|
223
|
-
stacklevel=2,
|
|
224
|
-
)
|
|
244
|
+
)
|
|
225
245
|
self.state = state
|
|
226
246
|
self.is_supply = is_supply
|
|
227
247
|
self.production_partner_ids = production_partner_ids
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
from typing import List, Optional, TypedDict
|
|
2
|
+
|
|
3
|
+
from etsy_python.v3.models.Request import Request
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CustomsItem(TypedDict):
|
|
7
|
+
# HS_code preserves Etsy's spec casing (Harmonized System code); do not snake_case.
|
|
8
|
+
country_of_origin: Optional[str]
|
|
9
|
+
declared_value: Optional[float]
|
|
10
|
+
HS_code: Optional[str]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CreateReceiptShipmentRequest(Request):
|
|
14
|
+
# Spec marks these fields nullable: true. Strings + array are added so callers
|
|
15
|
+
# can pass empty values to clear them; floats are intentionally excluded so
|
|
16
|
+
# legitimate zero values (free label, zero duty) serialize as 0, not null.
|
|
17
|
+
nullable: List[str] = [
|
|
18
|
+
"mail_class",
|
|
19
|
+
"weight_units",
|
|
20
|
+
"dimension_units",
|
|
21
|
+
"shipping_label_currency",
|
|
22
|
+
"revenue_eligibility",
|
|
23
|
+
"ship_from_country",
|
|
24
|
+
"ship_to_country",
|
|
25
|
+
"incoterm",
|
|
26
|
+
"customs_data",
|
|
27
|
+
"duty_currency",
|
|
28
|
+
"ship_date",
|
|
29
|
+
]
|
|
30
|
+
mandatory: List[str] = []
|
|
31
|
+
|
|
32
|
+
def __init__(
|
|
33
|
+
self,
|
|
34
|
+
tracking_code: Optional[str] = None,
|
|
35
|
+
carrier_name: Optional[str] = None,
|
|
36
|
+
send_bcc: Optional[bool] = None,
|
|
37
|
+
note_to_buyer: Optional[str] = None,
|
|
38
|
+
mail_class: Optional[str] = None,
|
|
39
|
+
weight: Optional[float] = None,
|
|
40
|
+
weight_units: Optional[str] = None,
|
|
41
|
+
length: Optional[float] = None,
|
|
42
|
+
width: Optional[float] = None,
|
|
43
|
+
height: Optional[float] = None,
|
|
44
|
+
dimension_units: Optional[str] = None,
|
|
45
|
+
shipping_label_cost: Optional[float] = None,
|
|
46
|
+
shipping_label_currency: Optional[str] = None,
|
|
47
|
+
revenue_eligibility: Optional[str] = None,
|
|
48
|
+
ship_from_country: Optional[str] = None,
|
|
49
|
+
ship_to_country: Optional[str] = None,
|
|
50
|
+
incoterm: Optional[str] = None,
|
|
51
|
+
customs_data: Optional[List[CustomsItem]] = None,
|
|
52
|
+
duty_amount: Optional[float] = None,
|
|
53
|
+
duty_currency: Optional[str] = None,
|
|
54
|
+
ship_date: Optional[str] = None,
|
|
55
|
+
):
|
|
56
|
+
self.tracking_code = tracking_code
|
|
57
|
+
self.carrier_name = carrier_name
|
|
58
|
+
self.send_bcc = send_bcc
|
|
59
|
+
self.note_to_buyer = note_to_buyer
|
|
60
|
+
self.mail_class = mail_class
|
|
61
|
+
self.weight = weight
|
|
62
|
+
self.weight_units = weight_units
|
|
63
|
+
self.length = length
|
|
64
|
+
self.width = width
|
|
65
|
+
self.height = height
|
|
66
|
+
self.dimension_units = dimension_units
|
|
67
|
+
self.shipping_label_cost = shipping_label_cost
|
|
68
|
+
self.shipping_label_currency = shipping_label_currency
|
|
69
|
+
self.revenue_eligibility = revenue_eligibility
|
|
70
|
+
self.ship_from_country = ship_from_country
|
|
71
|
+
self.ship_to_country = ship_to_country
|
|
72
|
+
self.incoterm = incoterm
|
|
73
|
+
self.customs_data = customs_data
|
|
74
|
+
self.duty_amount = duty_amount
|
|
75
|
+
self.duty_currency = duty_currency
|
|
76
|
+
self.ship_date = ship_date
|
|
77
|
+
|
|
78
|
+
super().__init__(
|
|
79
|
+
nullable=CreateReceiptShipmentRequest.nullable,
|
|
80
|
+
mandatory=CreateReceiptShipmentRequest.mandatory,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class UpdateShopReceiptRequest(Request):
|
|
85
|
+
nullable: List[str] = [
|
|
86
|
+
"was_shipped",
|
|
87
|
+
"was_paid",
|
|
88
|
+
]
|
|
89
|
+
mandatory: List[str] = []
|
|
90
|
+
|
|
91
|
+
def __init__(
|
|
92
|
+
self,
|
|
93
|
+
was_shipped: Optional[bool] = None,
|
|
94
|
+
was_paid: Optional[bool] = None,
|
|
95
|
+
):
|
|
96
|
+
self.was_shipped = was_shipped
|
|
97
|
+
self.was_paid = was_paid
|
|
98
|
+
|
|
99
|
+
super().__init__(
|
|
100
|
+
nullable=UpdateShopReceiptRequest.nullable,
|
|
101
|
+
mandatory=UpdateShopReceiptRequest.mandatory,
|
|
102
|
+
)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
|
|
3
|
-
from etsy_python.v3.models.Request import Request
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class CreateReceiptShipmentRequest(Request):
|
|
7
|
-
nullable: List[str] = []
|
|
8
|
-
mandatory: List[str] = []
|
|
9
|
-
|
|
10
|
-
def __init__(
|
|
11
|
-
self,
|
|
12
|
-
tracking_code: Optional[str] = None,
|
|
13
|
-
carrier_name: Optional[str] = None,
|
|
14
|
-
send_bcc: Optional[bool] = None,
|
|
15
|
-
note_to_buyer: Optional[str] = None,
|
|
16
|
-
):
|
|
17
|
-
self.tracking_code = tracking_code
|
|
18
|
-
self.carrier_name = carrier_name
|
|
19
|
-
self.send_bcc = send_bcc
|
|
20
|
-
self.note_to_buyer = note_to_buyer
|
|
21
|
-
|
|
22
|
-
super().__init__(
|
|
23
|
-
nullable=CreateReceiptShipmentRequest.nullable,
|
|
24
|
-
mandatory=CreateReceiptShipmentRequest.mandatory,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class UpdateShopReceiptRequest(Request):
|
|
29
|
-
nullable: List[str] = [
|
|
30
|
-
"was_shipped",
|
|
31
|
-
"was_paid",
|
|
32
|
-
]
|
|
33
|
-
mandatory: List[str] = []
|
|
34
|
-
|
|
35
|
-
def __init__(
|
|
36
|
-
self,
|
|
37
|
-
was_shipped: Optional[bool] = None,
|
|
38
|
-
was_paid: Optional[bool] = None,
|
|
39
|
-
):
|
|
40
|
-
self.was_shipped = was_shipped
|
|
41
|
-
self.was_paid = was_paid
|
|
42
|
-
|
|
43
|
-
super().__init__(
|
|
44
|
-
nullable=UpdateShopReceiptRequest.nullable,
|
|
45
|
-
mandatory=UpdateShopReceiptRequest.mandatory,
|
|
46
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|