-
Notifications
You must be signed in to change notification settings - Fork 27
/
api_default.go
60 lines (53 loc) · 4.38 KB
/
api_default.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Adyen Recurring API
*
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/checkout/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/user-management/how-to-get-the-web-service-ws-user-password). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* API version: 49
* Contact: support@adyen.com
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package recurring
import (
_context "context"
_nethttp "net/http"
"github.com/adyen/adyen-go-api-library/v2/src/common"
)
// Recurring Recurring service
type Recurring common.Service
/*
Disable Disables stored payment details.
Disables stored payment details to stop charging a shopper with this particular recurring detail ID. For more information, refer to [Disable stored details](https://docs.adyen.com/classic-integration/recurring-payments/disable-stored-details/).
* @param request DisableRequest - reference of DisableRequest).
* @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return DisableResult
*/
func (a Recurring) Disable(req *DisableRequest, ctxs ..._context.Context) (DisableResult, *_nethttp.Response, error) {
res := &DisableResult{}
httpRes, err := a.Client.MakeHTTPPostRequest(req, res, a.BasePath()+"/disable", ctxs...)
return *res, httpRes, err
}
/*
ListRecurringDetails Retrieves stored payment details for a shopper.
Lists the stored payment details for a shopper, if there are any available. The recurring detail ID can be used with a regular authorisation request to charge the shopper. A summary of the payment detail is returned for presentation to the shopper. For more information, refer to [Retrieve stored details](https://docs.adyen.com/classic-integration/recurring-payments/retrieve-stored-details/).
* @param request RecurringDetailsRequest - reference of RecurringDetailsRequest).
* @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return RecurringDetailsResult
*/
func (a Recurring) ListRecurringDetails(req *RecurringDetailsRequest, ctxs ..._context.Context) (RecurringDetailsResult, *_nethttp.Response, error) {
res := &RecurringDetailsResult{}
httpRes, err := a.Client.MakeHTTPPostRequest(req, res, a.BasePath()+"/listRecurringDetails", ctxs...)
return *res, httpRes, err
}
/*
ScheduleAccountUpdater Schedules running of the Account Updater.
When making the API call, you can submit either the credit card information, or the recurring detail reference and the shopper reference: * If the card information is provided, all the sub-fields for `card` are mandatory. * If the recurring detail reference is provided, the fields for `shopperReference` and `selectedRecurringDetailReference` are mandatory.
* @param request ScheduleAccountUpdaterRequest - reference of ScheduleAccountUpdaterRequest).
* @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ScheduleAccountUpdaterResult
*/
func (a Recurring) ScheduleAccountUpdater(req *ScheduleAccountUpdaterRequest, ctxs ..._context.Context) (ScheduleAccountUpdaterResult, *_nethttp.Response, error) {
res := &ScheduleAccountUpdaterResult{}
httpRes, err := a.Client.MakeHTTPPostRequest(req, res, a.BasePath()+"/scheduleAccountUpdater", ctxs...)
return *res, httpRes, err
}