Skip to content

Sync SDK with Etsy API spec — add buyer_country, currency params#21

Merged
amitray007 merged 2 commits intomasterfrom
release/sdk-audit-2026-04-06
Apr 6, 2026
Merged

Sync SDK with Etsy API spec — add buyer_country, currency params#21
amitray007 merged 2 commits intomasterfrom
release/sdk-audit-2026-04-06

Conversation

@amitray007
Copy link
Copy Markdown
Owner

Summary

Addresses #20 — syncs the SDK with the latest Etsy OAS spec changes.

  • Add buyer_country and currency optional query params to find_all_listings_active and get_listings_by_listing_ids
  • Add BUYER_PRICE value to the Includes enum (new spec includes option)
  • Update specs/baseline.json to latest Etsy OAS spec (captures new ListingBuyerPrice schema, converted_price/buyer_price response fields)

Informational (no code changes needed):

  • Personalization fields deprecated in createDraftListing/updateListing — already handled with deprecation warnings
  • 4 extra SDK methods are intentional deprecated wrappers for backward compat
  • State.REMOVED not in spec — already documented
  • Holiday enum design is intentional (US/CA named constants + raw int IDs for other regions)
  • Response-only schema changes need no SDK updates (raw dict responses)

Test plan

  • All 239 tests pass (pytest -v)
  • 4 new tests added for buyer_country/currency param passthrough and default behavior
  • Verified new params match spec types (both Optional[str])
  • Verified BuyerPrice enum value matches spec casing

🤖 Generated with Claude Code

amitray007 and others added 2 commits April 6, 2026 16:38
Sync SDK with latest Etsy OAS spec changes:
- Add buyer_country and currency optional query params to find_all_listings_active
- Add buyer_country and currency optional query params to get_listings_by_listing_ids
- Update specs/baseline.json to latest spec (includes new ListingBuyerPrice schema,
  converted_price field, BuyerPrice includes option)

Closes #20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add tests for buyer_country and currency on find_all_listings_active
- Add tests for buyer_country and currency on get_listings_by_listing_ids
- Add BUYER_PRICE enum value to Includes to match updated spec

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amitray007 amitray007 self-assigned this Apr 6, 2026
Copilot AI review requested due to automatic review settings April 6, 2026 11:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

Test Coverage Report

Overall: 93% (1534/1644 statements covered)

Coverage by file
File Statements Missing Coverage
etsy_python/v3/auth/OAuth.py 33 33 0%
etsy_python/v3/auth/__init__.py 1 1 0%
etsy_python/v3/enums/Language.py 12 12 0%
etsy_python/v3/enums/ListingInventory.py 3 3 0%
etsy_python/v3/models/ProcessingProfile.py 21 10 52%
etsy_python/v3/models/ShopReturnPolicy.py 25 11 56%
etsy_python/v3/resources/ProcessingProfile.py 26 11 58%
etsy_python/v3/models/HolidayPreferences.py 8 2 75%
etsy_python/v3/models/Miscellaneous.py 8 2 75%
etsy_python/v3/common/Utils.py 31 4 87%
etsy_python/v3/exceptions/RequestException.py 8 1 88%
etsy_python/v3/resources/Response.py 9 1 89%
etsy_python/v3/exceptions/BaseAPIException.py 10 1 90%
etsy_python/v3/models/Request.py 22 2 91%
etsy_python/v3/resources/Listing.py 81 6 93%
etsy_python/v3/models/Listing.py 148 9 94%
etsy_python/v3/resources/Session.py 94 1 99%
etsy_python/__init__.py 2 0 100%
etsy_python/_version.py 1 0 100%
etsy_python/v3/common/Env.py 10 0 100%
etsy_python/v3/common/Request.py 3 0 100%
etsy_python/v3/enums/HolidayPreferences.py 29 0 100%
etsy_python/v3/enums/Listing.py 78 0 100%
etsy_python/v3/enums/ProcessingProfile.py 7 0 100%
etsy_python/v3/enums/ShippingProfile.py 261 0 100%
etsy_python/v3/enums/ShopReceipt.py 12 0 100%
etsy_python/v3/exceptions/__init__.py 2 0 100%
etsy_python/v3/models/FileRequest.py 7 0 100%
etsy_python/v3/models/Product.py 7 0 100%
etsy_python/v3/models/Receipt.py 18 0 100%
etsy_python/v3/models/ShippingProfile.py 85 0 100%
etsy_python/v3/models/Shop.py 24 0 100%
etsy_python/v3/models/Utils.py 19 0 100%
etsy_python/v3/models/__init__.py 10 0 100%
etsy_python/v3/resources/HolidayPreferences.py 19 0 100%
etsy_python/v3/resources/ListingFile.py 22 0 100%
etsy_python/v3/resources/ListingImage.py 22 0 100%
etsy_python/v3/resources/ListingInventory.py 18 0 100%
etsy_python/v3/resources/ListingOffering.py 12 0 100%
etsy_python/v3/resources/ListingProduct.py 12 0 100%
etsy_python/v3/resources/ListingTranslation.py 19 0 100%
etsy_python/v3/resources/ListingVariationImages.py 16 0 100%
etsy_python/v3/resources/ListingVideo.py 22 0 100%
etsy_python/v3/resources/Miscellaneous.py 16 0 100%
etsy_python/v3/resources/Payment.py 23 0 100%
etsy_python/v3/resources/PaymentLedgerEntry.py 15 0 100%
etsy_python/v3/resources/Receipt.py 25 0 100%
etsy_python/v3/resources/ReceiptTransactions.py 27 0 100%
etsy_python/v3/resources/Review.py 16 0 100%
etsy_python/v3/resources/ShippingProfile.py 58 0 100%
etsy_python/v3/resources/Shop.py 23 0 100%
etsy_python/v3/resources/ShopProductionPartner.py 11 0 100%
etsy_python/v3/resources/ShopReturnPolicy.py 28 0 100%
etsy_python/v3/resources/ShopSection.py 25 0 100%
etsy_python/v3/resources/Taxonomy.py 23 0 100%
etsy_python/v3/resources/User.py 14 0 100%
etsy_python/v3/resources/UserAddress.py 19 0 100%
etsy_python/v3/resources/__init__.py 29 0 100%
etsy_python/v3/resources/enums/RateLimit.py 8 0 100%
etsy_python/v3/resources/enums/Request.py 7 0 100%

Updated by PR Tests

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Python SDK to align with the latest Etsy OpenAPI spec by adding newly introduced query parameters for listing retrieval and extending the listings “includes” options.

Changes:

  • Added optional buyer_country and currency query params to find_all_listings_active and get_listings_by_listing_ids.
  • Added BUYER_PRICE to the Includes enum to match the new spec include option.
  • Updated specs/baseline.json to the latest Etsy OAS baseline (including buyer price / converted price schema updates).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
etsy_python/v3/resources/Listing.py Adds buyer_country/currency passthrough in query params for the two affected endpoints.
etsy_python/v3/enums/Listing.py Extends Includes with BUYER_PRICE = "BuyerPrice" per spec.
tests/test_listing_resource.py Adds tests verifying passthrough and default None behavior for the new query params.
specs/baseline.json Syncs stored OpenAPI baseline to reflect the latest Etsy spec changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amitray007 amitray007 merged commit 7625ce5 into master Apr 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants