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: balancetransaction.go #1287

Merged
merged 5 commits into from
Jun 4, 2021
Merged

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented May 28, 2021

r? @stripe/api-library-reviewers
cc @stripe/api-libraries

Changelog

  • Added missing members of BalanceTransactionType enum: advance, advance_funding, refund_failure, reserve_transaction, reserved_funds, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer_cancel, transfer_failure.
  • Added missing variants to BalanceTransactionSource: ConnectCollectionTransfer, FeeRefund, PlatformTaxFee, ReserveTransaction, TaxDeductedAtSource, Topup

Note: codegen revealed two discrepancies reversal vs. transfer_reversal and IssuingAuthorization vs IssuingTransaction that I am preserving with overrides that will be removed on the next major.

ID string `json:"id"`
IssuingAuthorization *IssuingAuthorization `json:"-"`
IssuingDispute *IssuingDispute `json:"-"`
IssuingTransaction *IssuingAuthorization `json:"-"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bug to fix on next major.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah bad copy-paste 😱

BalanceTransactionSourceTypeIssuingTransaction BalanceTransactionSourceType = "issuing.transaction"
BalanceTransactionSourceTypePayout BalanceTransactionSourceType = "payout"
BalanceTransactionSourceTypeRefund BalanceTransactionSourceType = "refund"
BalanceTransactionSourceTypeReversal BalanceTransactionSourceType = "reversal"
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it's an API version thingy I missed at some point

@remi-stripe
Copy link
Contributor

@richardm-stripe While the 4 new API resources make sense/exist, I think they are quite "special" and they are not in other client libraries (that I know of). Should we just suppress them for now. Those are pretty obscure edge-cases on BalanceTransaction's source, some were not even really reviewed officially.

BalanceTransactionSourceTypeIssuingTransaction BalanceTransactionSourceType = "issuing.transaction"
BalanceTransactionSourceTypePayout BalanceTransactionSourceType = "payout"
BalanceTransactionSourceTypeRefund BalanceTransactionSourceType = "refund"
BalanceTransactionSourceTypeReversal BalanceTransactionSourceType = "reversal"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To fix on next major, should be transfer_reversal.

@richardm-stripe richardm-stripe changed the title [WIP] codegen: balancetransaction.go codegen: balancetransaction.go May 28, 2021
@richardm-stripe richardm-stripe marked this pull request as ready for review May 28, 2021 05:16
@richardm-stripe
Copy link
Contributor Author

richardm-stripe commented May 28, 2021

@remi-stripe
They do appear to exist on stripe-java and stripe-node, but not stripe-dotnet -- but I'm omitting for now -- if they aren't fully blessed, better to discourage users from relying on them and nothing prevents us from adding later if we need them.

@richardm-stripe richardm-stripe merged commit f3e09f5 into master Jun 4, 2021
@richardm-stripe richardm-stripe deleted the richardm-balancetransaction branch June 4, 2021 22: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.

None yet

4 participants