@@ -101,6 +101,10 @@ public class RequestedSession extends ApiResource
101101 @ SerializedName ("payment_method" )
102102 String paymentMethod ;
103103
104+ /** The preview of the payment method to be created when the requested session is confirmed. */
105+ @ SerializedName ("payment_method_preview" )
106+ PaymentMethodPreview paymentMethodPreview ;
107+
104108 @ SerializedName ("seller_details" )
105109 SellerDetails sellerDetails ;
106110
@@ -561,11 +565,118 @@ public static class LineItemDetail extends StripeObject {
561565 @ Setter
562566 @ EqualsAndHashCode (callSuper = false )
563567 public static class OrderDetails extends StripeObject {
568+ /** The seller's order identifier. */
569+ @ SerializedName ("order_id" )
570+ String orderId ;
571+
564572 /** The URL to the order status. */
565573 @ SerializedName ("order_status_url" )
566574 String orderStatusUrl ;
567575 }
568576
577+ /**
578+ * For more details about PaymentMethodPreview, please refer to the <a
579+ * href="https://docs.stripe.com/api">API Reference.</a>
580+ */
581+ @ Getter
582+ @ Setter
583+ @ EqualsAndHashCode (callSuper = false )
584+ public static class PaymentMethodPreview extends StripeObject {
585+ /** The billing details of the payment method. */
586+ @ SerializedName ("billing_details" )
587+ BillingDetails billingDetails ;
588+
589+ /** The card details of the payment method. */
590+ @ SerializedName ("card" )
591+ Card card ;
592+
593+ /** The type of the payment method. */
594+ @ SerializedName ("type" )
595+ String type ;
596+
597+ /**
598+ * For more details about BillingDetails, please refer to the <a
599+ * href="https://docs.stripe.com/api">API Reference.</a>
600+ */
601+ @ Getter
602+ @ Setter
603+ @ EqualsAndHashCode (callSuper = false )
604+ public static class BillingDetails extends StripeObject {
605+ /** The billing address. */
606+ @ SerializedName ("address" )
607+ Address address ;
608+
609+ /** The email address for the billing details. */
610+ @ SerializedName ("email" )
611+ String email ;
612+
613+ /** The name for the billing details. */
614+ @ SerializedName ("name" )
615+ String name ;
616+
617+ /** The phone number for the billing details. */
618+ @ SerializedName ("phone" )
619+ String phone ;
620+
621+ /**
622+ * For more details about Address, please refer to the <a
623+ * href="https://docs.stripe.com/api">API Reference.</a>
624+ */
625+ @ Getter
626+ @ Setter
627+ @ EqualsAndHashCode (callSuper = false )
628+ public static class Address extends StripeObject {
629+ /** City, district, suburb, town, or village. */
630+ @ SerializedName ("city" )
631+ String city ;
632+
633+ /**
634+ * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
635+ * 3166-1 alpha-2</a>).
636+ */
637+ @ SerializedName ("country" )
638+ String country ;
639+
640+ /** Address line 1, such as the street, PO Box, or company name. */
641+ @ SerializedName ("line1" )
642+ String line1 ;
643+
644+ /** Address line 2, such as the apartment, suite, unit, or building. */
645+ @ SerializedName ("line2" )
646+ String line2 ;
647+
648+ /** ZIP or postal code. */
649+ @ SerializedName ("postal_code" )
650+ String postalCode ;
651+
652+ /** State, county, province, or region. */
653+ @ SerializedName ("state" )
654+ String state ;
655+ }
656+ }
657+
658+ /**
659+ * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
660+ * Reference.</a>
661+ */
662+ @ Getter
663+ @ Setter
664+ @ EqualsAndHashCode (callSuper = false )
665+ public static class Card extends StripeObject {
666+ /** The expiry month of the card. */
667+ @ SerializedName ("exp_month" )
668+ Long expMonth ;
669+
670+ /** The expiry year of the card. */
671+ @ SerializedName ("exp_year" )
672+ Long expYear ;
673+
674+ /** The last 4 digits of the card number. */
675+ @ SerializedName ("last4" )
676+ String last4 ;
677+ }
678+ }
679+
569680 /**
570681 * For more details about SellerDetails, please refer to the <a
571682 * href="https://docs.stripe.com/api">API Reference.</a>
@@ -601,6 +712,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
601712 super .setResponseGetter (responseGetter );
602713 trySetResponseGetter (fulfillmentDetails , responseGetter );
603714 trySetResponseGetter (orderDetails , responseGetter );
715+ trySetResponseGetter (paymentMethodPreview , responseGetter );
604716 trySetResponseGetter (sellerDetails , responseGetter );
605717 trySetResponseGetter (totalDetails , responseGetter );
606718 }
0 commit comments