Skip to content

Commit

Permalink
Merge pull request #985 from stripe/remi/codegen-e77fb69
Browse files Browse the repository at this point in the history
Add support for `shipping` and `shipping_address_collection` on Checkout `Session`
  • Loading branch information
remi-stripe authored Mar 12, 2020
2 parents 263842c + f2a2786 commit 6f8d261
Show file tree
Hide file tree
Showing 2 changed files with 860 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.stripe.model.PaymentIntent;
import com.stripe.model.Plan;
import com.stripe.model.SetupIntent;
import com.stripe.model.ShippingDetails;
import com.stripe.model.Sku;
import com.stripe.model.StripeObject;
import com.stripe.model.Subscription;
Expand Down Expand Up @@ -134,6 +135,16 @@ public class Session extends ApiResource implements HasId {
@Setter(lombok.AccessLevel.NONE)
ExpandableField<SetupIntent> setupIntent;

/** Shipping information for this Checkout Session. */
@SerializedName("shipping")
ShippingDetails shipping;

/**
* When set, provides configuration for Checkout to collect a shipping address from a customer.
*/
@SerializedName("shipping_address_collection")
ShippingAddressCollection shippingAddressCollection;

/**
* Describes the type of transaction being performed by Checkout in order to customize relevant
* text on the page, such as the submit button. {@code submit_type} can only be specified on
Expand Down Expand Up @@ -382,4 +393,17 @@ public static class Custom extends StripeObject {
String name;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ShippingAddressCollection extends StripeObject {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide
* as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR,
* KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}.
*/
@SerializedName("allowed_countries")
List<String> allowedCountries;
}
}
Loading

0 comments on commit 6f8d261

Please sign in to comment.