Skip to content

Conversation

@mickjermsurawong-stripe
Copy link
Contributor

  • This PR contains the generated payment method apis.
  • It sadly just got the most updated Terminal endpoints that are incorrect now, but I think it's helpful if the PM features get reviewed or can help to the non-autogen one..
    r? @remi-stripe
    cc @stripe/api-libraries

String url = String.format("%s%s", Stripe.getApiBase(), "/v1/terminal/locations");
return requestCollection(url, params, LocationCollection.class, options);
}

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

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

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.

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

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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;

Copy link
Contributor

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

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);
}

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

@mickjermsurawong-stripe
Copy link
Contributor Author

Thanks remi for the review, I'll wait for billing details and will add to this PR then.

@mickjermsurawong-stripe mickjermsurawong-stripe force-pushed the mickjermsurawong/sdk-autogen-java-spec-9d9decd branch from 771eeb1 to 28258d6 Compare March 18, 2019 18:51
@mickjermsurawong-stripe
Copy link
Contributor Author

I'm merging PM changes in first. There are 3 pending issues in the subsequent PR

  1. Undashboard billing details so it appears on the spec, fix typo on 3D secure support, in this pay-sever #137513
  2. Update terminal client metadata endpoints to reflect instance method #137444
  3. Remove deprecated endpoints + checkout

@mickjermsurawong-stripe mickjermsurawong-stripe changed the title [payment methods][generated] source: spec3.sdk.yaml@spec-9d9decd in master [payment methods] source: spec3.sdk.yaml@spec-9d9decd in master Mar 18, 2019
@mickjermsurawong-stripe mickjermsurawong-stripe merged commit d683cf3 into autogen/8.0-beta Mar 18, 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)
@mickjermsurawong-stripe mickjermsurawong-stripe deleted the mickjermsurawong/sdk-autogen-java-spec-9d9decd branch March 29, 2019 03:30
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