Skip to content

Commit

Permalink
Upgrade Shopify API to 2024-01 (#187)
Browse files Browse the repository at this point in the history
* upgrade shopify api to 2024-01

* 2023-07 schema changes

* Version bump & changelog

* removed deprecated fields from customer schema

* removed few keys from actual keys to check as data is not available for them

* refactoring

* updated the comment
  • Loading branch information
rdeshmukh15 authored Feb 29, 2024
1 parent fea2b88 commit df35a37
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 36 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.10.0
* Updates the Shopify SDK to 12.3.0
* Updates API version used to 2024-01
* Incarporates schema changes [#187](https://github.com/singer-io/tap-shopify/pull/187)

## 1.9.0
* Updates to run on python 3.11 [#186](https://github.com/singer-io/tap-shopify/pull/186)

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

setup(
name="tap-shopify",
version="1.9.0",
version="1.10.0",
description="Singer.io tap for extracting Shopify data",
author="Stitch",
url="http://github.com/singer-io/tap-shopify",
classifiers=["Programming Language :: Python :: 3 :: Only"],
python_requires='>=3.5.2',
py_modules=["tap_shopify"],
install_requires=[
"ShopifyAPI==12.3.0",
"ShopifyAPI==12.4.0",
"singer-python==6.0.0",
],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion tap_shopify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def initialize_shopify_client():
api_key = Context.config['api_key']
shop = Context.config['shop']
version = '2023-04'
version = '2024-01'
session = shopify.Session(shop, version, api_key)
shopify.ShopifyResource.activate_session(session)

Expand Down
32 changes: 0 additions & 32 deletions tap_shopify/schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@
"string"
]
},
"currency": {
"type": [
"null",
"string"
]
},
"email": {
"type": [
"null",
Expand Down Expand Up @@ -410,26 +404,6 @@
"integer"
]
},
"accepts_marketing": {
"type": [
"null",
"boolean"
]
},
"accepts_marketing_updated_at": {
"anyOf": [
{
"type": "string" ,
"format": "date-time"
},
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": [
"null",
Expand All @@ -449,12 +423,6 @@
]
}
},
"marketing_opt_in_level": {
"type": [
"null",
"string"
]
},
"email_marketing_consent": {
"type": [
"null",
Expand Down
12 changes: 12 additions & 0 deletions tap_shopify/schemas/orders.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@
"boolean"
]
},
"taxExempt": {
"type": [
"null",
"boolean"
]
},
"poNumber": {
"type": [
"null",
"string"
]
},
"total_discounts": {
"type": [
"null",
Expand Down
5 changes: 4 additions & 1 deletion tests/test_all_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def test_run(self):
# https://jira.talendforge.org/browse/TDL-15985
# total_price_usd showing up in syncd records Sep 2023, still missing from docs
bad_schema_fields = {'order_adjustments'}
expected_all_keys = expected_all_keys - bad_schema_fields
# missing data for 'taxExempt' and 'poNumber' in 'orders' stream
# https://jira.talendforge.org/browse/TDL-25173
missing_fields = {'taxExempt', 'poNumber'}
expected_all_keys = expected_all_keys - bad_schema_fields - missing_fields

self.assertSetEqual(expected_all_keys, actual_all_keys)

0 comments on commit df35a37

Please sign in to comment.