Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1201

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,9 @@ public static class Company extends StripeObject {
* incorporated_non_profit}, {@code limited_liability_partnership}, {@code multi_member_llc},
* {@code private_company}, {@code private_corporation}, {@code private_partnership}, {@code
* public_company}, {@code public_corporation}, {@code public_partnership}, {@code
* sole_proprietorship}, {@code tax_exempt_government_instrumentality}, {@code
* unincorporated_association}, or {@code unincorporated_non_profit}.
* single_member_llc}, {@code sole_proprietorship}, {@code
* tax_exempt_government_instrumentality}, {@code unincorporated_association}, or {@code
* unincorporated_non_profit}.
*/
@SerializedName("structure")
String structure;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1076,12 +1076,12 @@ public static class PaymentMethodDetails extends StripeObject {

/**
* The type of transaction-specific details of the payment method used in the payment, one of
* {@code ach_credit_transfer}, {@code ach_debit}, {@code alipay}, {@code au_becs_debit}, {@code
* bancontact}, {@code card}, {@code card_present}, {@code eps}, {@code giropay}, {@code ideal},
* {@code klarna}, {@code multibanco}, {@code p24}, {@code sepa_debit}, {@code sofort}, {@code
* stripe_account}, or {@code wechat}. An additional hash is included on {@code
* payment_method_details} with a name matching this value. It contains information specific to
* the payment method.
* {@code ach_credit_transfer}, {@code ach_debit}, {@code acss_debit}, {@code alipay}, {@code
* au_becs_debit}, {@code bancontact}, {@code card}, {@code card_present}, {@code eps}, {@code
* giropay}, {@code ideal}, {@code klarna}, {@code multibanco}, {@code p24}, {@code sepa_debit},
* {@code sofort}, {@code stripe_account}, or {@code wechat}. An additional hash is included on
* {@code payment_method_details} with a name matching this value. It contains information
* specific to the payment method.
*/
@SerializedName("type")
String type;
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("card")
Card card;

@SerializedName("card_present")
CardPresent cardPresent;

@SerializedName("oxxo")
Oxxo oxxo;

Expand Down Expand Up @@ -1275,8 +1278,8 @@ public static class Card extends StripeObject {
Installments installments;

/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the
* card attached to the PaymentIntent. Can be only set confirm-time.
* Selected network to process this payment intent on. Depends on the available networks of
* the card attached to the payment intent. Can be only set confirm-time.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -1338,6 +1341,11 @@ public static class Plan extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CardPresent extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,14 @@ public static class PaymentMethodOptions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AcssDebit extends StripeObject {
/**
* Currency supported by the bank account. Returned when the Session is in {@code setup} mode.
*
* <p>One of {@code cad}, or {@code usd}.
*/
@SerializedName("currency")
String currency;

@SerializedName("mandate_options")
MandateOptions mandateOptions;

Expand All @@ -473,14 +481,6 @@ public static class AcssDebit extends StripeObject {
@SerializedName("verification_method")
String verificationMethod;

/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/issuing/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public static class Shipping extends StripeObject {
/**
* The delivery company that shipped a card.
*
* <p>One of {@code fedex}, or {@code usps}.
* <p>One of {@code dhl}, {@code fedex}, {@code royal_mail}, or {@code usps}.
*/
@SerializedName("carrier")
String carrier;
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/stripe/param/AccountCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -3992,6 +3992,9 @@ public enum Structure implements ApiRequestParams.EnumParam {
@SerializedName("public_partnership")
PUBLIC_PARTNERSHIP("public_partnership"),

@SerializedName("single_member_llc")
SINGLE_MEMBER_LLC("single_member_llc"),

@SerializedName("sole_proprietorship")
SOLE_PROPRIETORSHIP("sole_proprietorship"),

Expand Down Expand Up @@ -6378,7 +6381,7 @@ public static class CardIssuing {

/**
* Details on the account's acceptance of the <a
* href="stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* href="https://stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* Disclosures</a>.
*/
@SerializedName("tos_acceptance")
Expand Down Expand Up @@ -6433,7 +6436,7 @@ public Builder putAllExtraParam(Map<String, Object> map) {

/**
* Details on the account's acceptance of the <a
* href="stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* href="https://stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* Disclosures</a>.
*/
public Builder setTosAcceptance(TosAcceptance tosAcceptance) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/stripe/param/AccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -4297,6 +4297,9 @@ public enum Structure implements ApiRequestParams.EnumParam {
@SerializedName("public_partnership")
PUBLIC_PARTNERSHIP("public_partnership"),

@SerializedName("single_member_llc")
SINGLE_MEMBER_LLC("single_member_llc"),

@SerializedName("sole_proprietorship")
SOLE_PROPRIETORSHIP("sole_proprietorship"),

Expand Down Expand Up @@ -6968,7 +6971,7 @@ public static class CardIssuing {

/**
* Details on the account's acceptance of the <a
* href="stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* href="https://stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* Disclosures</a>.
*/
@SerializedName("tos_acceptance")
Expand Down Expand Up @@ -7023,7 +7026,7 @@ public Builder putAllExtraParam(Map<String, Object> map) {

/**
* Details on the account's acceptance of the <a
* href="stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* href="https://stripe.com/docs/issuing/connect/tos_acceptance">Stripe Issuing Terms and
* Disclosures</a>.
*/
public Builder setTosAcceptance(TosAcceptance tosAcceptance) {
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/com/stripe/param/InvoiceUpcomingParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public class InvoiceUpcomingParams extends ApiRequestParams {
/**
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the
* discount from the customer or subscription. Pass an empty string to avoid inheriting any
* discounts.
* discounts. To preview the upcoming invoice for a subscription that hasn't been created, use
* {@code coupon} instead.
*/
@SerializedName("discounts")
Object discounts;
Expand Down Expand Up @@ -314,7 +315,8 @@ public Builder addAllDiscount(List<Discount> elements) {
/**
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the
* discount from the customer or subscription. Pass an empty string to avoid inheriting any
* discounts.
* discounts. To preview the upcoming invoice for a subscription that hasn't been created, use
* {@code coupon} instead.
*/
public Builder setDiscounts(EmptyParam discounts) {
this.discounts = discounts;
Expand All @@ -324,7 +326,8 @@ public Builder setDiscounts(EmptyParam discounts) {
/**
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the
* discount from the customer or subscription. Pass an empty string to avoid inheriting any
* discounts.
* discounts. To preview the upcoming invoice for a subscription that hasn't been created, use
* {@code coupon} instead.
*/
public Builder setDiscounts(List<Discount> discounts) {
this.discounts = discounts;
Expand Down
87 changes: 87 additions & 0 deletions src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,13 @@ public static class PaymentMethodOptions {
@SerializedName("card")
Object card;

/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
@SerializedName("card_present")
Object cardPresent;

/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
Expand Down Expand Up @@ -3106,6 +3113,7 @@ private PaymentMethodOptions(
Object alipay,
Object bancontact,
Object card,
Object cardPresent,
Map<String, Object> extraParams,
Object oxxo,
Object p24,
Expand All @@ -3115,6 +3123,7 @@ private PaymentMethodOptions(
this.alipay = alipay;
this.bancontact = bancontact;
this.card = card;
this.cardPresent = cardPresent;
this.extraParams = extraParams;
this.oxxo = oxxo;
this.p24 = p24;
Expand All @@ -3135,6 +3144,8 @@ public static class Builder {

private Object card;

private Object cardPresent;

private Map<String, Object> extraParams;

private Object oxxo;
Expand All @@ -3152,6 +3163,7 @@ public PaymentMethodOptions build() {
this.alipay,
this.bancontact,
this.card,
this.cardPresent,
this.extraParams,
this.oxxo,
this.p24,
Expand Down Expand Up @@ -3225,6 +3237,24 @@ public Builder setCard(EmptyParam card) {
return this;
}

/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
public Builder setCardPresent(CardPresent cardPresent) {
this.cardPresent = cardPresent;
return this;
}

/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
public Builder setCardPresent(EmptyParam cardPresent) {
this.cardPresent = cardPresent;
return this;
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
Expand Down Expand Up @@ -4248,6 +4278,63 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
}
}

@Getter
public static class CardPresent {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

private CardPresent(Map<String, Object> extraParams) {
this.extraParams = extraParams;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Map<String, Object> extraParams;

/** Finalize and obtain parameter instance from this builder. */
public CardPresent build() {
return new CardPresent(this.extraParams);
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}

@Getter
public static class Oxxo {
/**
Expand Down
Loading