Skip to content
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
27 changes: 27 additions & 0 deletions gocardless_pro/services/payer_authorisations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# https://github.com/gocardless/crank
#

import warnings

from . import base_service
from .. import resources
from ..paginator import Paginator
Expand All @@ -23,13 +25,18 @@ def get(self,identity,params=None, headers=None):
Retrieves the details of a single existing Payer Authorisation. It can
be used for polling the status of a Payer Authorisation.

Deprecated:
Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.

Args:
identity (string): Unique identifier, beginning with "PA".
params (dict, optional): Query string parameters.

Returns:
PayerAuthorisation
"""
warnings.warn("Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/payer_authorisations/:identity', {

'identity': identity,
Expand All @@ -51,12 +58,17 @@ def create(self,params=None, headers=None):
save any payer data on your servers or the browser while still being
able to implement a progressive solution, such as a multi-step form.

Deprecated:
Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.

Args:
params (dict, optional): Request body.

Returns:
PayerAuthorisation
"""
warnings.warn("Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.",
DeprecationWarning, stacklevel=2)
path = '/payer_authorisations'

if params is not None:
Expand Down Expand Up @@ -89,13 +101,18 @@ def update(self,identity,params=None, headers=None):
update the `metadata` attribute values it must be sent completely as it
overrides the previously existing values.

Deprecated:
Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.

Args:
identity (string): Unique identifier, beginning with "PA".
params (dict, optional): Request body.

Returns:
PayerAuthorisation
"""
warnings.warn("Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/payer_authorisations/:identity', {

'identity': identity,
Expand All @@ -118,13 +135,18 @@ def submit(self,identity,params=None, headers=None):
it is successfully submitted, the Payer Authorisation can no longer be
edited.

Deprecated:
Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.

Args:
identity (string): Unique identifier, beginning with "PA".
params (dict, optional): Request body.

Returns:
PayerAuthorisation
"""
warnings.warn("Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/payer_authorisations/:identity/actions/submit', {

'identity': identity,
Expand All @@ -151,13 +173,18 @@ def confirm(self,identity,params=None, headers=None):
they go through our flow or make them go through the necessary
verification mechanism (upcoming feature).

Deprecated:
Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.

Args:
identity (string): Unique identifier, beginning with "PA".
params (dict, optional): Request body.

Returns:
PayerAuthorisation
"""
warnings.warn("Payer Authorisation is legacy API and cannot be used by new integrators. The Billing Request (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for any new integrations.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/payer_authorisations/:identity/actions/confirm', {

'identity': identity,
Expand Down
17 changes: 17 additions & 0 deletions gocardless_pro/services/redirect_flows_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# https://github.com/gocardless/crank
#

import warnings

from . import base_service
from .. import resources
from ..paginator import Paginator
Expand All @@ -23,12 +25,17 @@ def create(self,params=None, headers=None):
Creates a redirect flow object which can then be used to redirect your
customer to the GoCardless hosted payment pages.

Deprecated:
Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.

Args:
params (dict, optional): Request body.

Returns:
RedirectFlow
"""
warnings.warn("Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.",
DeprecationWarning, stacklevel=2)
path = '/redirect_flows'

if params is not None:
Expand All @@ -53,13 +60,18 @@ def get(self,identity,params=None, headers=None):

Returns all details about a single redirect flow

Deprecated:
Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.

Args:
identity (string): Unique identifier, beginning with "RE".
params (dict, optional): Query string parameters.

Returns:
RedirectFlow
"""
warnings.warn("Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/redirect_flows/:identity', {

'identity': identity,
Expand Down Expand Up @@ -90,13 +102,18 @@ def complete(self,identity,params=None, headers=None):
`session_token` differs to the one supplied when the redirect flow was
created.

Deprecated:
Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.

Args:
identity (string): Unique identifier, beginning with "RE".
params (dict, optional): Request body.

Returns:
RedirectFlow
"""
warnings.warn("Redirect Flows are legacy APIs and cannot be used by new integrators. The Billing Request flow (https://developer.gocardless.com/api-reference/#billing-requests) API should be used for your payment flows.",
DeprecationWarning, stacklevel=2)
path = self._sub_url_params('/redirect_flows/:identity/actions/complete', {

'identity': identity,
Expand Down
Loading