Skip to content

Commit

Permalink
Publish PR (#4121) (#4495)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo Parra <rodpar07@gmail.com>
  • Loading branch information
sherifnada and rparrapy committed Jul 2, 2021
1 parent 4b0c349 commit 9079cbd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "9da77001-af33-4bcd-be46-6252bf9342b9",
"name": "Shopify",
"dockerRepository": "airbyte/source-shopify",
"dockerImageTag": "0.1.7",
"dockerImageTag": "0.1.8",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/shopify"
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,21 @@ def request_params(self, stream_state=None, next_page_token: Mapping[str, Any] =
params = {"limit": self.limit, "updated_at_min": self.start_date, "since_id": stream_state.get(self.cursor_field)}
return params

class DraftOrders(IncrementalShopifyStream):
data_field = "draft_orders"

def path(self, **kwargs) -> str:
return f"{self.data_field}.json"

def request_params(self, stream_state=None, next_page_token: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:
stream_state = stream_state or {}
if next_page_token:
params = {"limit": self.limit, **next_page_token}
else:
params = {"limit": self.limit, "updated_at_min": self.start_date, "since_id": stream_state.get(self.cursor_field)}
return params


class Products(IncrementalShopifyStream):
data_field = "products"

Expand Down
4 changes: 2 additions & 2 deletions docs/integrations/sources/shopify.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ This Source is capable of syncing the following core Streams:
* [Collects](https://help.shopify.com/en/api/reference/products/collect)
* [Custom Collections](https://help.shopify.com/en/api/reference/products/customcollection)
* [Customers](https://help.shopify.com/en/api/reference/customers)
* [Draft Orders](https://help.shopify.com/en/api/reference/orders/draftorder)
* [Discount Codes](https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode)
* [Metafields](https://help.shopify.com/en/api/reference/metafield)
* [Orders](https://help.shopify.com/en/api/reference/orders)
* [Products](https://help.shopify.com/en/api/reference/products)
* [Transactions](https://help.shopify.com/en/api/reference/orders/transaction)
* [Pages](https://help.shopify.com/en/api/reference/online-store/page)
* [Price Rules](https://help.shopify.com/en/api/reference/discounts/pricerule)
* [Draft Orders](https://help.shopify.com/en/api/reference/orders/draftorder)

### Data type mapping

Expand Down Expand Up @@ -61,7 +61,7 @@ Shopify has some [rate limit restrictions](https://shopify.dev/concepts/about-ap

| Version | Date | Pull Request | Subject |
| :------ | :-------- | :----- | :------ |
| 0.1.8 | 2021-06-29 | [4121](https://github.com/airbytehq/airbyte/pull/4121) | Add draft orders |
| 0.1.8 | 2021-06-29 | [4121](https://github.com/airbytehq/airbyte/pull/4121) | Add draft orders stream |
| 0.1.7 | 2021-06-26 | [4290](https://github.com/airbytehq/airbyte/pull/4290) | Fixed the bug when limiting output records to 1 caused infinity loop |
| 0.1.6 | 2021-06-24 | [4009](https://github.com/airbytehq/airbyte/pull/4009) | Add pages, price rules and discount codes streams |
| 0.1.5 | 2021-06-10 | [3973](https://github.com/airbytehq/airbyte/pull/3973) | Add `AIRBYTE_ENTRYPOINT` for Kubernetes support |
Expand Down
7 changes: 4 additions & 3 deletions tools/integrations/manage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -e
set -x

. tools/lib/lib.sh

Expand Down Expand Up @@ -31,14 +32,14 @@ cmd_build() {
local run_tests=$1; shift || run_tests=true

echo "Building $path"
./gradlew "$(_to_gradle_path "$path" clean)"
./gradlew "$(_to_gradle_path "$path" build)"
./gradlew --no-daemon -no-build-cache "$(_to_gradle_path "$path" clean)"
./gradlew --no-daemon -no-build-cache "$(_to_gradle_path "$path" build)"

if [ "$run_tests" = false ] ; then
echo "Skipping integration tests..."
else
echo "Running integration tests..."
./gradlew "$(_to_gradle_path "$path" integrationTest)"
./gradlew --no-daemon -no-build-cache "$(_to_gradle_path "$path" integrationTest)"
fi
}

Expand Down

0 comments on commit 9079cbd

Please sign in to comment.