Skip to content

Release 4.0.0

Compare
Choose a tag to compare
@douglasmiller douglasmiller released this 01 Mar 21:33
db8a94e

Changelog

Unreleased

Full Changelog

Major Version Release

The 4.x major version of the client pairs with the v2021-02-25 API version. This version of the client and the API contain breaking changes that should be considered before upgrading your integration.

Breaking Changes in the API

All changes to the core API are documented in the Developer Portal changelog

Breaking Changes in Client

  • Empty path parameters are now explicitly invalid and cause an error to be returned. [#67] [#68]

  • Params has been removed in favor of Context/RequestOptions. [#70]

    3.x

    headers := http.Header{"Accept-Language": []string{"fr"}}
    
    accountReq := &recurly.AccountCreate{
        Params: recurly.Params{
    	    Header: headers,
        },
    }
    
    account, err := client.CreateAccount(accountReq)

    4.x

    headers := http.Header{"Accept-Language": []string{"fr"}}
    
    accountReq := &recurly.AccountCreate{}
    
    account, err := client.CreateAccount(accountReq, recurly.WithHeader(headers))
  • List operations return a pager interface instead of struct. [#80]

    3.x

    account, err := client.ListAccounts()
    
    for accounts.HasMore {
        err := accounts.Fetch()
        for i, account := range accounts.Data {
    	    fmt.Printf("Account   0", i)
        }
    }

    4.x

    account, err := client.ListAccounts()
    
    for accounts.HasMore() {
        err := accounts.Fetch()
        for i, account := range accounts.Data() {
    	    fmt.Printf("Account   0", i)
        }
    }

Implemented enhancements:

  • FetchWithContext not exposed within ClientInterface #77

Merged pull requests: