Skip to content

Commit

Permalink
Merge pull request #31 from gocardless/template-changes
Browse files Browse the repository at this point in the history
V3.5.0
  • Loading branch information
alfredrichards authored Aug 15, 2023
2 parents 7a03e14 + 94fc665 commit 8cf64c8
Show file tree
Hide file tree
Showing 58 changed files with 219 additions and 221 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/gocardless-pro-go@v3.4.0
go get -u github.com/gocardless/gocardless-pro-go@v3.5.0
```

## Initializing the client
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0
3.5.0
4 changes: 2 additions & 2 deletions bank_authorisation_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s *BankAuthorisationServiceImpl) Create(ctx context.Context, p BankAuthori
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -179,7 +179,7 @@ func (s *BankAuthorisationServiceImpl) Get(ctx context.Context, identity string,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down
2 changes: 1 addition & 1 deletion bank_details_lookup_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (s *BankDetailsLookupServiceImpl) Create(ctx context.Context, p BankDetails
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down
4 changes: 2 additions & 2 deletions billing_request_flow_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (s *BillingRequestFlowServiceImpl) Create(ctx context.Context, p BillingReq
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -253,7 +253,7 @@ func (s *BillingRequestFlowServiceImpl) Initialise(ctx context.Context, identity
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down
27 changes: 14 additions & 13 deletions billing_request_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type BillingRequestActions struct {
BankAuthorisation *BillingRequestActionsBankAuthorisation `url:"bank_authorisation,omitempty" json:"bank_authorisation,omitempty"`
CollectCustomerDetails *BillingRequestActionsCollectCustomerDetails `url:"collect_customer_details,omitempty" json:"collect_customer_details,omitempty"`
CompletesActions []string `url:"completes_actions,omitempty" json:"completes_actions,omitempty"`
InstitutionGuessStatus string `url:"institution_guess_status,omitempty" json:"institution_guess_status,omitempty"`
Required bool `url:"required,omitempty" json:"required,omitempty"`
RequiresActions []string `url:"requires_actions,omitempty" json:"requires_actions,omitempty"`
Status string `url:"status,omitempty" json:"status,omitempty"`
Expand Down Expand Up @@ -281,7 +282,7 @@ func (s *BillingRequestServiceImpl) Create(ctx context.Context, p BillingRequest
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -413,7 +414,7 @@ func (s *BillingRequestServiceImpl) CollectCustomerDetails(ctx context.Context,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -533,7 +534,7 @@ func (s *BillingRequestServiceImpl) CollectBankAccount(ctx context.Context, iden
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -634,7 +635,7 @@ func (s *BillingRequestServiceImpl) ConfirmPayerDetails(ctx context.Context, ide
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -734,7 +735,7 @@ func (s *BillingRequestServiceImpl) Fulfil(ctx context.Context, identity string,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -834,7 +835,7 @@ func (s *BillingRequestServiceImpl) Cancel(ctx context.Context, identity string,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -947,7 +948,7 @@ func (s *BillingRequestServiceImpl) List(ctx context.Context, p BillingRequestLi
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -1056,7 +1057,7 @@ func (c *BillingRequestListPagingIterator) Value(ctx context.Context) (*BillingR
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -1148,7 +1149,7 @@ func (s *BillingRequestServiceImpl) Get(ctx context.Context, identity string, op
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -1251,7 +1252,7 @@ func (s *BillingRequestServiceImpl) Notify(ctx context.Context, identity string,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -1350,7 +1351,7 @@ func (s *BillingRequestServiceImpl) Fallback(ctx context.Context, identity strin
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -1456,7 +1457,7 @@ func (s *BillingRequestServiceImpl) ChooseCurrency(ctx context.Context, identity
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -1556,7 +1557,7 @@ func (s *BillingRequestServiceImpl) SelectInstitution(ctx context.Context, ident
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down
10 changes: 5 additions & 5 deletions billing_request_template_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (s *BillingRequestTemplateServiceImpl) List(ctx context.Context, p BillingR
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -218,7 +218,7 @@ func (c *BillingRequestTemplateListPagingIterator) Value(ctx context.Context) (*
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -310,7 +310,7 @@ func (s *BillingRequestTemplateServiceImpl) Get(ctx context.Context, identity st
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -422,7 +422,7 @@ func (s *BillingRequestTemplateServiceImpl) Create(ctx context.Context, p Billin
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -534,7 +534,7 @@ func (s *BillingRequestTemplateServiceImpl) Update(ctx context.Context, identity
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down
14 changes: 7 additions & 7 deletions block_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (s *BlockServiceImpl) Create(ctx context.Context, p BlockCreateParams, opts
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -177,7 +177,7 @@ func (s *BlockServiceImpl) Get(ctx context.Context, identity string, opts ...Req
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -290,7 +290,7 @@ func (s *BlockServiceImpl) List(ctx context.Context, p BlockListParams, opts ...
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -399,7 +399,7 @@ func (c *BlockListPagingIterator) Value(ctx context.Context) (*BlockListResult,
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -494,7 +494,7 @@ func (s *BlockServiceImpl) Disable(ctx context.Context, identity string, opts ..
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -579,7 +579,7 @@ func (s *BlockServiceImpl) Enable(ctx context.Context, identity string, opts ...
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -700,7 +700,7 @@ func (s *BlockServiceImpl) BlockByRef(ctx context.Context, p BlockBlockByRefPara
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down
10 changes: 5 additions & 5 deletions creditor_bank_account_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (s *CreditorBankAccountServiceImpl) Create(ctx context.Context, p CreditorB
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", o.idempotencyKey)
Expand Down Expand Up @@ -229,7 +229,7 @@ func (s *CreditorBankAccountServiceImpl) List(ctx context.Context, p CreditorBan
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -338,7 +338,7 @@ func (c *CreditorBankAccountListPagingIterator) Value(ctx context.Context) (*Cre
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -430,7 +430,7 @@ func (s *CreditorBankAccountServiceImpl) Get(ctx context.Context, identity strin
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
req.Header.Set("User-Agent", userAgent)

for key, value := range o.headers {
Expand Down Expand Up @@ -520,7 +520,7 @@ func (s *CreditorBankAccountServiceImpl) Disable(ctx context.Context, identity s
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", "3.4.0")
req.Header.Set("GoCardless-Client-Version", "3.5.0")
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 8cf64c8

Please sign in to comment.