Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1705

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v458
v466
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Go Stripe
[![Go Reference](https://pkg.go.dev/badge/github.com/stripe/stripe-go)](https://pkg.go.dev/github.com/stripe/stripe-go/v74)
[![Go Reference](https://pkg.go.dev/badge/github.com/stripe/stripe-go)](https://pkg.go.dev/github.com/stripe/stripe-go/v75)
[![Build Status](https://github.com/stripe/stripe-go/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-go/actions/workflows/ci.yml?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-go/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-go?branch=master)

Expand All @@ -22,8 +22,8 @@ Then, reference stripe-go in a Go program with `import`:

``` go
import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/customer"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/customer"
)
```

Expand All @@ -33,7 +33,7 @@ toolchain will resolve and fetch the stripe-go module automatically.
Alternatively, you can also explicitly `go get` the package into a project:

```bash
go get -u github.com/stripe/stripe-go/v74
go get -u github.com/stripe/stripe-go/v75
```

## Documentation
Expand Down Expand Up @@ -122,8 +122,8 @@ To use a key, pass it to `API`'s `Init` function:
```go

import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/client"
)

stripe := &client.API{}
Expand All @@ -144,8 +144,8 @@ import (
"google.golang.org/appengine"
"google.golang.org/appengine/urlfetch"

"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/client"
)

func handler(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -179,8 +179,8 @@ client.

```go
import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/$resource$"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/$resource$"
)

// Setup
Expand Down Expand Up @@ -220,8 +220,8 @@ individual key.

```go
import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/client"
)

// Setup
Expand Down Expand Up @@ -292,8 +292,8 @@ with `MaxNetworkRetries`:

```go
import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/client"
)

config := &stripe.BackendConfig{
Expand Down Expand Up @@ -477,7 +477,7 @@ To mock a Stripe client for a unit tests using [GoMock](https://github.com/golan

1. Generate a `Backend` type mock.
```
mockgen -destination=mocks/backend.go -package=mocks github.com/stripe/stripe-go/v74 Backend
mockgen -destination=mocks/backend.go -package=mocks github.com/stripe/stripe-go/v75 Backend
```
2. Use the `Backend` mock to initialize and call methods on the client.
```go
Expand All @@ -488,8 +488,8 @@ import (

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/account"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/account"
)

func UseMockedStripeClient(t *testing.T) {
Expand Down Expand Up @@ -526,7 +526,7 @@ We would love for you to try these and share feedback with us before these featu
To install a beta version of stripe-go use the commit notation of the `go get` command to point to a beta tag:

```
go get -u github.com/stripe/stripe-go/v74@v73.3.0-beta.1
go get -u github.com/stripe/stripe-go/v75@v73.3.0-beta.1
```

> **Note**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
74.30.0
75.0.0
2 changes: 1 addition & 1 deletion account.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package stripe

import (
"encoding/json"
"github.com/stripe/stripe-go/v74/form"
"github.com/stripe/stripe-go/v75/form"
)

// The business type.
Expand Down
4 changes: 2 additions & 2 deletions account/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package account
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /accounts APIs.
Expand Down
4 changes: 2 additions & 2 deletions account/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestAccountDel(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74/form"
"github.com/stripe/stripe-go/v75/form"
)

func TestAccountExternalAccountParams_AppendTo(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion accountlink/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package accountlink
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
stripe "github.com/stripe/stripe-go/v75"
)

// Client is used to invoke /account_links APIs.
Expand Down
4 changes: 2 additions & 2 deletions accountlink/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestAccountLinkNew(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
package stripe

const (
apiVersion string = "2022-11-15"
apiVersion string = "2023-08-16"
)
4 changes: 2 additions & 2 deletions applepaydomain/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package applepaydomain
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /apple_pay/domains APIs.
Expand Down
4 changes: 2 additions & 2 deletions applepaydomain/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestApplePayDomainDel(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions applicationfee/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package applicationfee
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /application_fees APIs.
Expand Down
4 changes: 2 additions & 2 deletions applicationfee/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestApplicationFeeGet(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions apps/secret/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package secret
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /apps/secrets APIs.
Expand Down
2 changes: 1 addition & 1 deletion balance/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package balance
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
stripe "github.com/stripe/stripe-go/v75"
)

// Client is used to invoke /balance APIs.
Expand Down
2 changes: 1 addition & 1 deletion balance/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
_ "github.com/stripe/stripe-go/v74/testing"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestBalanceGet(t *testing.T) {
Expand Down
10 changes: 3 additions & 7 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ const (
//
// Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
type BalanceTransactionListParams struct {
ListParams `form:"*"`
// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
AvailableOn *int64 `form:"available_on"`
// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
AvailableOnRange *RangeQueryParams `form:"available_on"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
// Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Currency *string `form:"currency"`
// Specifies which fields in the response should be expanded.
Expand Down
4 changes: 2 additions & 2 deletions balancetransaction/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package balancetransaction
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /balance_transactions APIs.
Expand Down
4 changes: 2 additions & 2 deletions balancetransaction/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestBalanceTransactionGet(t *testing.T) {
Expand Down
10 changes: 9 additions & 1 deletion bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package stripe

import (
"encoding/json"
"github.com/stripe/stripe-go/v74/form"
"github.com/stripe/stripe-go/v75/form"
"strconv"
)

Expand Down Expand Up @@ -41,10 +41,12 @@ const (
BankAccountFutureRequirementsErrorCodeInvalidStreetAddress BankAccountFutureRequirementsErrorCode = "invalid_street_address"
BankAccountFutureRequirementsErrorCodeInvalidTOSAcceptance BankAccountFutureRequirementsErrorCode = "invalid_tos_acceptance"
BankAccountFutureRequirementsErrorCodeInvalidValueOther BankAccountFutureRequirementsErrorCode = "invalid_value_other"
BankAccountFutureRequirementsErrorCodeVerificationDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_directors_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountFutureRequirementsErrorCode = "verification_document_address_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountFutureRequirementsErrorCode = "verification_document_address_missing"
BankAccountFutureRequirementsErrorCodeVerificationDocumentCorrupt BankAccountFutureRequirementsErrorCode = "verification_document_corrupt"
BankAccountFutureRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_country_not_supported"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_document_directors_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountFutureRequirementsErrorCode = "verification_document_dob_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountFutureRequirementsErrorCode = "verification_document_duplicate_type"
BankAccountFutureRequirementsErrorCodeVerificationDocumentExpired BankAccountFutureRequirementsErrorCode = "verification_document_expired"
Expand All @@ -70,6 +72,7 @@ const (
BankAccountFutureRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountFutureRequirementsErrorCode = "verification_document_photo_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentTooLarge BankAccountFutureRequirementsErrorCode = "verification_document_too_large"
BankAccountFutureRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_type_not_supported"
BankAccountFutureRequirementsErrorCodeVerificationExtraneousDirectors BankAccountFutureRequirementsErrorCode = "verification_extraneous_directors"
BankAccountFutureRequirementsErrorCodeVerificationFailedAddressMatch BankAccountFutureRequirementsErrorCode = "verification_failed_address_match"
BankAccountFutureRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountFutureRequirementsErrorCode = "verification_failed_business_iec_number"
BankAccountFutureRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountFutureRequirementsErrorCode = "verification_failed_document_match"
Expand All @@ -81,6 +84,7 @@ const (
BankAccountFutureRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountFutureRequirementsErrorCode = "verification_failed_residential_address"
BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_match"
BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_not_issued"
BankAccountFutureRequirementsErrorCodeVerificationMissingDirectors BankAccountFutureRequirementsErrorCode = "verification_missing_directors"
BankAccountFutureRequirementsErrorCodeVerificationMissingExecutives BankAccountFutureRequirementsErrorCode = "verification_missing_executives"
BankAccountFutureRequirementsErrorCodeVerificationMissingOwners BankAccountFutureRequirementsErrorCode = "verification_missing_owners"
BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
Expand All @@ -97,10 +101,12 @@ const (
BankAccountRequirementsErrorCodeInvalidStreetAddress BankAccountRequirementsErrorCode = "invalid_street_address"
BankAccountRequirementsErrorCodeInvalidTOSAcceptance BankAccountRequirementsErrorCode = "invalid_tos_acceptance"
BankAccountRequirementsErrorCodeInvalidValueOther BankAccountRequirementsErrorCode = "invalid_value_other"
BankAccountRequirementsErrorCodeVerificationDirectorsMismatch BankAccountRequirementsErrorCode = "verification_directors_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountRequirementsErrorCode = "verification_document_address_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountRequirementsErrorCode = "verification_document_address_missing"
BankAccountRequirementsErrorCodeVerificationDocumentCorrupt BankAccountRequirementsErrorCode = "verification_document_corrupt"
BankAccountRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountRequirementsErrorCode = "verification_document_country_not_supported"
BankAccountRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountRequirementsErrorCode = "verification_document_directors_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountRequirementsErrorCode = "verification_document_dob_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountRequirementsErrorCode = "verification_document_duplicate_type"
BankAccountRequirementsErrorCodeVerificationDocumentExpired BankAccountRequirementsErrorCode = "verification_document_expired"
Expand All @@ -126,6 +132,7 @@ const (
BankAccountRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountRequirementsErrorCode = "verification_document_photo_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentTooLarge BankAccountRequirementsErrorCode = "verification_document_too_large"
BankAccountRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountRequirementsErrorCode = "verification_document_type_not_supported"
BankAccountRequirementsErrorCodeVerificationExtraneousDirectors BankAccountRequirementsErrorCode = "verification_extraneous_directors"
BankAccountRequirementsErrorCodeVerificationFailedAddressMatch BankAccountRequirementsErrorCode = "verification_failed_address_match"
BankAccountRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountRequirementsErrorCode = "verification_failed_business_iec_number"
BankAccountRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountRequirementsErrorCode = "verification_failed_document_match"
Expand All @@ -137,6 +144,7 @@ const (
BankAccountRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountRequirementsErrorCode = "verification_failed_residential_address"
BankAccountRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountRequirementsErrorCode = "verification_failed_tax_id_match"
BankAccountRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountRequirementsErrorCode = "verification_failed_tax_id_not_issued"
BankAccountRequirementsErrorCodeVerificationMissingDirectors BankAccountRequirementsErrorCode = "verification_missing_directors"
BankAccountRequirementsErrorCodeVerificationMissingExecutives BankAccountRequirementsErrorCode = "verification_missing_executives"
BankAccountRequirementsErrorCodeVerificationMissingOwners BankAccountRequirementsErrorCode = "verification_missing_owners"
BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
Expand Down
4 changes: 2 additions & 2 deletions bankaccount/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"fmt"
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke bankaccount related APIs.
Expand Down
4 changes: 2 additions & 2 deletions bankaccount/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v74"
_ "github.com/stripe/stripe-go/v74/testing"
stripe "github.com/stripe/stripe-go/v75"
_ "github.com/stripe/stripe-go/v75/testing"
)

func TestBankAccountDel_ByAccount(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bankaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

assert "github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74/form"
"github.com/stripe/stripe-go/v75/form"
)

func TestBankAccount_UnmarshalJSON(t *testing.T) {
Expand Down
Loading
Loading