etsy-python 1.0.16__tar.gz → 1.0.18__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.0.16 → etsy_python-1.0.18}/PKG-INFO +1 -1
- etsy_python-1.0.18/etsy_python/v3/enums/HolidayPreferences.py +41 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/Listing.py +4 -4
- etsy_python-1.0.18/etsy_python/v3/models/HolidayPreferences.py +20 -0
- etsy_python-1.0.18/etsy_python/v3/resources/HolidayPreferences.py +29 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python.egg-info/PKG-INFO +1 -1
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python.egg-info/SOURCES.txt +3 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/setup.py +1 -1
- {etsy_python-1.0.16 → etsy_python-1.0.18}/LICENSE +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/README.md +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/auth/OAuth.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/auth/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/common/Env.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/common/Request.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/common/Utils.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/common/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/Language.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/ListingInventory.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/ShippingProfile.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/ShopReceipt.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/enums/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/exceptions/BaseAPIException.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/exceptions/RequestException.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/exceptions/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/FileRequest.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Listing.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Miscellaneous.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Product.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Receipt.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Request.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/ShippingProfile.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Shop.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/ShopReturnPolicy.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/Utils.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/models/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Listing.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingFile.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingImage.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingInventory.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingOffering.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingProduct.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingTranslation.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingVariationImages.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingVideo.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Miscellaneous.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Payment.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/PaymentLedgerEntry.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Receipt.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ReceiptTransactions.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Response.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Review.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Session.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ShippingProfile.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Shop.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ShopProductionPartner.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ShopReturnPolicy.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ShopSection.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/Taxonomy.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/User.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/UserAddress.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/enums/RateLimit.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/enums/Request.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/enums/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/tests/__init__.py +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python.egg-info/dependency_links.txt +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python.egg-info/requires.txt +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python.egg-info/top_level.txt +0 -0
- {etsy_python-1.0.16 → etsy_python-1.0.18}/setup.cfg +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Reference:
|
|
5
|
+
Official Documentation: https://developer.etsy.com/documentation/tutorials/fulfillment/#country-holidays
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
class HOLIDAYS(Enum):
|
|
9
|
+
"""
|
|
10
|
+
# Note:
|
|
11
|
+
1. More Holidays are pending to be added, as Etsy only supports US and CA holidays as of Release (3.0.0 General Release 2024-07-24).
|
|
12
|
+
2. String values from "1" till "105" are supported by Etsy based on selected regions.
|
|
13
|
+
"""
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
class US_HOLIDAYS(Enum):
|
|
17
|
+
NEW_YEARS_DAY = "1"
|
|
18
|
+
MARTIN_LUTHER_KING_JR_DAY = "2"
|
|
19
|
+
PRESIDENTS_DAY = "3"
|
|
20
|
+
MEMORIAL_DAY = "4"
|
|
21
|
+
JUNETEENTH = "5"
|
|
22
|
+
INDEPENDENCE_DAY = "6"
|
|
23
|
+
LABOR_DAY = "7"
|
|
24
|
+
COLUMBUS_DAY = "8"
|
|
25
|
+
VETERANS_DAY = "9"
|
|
26
|
+
THANKSGIVING_DAY = "10"
|
|
27
|
+
CHRISTMAS_DAY = "11"
|
|
28
|
+
|
|
29
|
+
class CA_HOLIDAYS(Enum):
|
|
30
|
+
GOOD_FRIDAY = "12"
|
|
31
|
+
EASTER = "13"
|
|
32
|
+
VICTORIA_DAY = "14"
|
|
33
|
+
CANADA_DAY = "15"
|
|
34
|
+
TRUTH_AND_RECONCILIATION_DAY = "16"
|
|
35
|
+
REMEMBRANCE_DAY = "17"
|
|
36
|
+
CIVIC_HOLIDAY = "18"
|
|
37
|
+
BOXING_DAY = "19"
|
|
38
|
+
NEW_YEARS_DAY = "20"
|
|
39
|
+
LABOR_DAY = "21"
|
|
40
|
+
THANKSGIVING_DAY = "22"
|
|
41
|
+
CHRISTMAS_DAY = "23"
|
|
@@ -9,11 +9,11 @@ class WhoMade(Enum):
|
|
|
9
9
|
|
|
10
10
|
class WhenMade(Enum):
|
|
11
11
|
MADE_TO_ORDER = "made_to_order"
|
|
12
|
-
TWENTY_TWENTIES = "
|
|
12
|
+
TWENTY_TWENTIES = "2020_2025"
|
|
13
13
|
TWENTY_TENS = "2010_2019"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
TWENTY_OH_SIX_TO_NINE = "2006_2009"
|
|
15
|
+
BEFORE_2006 = "before_2006"
|
|
16
|
+
TWO_THOUSAND_TO_FIVE = "2000_2005"
|
|
17
17
|
NINETEEN_NINETIES = "1990s"
|
|
18
18
|
NINETEEN_EIGHTIES = "1980s"
|
|
19
19
|
NINETEEN_SEVENTIES = "1970s"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from etsy_python.v3.models.Request import Request
|
|
4
|
+
|
|
5
|
+
class UpdateHolidayPreferencesRequest(Request):
|
|
6
|
+
nullable = [
|
|
7
|
+
]
|
|
8
|
+
mandatory = [
|
|
9
|
+
"is_working"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
is_working: Optional[bool] = False,
|
|
15
|
+
):
|
|
16
|
+
self.is_working = is_working
|
|
17
|
+
super().__init__(
|
|
18
|
+
nullable=UpdateHolidayPreferencesRequest.nullable,
|
|
19
|
+
mandatory=UpdateHolidayPreferencesRequest.mandatory,
|
|
20
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Optional, Union
|
|
3
|
+
|
|
4
|
+
from etsy_python.v3.enums.HolidayPreferences import CA_HOLIDAYS, HOLIDAYS, US_HOLIDAYS
|
|
5
|
+
from etsy_python.v3.models.HolidayPreferences import UpdateHolidayPreferencesRequest
|
|
6
|
+
from etsy_python.v3.resources.enums.Request import Method
|
|
7
|
+
from etsy_python.v3.exceptions.RequestException import RequestException
|
|
8
|
+
from etsy_python.v3.resources.Session import EtsyClient
|
|
9
|
+
from etsy_python.v3.resources.Response import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class HolidayPreferencesResource:
|
|
14
|
+
session: EtsyClient
|
|
15
|
+
|
|
16
|
+
def get_holiday_preferences(self, shop_id: int) -> Union[Response, RequestException]:
|
|
17
|
+
endpoint = f"/shops/{shop_id}/holiday-preferences"
|
|
18
|
+
return self.session.make_request(endpoint)
|
|
19
|
+
|
|
20
|
+
def update_holiday_preferences(
|
|
21
|
+
self,
|
|
22
|
+
shop_id: int,
|
|
23
|
+
holiday_id: Optional[Union[HOLIDAYS, US_HOLIDAYS, CA_HOLIDAYS, str]],
|
|
24
|
+
holiday_preference: UpdateHolidayPreferencesRequest,
|
|
25
|
+
) -> Union[Response, RequestException]:
|
|
26
|
+
endpoint = f"/shops/{shop_id}/holiday-preferences/{holiday_id}"
|
|
27
|
+
return self.session.make_request(
|
|
28
|
+
endpoint, method=Method.PUT, payload=holiday_preference
|
|
29
|
+
)
|
|
@@ -14,6 +14,7 @@ etsy_python/v3/common/Env.py
|
|
|
14
14
|
etsy_python/v3/common/Request.py
|
|
15
15
|
etsy_python/v3/common/Utils.py
|
|
16
16
|
etsy_python/v3/common/__init__.py
|
|
17
|
+
etsy_python/v3/enums/HolidayPreferences.py
|
|
17
18
|
etsy_python/v3/enums/Language.py
|
|
18
19
|
etsy_python/v3/enums/Listing.py
|
|
19
20
|
etsy_python/v3/enums/ListingInventory.py
|
|
@@ -24,6 +25,7 @@ etsy_python/v3/exceptions/BaseAPIException.py
|
|
|
24
25
|
etsy_python/v3/exceptions/RequestException.py
|
|
25
26
|
etsy_python/v3/exceptions/__init__.py
|
|
26
27
|
etsy_python/v3/models/FileRequest.py
|
|
28
|
+
etsy_python/v3/models/HolidayPreferences.py
|
|
27
29
|
etsy_python/v3/models/Listing.py
|
|
28
30
|
etsy_python/v3/models/Miscellaneous.py
|
|
29
31
|
etsy_python/v3/models/Product.py
|
|
@@ -34,6 +36,7 @@ etsy_python/v3/models/Shop.py
|
|
|
34
36
|
etsy_python/v3/models/ShopReturnPolicy.py
|
|
35
37
|
etsy_python/v3/models/Utils.py
|
|
36
38
|
etsy_python/v3/models/__init__.py
|
|
39
|
+
etsy_python/v3/resources/HolidayPreferences.py
|
|
37
40
|
etsy_python/v3/resources/Listing.py
|
|
38
41
|
etsy_python/v3/resources/ListingFile.py
|
|
39
42
|
etsy_python/v3/resources/ListingImage.py
|
|
@@ -7,7 +7,7 @@ here = os.path.abspath(os.path.dirname(__file__))
|
|
|
7
7
|
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
|
|
8
8
|
long_description = "\n" + fh.read()
|
|
9
9
|
|
|
10
|
-
VERSION = "1.0.
|
|
10
|
+
VERSION = "1.0.18"
|
|
11
11
|
DESCRIPTION = "Etsy API Client Library for Python"
|
|
12
12
|
|
|
13
13
|
# Setting up
|
|
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
|
{etsy_python-1.0.16 → etsy_python-1.0.18}/etsy_python/v3/resources/ListingVariationImages.py
RENAMED
|
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
|