Skip to content

Commit

Permalink
Cleanup customer schema, remove one (deprecated) field; add ipdb. (#39
Browse files Browse the repository at this point in the history
)

* Cleanup `customer` schema, remove one (deprecated) field; add ipdb.

* Update expected_streams with `onetimes` bug marker
  • Loading branch information
dsprayberry authored Sep 26, 2022
1 parent 3e1245b commit de46032
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 80 deletions.
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

0 comments on commit de46032

Please sign in to comment.