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

API Updates #1328

Merged
merged 4 commits into from Aug 19, 2021
Merged

API Updates #1328

merged 4 commits into from Aug 19, 2021

Conversation

dcr-stripe
Copy link
Contributor

@dcr-stripe dcr-stripe commented Aug 19, 2021

Codegen for openapi 10ebdb9.
r? @richardm-stripe
cc @stripe/api-libraries

Changelog

  • Add support for new TaxId type: au_arn
  • Add support for InteracPresent on ChargePaymentMethodDetails
  • Add support for SepaCreditTransfer on ChargePaymentMethodDetails
  • Codegen related changes:
    • Moved ShippingDetails into address.go
    • Add support for Object and Order to Charge
    • Renamed ReviewReasonType enum to ReviewReason but added a type alias to preserve backwards compatibility

@dcr-stripe
Copy link
Contributor Author

Something is up with our codegen and removed Charge#ShippingDetails. Looking...

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

left some comments early but will defer to @richardm-stripe for final review

Phone string `json:"phone"`
TrackingNumber string `json:"tracking_number"`
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Whis is this disappearing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-added - it should've been manually specified in address.go.

checkout_session.go Outdated Show resolved Hide resolved
issuingcard "github.com/stripe/stripe-go/v72/issuing/card"
"github.com/stripe/stripe-go/v72/issuing/cardholder"
issuingcardholder "github.com/stripe/stripe-go/v72/issuing/cardholder"
Copy link
Contributor

Choose a reason for hiding this comment

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

are those changes breaking changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was actually merged in #1323 .

type ReviewReason string

// Deprecated: we preserve this name for backwards-compatibility, prefer `ReviewReason`.
type ReviewReasonType = ReviewReason
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a breaking change or are type aliasing safe, same for the one below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Type aliasing here should be safe.

@@ -86,11 +97,11 @@ type Review struct {
Open bool `json:"open"`
OpenedReason ReviewOpenedReason `json:"opened_reason"`
PaymentIntent *PaymentIntent `json:"payment_intent"`
Reason ReviewReasonType `json:"reason"`
Reason ReviewReason `json:"reason"`
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Type aliasing here should be safe.

taxid.go Outdated Show resolved Hide resolved
@akalinin-stripe
Copy link
Contributor

Something is up with our codegen and removed Charge#ShippingDetails. Looking...

I've ran into this with Richard at some point and his suggestion was to move ShippingDetails struct into address.go. That file already contains ShippingDetailsParams.

Comment on lines +515 to +519
type ChargePaymentMethodDetailsSepaCreditTransfer struct {
BankName string `json:"bank_name"`
Bic string `json:"bic"`
Iban string `json:"iban"`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
type ChargePaymentMethodDetailsSepaCreditTransfer struct {
BankName string `json:"bank_name"`
Bic string `json:"bic"`
Iban string `json:"iban"`
}
type ChargePaymentMethodDetailsSepaCreditTransfer struct {
BankName string `json:"bank_name"`
BIC string `json:"bic"`
IBAN string `json:"iban"`
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually nevermind, we don't capitalize these acronyms anywhere and should be consistent with elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually nevermind, we don't capitalize these acronyms anywhere and should be consistent with elsewhere.

@dcr-stripe dcr-stripe merged commit 6a809e5 into master Aug 19, 2021
@dcr-stripe dcr-stripe deleted the dcr-latest-codegen branch August 19, 2021 16:42
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.

None yet

4 participants