From 0f793dfb0cd1d07e3eec2e62f3c26526a8bae365 Mon Sep 17 00:00:00 2001 From: gocardless-robot-restricted Date: Tue, 3 May 2022 10:34:34 +0100 Subject: [PATCH] Release 2.1.1 (#9) * Changes generated by 90afb7b0bfe8400aa172a0c41d12cc89cab3a0cb * Changes generated by d03f550064463c26c11345d6f913b82145c463e0 * Changes generated by 761a5f396ff8e06739254ec3d5994647745a2fa5 * Changes generated by 3f7e469a9ed21afa7425ef1f6ce0682c66f9ee84 * Changes generated by 9673ff362be6a2c82b88a34e52b61b6d0603c461 * Changes generated by 89d28f103fc65da5c9f4677e2b85b06c9c07b799 * Changes generated by 73fa74b77ef5f5b5e400b81a3563af6e74c2ac85 * Changes generated by 61d47cd4272cbfc368540ec736da14486b76b71c * Changes generated by 1ed5a6598f0c9a12807f982f379311f20ff11ef8 * Changes generated by 3331ffcbdfa84b6ac199045b0fb50f60c3641426 * Changes generated by d2ff61a58e5ba09526bcb19a0664e0d1442e91b3 * Changes generated by 976187b15a5e307bbe6d7c588f36530a45139186 * Changes generated by 79077ca0952a7a942c9316d617e923b73ddd1aa1 * Changes generated by 750627fba2f3ef092a26bd8227b6f4fa2f6bba96 * Changes generated by c59277736a2d0e40ac0f9d8a42e1b9463a39edef * Changes generated by 6d1a66b2decd2844457e4f635aa396041d4415dd * Changes generated by 96427efe0958d47a42deeed61d74dd839ff3b801 * Changes generated by 86653b3d64a2ebc708cad205f692c4ef4f6ff502 * Changes generated by 957c7b6a278d7bbc180d245e31cc075042869e54 * Changes generated by e5377575d33701f1530977ced9f07b992bece019 * Changes generated by b0985abebd47ede4bc75cec926b0c9cc5b5a7384 * Changes generated by 813e6acfab0094225dd4820af515683eed3bacb3 * Changes generated by 7f472b1ae11ec581267eca9b6564d29c2cd670fe * Changes generated by e4a1f03495fe9b2018c66096ede365a866b439ff * Changes generated by 5a05b83be196c2f03480373c45c6ec522bc55511 * Changes generated by 42926f644eb35ecfccc50067b295ee652e5eaf4d * Changes generated by 5a05b83be196c2f03480373c45c6ec522bc55511 * Changes generated by 70cf5af9f9b2ded08ad3edc8e5341a887e06fd67 * Changes generated by b238b32e590ee8661f7d3460842e6c83b9e23474 * Changes generated by af16970bff9d006006e8cad69edd5e4402bdb70d * Changes generated by 9e4cc2d3e9bc8d4b9d0f9183377407ac66630992 * Changes generated by 043027457162d8b0b8cde59791f627b7b2d01bdd * Changes generated by 5dc56f9ceb3b969c993494e67c39f76dd3a53a39 * Changes generated by 8847570321f5bc9dd2797afef4bd6b770d784dd4 * Changes generated by db3102d5dfbb0d6581580a5e0926913900074f08 * Changes generated by 462d4736d9bcf7fb7359bacb849c08a68ab45cdb * Changes generated by ecc66b7049acde4ce2fe00df0fd5a0edd6f874e7 * Changes generated by 782dc134975bab686d3964236388a615b1541dee * Changes generated by 042c4dff0a67dd5cea3621462ffae6be0a4768ae * Changes generated by cb8fd717ae1b00833e4d2f2bc87cb9f54c625130 * Changes generated by aefd3663b5dbdd5f4401c1b31842c400aa81ad92 Co-authored-by: Robot --- README.md | 2 +- VERSION | 2 +- bank_authorisation_service.go | 8 ++-- bank_details_lookup_service.go | 10 ++++- billing_request_flow_service.go | 8 ++-- billing_request_service.go | 50 ++++++++++++++----------- billing_request_template_service.go | 20 +++++----- block_service.go | 28 +++++++------- creditor_bank_account_service.go | 20 +++++----- creditor_service.go | 20 +++++----- currency_exchange_rate_service.go | 8 ++-- customer_bank_account_service.go | 24 ++++++------ customer_notification_service.go | 4 +- customer_service.go | 24 ++++++------ event_service.go | 12 +++--- instalment_schedule_service.go | 28 +++++++------- institution_service.go | 4 +- mandate_import_entry_service.go | 12 +++--- mandate_import_service.go | 16 ++++---- mandate_pdf_service.go | 4 +- mandate_service.go | 28 +++++++------- payer_authorisation_service.go | 20 +++++----- payment_service.go | 28 +++++++------- payout_item_service.go | 8 ++-- payout_service.go | 16 ++++---- redirect_flow_service.go | 12 +++--- refund_service.go | 20 +++++----- scenario_simulator_service.go | 4 +- subscription_service.go | 32 ++++++++-------- tax_rate_service.go | 12 +++--- testdata/bank_authorisations.json | 4 +- testdata/billing_request_flows.json | 4 +- testdata/billing_request_templates.json | 2 +- testdata/billing_requests.json | 18 ++++----- testdata/blocks.json | 4 +- testdata/creditors.json | 4 +- testdata/currency_exchange_rates.json | 2 +- testdata/customer_bank_accounts.json | 2 +- testdata/customer_notifications.json | 2 +- testdata/events.json | 4 +- testdata/institutions.json | 2 +- testdata/payer_authorisations.json | 6 +-- testdata/payouts.json | 2 +- testdata/subscriptions.json | 2 +- testdata/tax_rates.json | 2 +- testdata/webhooks.json | 6 +-- useragent.go | 2 +- webhook_service.go | 16 ++++---- 48 files changed, 290 insertions(+), 278 deletions(-) diff --git a/README.md b/README.md index dc87ea2..5d306ac 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ toolchain will resolve and fetch the gocardless-pro-go module automatically. Alternatively, you can also explicitly `go get` the package into a project: ``` -go get -u github.com/gocardless/gocardless-pro-go@v2.1.0 +go get -u github.com/gocardless/gocardless-pro-go@v2.1.1 ``` ## Initializing the client diff --git a/VERSION b/VERSION index 50aea0e..7c32728 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0 \ No newline at end of file +2.1.1 \ No newline at end of file diff --git a/bank_authorisation_service.go b/bank_authorisation_service.go index 512dcba..dfb9844 100644 --- a/bank_authorisation_service.go +++ b/bank_authorisation_service.go @@ -71,11 +71,11 @@ func (s *BankAuthorisationServiceImpl) Get(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -174,11 +174,11 @@ func (s *BankAuthorisationServiceImpl) Create(ctx context.Context, p BankAuthori if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/bank_details_lookup_service.go b/bank_details_lookup_service.go index 92bc33d..55f16d3 100644 --- a/bank_details_lookup_service.go +++ b/bank_details_lookup_service.go @@ -58,6 +58,12 @@ type BankDetailsLookupCreateParams struct { // Bank account details may be supplied using [local // details](#appendix-local-bank-details) or an IBAN. // +// _ACH scheme_ For compliance reasons, an extra validation step is done using +// a third-party provider to make sure the customer's bank account can accept +// Direct Debit. If a bank account is discovered to be closed or invalid, the +// customer is requested to adjust the account number/routing number and +// succeed in this check to continue with the flow. +// // _Note:_ Usage of this endpoint is monitored. If your organisation relies on // GoCardless for // modulus or reachability checking but not for payment collection, please get @@ -96,11 +102,11 @@ func (s *BankDetailsLookupServiceImpl) Create(ctx context.Context, p BankDetails if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/billing_request_flow_service.go b/billing_request_flow_service.go index faf644d..3a076aa 100644 --- a/billing_request_flow_service.go +++ b/billing_request_flow_service.go @@ -99,11 +99,11 @@ func (s *BillingRequestFlowServiceImpl) Create(ctx context.Context, p BillingReq if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -199,11 +199,11 @@ func (s *BillingRequestFlowServiceImpl) Initialise(ctx context.Context, identity if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/billing_request_service.go b/billing_request_service.go index 8a71bdb..b6000b5 100644 --- a/billing_request_service.go +++ b/billing_request_service.go @@ -217,11 +217,11 @@ func (s *BillingRequestServiceImpl) List(ctx context.Context, p BillingRequestLi if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -326,11 +326,11 @@ func (c *BillingRequestListPagingIterator) Value(ctx context.Context) (*BillingR return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -460,11 +460,11 @@ func (s *BillingRequestServiceImpl) Create(ctx context.Context, p BillingRequest if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -542,11 +542,11 @@ func (s *BillingRequestServiceImpl) Get(ctx context.Context, identity string, op if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -671,11 +671,11 @@ func (s *BillingRequestServiceImpl) CollectCustomerDetails(ctx context.Context, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -750,6 +750,12 @@ type BillingRequestCollectBankAccountParams struct { // The endpoint takes the same payload as Customer Bank Accounts, but check // the bank account is valid for the billing request scheme before creating // and attaching it. +// +// _ACH scheme_ For compliance reasons, an extra validation step is done using +// a third-party provider to make sure the customer's bank account can accept +// Direct Debit. If a bank account is discovered to be closed or invalid, the +// customer is requested to adjust the account number/routing number and +// succeed in this check to continue with the flow. func (s *BillingRequestServiceImpl) CollectBankAccount(ctx context.Context, identity string, p BillingRequestCollectBankAccountParams, opts ...RequestOption) (*BillingRequest, error) { uri, err := url.Parse(fmt.Sprintf(s.config.Endpoint()+"/billing_requests/%v/actions/collect_bank_account", identity)) @@ -785,11 +791,11 @@ func (s *BillingRequestServiceImpl) CollectBankAccount(ctx context.Context, iden if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -885,11 +891,11 @@ func (s *BillingRequestServiceImpl) Fulfil(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -986,11 +992,11 @@ func (s *BillingRequestServiceImpl) ConfirmPayerDetails(ctx context.Context, ide if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -1086,11 +1092,11 @@ func (s *BillingRequestServiceImpl) Cancel(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -1188,11 +1194,11 @@ func (s *BillingRequestServiceImpl) Notify(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -1287,11 +1293,11 @@ func (s *BillingRequestServiceImpl) Fallback(ctx context.Context, identity strin if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/billing_request_template_service.go b/billing_request_template_service.go index 5ef9014..d57c4cf 100644 --- a/billing_request_template_service.go +++ b/billing_request_template_service.go @@ -104,11 +104,11 @@ func (s *BillingRequestTemplateServiceImpl) List(ctx context.Context, p BillingR if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -213,11 +213,11 @@ func (c *BillingRequestTemplateListPagingIterator) Value(ctx context.Context) (* return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -305,11 +305,11 @@ func (s *BillingRequestTemplateServiceImpl) Get(ctx context.Context, identity st if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -417,11 +417,11 @@ func (s *BillingRequestTemplateServiceImpl) Create(ctx context.Context, p Billin if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -528,11 +528,11 @@ func (s *BillingRequestTemplateServiceImpl) Update(ctx context.Context, identity if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/block_service.go b/block_service.go index 2c25bfc..3f6bce9 100644 --- a/block_service.go +++ b/block_service.go @@ -91,11 +91,11 @@ func (s *BlockServiceImpl) Create(ctx context.Context, p BlockCreateParams, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -173,11 +173,11 @@ func (s *BlockServiceImpl) Get(ctx context.Context, identity string, opts ...Req if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -286,11 +286,11 @@ func (s *BlockServiceImpl) List(ctx context.Context, p BlockListParams, opts ... if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -395,11 +395,11 @@ func (c *BlockListPagingIterator) Value(ctx context.Context) (*BlockListResult, return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -490,11 +490,11 @@ func (s *BlockServiceImpl) Disable(ctx context.Context, identity string, opts .. if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -575,11 +575,11 @@ func (s *BlockServiceImpl) Enable(ctx context.Context, identity string, opts ... if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -696,11 +696,11 @@ func (s *BlockServiceImpl) BlockByRef(ctx context.Context, p BlockBlockByRefPara if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/creditor_bank_account_service.go b/creditor_bank_account_service.go index 511f566..dff1924 100644 --- a/creditor_bank_account_service.go +++ b/creditor_bank_account_service.go @@ -105,11 +105,11 @@ func (s *CreditorBankAccountServiceImpl) Create(ctx context.Context, p CreditorB if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -225,11 +225,11 @@ func (s *CreditorBankAccountServiceImpl) List(ctx context.Context, p CreditorBan if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -334,11 +334,11 @@ func (c *CreditorBankAccountListPagingIterator) Value(ctx context.Context) (*Cre return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -426,11 +426,11 @@ func (s *CreditorBankAccountServiceImpl) Get(ctx context.Context, identity strin if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -516,11 +516,11 @@ func (s *CreditorBankAccountServiceImpl) Disable(ctx context.Context, identity s if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/creditor_service.go b/creditor_service.go index 249d3d3..26f8ce8 100644 --- a/creditor_service.go +++ b/creditor_service.go @@ -132,11 +132,11 @@ func (s *CreditorServiceImpl) Create(ctx context.Context, p CreditorCreateParams if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -250,11 +250,11 @@ func (s *CreditorServiceImpl) List(ctx context.Context, p CreditorListParams, op if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -359,11 +359,11 @@ func (c *CreditorListPagingIterator) Value(ctx context.Context) (*CreditorListRe return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -455,11 +455,11 @@ func (s *CreditorServiceImpl) Get(ctx context.Context, identity string, p Credit if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -572,11 +572,11 @@ func (s *CreditorServiceImpl) Update(ctx context.Context, identity string, p Cre if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/currency_exchange_rate_service.go b/currency_exchange_rate_service.go index d3f09d6..7beea2d 100644 --- a/currency_exchange_rate_service.go +++ b/currency_exchange_rate_service.go @@ -99,11 +99,11 @@ func (s *CurrencyExchangeRateServiceImpl) List(ctx context.Context, p CurrencyEx if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -208,11 +208,11 @@ func (c *CurrencyExchangeRateListPagingIterator) Value(ctx context.Context) (*Cu return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/customer_bank_account_service.go b/customer_bank_account_service.go index 38639a6..40d62e3 100644 --- a/customer_bank_account_service.go +++ b/customer_bank_account_service.go @@ -118,11 +118,11 @@ func (s *CustomerBankAccountServiceImpl) Create(ctx context.Context, p CustomerB if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -238,11 +238,11 @@ func (s *CustomerBankAccountServiceImpl) List(ctx context.Context, p CustomerBan if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -347,11 +347,11 @@ func (c *CustomerBankAccountListPagingIterator) Value(ctx context.Context) (*Cus return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -439,11 +439,11 @@ func (s *CustomerBankAccountServiceImpl) Get(ctx context.Context, identity strin if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -537,11 +537,11 @@ func (s *CustomerBankAccountServiceImpl) Update(ctx context.Context, identity st if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -628,11 +628,11 @@ func (s *CustomerBankAccountServiceImpl) Disable(ctx context.Context, identity s if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/customer_notification_service.go b/customer_notification_service.go index 6b5fba3..6565831 100644 --- a/customer_notification_service.go +++ b/customer_notification_service.go @@ -94,11 +94,11 @@ func (s *CustomerNotificationServiceImpl) Handle(ctx context.Context, identity s if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/customer_service.go b/customer_service.go index 165d5a0..e363314 100644 --- a/customer_service.go +++ b/customer_service.go @@ -110,11 +110,11 @@ func (s *CustomerServiceImpl) Create(ctx context.Context, p CustomerCreateParams if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -231,11 +231,11 @@ func (s *CustomerServiceImpl) List(ctx context.Context, p CustomerListParams, op if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -340,11 +340,11 @@ func (c *CustomerListPagingIterator) Value(ctx context.Context) (*CustomerListRe return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -432,11 +432,11 @@ func (s *CustomerServiceImpl) Get(ctx context.Context, identity string, opts ... if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -545,11 +545,11 @@ func (s *CustomerServiceImpl) Update(ctx context.Context, identity string, p Cus if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -650,11 +650,11 @@ func (s *CustomerServiceImpl) Remove(ctx context.Context, identity string, p Cus if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/event_service.go b/event_service.go index 2ee9e62..a52a514 100644 --- a/event_service.go +++ b/event_service.go @@ -157,11 +157,11 @@ func (s *EventServiceImpl) List(ctx context.Context, p EventListParams, opts ... if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -266,11 +266,11 @@ func (c *EventListPagingIterator) Value(ctx context.Context) (*EventListResult, return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -358,11 +358,11 @@ func (s *EventServiceImpl) Get(ctx context.Context, identity string, opts ...Req if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/instalment_schedule_service.go b/instalment_schedule_service.go index 71f630f..943b572 100644 --- a/instalment_schedule_service.go +++ b/instalment_schedule_service.go @@ -129,11 +129,11 @@ func (s *InstalmentScheduleServiceImpl) CreateWithDates(ctx context.Context, p I if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -261,11 +261,11 @@ func (s *InstalmentScheduleServiceImpl) CreateWithSchedule(ctx context.Context, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -382,11 +382,11 @@ func (s *InstalmentScheduleServiceImpl) List(ctx context.Context, p InstalmentSc if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -491,11 +491,11 @@ func (c *InstalmentScheduleListPagingIterator) Value(ctx context.Context) (*Inst return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -583,11 +583,11 @@ func (s *InstalmentScheduleServiceImpl) Get(ctx context.Context, identity string if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -680,11 +680,11 @@ func (s *InstalmentScheduleServiceImpl) Update(ctx context.Context, identity str if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -782,11 +782,11 @@ func (s *InstalmentScheduleServiceImpl) Cancel(ctx context.Context, identity str if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/institution_service.go b/institution_service.go index 228cbe6..0dcd3d5 100644 --- a/institution_service.go +++ b/institution_service.go @@ -86,11 +86,11 @@ func (s *InstitutionServiceImpl) List(ctx context.Context, p InstitutionListPara if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/mandate_import_entry_service.go b/mandate_import_entry_service.go index aa7add9..6b20e7b 100644 --- a/mandate_import_entry_service.go +++ b/mandate_import_entry_service.go @@ -131,11 +131,11 @@ func (s *MandateImportEntryServiceImpl) Create(ctx context.Context, p MandateImp if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -249,11 +249,11 @@ func (s *MandateImportEntryServiceImpl) List(ctx context.Context, p MandateImpor if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -358,11 +358,11 @@ func (c *MandateImportEntryListPagingIterator) Value(ctx context.Context) (*Mand return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/mandate_import_service.go b/mandate_import_service.go index 27ff8f8..8f32d51 100644 --- a/mandate_import_service.go +++ b/mandate_import_service.go @@ -84,11 +84,11 @@ func (s *MandateImportServiceImpl) Create(ctx context.Context, p MandateImportCr if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -170,11 +170,11 @@ func (s *MandateImportServiceImpl) Get(ctx context.Context, identity string, p M if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -277,11 +277,11 @@ func (s *MandateImportServiceImpl) Submit(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -381,11 +381,11 @@ func (s *MandateImportServiceImpl) Cancel(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/mandate_pdf_service.go b/mandate_pdf_service.go index a5a9c3f..2903ac3 100644 --- a/mandate_pdf_service.go +++ b/mandate_pdf_service.go @@ -143,11 +143,11 @@ func (s *MandatePdfServiceImpl) Create(ctx context.Context, p MandatePdfCreatePa if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/mandate_service.go b/mandate_service.go index 4edf7dc..460ae42 100644 --- a/mandate_service.go +++ b/mandate_service.go @@ -103,11 +103,11 @@ func (s *MandateServiceImpl) Create(ctx context.Context, p MandateCreateParams, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -227,11 +227,11 @@ func (s *MandateServiceImpl) List(ctx context.Context, p MandateListParams, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -336,11 +336,11 @@ func (c *MandateListPagingIterator) Value(ctx context.Context) (*MandateListResu return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -428,11 +428,11 @@ func (s *MandateServiceImpl) Get(ctx context.Context, identity string, opts ...R if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -525,11 +525,11 @@ func (s *MandateServiceImpl) Update(ctx context.Context, identity string, p Mand if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -629,11 +629,11 @@ func (s *MandateServiceImpl) Cancel(ctx context.Context, identity string, p Mand if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -739,11 +739,11 @@ func (s *MandateServiceImpl) Reinstate(ctx context.Context, identity string, p M if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/payer_authorisation_service.go b/payer_authorisation_service.go index 581da77..721cac6 100644 --- a/payer_authorisation_service.go +++ b/payer_authorisation_service.go @@ -120,11 +120,11 @@ func (s *PayerAuthorisationServiceImpl) Get(ctx context.Context, identity string if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -262,11 +262,11 @@ func (s *PayerAuthorisationServiceImpl) Create(ctx context.Context, p PayerAutho if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -410,11 +410,11 @@ func (s *PayerAuthorisationServiceImpl) Update(ctx context.Context, identity str if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -498,11 +498,11 @@ func (s *PayerAuthorisationServiceImpl) Submit(ctx context.Context, identity str if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -593,11 +593,11 @@ func (s *PayerAuthorisationServiceImpl) Confirm(ctx context.Context, identity st if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/payment_service.go b/payment_service.go index 66cc688..1b9aa99 100644 --- a/payment_service.go +++ b/payment_service.go @@ -123,11 +123,11 @@ func (s *PaymentServiceImpl) Create(ctx context.Context, p PaymentCreateParams, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -257,11 +257,11 @@ func (s *PaymentServiceImpl) List(ctx context.Context, p PaymentListParams, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -366,11 +366,11 @@ func (c *PaymentListPagingIterator) Value(ctx context.Context) (*PaymentListResu return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -458,11 +458,11 @@ func (s *PaymentServiceImpl) Get(ctx context.Context, identity string, opts ...R if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -556,11 +556,11 @@ func (s *PaymentServiceImpl) Update(ctx context.Context, identity string, p Paym if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -660,11 +660,11 @@ func (s *PaymentServiceImpl) Cancel(ctx context.Context, identity string, p Paym if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -769,11 +769,11 @@ func (s *PaymentServiceImpl) Retry(ctx context.Context, identity string, p Payme if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/payout_item_service.go b/payout_item_service.go index 3ab3175..8dce22b 100644 --- a/payout_item_service.go +++ b/payout_item_service.go @@ -107,11 +107,11 @@ func (s *PayoutItemServiceImpl) List(ctx context.Context, p PayoutItemListParams if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -216,11 +216,11 @@ func (c *PayoutItemListPagingIterator) Value(ctx context.Context) (*PayoutItemLi return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/payout_service.go b/payout_service.go index 37e8e0a..6c361f0 100644 --- a/payout_service.go +++ b/payout_service.go @@ -127,11 +127,11 @@ func (s *PayoutServiceImpl) List(ctx context.Context, p PayoutListParams, opts . if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -236,11 +236,11 @@ func (c *PayoutListPagingIterator) Value(ctx context.Context) (*PayoutListResult return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -330,11 +330,11 @@ func (s *PayoutServiceImpl) Get(ctx context.Context, identity string, opts ...Re if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -427,11 +427,11 @@ func (s *PayoutServiceImpl) Update(ctx context.Context, identity string, p Payou if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/redirect_flow_service.go b/redirect_flow_service.go index 0162f6e..a873fac 100644 --- a/redirect_flow_service.go +++ b/redirect_flow_service.go @@ -127,11 +127,11 @@ func (s *RedirectFlowServiceImpl) Create(ctx context.Context, p RedirectFlowCrea if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -209,11 +209,11 @@ func (s *RedirectFlowServiceImpl) Get(ctx context.Context, identity string, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -316,11 +316,11 @@ func (s *RedirectFlowServiceImpl) Complete(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/refund_service.go b/refund_service.go index 9ab348b..dcf63c5 100644 --- a/refund_service.go +++ b/refund_service.go @@ -122,11 +122,11 @@ func (s *RefundServiceImpl) Create(ctx context.Context, p RefundCreateParams, op if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -243,11 +243,11 @@ func (s *RefundServiceImpl) List(ctx context.Context, p RefundListParams, opts . if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -352,11 +352,11 @@ func (c *RefundListPagingIterator) Value(ctx context.Context) (*RefundListResult return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -444,11 +444,11 @@ func (s *RefundServiceImpl) Get(ctx context.Context, identity string, opts ...Re if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -541,11 +541,11 @@ func (s *RefundServiceImpl) Update(ctx context.Context, identity string, p Refun if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/scenario_simulator_service.go b/scenario_simulator_service.go index dbc3dc9..4f7f5e1 100644 --- a/scenario_simulator_service.go +++ b/scenario_simulator_service.go @@ -78,11 +78,11 @@ func (s *ScenarioSimulatorServiceImpl) Run(ctx context.Context, identity string, if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/subscription_service.go b/subscription_service.go index 201a6dd..d655eee 100644 --- a/subscription_service.go +++ b/subscription_service.go @@ -126,11 +126,11 @@ func (s *SubscriptionServiceImpl) Create(ctx context.Context, p SubscriptionCrea if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -247,11 +247,11 @@ func (s *SubscriptionServiceImpl) List(ctx context.Context, p SubscriptionListPa if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -356,11 +356,11 @@ func (c *SubscriptionListPagingIterator) Value(ctx context.Context) (*Subscripti return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -448,11 +448,11 @@ func (s *SubscriptionServiceImpl) Get(ctx context.Context, identity string, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -574,11 +574,11 @@ func (s *SubscriptionServiceImpl) Update(ctx context.Context, identity string, p if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -714,11 +714,11 @@ func (s *SubscriptionServiceImpl) Pause(ctx context.Context, identity string, p if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -829,11 +829,11 @@ func (s *SubscriptionServiceImpl) Resume(ctx context.Context, identity string, p if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) @@ -933,11 +933,11 @@ func (s *SubscriptionServiceImpl) Cancel(ctx context.Context, identity string, p if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey) diff --git a/tax_rate_service.go b/tax_rate_service.go index f773c53..266110f 100644 --- a/tax_rate_service.go +++ b/tax_rate_service.go @@ -92,11 +92,11 @@ func (s *TaxRateServiceImpl) List(ctx context.Context, p TaxRateListParams, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -201,11 +201,11 @@ func (c *TaxRateListPagingIterator) Value(ctx context.Context) (*TaxRateListResu return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -293,11 +293,11 @@ func (s *TaxRateServiceImpl) Get(ctx context.Context, identity string, opts ...R if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { diff --git a/testdata/bank_authorisations.json b/testdata/bank_authorisations.json index 9a42fea..84ea76a 100644 --- a/testdata/bank_authorisations.json +++ b/testdata/bank_authorisations.json @@ -1,8 +1,8 @@ { "get": { - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-04-25T14:45:05.515Z","expires_at":"2022-04-25T14:45:05.515Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-05-03T09:17:16.498Z","expires_at":"2022-05-03T09:17:16.498Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} }, "create": { - "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-04-25T14:45:05.515Z","expires_at":"2022-04-25T14:45:05.515Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} + "body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2022-05-03T09:17:16.498Z","expires_at":"2022-05-03T09:17:16.498Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}} } } \ No newline at end of file diff --git a/testdata/billing_request_flows.json b/testdata/billing_request_flows.json index 3f44143..ddfe7b6 100644 --- a/testdata/billing_request_flows.json +++ b/testdata/billing_request_flows.json @@ -1,8 +1,8 @@ { "create": { - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2022-04-25T14:45:05.518Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-04-25T14:45:05.518Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_customer_details":true,"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2022-05-03T09:17:16.501Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-05-03T09:17:16.501Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_customer_details":true,"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false}} }, "initialise": { - "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2022-04-25T14:45:05.518Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-04-25T14:45:05.518Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_customer_details":true,"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false}} + "body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2022-05-03T09:17:16.501Z","exit_uri":"https://my-website.com/abc/callback","expires_at":"2022-05-03T09:17:16.501Z","id":"BRF123","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_customer_details":false,"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false}} } } \ No newline at end of file diff --git a/testdata/billing_request_templates.json b/testdata/billing_request_templates.json index 48a5147..e24c325 100644 --- a/testdata/billing_request_templates.json +++ b/testdata/billing_request_templates.json @@ -1,6 +1,6 @@ { "list": { - "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 6052","before":"example before 7175"},"limit":50}} + "body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7175","before":"example before 6052"},"limit":50}} }, "get": { "body": {"billing_request_templates":{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}} diff --git a/testdata/billing_requests.json b/testdata/billing_requests.json index 26de264..bc57da7 100644 --- a/testdata/billing_requests.json +++ b/testdata/billing_requests.json @@ -1,32 +1,32 @@ { "list": { - "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1847","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 4059","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1318"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4425"},"metadata":{},"scheme":"faster_payments"},"status":"pending"},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 694","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8511","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 456"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 3300"},"metadata":{},"scheme":"faster_payments"},"status":"pending"}],"meta":{"cursors":{"after":"example after 8162","before":"example before 5089"},"limit":50}} + "body": {"billing_requests":[{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 4059","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1847","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1318"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4425"},"metadata":{},"scheme":"faster_payments"},"status":"pending"},{"created_at":"2015-01-01T12:00:00.000Z","id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 3300","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 456","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 8511"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 2540"},"metadata":{},"scheme":"faster_payments"},"status":"pending"}],"meta":{"cursors":{"after":"example after 5089","before":"example before 8162"},"limit":50}} }, "create": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 3274","authorisation_type":"example authorisation_type 1211","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 1445"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9947","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 8047","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1528"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 6258"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9106"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3237"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 1528","authorisation_type":"example authorisation_type 6258","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 9947"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1211","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1445","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 5466"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9106"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3274"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 4728"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "get": { "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 3015","authorisation_type":"example authorisation_type 5541","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 7387"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1737","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 631","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 2888"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5356"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 5429"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 6831"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "collect_customer_details": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 6413","authorisation_type":"example authorisation_type 3090","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 1485"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 563","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 5194","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 4147"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4078"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 1353"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 6159"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 563","authorisation_type":"example authorisation_type 2433","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 4078"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 1485","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 5026","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3090"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 1353"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 6159"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 4324"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "collect_bank_account": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 1957","authorisation_type":"example authorisation_type 3721","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 2199"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 2451","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9355","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 8705"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9703"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 4538"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 2888"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 7189","authorisation_type":"example authorisation_type 2199","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 8705"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 8510","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2451","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 3721"},"metadata":{},"scheme":"bacs","verify":"recommended"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 2888"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9355"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9703"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "fulfil": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 8266","authorisation_type":"example authorisation_type 9828","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 7202"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9002","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9718","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 2605"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 4376"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 1563"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 5746"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 7202","authorisation_type":"example authorisation_type 4783","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 1563"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 156","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 2605","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 5561"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 9718"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9002"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 4376"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "confirm_payer_details": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 1137","authorisation_type":"example authorisation_type 3133","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 59"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5094","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 5447","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 7996"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 953"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8623"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 6420"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 1577","authorisation_type":"example authorisation_type 7463","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 6420"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 59","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9241","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 5094"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 3133"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 953"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8623"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "cancel": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 3891","authorisation_type":"example authorisation_type 2002","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 8878"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9107","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7940","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9843"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 3033"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 2546"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 9336"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 3033","authorisation_type":"example authorisation_type 8643","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 2002"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 552","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 9843","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 9107"},"metadata":{},"scheme":"bacs","verify":"minimum"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 6503"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 9336"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8878"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "notify": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 9757","authorisation_type":"example authorisation_type 3687","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 3410"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 8590","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 5285","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 1351"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 7425"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 1598"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 2205"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 2205","authorisation_type":"example authorisation_type 1598","requires_institution":false},"collect_customer_details":{"default_country_code":"example default_country_code 1351"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 9757","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1515","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 5285"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 8010"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3632"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8590"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} }, "fallback": { - "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 6137","authorisation_type":"example authorisation_type 1297","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 9271"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":true,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5802","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 7726","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 8582"},"metadata":{},"scheme":"bacs","verify":"always"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 5384"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8553"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 3098"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} + "body": {"billing_requests":{"actions":[{"bank_authorisation":{"adapter":"example adapter 6137","authorisation_type":"example authorisation_type 9271","requires_institution":true},"collect_customer_details":{"default_country_code":"example default_country_code 5894"},"completes_actions":["collect_bank_account"],"required":true,"requires_actions":["collect_bank_account"],"status":"pending","type":"collect_bank_details"}],"created_at":"2015-01-01T12:00:00.000Z","fallback_enabled":false,"id":"BRQ123","links":{"bank_authorisation":"example bank_authorisation 5384","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","customer_billing_detail":"example customer_billing_detail 1297","mandate_request":"MRQ123","mandate_request_mandate":"MD123","payment_request":"PRQ123","payment_request_payment":"PM123"},"mandate_request":{"currency":"GBP","links":{"mandate":"example mandate 5802"},"metadata":{},"scheme":"bacs","verify":"when_available"},"metadata":{},"payment_request":{"amount":1000,"app_fee":100,"currency":"GBP","description":"Top-up Payment","links":{"payment":"example payment 8582"},"metadata":{},"scheme":"faster_payments"},"resources":{"customer":{"company_name":"Hamilton Trading Ltd.","created_at":"2014-01-01T12:00:00.000Z","email":"user@example.com","family_name":"Osborne","given_name":"Frank","id":"CU123","language":"en","metadata":{},"phone_number":"+64 4 817 9999"},"customer_bank_account":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 3098"},"metadata":{}},"customer_billing_detail":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","danish_identity_number":"220550-6218","id":"CU123","ip_address":"127.0.0.1","postal_code":"NW1 6XE","region":"Greater London","schemes":["example schemes 8553"],"swedish_identity_number":"556564-5404"}},"status":"pending"}} } } \ No newline at end of file diff --git a/testdata/blocks.json b/testdata/blocks.json index e816f80..d4f614d 100644 --- a/testdata/blocks.json +++ b/testdata/blocks.json @@ -6,13 +6,13 @@ "body": {"blocks":{"active":true,"block_type":"example block_type 3749","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 2818","reason_type":"example reason_type 1528","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "list": { - "body": {"blocks":[{"active":true,"block_type":"example block_type 1224","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3612","reason_type":"example reason_type 4547","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 7839","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 3616","reason_type":"example reason_type 1532","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7903","before":"example before 4384"},"limit":50}} + "body": {"blocks":[{"active":true,"block_type":"example block_type 4384","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 1224","reason_type":"example reason_type 7903","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 4547","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 1532","reason_type":"example reason_type 3612","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 7839","before":"example before 3616"},"limit":50}} }, "disable": { "body": {"blocks":{"active":true,"block_type":"example block_type 540","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7051","reason_type":"example reason_type 5786","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "enable": { - "body": {"blocks":{"active":true,"block_type":"example block_type 8076","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 7351","reason_type":"example reason_type 3640","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} + "body": {"blocks":{"active":true,"block_type":"example block_type 3640","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 8076","reason_type":"example reason_type 7351","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}} }, "block_by_ref": { "body": {"blocks":[{"active":true,"block_type":"example block_type 2305","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 4801","reason_type":"example reason_type 9183","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"},{"active":true,"block_type":"example block_type 90","created_at":"2014-01-01T12:00:00.000Z","id":"BLC123","reason_description":"example reason_description 2258","reason_type":"example reason_type 1602","resource_reference":"example@example.com","updated_at":"2014-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 364","before":"example before 8844"},"limit":50}} diff --git a/testdata/creditors.json b/testdata/creditors.json index abecc23..d575b92 100644 --- a/testdata/creditors.json +++ b/testdata/creditors.json @@ -3,12 +3,12 @@ "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7578","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 8154","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3231","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3767","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} }, "list": { - "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7822","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 4208","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 1223","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7342","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7743","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1968","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 1166","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3710","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 4535","before":"example before 440"},"limit":50}} + "body": {"creditors":[{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 7822","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 1223","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 4208","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 7342","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"},{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 3710","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 7743","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 1968","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 1166","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}],"meta":{"cursors":{"after":"example after 440","before":"example before 4535"},"limit":50}} }, "get": { "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 4657","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 4415","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 4904","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3162","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} }, "update": { - "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9371","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 3039","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3430","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 9513","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} + "body": {"creditors":{"address_line1":"338-346 Goswell Road","address_line2":"Islington","address_line3":"example address_line3 9513","can_create_refunds":false,"city":"London","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","custom_payment_pages_enabled":true,"fx_payout_currency":"EUR","id":"CR123","links":{"default_aud_payout_account":"BA234","default_cad_payout_account":"BA792","default_dkk_payout_account":"BA790","default_eur_payout_account":"BA456","default_gbp_payout_account":"BA123","default_nzd_payout_account":"BA791","default_sek_payout_account":"BA789","default_usd_payout_account":"BA792"},"logo_url":"https://uploads.gocardless.com/logo.png","mandate_imports_enabled":true,"merchant_responsible_for_notifications":true,"name":"Nude Wines","postal_code":"EC1V 7LQ","region":"example region 9371","scheme_identifiers":[{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","can_specify_mandate_reference":false,"city":"London","country_code":"GB","currency":"EUR","email":"user@example.com","minimum_advance_notice":3,"name":"example name 3039","phone_number":"+44 20 1234 1234","postal_code":"NW1 6XE","reference":"example reference 3430","region":"Greater London","scheme":"bacs"}],"verification_status":"action_required"}} } } \ No newline at end of file diff --git a/testdata/currency_exchange_rates.json b/testdata/currency_exchange_rates.json index a35bbb8..b94137f 100644 --- a/testdata/currency_exchange_rates.json +++ b/testdata/currency_exchange_rates.json @@ -1,5 +1,5 @@ { "list": { - "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 783","before":"example before 6720"},"limit":50}} + "body": {"currency_exchange_rates":[{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"},{"rate":"1.1234567890","source":"GBP","target":"EUR","time":"2014-01-01T12:00:00Z"}],"meta":{"cursors":{"after":"example after 6720","before":"example before 783"},"limit":50}} } } \ No newline at end of file diff --git a/testdata/customer_bank_accounts.json b/testdata/customer_bank_accounts.json index 56e3774..cea2a66 100644 --- a/testdata/customer_bank_accounts.json +++ b/testdata/customer_bank_accounts.json @@ -3,7 +3,7 @@ "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8247"},"metadata":{}}} }, "list": { - "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8010"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 565"},"metadata":{}}],"meta":{"cursors":{"after":"example after 4162","before":"example before 6829"},"limit":50}} + "body": {"customer_bank_accounts":[{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 8010"},"metadata":{}},{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 565"},"metadata":{}}],"meta":{"cursors":{"after":"example after 6829","before":"example before 4162"},"limit":50}} }, "get": { "body": {"customer_bank_accounts":{"account_holder_name":"Billie Jean","account_number_ending":"1234","account_type":"savings","bank_name":"BARCLAYS BANK PLC","country_code":"GB","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","enabled":true,"id":"BA123","links":{"customer":"example customer 7920"},"metadata":{}}} diff --git a/testdata/customer_notifications.json b/testdata/customer_notifications.json index 6bb6764..6e5946c 100644 --- a/testdata/customer_notifications.json +++ b/testdata/customer_notifications.json @@ -1,5 +1,5 @@ { "handle": { - "body": {"customer_notifications":{"action_taken":"example action_taken 5695","action_taken_at":"2022-04-25T14:45:05.523Z","action_taken_by":"example action_taken_by 8666","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} + "body": {"customer_notifications":{"action_taken":"example action_taken 5695","action_taken_at":"2022-05-03T09:17:16.506Z","action_taken_by":"example action_taken_by 8666","id":"PCN123","links":{"customer":"CU123","event":"EV123","mandate":"MD123","payment":"PM123","refund":"RF123","subscription":"SB123"},"type":"payment_created"}} } } \ No newline at end of file diff --git a/testdata/events.json b/testdata/events.json index 38754f7..71a7edc 100644 --- a/testdata/events.json +++ b/testdata/events.json @@ -1,8 +1,8 @@ { "list": { - "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-04-25T14:45:05.523Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-04-25T14:45:05.524Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 1092","before":"example before 6629"},"limit":50}} + "body": {"events":[{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-05-03T09:17:16.506Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"},{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-05-03T09:17:16.506Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}],"meta":{"cursors":{"after":"example after 1092","before":"example before 6629"},"limit":50}} }, "get": { - "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-04-25T14:45:05.524Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}} + "body": {"events":{"action":"cancelled","created_at":"2014-01-01T12:00:00.000Z","customer_notifications":[{"deadline":"2022-05-03T09:17:16.506Z","id":"PCN123","mandatory":false,"type":"payment_created"}],"details":{"bank_account_id":"BA123","cause":"bank_account_disabled","currency":"GBP","description":"Customer's bank account closed","not_retried_reason":"failure_filter_applied","origin":"bank","property":"fx_payout_currency","reason_code":"ADDACS-B","scheme":"bacs","will_attempt_retry":true},"id":"EV123","links":{"bank_authorisation":"BAU123","billing_request":"BRQ123","billing_request_flow":"BRF123","creditor":"CR123","customer":"CU123","customer_bank_account":"BA123","instalment_schedule":"IS123","mandate":"MD123","mandate_request_mandate":"MD123","new_customer_bank_account":"BA123","new_mandate":"MD123","organisation":"OR123","parent_event":"EV123","payer_authorisation":"PAU123","payment":"PM123","payment_request_payment":"PM123","payout":"PO123","previous_customer_bank_account":"BA123","refund":"RF123","subscription":"SB123"},"metadata":{},"resource_type":"mandates"}} } } \ No newline at end of file diff --git a/testdata/institutions.json b/testdata/institutions.json index 69ca90a..086b90e 100644 --- a/testdata/institutions.json +++ b/testdata/institutions.json @@ -1,5 +1,5 @@ { "list": { - "body": {"institutions":[{"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 5320","before":"example before 5399"},"limit":50}} + "body": {"institutions":[{"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"},{"country_code":"GB","icon_url":"https://gocardless/assets/icons/monzo","id":"monzo","logo_url":"https://gocardless/assets/logos/monzo","name":"VAT"}],"meta":{"cursors":{"after":"example after 5399","before":"example before 5320"},"limit":50}} } } \ No newline at end of file diff --git a/testdata/payer_authorisations.json b/testdata/payer_authorisations.json index 0162d29..b8c3fde 100644 --- a/testdata/payer_authorisations.json +++ b/testdata/payer_authorisations.json @@ -1,9 +1,9 @@ { "get": { - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 8318","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 6611","message":"example message 9103","request_pointer":"example request_pointer 9888"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 6611","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 9103","message":"example message 9888","request_pointer":"example request_pointer 8318"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "create": { - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 3756","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 2019","message":"example message 7807","request_pointer":"example request_pointer 6157"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 6157","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 2019","message":"example message 7807","request_pointer":"example request_pointer 3756"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "update": { "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 8652","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 8675","message":"example message 2181","request_pointer":"example request_pointer 1853"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} @@ -12,6 +12,6 @@ "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 8795","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 417","message":"example message 1393","request_pointer":"example request_pointer 8470"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} }, "confirm": { - "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 8996","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 9386","message":"example message 2632","request_pointer":"example request_pointer 2520"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} + "body": {"payer_authorisations":{"bank_account":{"account_holder_name":"Billie Jean","account_number":"55779911","account_number_ending":"1234","account_number_suffix":"00","account_type":"savings","bank_code":"example bank_code 2520","branch_code":"20-00-00","country_code":"GB","currency":"EUR","iban":"GB60BARC20000055779911","metadata":{}},"created_at":"2020-01-01T12:00:00.000Z","customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"user@example.com","family_name":"Osborne","given_name":"Frank","locale":"en-GB","metadata":{},"postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"id":"PA123","incomplete_fields":[{"field":"example field 8996","message":"example message 9386","request_pointer":"example request_pointer 2632"}],"links":{"bank_account":"BA123","customer":"CU123","mandate":"MD123"},"mandate":{"metadata":{},"payer_ip_address":"127.0.0.1","reference":"REF-123","scheme":"bacs"},"status":"created"}} } } \ No newline at end of file diff --git a/testdata/payouts.json b/testdata/payouts.json index fb4c904..a9e6212 100644 --- a/testdata/payouts.json +++ b/testdata/payouts.json @@ -1,6 +1,6 @@ { "list": { - "body": {"meta":{"cursors":{"after":"example after 2060","before":"example before 9551"},"limit":50},"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"},{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}]} + "body": {"meta":{"cursors":{"after":"example after 9551","before":"example before 2060"},"limit":50},"payouts":[{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"},{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}]} }, "get": { "body": {"payouts":{"amount":1000,"arrival_date":"2014-01-01","created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","deducted_fees":20,"fx":{"estimated_exchange_rate":"1.1234567890","exchange_rate":"1.1234567890","fx_amount":1150,"fx_currency":"EUR"},"id":"PO123","links":{"creditor":"CR123","creditor_bank_account":"BA123"},"metadata":{"salesforce_id":"ABCD1234"},"payout_type":"merchant","reference":"ref-1","status":"pending","tax_currency":"EUR"}} diff --git a/testdata/subscriptions.json b/testdata/subscriptions.json index c912bb1..788d1f7 100644 --- a/testdata/subscriptions.json +++ b/testdata/subscriptions.json @@ -3,7 +3,7 @@ "body": {"subscriptions":{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} }, "list": { - "body": {"meta":{"cursors":{"after":"example after 1509","before":"example before 1215"},"limit":50},"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} + "body": {"meta":{"cursors":{"after":"example after 1215","before":"example before 1509"},"limit":50},"subscriptions":[{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":false,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]},{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}]} }, "get": { "body": {"subscriptions":{"amount":1000,"app_fee":100,"count":5,"created_at":"2014-01-01T12:00:00.000Z","currency":"EUR","day_of_month":28,"earliest_charge_date_after_resume":"2014-11-03","end_date":"2015-10-21","id":"SB123","interval":1,"interval_unit":"monthly","links":{"mandate":"MD123"},"metadata":{},"month":"january","name":"12 month subscription","payment_reference":"GOLDPLAN","retry_if_possible":true,"start_date":"2014-10-21","status":"active","upcoming_payments":[{"amount":2500,"charge_date":"2014-11-03"}]}} diff --git a/testdata/tax_rates.json b/testdata/tax_rates.json index 9e38fb2..2bcc91b 100644 --- a/testdata/tax_rates.json +++ b/testdata/tax_rates.json @@ -1,6 +1,6 @@ { "list": { - "body": {"meta":{"cursors":{"after":"example after 9284","before":"example before 6000"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} + "body": {"meta":{"cursors":{"after":"example after 6000","before":"example before 9284"},"limit":50},"tax_rates":[{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"},{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}]} }, "get": { "body": {"tax_rates":{"end_date":"2014-01-01","id":"GB_VAT_1","jurisdiction":"GBP","percentage":"20.0","start_date":"2014-01-01","type":"VAT"}} diff --git a/testdata/webhooks.json b/testdata/webhooks.json index 6e6d25e..59c1b67 100644 --- a/testdata/webhooks.json +++ b/testdata/webhooks.json @@ -1,11 +1,11 @@ { "list": { - "body": {"meta":{"cursors":{"after":"example after 1606","before":"example before 7293"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 574","request_headers":{},"response_body":"example response_body 2869","response_body_truncated":true,"response_code":235,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 3338","request_headers":{},"response_body":"example response_body 1237","response_body_truncated":true,"response_code":3472,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"}]} + "body": {"meta":{"cursors":{"after":"example after 1606","before":"example before 7293"},"limit":50},"webhooks":[{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 574","request_headers":{},"response_body":"example response_body 2869","response_body_truncated":true,"response_code":6443,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"},{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 3472","request_headers":{},"response_body":"example response_body 1544","response_body_truncated":false,"response_code":6336,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}]} }, "get": { - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 7420","request_headers":{},"response_body":"example response_body 8151","response_body_truncated":true,"response_code":6117,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":false,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 371","request_headers":{},"response_body":"example response_body 9648","response_body_truncated":true,"response_code":5265,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}} }, "retry": { - "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":true,"request_body":"example request_body 8682","request_headers":{},"response_body":"example response_body 4511","response_body_truncated":false,"response_code":855,"response_headers":{},"response_headers_content_truncated":true,"response_headers_count_truncated":false,"successful":true,"url":"https://example.com/webhooks"}} + "body": {"webhooks":{"created_at":"2014-01-01T12:00:00.000Z","id":"WB123","is_test":false,"request_body":"example request_body 129","request_headers":{},"response_body":"example response_body 4511","response_body_truncated":true,"response_code":8682,"response_headers":{},"response_headers_content_truncated":false,"response_headers_count_truncated":true,"successful":false,"url":"https://example.com/webhooks"}} } } \ No newline at end of file diff --git a/useragent.go b/useragent.go index 276bac3..3b053d8 100644 --- a/useragent.go +++ b/useragent.go @@ -7,7 +7,7 @@ import ( const ( // client library version - clientLibVersion = "2.1.0" + clientLibVersion = "2.1.1" ) var userAgent string diff --git a/webhook_service.go b/webhook_service.go index abd3620..d6177d4 100644 --- a/webhook_service.go +++ b/webhook_service.go @@ -110,11 +110,11 @@ func (s *WebhookServiceImpl) List(ctx context.Context, p WebhookListParams, opts if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -219,11 +219,11 @@ func (c *WebhookListPagingIterator) Value(ctx context.Context) (*WebhookListResu return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -311,11 +311,11 @@ func (s *WebhookServiceImpl) Get(ctx context.Context, identity string, opts ...R if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) for key, value := range o.headers { @@ -394,11 +394,11 @@ func (s *WebhookServiceImpl) Retry(ctx context.Context, identity string, opts .. if err != nil { return nil, err } - req.WithContext(ctx) + req = req.WithContext(ctx) req.Header.Set("Authorization", "Bearer "+s.config.Token()) req.Header.Set("GoCardless-Version", "2015-07-06") req.Header.Set("GoCardless-Client-Library", "gocardless-pro-go") - req.Header.Set("GoCardless-Client-Version", "2.1.0") + req.Header.Set("GoCardless-Client-Version", "2.1.1") req.Header.Set("User-Agent", userAgent) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", o.idempotencyKey)