Skip to content

Commit

Permalink
Source Cart: add stream addresses (#7767)
Browse files Browse the repository at this point in the history
* change check_connection for Amazon Seller Partner

* add new stream addresses

* correct configured_catalog

* correct abnormal_state

* run airbyte config seed file
  • Loading branch information
marcosmarxm committed Nov 10, 2021
1 parent 7f6d12a commit dac49d1
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "bb1a6d31-6879-4819-a2bd-3eed299ea8e2",
"name": "Cart.com",
"dockerRepository": "airbyte/source-cart",
"dockerImageTag": "0.1.3",
"dockerImageTag": "0.1.4",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/cart"
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- name: Cart.com
sourceDefinitionId: bb1a6d31-6879-4819-a2bd-3eed299ea8e2
dockerRepository: airbyte/source-cart
dockerImageTag: 0.1.3
dockerImageTag: 0.1.4
documentationUrl: https://docs.airbyte.io/integrations/sources/cart
sourceType: api
- name: Chargebee
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-cart:0.1.3"
- dockerImage: "airbyte/source-cart:0.1.4"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/cart"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-cart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ COPY source_cart ./source_cart
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.3
LABEL io.airbyte.version=0.1.4
LABEL io.airbyte.name=airbyte/source-cart
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"orders": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
"order_payments": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
"order_items": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
"products": { "updated_at": "2051-07-01T08:59:28.457-05:00" }
"products": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
"addresses": { "updated_at": "2051-07-01T08:59:28.457-05:00" }
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
"cursor_field": ["updated_at"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "addresses",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"]
},
"sync_mode": "incremental",
"cursor_field": ["updated_at"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "order_payments",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"customer_id": {
"type": ["integer", "null"]
},
"address_line_1": {
"type": ["string", "null"]
},
"address_line_2": {
"type": ["string", "null"]
},
"city": {
"type": ["string", "null"]
},
"state": {
"type": ["string", "null"]
},
"postal_code": {
"type": ["string", "null"]
},
"country": {
"type": ["string", "null"]
},
"is_default_shipping_address": {
"type": ["boolean", "null"]
},
"phone": {
"type": ["string", "null"]
},
"company": {
"type": ["string", "null"]
},
"alternate_phone": {
"type": ["string", "null"]
},
"fax": {
"type": ["string", "null"]
},
"comments": {
"type": ["string", "null"]
},
"is_default_billing_address": {
"type": ["boolean", "null"]
},
"created_at": {
"type": ["string", "null"]
},
"updated_at": {
"type": ["string", "null"]
},
"first_name": {
"type": ["string", "null"]
},
"last_name": {
"type": ["string", "null"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from airbyte_cdk.sources.streams.http.auth import HttpAuthenticator
from pendulum.parsing.exceptions import ParserError

from .streams import CustomersCart, OrderItems, OrderPayments, Orders, Products
from .streams import Addresses, CustomersCart, OrderItems, OrderPayments, Orders, Products


class CustomHeaderAuthenticator(HttpAuthenticator):
Expand Down Expand Up @@ -74,4 +74,4 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
"store_name": config["store_name"],
"end_date": config.get("end_date"),
}
return [CustomersCart(**args), Orders(**args), OrderPayments(**args), OrderItems(**args), Products(**args)]
return [CustomersCart(**args), Orders(**args), OrderPayments(**args), OrderItems(**args), Products(**args), Addresses(**args)]
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,9 @@ class Products(IncrementalCartStream):
"""
Docs: https://developers.cart.com/docs/rest-api/restapi.json/paths/~1products/get
"""


class Addresses(IncrementalCartStream):
"""
Docs: https://developers.cart.com/docs/rest-api/b3A6MjMzMTc3Njc-get-addresses
"""

0 comments on commit dac49d1

Please sign in to comment.