-
Notifications
You must be signed in to change notification settings - Fork 452
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 Klarna and SourceOrders #904
Conversation
8fcbb73
to
855590f
Compare
r? @remi-stripe Yep. I was confused by the data on the charge.source.klarna, which you've shared is roughly typed by the type_data. I must have missed the discount source order item type because it's not documented here: https://stripe.com/docs/api/sources/object#source_object-source_order-items-type but I do see discount in the spec. |
This looks good to me. Re-assigning to @brandur-stripe to be safe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, but otherwise looks good. Thanks @cjavilla-stripe!
Were you thinking about getting spun up for bindings releases? If so, there's a doc for it in the wiki ("releasing language bindings"). If not, we can take.
ptal @cjavilla-stripe
source.go
Outdated
Amount int64 `json:"amount"` | ||
Currency Currency `json:"currency"` | ||
Email string `json:"email"` | ||
Items SourceSourceOrderItems `json:"items"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind making this one a pointer to SourceSourceOrderItems
? It probably doesn't matter that much, but it's basically the overwhelming convention we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Yeah I'd like to eventually get spun up on releasing. I have a few other projects I'm trying to wrap up before I'll be ready to learn that :)
Happy to squash, didn't want to kill the comments again :) |
Yeah, actually would you mind going for the squash? It's not too big of a deal, but I think all regular contributors are in this habit now, and it does help to keep history relatively clean.
Cool! Alright, I'll take this one then. |
@cjavilla-stripe Just FYI, I just ended up squashing from the GitHub interface (I don't think it makes a huge amount of difference in practice). |
Released as 61.21.0. |
r? @remi-stripe
cc @stripe/api-libraries
Putting up for naming review, this was kinda a gnarly one for naming.
I saw another reference of
...ItemsParams
so I usedSourceOrderItemsParams
not sure if that's better asSourceOrderItemParams
(single item param, technically.)Also, for the deserialized json object having SourceSourceOrder... everywhere seems a little odd :)