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

Add support for the BillingPortal namespace and the Session API and resource #1063

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

remi-stripe
Copy link
Contributor

cc @stripe/api-libraries
cc @alexander-stripe

@remi-stripe remi-stripe changed the title [WIP] Add support for the BillingPortal namespace and the Session API and resource Add support for the BillingPortal namespace and the Session API and resource Apr 22, 2020
@remi-stripe
Copy link
Contributor Author

remi-stripe commented Apr 22, 2020

I'm hitting a weird error locally

$ make all
go run scripts/test_with_stripe_mock/main.go -race ./...
No custom spec file found, assuming stripe-mock is already running on port 12112
# github.com/stripe/stripe-go/v71/billingportal/session [github.com/stripe/stripe-go/v71/billingportal/session.test]
billingportal/session/client.go:17:18: undefined: stripe.BillingPortalSessionParams
billingportal/session/client.go:17:55: undefined: stripe.BillingPortalSession
billingportal/session/client.go:22:29: undefined: stripe.BillingPortalSessionParams
billingportal/session/client.go:22:66: undefined: stripe.BillingPortalSession
# github.com/stripe/stripe-go/v71/billingportal/session
billingportal/session/client.go:17:18: undefined: stripe.BillingPortalSessionParams
billingportal/session/client.go:17:55: undefined: stripe.BillingPortalSession
billingportal/session/client.go:22:29: undefined: stripe.BillingPortalSessionParams
billingportal/session/client.go:22:66: undefined: stripe.BillingPortalSession

I don't understand what is causing those errors at the moment and whether it's related to the change with module or the fact that this is the first namespace with 2 words.

Running make all also changes go.mod and go.sum locally and I don't understand why either

import (
"net/http"

stripe "github.com/stripe/stripe-go"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try adding v71 to the end of this like:

    stripe "github.com/stripe/stripe-go/v71"

Unfortunately this is needed for all stripe-go require paths now.

"testing"

assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And same with this one: v71 at the end.

@brandur-stripe
Copy link
Contributor

@remi-stripe I think it's just a minor problem with the format of your import paths. Comments above.

ptal @remi-stripe

@remi-stripe
Copy link
Contributor Author

Ah gotcha, it's the bad luck of having starting the PR before the major was merged. Okay fixed all the issues, PTAL @brandur-stripe

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@remi-stripe remi-stripe merged commit b1b8e17 into master Apr 22, 2020
@remi-stripe remi-stripe deleted the remi-add-portal branch April 22, 2020 19:23
nadaismail-stripe added a commit that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants