diff --git a/services/billing.py b/services/billing.py index 9d804e9174..052fcbfd2f 100644 --- a/services/billing.py +++ b/services/billing.py @@ -175,8 +175,8 @@ def cancel_and_refund( subscription=owner.stripe_subscription_id, status="paid", created={ - "created.gte": int(start_of_last_period.timestamp()), - "created.lt": int(current_subscription_datetime.timestamp()), + "gte": int(start_of_last_period.timestamp()), + "lt": int(current_subscription_datetime.timestamp()), }, ) diff --git a/services/tests/test_billing.py b/services/tests/test_billing.py index 8f50d9196f..d24eace473 100644 --- a/services/tests/test_billing.py +++ b/services/tests/test_billing.py @@ -448,7 +448,7 @@ def test_delete_subscription_with_schedule_releases_schedule_and_cancels_subscri list_invoice_mock.assert_called_once_with( subscription=stripe_subscription_id, status="paid", - created={"created.gte": 1458263420, "created.lt": 1489799420}, + created={"gte": 1458263420, "lt": 1489799420}, ) self.assertEqual(create_refund_mock.call_count, 2) modify_customer_mock.assert_called_once_with( @@ -523,7 +523,7 @@ def test_delete_subscription_with_schedule_releases_schedule_and_cancels_subscri list_invoice_mock.assert_called_once_with( subscription=stripe_subscription_id, status="paid", - created={"created.gte": 1458263420, "created.lt": 1489799420}, + created={"gte": 1458263420, "lt": 1489799420}, ) self.assertEqual(create_refund_mock.call_count, 2) modify_customer_mock.assert_called_once_with( @@ -600,7 +600,7 @@ def test_delete_subscription_with_schedule_releases_schedule_and_cancels_subscri list_invoice_mock.assert_called_once_with( subscription=stripe_subscription_id, status="paid", - created={"created.gte": 1458263420, "created.lt": 1489799420}, + created={"gte": 1458263420, "lt": 1489799420}, ) create_refund_mock.assert_not_called() modify_customer_mock.assert_not_called()