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

codegen: api.go #1323

Merged
merged 1 commit into from
Aug 19, 2021
Merged

codegen: api.go #1323

merged 1 commit into from
Aug 19, 2021

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Aug 4, 2021

r? @stripe/api-library-reviewers
Changes client/api.go to be compatible with codegen.

Alphebetization is now consistent, and "namespaced" resources are now consistently given qualified imports.

client/api.go Outdated
@@ -83,25 +89,24 @@ import (
"github.com/stripe/stripe-go/v72/webhookendpoint"
)

// API is the Stripe client. It contains all the different resources available.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

git diff HEAD~1 | grep '\.Client$' | grep [+-] | sort -k 2
+       BillingPortalSessions *billingportalsession.Client
-       BillingPortalSessions *billingportalsession.Client
+       CustomerBalanceTransactions *customerbalancetransaction.Client
-       CustomerBalanceTransactions *customerbalancetransaction.Client
+       FeeRefunds *feerefund.Client
-       FeeRefunds *feerefund.Client
+       Files *file.Client
-       Files *file.Client
+       IdentityVerificationReports *identityverificationreport.Client
-       IdentityVerificationReports *verificationreport.Client
+       IdentityVerificationSessions *identityverificationsession.Client
-       IdentityVerificationSessions *verificationsession.Client
+       Invoices *invoice.Client
-       Invoices *invoice.Client
-       IssuingAuthorizations *authorization.Client
+       IssuingAuthorizations *issuingauthorization.Client
-       IssuingCardholders *cardholder.Client
+       IssuingCardholders *issuingcardholder.Client
+       IssuingTransactions *issuingtransaction.Client
-       IssuingTransactions *transaction.Client
+       Orders *order.Client
-       Orders *order.Client
-       RadarEarlyFraudWarnings *earlyfraudwarning.Client
+       RadarEarlyFraudWarnings *radarearlyfraudwarning.Client
+       RadarValueListItems *radarvaluelistitem.Client
-       RadarValueListItems *valuelistitem.Client
+       RadarValueLists *radarvaluelist.Client
-       RadarValueLists *valuelist.Client
+       ReportRuns *reportingreportrun.Client
-       ReportRuns *reportrun.Client
+       ReportTypes *reportingreporttype.Client
-       ReportTypes *reporttype.Client
-       SigmaScheduledQueryRuns *scheduledqueryrun.Client
+       SigmaScheduledQueryRuns *sigmascheduledqueryrun.Client
+       SubscriptionItems *subitem.Client
-       SubscriptionItems *subitem.Client
+       TaxIDs *taxid.Client
-       TaxIDs *taxid.Client

@@ -255,42 +259,42 @@ func (a *API) Init(key string, backends *stripe.Backends) {
}

a.Account = &account.Client{B: backends.API, Key: key}
Copy link
Contributor Author

@richardm-stripe richardm-stripe Aug 4, 2021

Choose a reason for hiding this comment

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

$ git diff HEAD~1 | grep '\.Client{' | grep [+-] | sort -k 2
+       a.ApplePayDomains = &applepaydomain.Client{B: backends.API, Key: key}
-       a.ApplePayDomains = &applepaydomain.Client{B: backends.API, Key: key}
+       a.BillingPortalSessions = &billingportalsession.Client{B: backends.API, Key: key}
-       a.BillingPortalSessions = &billingportalsession.Client{B: backends.API, Key: key}
+       a.Customers = &customer.Client{B: backends.API, Key: key}
-       a.Customers = &customer.Client{B: backends.API, Key: key}
+       a.Fees = &fee.Client{B: backends.API, Key: key}
-       a.Fees = &fee.Client{B: backends.API, Key: key}
+       a.Files = &file.Client{B: backends.Uploads, Key: key}
-       a.Files = &file.Client{B: backends.Uploads, Key: key}
+       a.IdentityVerificationReports = &identityverificationreport.Client{B: backends.API, Key: key}
-       a.IdentityVerificationReports = &verificationreport.Client{B: backends.API, Key: key}
+       a.IdentityVerificationSessions = &identityverificationsession.Client{B: backends.API, Key: key}
-       a.IdentityVerificationSessions = &verificationsession.Client{B: backends.API, Key: key}
+       a.Invoices = &invoice.Client{B: backends.API, Key: key}
-       a.Invoices = &invoice.Client{B: backends.API, Key: key}
-       a.IssuingAuthorizations = &authorization.Client{B: backends.API, Key: key}
+       a.IssuingAuthorizations = &issuingauthorization.Client{B: backends.API, Key: key}
-       a.IssuingCardholders = &cardholder.Client{B: backends.API, Key: key}
+       a.IssuingCardholders = &issuingcardholder.Client{B: backends.API, Key: key}
+       a.IssuingTransactions = &issuingtransaction.Client{B: backends.API, Key: key}
-       a.IssuingTransactions = &transaction.Client{B: backends.API, Key: key}
+       a.OAuth = &oauth.Client{B: backends.API, Key: key}
-       a.OAuth = &oauth.Client{B: backends.Connect, Key: key}
-       a.RadarEarlyFraudWarnings = &earlyfraudwarning.Client{B: backends.API, Key: key}
+       a.RadarEarlyFraudWarnings = &radarearlyfraudwarning.Client{B: backends.API, Key: key}
+       a.RadarValueListItems = &radarvaluelistitem.Client{B: backends.API, Key: key}
-       a.RadarValueListItems = &valuelistitem.Client{B: backends.API, Key: key}
+       a.RadarValueLists = &radarvaluelist.Client{B: backends.API, Key: key}
-       a.RadarValueLists = &valuelist.Client{B: backends.API, Key: key}
+       a.ReportRuns = &reportingreportrun.Client{B: backends.API, Key: key}
-       a.ReportRuns = &reportrun.Client{B: backends.API, Key: key}
+       a.ReportTypes = &reportingreporttype.Client{B: backends.API, Key: key}
-       a.ReportTypes = &reporttype.Client{B: backends.API, Key: key}
-       a.SigmaScheduledQueryRuns = &scheduledqueryrun.Client{B: backends.API, Key: key}
+       a.SigmaScheduledQueryRuns = &sigmascheduledqueryrun.Client{B: backends.API, Key: key}
+       a.Subscriptions = &sub.Client{B: backends.API, Key: key}
-       a.Subscriptions = &sub.Client{B: backends.API, Key: key}
+       a.TaxIDs = &taxid.Client{B: backends.API, Key: key}
-       a.TaxIDs = &taxid.Client{B: backends.API, Key: key}

@richardm-stripe richardm-stripe changed the title codegen: api.go [WIP] codegen: api.go Aug 4, 2021
@richardm-stripe richardm-stripe changed the title [WIP] codegen: api.go codegen: api.go Aug 5, 2021
Copy link

@seang-stripe seang-stripe left a comment

Choose a reason for hiding this comment

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

Apologies for missing this, LGTM!

@richardm-stripe richardm-stripe merged commit bfd5bb2 into master Aug 19, 2021
@dcr-stripe dcr-stripe mentioned this pull request Aug 19, 2021
@stripe stripe deleted a comment Aug 20, 2021
@stripe stripe deleted a comment Aug 20, 2021
@stripe stripe deleted a comment Aug 20, 2021
@stripe stripe deleted a comment Aug 20, 2021
@remi-stripe remi-stripe deleted the richardm-codegen-4 branch September 1, 2021 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants