Skip to content

Commit

Permalink
Release 2.1.1 (#9)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
1 parent a163d97 commit 0f793df
Show file tree
Hide file tree
Showing 48 changed files with 290 additions and 278 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
go get -u github.com/gocardless/[email protected].1
```

## Initializing the client
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.1.1
8 changes: 4 additions & 4 deletions bank_authorisation_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 8 additions & 2 deletions bank_details_lookup_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions billing_request_flow_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
50 changes: 28 additions & 22 deletions billing_request_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
20 changes: 10 additions & 10 deletions billing_request_template_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 0f793df

Please sign in to comment.