-
Notifications
You must be signed in to change notification settings - Fork 387
Parity with 7.20 - subscription schedule and payment method #672
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
Parity with 7.20 - subscription schedule and payment method #672
Conversation
| */ | ||
| @SerializedName("next_source_action") | ||
| PaymentIntentSourceAction nextSourceAction; | ||
| PaymentIntentNextSourceAction nextSourceAction; |
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 is unrelated to the review (or a change in openapi). Is this because of some client-metadata changes?
Asking out of curiosity, this should go away since we're now doing next_action instead anyway in the next API version
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.
Changed to nested NextAction
| @Setter | ||
| @EqualsAndHashCode(callSuper = false) | ||
| public class PaymentIntentSourceActionValueAuthorizeWithUrl extends StripeObject { | ||
| public class PaymentIntentNextSourceActionValueAuthorizeWithUrl extends StripeObject { |
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.
So this is tricky. We have a custom deserializer for that class. When you're renaming, you're breaking the custom deserializer. Is this expected? Is this part of autogen already too?
cc @ob-stripe who can explain this better than I would.
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.
Changed to NextActionRedirectToUrl
|
|
||
| /** The subscription schedule's default invoice settings. */ | ||
| @SerializedName("invoice_settings") | ||
| SubscriptionScheduleInvoiceSettings invoiceSettings; |
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 is one of the examples where we are "nesting it" but really it's likely that in 4 months we share that hash with another resource and so maybe it should be top-level.
I gave up for .NET and go and did what you did (but not nested because those languages can't)
| } | ||
|
|
||
| /** Retrieves the list of your subscription schedules. */ | ||
| public SubscriptionScheduleCollection list(Map<String, Object> params) throws StripeException { |
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.
@ob-stripe totally random but do we really need those duplicate collection classes? (nothing to do with autogen, just realizing I haven't asked in a while)
src/main/java/com/stripe/model/SubscriptionScheduleInvoiceSettings.java
Outdated
Show resolved
Hide resolved
| @Setter | ||
| @EqualsAndHashCode(callSuper = false) | ||
| public class SubscriptionScheduleRevision extends StripeObject implements HasId { | ||
| /** Time at which the object was created. Measured in seconds since the Unix epoch. */ |
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.
Should all of those be real javadocs? (sorry train of thoughts, nothing specific to that property, just wondered)
|
@mickjermsurawong-stripe Added some comments but I think I can mostly copy-paste most of this in java (though it be better after some of the things I mentioned) |
03a52c9 to
e328e27
Compare
6ce8daf to
2733fc7
Compare
…msurawong/subscription-schedules
e328e27 to
b53f211
Compare
| * name next to it if provided. Must be at least 128px x 128px. | ||
| */ | ||
| @SerializedName("business_logo_large") | ||
| String businessLogoLarge; |
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 New field appearing, not in binding, but now also in APIref
https://stripe.com/docs/api/accounts/object#account_object-business_logo_large
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 just added it for backwards compatibility reasons. Since go/.net will be on the next API version on 2/19 and java will be on 2/26 I don't think it's a big deal if we don't add it immediately/ignore it.
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.
ah okay it will just follow OpenAPI spec doc. When the avedon come I suspect it will be removed into business profile object right?
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.
Correct! Just include it. I was lazy and did not do it because the hope is that no one really needs it and since autogen ships soon (and .net/go have the new API version next week) it wasn't worth the chunder of code + PR + release :p
|
|
||
| /** Whether the person has a significant control of the account’s legal entity. */ | ||
| @SerializedName("executive") | ||
| Boolean executive; |
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.
executive field in now hidden in OpenAPI spec. I'll make a change in pay-server to add it back..
Put it in TODO here
https://git.corp.stripe.com/stripe-internal/sdk-autogen-java/blob/8eac5b0e7eedeedbfaff8980c6b0005d24ef961e/generated/diff_change_log_fields.md#todo-add-back-from-pay-server
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.
It's going away, please keep it removed! (also we should avoid linking to internal links on public repos!)
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.
ah got it! will take no action on this.
|
ptal @remi-stripe |
| * name next to it if provided. Must be at least 128px x 128px. | ||
| */ | ||
| @SerializedName("business_logo_large") | ||
| String businessLogoLarge; |
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 just added it for backwards compatibility reasons. Since go/.net will be on the next API version on 2/19 and java will be on 2/26 I don't think it's a big deal if we don't add it immediately/ignore it.
| * is only intended to be used by Stripe.js. | ||
| */ | ||
| @SerializedName("use_stripe_sdk") | ||
| Map<String, Object> useStripeSdk; |
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.
Same as the other PR we likely should remove this in the library.
|
|
||
| /** Whether the person has a significant control of the account’s legal entity. */ | ||
| @SerializedName("executive") | ||
| Boolean executive; |
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.
It's going away, please keep it removed! (also we should avoid linking to internal links on public repos!)
|
thank you @remi-stripe! |
…msurawong/subscription-schedules (#672)
…msurawong/subscription-schedules (#672)
…msurawong/subscription-schedules (#672)
…msurawong/subscription-schedules (#672)
…msurawong/subscription-schedules (#672)
…msurawong/subscription-schedules (#672)
* 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
Not sure you've worked on Java already. But I suspect this is what you would have written by hand.
This correspond to change in pay-server https://git.corp.stripe.com/stripe-internal/pay-server/pull/130623
cc @stripe/api-libraries