|
| 1 | +from ..base import AdyenServiceBase |
| 2 | + |
| 3 | + |
| 4 | +class ModificationsApi(AdyenServiceBase): |
| 5 | + """NOTE: This class is auto generated by OpenAPI Generator |
| 6 | + Ref: https://openapi-generator.tech |
| 7 | +
|
| 8 | + Do not edit the class manually. |
| 9 | + """ |
| 10 | + |
| 11 | + def __init__(self, client=None): |
| 12 | + super(ModificationsApi, self).__init__(client=client) |
| 13 | + self.service = "payments" |
| 14 | + |
| 15 | + def adjust_authorisation(self, request, idempotency_key=None, **kwargs): |
| 16 | + """ |
| 17 | + Change the authorised amount |
| 18 | + """ |
| 19 | + endpoint = f"/adjustAuthorisation" |
| 20 | + endpoint = endpoint.replace('/', '', 1) |
| 21 | + method = "POST" |
| 22 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 23 | + |
| 24 | + def cancel(self, request, idempotency_key=None, **kwargs): |
| 25 | + """ |
| 26 | + Cancel an authorisation |
| 27 | + """ |
| 28 | + endpoint = f"/cancel" |
| 29 | + endpoint = endpoint.replace('/', '', 1) |
| 30 | + method = "POST" |
| 31 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 32 | + |
| 33 | + def cancel_or_refund(self, request, idempotency_key=None, **kwargs): |
| 34 | + """ |
| 35 | + Cancel or refund a payment |
| 36 | + """ |
| 37 | + endpoint = f"/cancelOrRefund" |
| 38 | + endpoint = endpoint.replace('/', '', 1) |
| 39 | + method = "POST" |
| 40 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 41 | + |
| 42 | + def capture(self, request, idempotency_key=None, **kwargs): |
| 43 | + """ |
| 44 | + Capture an authorisation |
| 45 | + """ |
| 46 | + endpoint = f"/capture" |
| 47 | + endpoint = endpoint.replace('/', '', 1) |
| 48 | + method = "POST" |
| 49 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 50 | + |
| 51 | + def donate(self, request, idempotency_key=None, **kwargs): |
| 52 | + """ |
| 53 | + Create a donation |
| 54 | + """ |
| 55 | + endpoint = f"/donate" |
| 56 | + endpoint = endpoint.replace('/', '', 1) |
| 57 | + method = "POST" |
| 58 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 59 | + |
| 60 | + def refund(self, request, idempotency_key=None, **kwargs): |
| 61 | + """ |
| 62 | + Refund a captured payment |
| 63 | + """ |
| 64 | + endpoint = f"/refund" |
| 65 | + endpoint = endpoint.replace('/', '', 1) |
| 66 | + method = "POST" |
| 67 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 68 | + |
| 69 | + def technical_cancel(self, request, idempotency_key=None, **kwargs): |
| 70 | + """ |
| 71 | + Cancel an authorisation using your reference |
| 72 | + """ |
| 73 | + endpoint = f"/technicalCancel" |
| 74 | + endpoint = endpoint.replace('/', '', 1) |
| 75 | + method = "POST" |
| 76 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 77 | + |
| 78 | + def void_pending_refund(self, request, idempotency_key=None, **kwargs): |
| 79 | + """ |
| 80 | + Cancel an in-person refund |
| 81 | + """ |
| 82 | + endpoint = f"/voidPendingRefund" |
| 83 | + endpoint = endpoint.replace('/', '', 1) |
| 84 | + method = "POST" |
| 85 | + return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) |
| 86 | + |
0 commit comments