-
Notifications
You must be signed in to change notification settings - Fork 387
[payment methods] source: spec3.sdk.yaml@spec-9d9decd in master #690
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
[payment methods] source: spec3.sdk.yaml@spec-9d9decd in master #690
Conversation
| String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); | ||
| return requestCollection(url, params, LocationCollection.class, options); | ||
| } | ||
|
|
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.
Terminal endpoints below actually would be correct, but it's not consistent. The client metadata now generate static methods
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.
Do you think we want to release this as 8.0 too?
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.
Yeah, we need to quickly talk about static methods (globally, not just java) because I think this is becoming critical. I also need to release those in the libs so it's on my todo list
remi-stripe
left a comment
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.
Left some comments but this looks great
|
|
||
| /** Check results by Card networks on Card address and CVC at time of payment. */ | ||
| @SerializedName("checks") | ||
| Checks checks; |
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.
In this world we're not sharing with PaymentMethod.Card.Checks. In my PR I'm sharing because I assumed it was the same resource.
It's likely easier to not share but I'll need to update my PR so wanted to ask what you think is preferred?
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.
Okay I saw the commend in my other PR too. I'll fix mine to just duplicate the class instead of trying to be smart.
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.
@remi-stripe, I would prefer not sharing in this example, simply because it is what the back-end actually has. So I stated before that now we prefer sharing, I'm actually wrong. I think I was saying that because in most case backend code do share resources. So my position is rather resource sharing just as what our backend and open API has.
In the world that we share nothing, that's when we can ignore the backend code and openAPI references (with exceptions of sharinging core resource)
| /** Transaction-specific details of the payment method used in the payment. */ | ||
| @SerializedName("payment_method_details") | ||
| PaymentMethodDetails paymentMethodDetails; | ||
|
|
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.
We're missing billing_details which is also shipping at the same time as payment_method_details. I realize it's also missing in my PRs though and I'll have to fix this but I think it's important to fix in pay-server
| @Setter | ||
| @EqualsAndHashCode(callSuper = false) | ||
| public static class ThreeDSecureUsage extends StripeObject { | ||
| /** 3D Secure is support on this card. */ |
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.
typo in the comment
| String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations"); | ||
| return requestCollection(url, params, LocationCollection.class, options); | ||
| } | ||
|
|
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.
Yeah, we need to quickly talk about static methods (globally, not just java) because I think this is becoming critical. I also need to release those in the libs so it's on my todo list
|
Thanks remi for the review, I'll wait for billing details and will add to this PR then. |
771eeb1 to
28258d6
Compare
|
I'm merging PM changes in first. There are 3 pending issues in the subsequent PR
|
* remove updated resource * src: remove class specific deserializers from ApiResource.java * test: use PaymentSource instead of ExternalAccount for BankAccount and Card in `/v1/customers/...` * test: remove Charge `markSafe/markFraudulent` method in favor of normal update * test: remove LoginLinkCollection for create method, in favor of LoginLink `craeteOnAccount` * test: rename Reversal to TransferReversal Reversal to Transfer Reversal * test: remove UsageRecord `create` taking ID argument in parameters, in favor of `createOnSubscriptionItem` * test: use StripeError and PaymentSource for PaymentIntent instead of PaymentIntentLastPaymentError and ExternalAccount * test: remove `getTypeData` in SourceTransaction and SourceMandateNotification in favor of new typed classes specific to each source type * test: use normal getters for auto-expand issuing.Card in Authorization and CardDetails instead of expandable idiom * test: fix Topup test using incorrect stripe-mock url * test: add deserialzation tests for unknown subtypes on BalanceTransactionSource and ExternalAccount * test: type-cast nulls for ambiguous method calls supporting single argument for both RequestOptions and param Map * src/test: [version-pin] pin API_VERSION and update RequestOptions and EphemeralKey * remove resources to be regenerated * test: add deserialization test to OrderItem expanding parent * "[generated] source: spec3.sdk.yaml@spec-214186957a2324edd15aba2a7d8d03e408f22669 in master"" * src/test: [version-pin] remove Stripe.apiVersion * Interface for handling event deserialization failure due to api version mismatch (#664) * make event data backward compat * implement versioned data * rename work * rename exception * improve deserializeUnsafeWith * add comments using static pinned version * "[generated] source: spec3.sdk.yaml@spec-c6ce0ce334c19193dc22b6b63f47388f25f30d57 in master"" (#666) * "[generated] source: spec3.sdk.yaml@spec-3b52a80 in master"" (#668) * remove resource * remove updated resource * remove updated resource * remove resources * [generated] source: spec3.sdk.yaml@non-master-spec-a8fea08 in HEAD (#671) * [generated] source: spec3.sdk.yaml@non-master-spec-d2b863d in mickjermsurawong/subscription-schedules (#672) * test: Person remove old document expansion * test: Subscription default source becomes PaymentSource * test: typed param setup - fix ambiguous call with null casting test: CardTest ambiguous call with typed param * test: LegalEntity class is removed fix person * Basic primitives for typed params (#679) * extract common deserializer method extract common logic * implement ApiParamRequest add api param request * Add to base test lenient request params comparison for list/array int/long comparison * use List<Object> instead of Object[] in untyped deserializer * provide documentation to deserializer and api request param * reorder import statments * fix other imports in new files * fix: RequestOptions use lombok equal/hashcode instead * test: Standardization consider request param as map param * Update resources to 8.0-beta (#687) * [generated] source: spec3.sdk.yaml@non-master-spec-e27a05e in mickjermsurawong/no-v-change * [generated] source: spec3.sdk.yaml@spec-82bb471 in master * [generated] source: spec3.sdk.yaml@spec-3869a7f in master * [generated] source: spec3.sdk.yaml@non-master-spec-02ef86a in mickjermsurawong/undoc-sensitive-enum * Revert "test: Standardization consider request param as map param" This reverts commit c3c1157. * Revert "Basic primitives for typed params (#679)" This reverts commit a1c2175. * Revert "test: typed param setup - fix ambiguous call with null casting" This reverts commit 1eb0f45. * [generated] source: spec3.sdk.yaml@spec-9d9decd in master (#690) * [generated] source: spec3.sdk.yaml@spec-2662e57 in master (#692) * [generated] source: spec3.sdk.yaml@spec-436464f in master (#693) * remove parts that should be done by script (#696)
r? @remi-stripe
cc @stripe/api-libraries