Skip to content

Conversation

@mickjermsurawong-stripe
Copy link
Contributor

@mickjermsurawong-stripe mickjermsurawong-stripe commented Feb 8, 2019

r? @remi-stripe

*/
@SerializedName("next_source_action")
PaymentIntentSourceAction nextSourceAction;
PaymentIntentNextSourceAction nextSourceAction;
Copy link
Contributor

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

Copy link
Contributor Author

@mickjermsurawong-stripe mickjermsurawong-stripe Feb 13, 2019

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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 {
Copy link
Contributor

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)

@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. */
Copy link
Contributor

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)

@remi-stripe
Copy link
Contributor

@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)

@mickjermsurawong-stripe mickjermsurawong-stripe force-pushed the mickjermsurawong/sdk-autogen-java-non-master-spec-80cdede branch from 03a52c9 to e328e27 Compare February 13, 2019 02:47
@mickjermsurawong-stripe mickjermsurawong-stripe force-pushed the mickjermsurawong/sdk-autogen-java-non-master-spec-80cdede branch from e328e27 to b53f211 Compare February 13, 2019 03:11
* name next to it if provided. Must be at least 128px x 128px.
*/
@SerializedName("business_logo_large")
String businessLogoLarge;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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!)

Copy link
Contributor Author

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.

@mickjermsurawong-stripe mickjermsurawong-stripe changed the title [generated] source: spec3.sdk.yaml@non-master-spec-80cdede Parity with 7.20 - subscription schedule and payment method Feb 13, 2019
@mickjermsurawong-stripe
Copy link
Contributor Author

ptal @remi-stripe
This should be consistent with the latest stripe-java 7.20 now.
What i did is also rebasing autogen/8.0-beta to the latest 7.20 master, so what you see is the diff from the latest change in OpenAPI spec from this PR https://git.corp.stripe.com/stripe-internal/pay-server/pull/130623

* name next to it if provided. Must be at least 128px x 128px.
*/
@SerializedName("business_logo_large")
String businessLogoLarge;
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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!)

@mickjermsurawong-stripe
Copy link
Contributor Author

thank you @remi-stripe!
The only action to take is then to undocument use_stripe_sdk!

@mickjermsurawong-stripe mickjermsurawong-stripe merged commit cc57b0a into autogen/8.0-beta Feb 14, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Feb 21, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Feb 26, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 12, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 15, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 19, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 19, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 19, 2019
* 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)
@ob-stripe ob-stripe deleted the mickjermsurawong/sdk-autogen-java-non-master-spec-80cdede branch April 10, 2019 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants