Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup customer schema, remove one (deprecated) field; add ipdb. #39

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
extras_require={
'dev': [
'pylint'
'pylint',
'ipdb'
]
})
153 changes: 75 additions & 78 deletions tap_recharge/schemas/customers.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,84 +5,6 @@
"id": {
"type": ["null", "integer"]
},
"hash": {
"type": ["null", "string"]
},
"shopify_customer_id": {
"type": ["null", "string"]
},
"email": {
"type": ["null", "string"]
},
"created_at": {
"type": ["null", "string"],
"format": "date-time"
},
"updated_at": {
"type": ["null", "string"],
"format": "date-time"
},
"first_name": {
"type": ["null", "string"]
},
"last_name": {
"type": ["null", "string"]
},
"billing_address1": {
"type": ["null", "string"]
},
"billing_address2": {
"type": ["null", "string"]
},
"billing_zip": {
"type": ["null", "string"]
},
"billing_city": {
"type": ["null", "string"]
},
"billing_company": {
"type": ["null", "string"]
},
"billing_province": {
"type": ["null", "string"]
},
"billing_country": {
"type": ["null", "string"]
},
"billing_phone": {
"type": ["null", "string"]
},
"processor_type": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
},
"paypal_customer_token": {
"type": ["null", "string"]
},
"braintree_customer_token": {
"type": ["null", "string"]
},
"has_valid_payment_method": {
"type": ["null", "boolean"]
},
"reason_payment_method_not_valid": {
"type": ["null", "string"]
},
"has_card_error_in_dunning": {
"type": ["null", "boolean"]
},
"number_active_subscriptions": {
"type": ["null", "integer"]
},
"number_subscriptions": {
"type": ["null", "integer"]
},
"first_charge_processed_at": {
"type": ["null", "string"],
"format": "date-time"
},
"analytics_data": {
"type": ["null", "object"],
"additionalProperties": false,
Expand Down Expand Up @@ -126,6 +48,40 @@
}
}
},
"billing_address1": {
"type": ["null", "string"]
},
"billing_address2": {
"type": ["null", "string"]
},
"billing_zip": {
"type": ["null", "string"]
},
"billing_city": {
"type": ["null", "string"]
},
"billing_company": {
"type": ["null", "string"]
},
"billing_province": {
"type": ["null", "string"]
},
"billing_country": {
"type": ["null", "string"]
},
"billing_phone": {
"type": ["null", "string"]
},
"braintree_customer_token": {
"type": ["null", "string"]
},
"created_at": {
"type": ["null", "string"],
"format": "date-time"
},
"email": {
"type": ["null", "string"]
},
"external_customer_id": {
"type": ["null", "object"],
"additionalProperties": false,
Expand All @@ -135,14 +91,55 @@
}
}
},
"first_charge_processed_at": {
"type": ["null", "string"],
"format": "date-time"
},
"first_name": {
"type": ["null", "string"]
},
"has_card_error_in_dunning": {
"type": ["null", "boolean"]
},
"has_payment_method_in_dunning": {
"type": ["null", "boolean"]
},
"has_valid_payment_method": {
"type": ["null", "boolean"]
},
"hash": {
"type": ["null", "string"]
},
"last_name": {
"type": ["null", "string"]
},
"number_active_subscriptions": {
"type": ["null", "integer"]
},
"number_subscriptions": {
"type": ["null", "integer"]
},
"paypal_customer_token": {
"type": ["null", "string"]
},
"processor_type": {
"type": ["null", "string"]
},
"reason_payment_method_not_valid": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
},
"subscriptions_active_count": {
"type": ["null", "integer"]
},
"subscriptions_total_count": {
"type": ["null", "integer"]
},
"updated_at": {
"type": ["null", "string"],
"format": "date-time"
}
}
}
2 changes: 2 additions & 0 deletions tests/test_recharge_bookmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def test_run(self):
"""

expected_streams = self.expected_streams()
# BUG https://jira.talendforge.org/browse/TDL-20783
expected_streams = expected_streams - {"onetimes"}
expected_replication_keys = self.expected_replication_keys()
expected_replication_methods = self.expected_replication_method()

Expand Down
4 changes: 3 additions & 1 deletion tests/test_recharge_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ def test_run(self):
"customers",
"discounts",
"metafields_subscription",
"onetimes",
# BUG https://jira.talendforge.org/browse/TDL-20783
# "onetimes",
]

found_catalogs = self.run_and_verify_check_mode(conn_id)

# table and field selection
Expand Down
2 changes: 2 additions & 0 deletions tests/test_recharge_start_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def run_test(self, streams, start_date_1, start_date_2):
self.start_date = self.start_date_1

expected_streams = streams
# BUG https://jira.talendforge.org/browse/TDL-20783
expected_streams = streams - {"onetimes"}
expected_replication_methods = self.expected_replication_method()

##########################################################################
Expand Down