Skip to content

Commit

Permalink
Merge pull request #1540 from stripe/latest-codegen-master
Browse files Browse the repository at this point in the history
Update generated code
  • Loading branch information
richardm-stripe committed Apr 6, 2023
2 parents f074ad9 + ac86566 commit f3b9352
Show file tree
Hide file tree
Showing 26 changed files with 454 additions and 206 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v285
v294
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public class Card extends ApiResource

/**
* Card brand. Can be {@code American Express}, {@code Diners Club}, {@code Discover}, {@code
* JCB}, {@code MasterCard}, {@code UnionPay}, {@code Visa}, or {@code Unknown}.
* Eftpos Australia}, {@code JCB}, {@code MasterCard}, {@code UnionPay}, {@code Visa}, or {@code
* Unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,8 @@ public static class Boleto extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -1625,8 +1625,8 @@ public static class Card extends StripeObject {

/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code interac}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -1763,9 +1763,9 @@ public static class Wallet extends StripeObject {

/**
* The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
* {@code google_pay}, {@code masterpass}, {@code samsung_pay}, or {@code visa_checkout}. An
* additional hash is included on the Wallet subhash with a name matching this value. It
* contains additional information specific to the card wallet type.
* {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
* {@code link}. An additional hash is included on the Wallet subhash with a name matching
* this value. It contains additional information specific to the card wallet type.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1874,8 +1874,8 @@ public static class CardPresent extends StripeObject {
Long amountAuthorized;

/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -1979,8 +1979,8 @@ public static class CardPresent extends StripeObject {

/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code interac}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -2333,8 +2333,8 @@ public static class InteracPresent extends StripeObject {

/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code interac}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("network")
String network;
Expand Down
54 changes: 49 additions & 5 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,8 @@ public static class Boleto extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code jcb}, {@code
* mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
* jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -852,9 +852,9 @@ public static class Wallet extends StripeObject {

/**
* The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
* {@code google_pay}, {@code masterpass}, {@code samsung_pay}, or {@code visa_checkout}. An
* additional hash is included on the Wallet subhash with a name matching this value. It
* contains additional information specific to the card wallet type.
* {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
* {@code link}. An additional hash is included on the Wallet subhash with a name matching
* this value. It contains additional information specific to the card wallet type.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1081,6 +1081,14 @@ public static class Konbini extends StripeObject {}
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Link extends StripeObject {
/**
* Two-letter ISO code representing the funding source (i.e. card, bank) country beneath the
* Link payment method. You could use this attribute to get a sense of the international
* breakdown of funding sources you've collected.
*/
@SerializedName("country")
String country;

/** Account owner's email address. */
@SerializedName("email")
String email;
Expand Down Expand Up @@ -1288,6 +1296,10 @@ public static class UsBankAccount extends StripeObject {
@SerializedName("routing_number")
String routingNumber;

/** Contains information about the future reusability of this PaymentMethod. */
@SerializedName("status_details")
StatusDetails statusDetails;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand All @@ -1300,6 +1312,38 @@ public static class Networks extends StripeObject {
@SerializedName("supported")
List<String> supported;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class StatusDetails extends StripeObject {
@SerializedName("blocked")
Blocked blocked;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Blocked extends StripeObject {
/**
* The ACH network code that resulted in this block.
*
* <p>One of {@code R02}, {@code R03}, {@code R04}, {@code R05}, {@code R07}, {@code R08},
* {@code R10}, {@code R11}, {@code R16}, {@code R20}, {@code R29}, or {@code R31}.
*/
@SerializedName("network_code")
String networkCode;

/**
* The reason why this PaymentMethod's fingerprint has been blocked
*
* <p>One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code
* bank_account_invalid_details}, {@code bank_account_restricted}, {@code
* bank_account_unusable}, or {@code debit_not_authorized}.
*/
@SerializedName("reason")
String reason;
}
}
}

@Getter
Expand Down
18 changes: 12 additions & 6 deletions src/main/java/com/stripe/model/Price.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ public class Price extends ApiResource implements HasId, MetadataStore<Price> {
Recurring recurring;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
String taxBehavior;
Expand Down Expand Up @@ -395,9 +398,12 @@ public static class CurrencyOption extends StripeObject {
CustomUnitAmount customUnitAmount;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
String taxBehavior;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/stripe/model/Refund.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public class Refund extends ApiResource implements MetadataStore<Refund>, Balanc
@SerializedName("id")
String id;

/** Email to which refund instructions, if required, are sent to. */
/**
* For payment methods without native refund support (e.g., Konbini, PromptPay), email for the
* customer to receive refund instructions.
*/
@SerializedName("instructions_email")
String instructionsEmail;

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/stripe/model/issuing/Cardholder.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ public class Cardholder extends ApiResource implements HasId, MetadataStore<Card
@SerializedName("status")
String status;

/** One of {@code individual} or {@code company}. */
/**
* One of {@code individual} or {@code company}. See <a
* href="https://stripe.com/docs/issuing/other/choose-cardholder">Choose a cardholder type</a> for
* more details.
*/
@SerializedName("type")
String type;

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/stripe/model/tax/Calculation.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
import lombok.Getter;
import lombok.Setter;

/** A Tax {@code Calculation} allows you to calculate the tax to collect from your customer. */
/**
* A Tax Calculation allows you to calculate the tax to collect from your customer.
*
* <p>Related guide: <a href="https://stripe.com/docs/tax/custom">Calculate tax in your custom
* payment flow</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/stripe/model/tax/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
import lombok.Getter;
import lombok.Setter;

/** A Tax transaction records the tax collected from or refunded to your customer. */
/**
* A Tax Transaction records the tax collected from or refunded to your customer.
*
* <p>Related guide: <a href="https://stripe.com/docs/tax/custom#tax-transaction">Calculate tax in
* your custom payment flow</a>.
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
36 changes: 24 additions & 12 deletions src/main/java/com/stripe/param/InvoiceItemCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ public class InvoiceItemCreateParams extends ApiRequestParams {
String subscription;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
TaxBehavior taxBehavior;
Expand Down Expand Up @@ -515,9 +518,12 @@ public Builder setSubscription(String subscription) {
}

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
public Builder setTaxBehavior(InvoiceItemCreateParams.TaxBehavior taxBehavior) {
this.taxBehavior = taxBehavior;
Expand Down Expand Up @@ -776,9 +782,12 @@ public static class PriceData {
String product;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
TaxBehavior taxBehavior;
Expand Down Expand Up @@ -884,9 +893,12 @@ public Builder setProduct(String product) {
}

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either
* {@code inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price
* is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
public Builder setTaxBehavior(InvoiceItemCreateParams.PriceData.TaxBehavior taxBehavior) {
this.taxBehavior = taxBehavior;
Expand Down
36 changes: 24 additions & 12 deletions src/main/java/com/stripe/param/InvoiceItemUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ public class InvoiceItemUpdateParams extends ApiRequestParams {
Long quantity;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
TaxBehavior taxBehavior;
Expand Down Expand Up @@ -448,9 +451,12 @@ public Builder setQuantity(Long quantity) {
}

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
public Builder setTaxBehavior(InvoiceItemUpdateParams.TaxBehavior taxBehavior) {
this.taxBehavior = taxBehavior;
Expand Down Expand Up @@ -752,9 +758,12 @@ public static class PriceData {
Object product;

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either {@code
* inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price is
* considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
@SerializedName("tax_behavior")
TaxBehavior taxBehavior;
Expand Down Expand Up @@ -876,9 +885,12 @@ public Builder setProduct(EmptyParam product) {
}

/**
* Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of
* {@code inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either
* {@code inclusive} or {@code exclusive}, it cannot be changed.
* Only required if a <a
* href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
* tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the price
* is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code
* exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code
* exclusive}, it cannot be changed.
*/
public Builder setTaxBehavior(InvoiceItemUpdateParams.PriceData.TaxBehavior taxBehavior) {
this.taxBehavior = taxBehavior;
Expand Down

0 comments on commit f3b9352

Please sign in to comment.