-
Notifications
You must be signed in to change notification settings - Fork 573
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 Klarna Source #1723
Add Klarna Source #1723
Conversation
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.
Thanks for the detailed work. Here's what I'd recommend:
- Remove all docs. They are partial which is not great and since this will move to PaymentMethod I'd rather leave it empty. Otherwise, clean up the ISO mention to just be shorter and factual (up to you)
- Add SourceOrder and Shipping in the same PR because it's all related
r? @remi-stripe Thanks for taking a look... Couple of questions:
|
We don't nest classes so it can't be
No enums for now, not until we auto-generate the library.
I usually put the docs if they are in the API reference, otherwise I don't |
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 changes. Please re-assign to @ob-stripe after that so that he can review and approve
[JsonProperty("tracking_number")] | ||
public string TrackingNumber { get; set; } | ||
} | ||
} |
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.
There's ChargeShippingOptions
for this (the name is definitely not great but that's what we use in other places). Not sure what the best approach is here :(
Having a custom options one when the resource one is generic is weird. But maybe a problem from another time. Will defer to @ob-stripe on that one.
1c55ccf
to
9711fbd
Compare
Updated. r? @remi-stripe ptal |
LGTM, assigning to @ob-stripe to be safe |
/// The amount (price) for this order item. | ||
/// </summary> | ||
[JsonProperty("amount")] | ||
public long Amount { get; set; } |
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.
This attribute is flagged as nullable in the spec, so should be long?
.
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.
Updated to nullable.
/// the number of instances of the SKU to be ordered. | ||
/// </summary> | ||
[JsonProperty("quantity")] | ||
public long? Quantity { get; set; } |
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.
This attribute is not flagged as nullable in the spec, so should be long
(though maybe we can keep it nullable anyway to avoid a future breaking change... @remi-stripe wdyt?).
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.
I'd be fine with not nullable since Amount
is not nullable
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.
Ha Amount
is nullable, so we should make Quantity nullable
and also ask why one can be and not the other
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.
How would I figure out who to ask why quantity is not nullable in the spec?
9711fbd
to
01abcfa
Compare
r? @ob-stripe I think this one is ready for another look. Squashed, so the comments may have lost context, but I think we're good with one action item to ask why source order item quantity is not nullable in the spec. |
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.
lgtm
r? @remi-stripe
cc @stripe/api-libraries
I want to submit the Klarna and SourceOrder stuff separately here. Did I get these references right?