Skip to content

Conversation

@mickjermsurawong-stripe
Copy link
Contributor

@mickjermsurawong-stripe mickjermsurawong-stripe commented Mar 12, 2019

  • This PR only generates and update latest resources and without param changes.
  • I would like to merge this to branch 8.0-beta, and then rebase the pending params PR on to it (so review of PR and resource is separated)
    r? @remi-stripe
    cc @stripe/api-libraries

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Compatible with 7.x, 3rd level nesting

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure what this comment means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I meant that SourceTypes class now is nested inside Money, and inside Balance just as how 7.x has.

* service</a> without interruption.
*
* <p>Update a specified source for a given customer.
* <p>Updates a specified card for a given customer.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is updated in this PR #135080 in pay-server.

* charge amount is transferred to the destination account.
*/
@SerializedName("amount")
Long amount;
Copy link
Contributor Author

@mickjermsurawong-stripe mickjermsurawong-stripe Mar 12, 2019

Choose a reason for hiding this comment

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

Same as the released 97b6e1a

/** Fields which every account must eventually provide. */
@SerializedName("minimum")
List<String> minimum;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nesting compatible with 7.x

@SerializedName("unit_cost")
Long unitCost;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nesting compatible with 7.x

ExpandableField<Customer> customer;

/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("date")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated date and created is added.

Long endingBalance;

/** The time that the invoice draft was finalized. */
@SerializedName("finalized_at")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will use Status_transitions instead.
This is breaking, but I will have to document them again in the diff.

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Verification extends StripeObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avedon related changes

public class Source extends ApiResource implements PaymentSource, MetadataStore<Source> {
@SerializedName("ach_credit_transfer")
SourceTypeAchCreditTransfer achCreditTransfer;
AchCreditTransfer achCreditTransfer;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nesting of sources


/** The date that the transactions are cleared and posted to user's accounts. */
@SerializedName("clearing_date")
Long clearingDate;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would like to flag this, as I didn't see it updated in 7.x

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah they keep changing those and that was not API reviewed and I kind of punted on this one for now since it was coming with autogen


/** List of column names that are included by default when this Report Type gets run. */
@SerializedName("default_columns")
List<String> defaultColumns;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same for this; I didn't see it updated in 7.x

Copy link
Contributor

Choose a reason for hiding this comment

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

yep this is new and was in the middle of API review so it's on my todo list

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

thanks for flagging new things, this is really helpful. Left some comments but some are me misunderstanding that you're comparing to a previous 8.x beta branch and not master. I think it's mostly okay except some "secret" stuff (though not the bad ones so mostly okay)

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes 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.

not sure what this comment means?

classLookup.put("issuing.authorization", Authorization.class);
classLookup.put("issuing.card", com.stripe.model.issuing.Card.class);
classLookup.put("issuing.card_details", CardDetails.class);
classLookup.put("issuing.card_pin", CardPin.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

why did we remove this?

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 autogen had CardPin class before, and I confirmed with the issuing team that it is not for our client-libs but the mobiles.


/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("created")
Long created;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup it is comparing with the autogen branch, not the master

/** The [Level III data](https://stripe.com/docs/level3) associated with this payment. */
@SerializedName("level3")
Level3 level3;
Charge.Level3 level3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I still believe we're making a mistake adding this in stripe-java. We should not support this until it's stable. Payflows used this like Charge but I believe they will change this. Not a huge deal but flagging again anyway

Boolean open;

/** The reason the review was opened. One of `rule` or `manual`. */
/** The reason the review was opened. One of `rule`, `manual`, or `issuer_fraud_record`. */
Copy link
Contributor

Choose a reason for hiding this comment

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

technically the last one is supposed to be secret and should not be available publicly.

Copy link
Contributor

Choose a reason for hiding this comment

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

bump


@SerializedName("sepa_credit_transfer")
SourceTypeSepaCreditTransfer sepaCreditTransfer;
SepaCreditTransfer sepaCreditTransfer;
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 not public

String name;

@SerializedName("skip_validation")
Boolean skipValidation;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is a thing

@@ -1,75 +0,0 @@
// Generated by com.stripe.generator.entity.SdkBuilder
Copy link
Contributor

Choose a reason for hiding this comment

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

Not entirely sure why this disappeared though I'm not fully familiar with that resource


/** The date that the transactions are cleared and posted to user's accounts. */
@SerializedName("clearing_date")
Long clearingDate;
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah they keep changing those and that was not API reviewed and I kind of punted on this one for now since it was coming with autogen


/** List of column names that are included by default when this Report Type gets run. */
@SerializedName("default_columns")
List<String> defaultColumns;
Copy link
Contributor

Choose a reason for hiding this comment

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

yep this is new and was in the middle of API review so it's on my todo list

@mickjermsurawong-stripe
Copy link
Contributor Author

mickjermsurawong-stripe commented Mar 15, 2019

ptal @remi-stripe

  • skipValidation fields in Sources are now removed
  • PaperCheck and SepaCreditTransfer are removed. AchDebit remains as there's really no gate in backend, and it's supported in .NET and intended for .NET and Go
  • Remove level3 field from PaymentIntent

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

approved but bumped 2 comments you skipped I think

Boolean open;

/** The reason the review was opened. One of `rule` or `manual`. */
/** The reason the review was opened. One of `rule`, `manual`, or `issuer_fraud_record`. */
Copy link
Contributor

Choose a reason for hiding this comment

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

bump

* The reason the review is currently open or closed. One of `rule`, `manual`, `approved`,
* `refunded`, `refunded_as_fraud`, or `disputed`.
* The reason the review is currently open or closed. One of `rule`, `manual`,
* `issuer_fraud_record`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`.
Copy link
Contributor

Choose a reason for hiding this comment

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

bump

@mickjermsurawong-stripe
Copy link
Contributor Author

my bad @remi-stripe! I did make assumption that the docs on enums were okay.
Fixed that.

@mickjermsurawong-stripe
Copy link
Contributor Author

self-approving after fixing the doc comments.
LGTM

@mickjermsurawong-stripe mickjermsurawong-stripe merged commit ec2a54d into autogen/8.0-beta Mar 15, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Mar 15, 2019
* [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
mickjermsurawong-stripe added a commit that referenced this pull request Mar 15, 2019
* [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
mickjermsurawong-stripe added a commit that referenced this pull request Mar 19, 2019
* [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
mickjermsurawong-stripe added a commit that referenced this pull request Mar 19, 2019
* [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
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)
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