diff --git a/duffel_api/api/booking/payments.py b/duffel_api/api/booking/payments.py index 4c583c4..5870940 100644 --- a/duffel_api/api/booking/payments.py +++ b/duffel_api/api/booking/payments.py @@ -35,7 +35,7 @@ def _validate_payment(payment): if payment["type"] not in ["arc_bsp_cash", "balance", "payments"]: raise PaymentClient.InvalidPaymentType(payment["type"]) - def order_id(self, order_id): + def order(self, order_id): self._order_id = order_id return self diff --git a/tests/test_payments.py b/tests/test_payments.py index 81d078b..c5511d9 100644 --- a/tests/test_payments.py +++ b/tests/test_payments.py @@ -15,7 +15,7 @@ def test_create_payment(requests_mock): } payment = ( client.payments.create() - .order_id("order-id") + .order("order-id") .payment(payment_details) .execute() ) @@ -32,7 +32,7 @@ def test_create_payment_with_invalid_payment_details(requests_mock): "currency": "GBP", "amount": "30.20", } - payments_create_client = client.payments.create().order_id("order-id") + payments_create_client = client.payments.create().order("order-id") with pytest.raises( PaymentClient.InvalidPayment, match="{'currency': 'GBP', 'amount': '30.20'}",