Skip to content

Commit

Permalink
Codegen for openapi v154
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Jun 9, 2022
1 parent 292def0 commit 463b348
Show file tree
Hide file tree
Showing 23 changed files with 1,995 additions and 71 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v152
v154
34 changes: 34 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,9 @@ public static class Settings extends StripeObject {
@SerializedName("sepa_debit_payments")
SepaDebitPayments sepaDebitPayments;

@SerializedName("treasury")
SettingsTreasury treasury;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1531,6 +1534,37 @@ public static class TosAcceptance extends StripeObject {
String userAgent;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SettingsTreasury extends StripeObject {
@SerializedName("tos_acceptance")
TosAcceptance tosAcceptance;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TosAcceptance extends StripeObject {
/**
* The Unix timestamp marking when the account representative accepted the service
* agreement.
*/
@SerializedName("date")
Long date;

/** The IP address from which the account representative accepted the service agreement. */
@SerializedName("ip")
String ip;

/**
* The user agent of the browser from which the account representative accepted the service
* agreement.
*/
@SerializedName("user_agent")
String userAgent;
}
}
}

@Getter
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Customer.java
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public PaymentMethodCollection listPaymentMethods(
return ApiResource.requestCollection(url, params, PaymentMethodCollection.class, options);
}

/** Retrieves a PaymentMethod object. */
/** Retrieves a PaymentMethod object for a given Customer. */
public PaymentMethod retrievePaymentMethod(
String customer, Map<String, Object> params, RequestOptions options) throws StripeException {
String url =
Expand All @@ -549,7 +549,7 @@ public PaymentMethod retrievePaymentMethod(
ApiResource.RequestMethod.GET, url, params, PaymentMethod.class, options);
}

/** Retrieves a PaymentMethod object. */
/** Retrieves a PaymentMethod object for a given Customer. */
public PaymentMethod retrievePaymentMethod(
String customer, CustomerRetrievePaymentMethodParams params, RequestOptions options)
throws StripeException {
Expand Down
72 changes: 71 additions & 1 deletion src/main/java/com/stripe/model/FundingInstructions.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,26 @@ public static class BankTransfer extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialAddresses extends StripeObject {
/** Iban Records contain E.U. bank account details per the SEPA format. */
@SerializedName("iban")
Iban iban;

/** Sort Code Records contain U.K. bank account details per the sort code format. */
@SerializedName("sort_code")
SortCode sortCode;

/** SPEI Records contain Mexico bank account details per the SPEI format. */
@SerializedName("spei")
Spei spei;

/** The payment networks supported by this FinancialAddress. */
@SerializedName("supported_networks")
List<String> supportedNetworks;

/**
* The type of financial address
*
* <p>One of {@code iban}, or {@code zengin}.
* <p>One of {@code iban}, {@code sort_code}, {@code spei}, or {@code zengin}.
*/
@SerializedName("type")
String type;
Expand All @@ -84,6 +96,64 @@ public static class FinancialAddresses extends StripeObject {
@SerializedName("zengin")
Zengin zengin;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Iban extends StripeObject {
/** The name of the person or business that owns the bank account. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The BIC/SWIFT code of the account. */
@SerializedName("bic")
String bic;

/**
* Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
* 3166-1 alpha-2</a>).
*/
@SerializedName("country")
String country;

/** The IBAN of the account. */
@SerializedName("iban")
String iban;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SortCode extends StripeObject {
/** The name of the person or business that owns the bank account. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The account number. */
@SerializedName("account_number")
String accountNumber;

/** The six-digit sort code. */
@SerializedName("sort_code")
String sortCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Spei extends StripeObject {
/** The three-digit bank code. */
@SerializedName("bank_code")
String bankCode;

/** The short banking institution name. */
@SerializedName("bank_name")
String bankName;

/** The CLABE number. */
@SerializedName("clabe")
String clabe;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
20 changes: 19 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1750,12 +1750,30 @@ public static class CustomerBalance extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BankTransfer extends StripeObject {
@SerializedName("eu_bank_transfer")
EuBankTransfer euBankTransfer;

/**
* The bank transfer type that can be used for funding. Permitted values include: {@code
* jp_bank_transfer}.
* eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or {@code
* mx_bank_transfer}.
*/
@SerializedName("type")
String type;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class EuBankTransfer extends StripeObject {
/**
* The desired country code of the bank account information. Permitted values include:
* {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
*
* <p>One of {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
*/
@SerializedName("country")
String country;
}
}
}

Expand Down
101 changes: 96 additions & 5 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,8 @@ public static class NextActionDisplayBankTransferInstructions extends StripeObje
/**
* Type of bank transfer
*
* <p>Equal to {@code jp_bank_transfer}.
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or
* {@code mx_bank_transfer}.
*/
@SerializedName("type")
String type;
Expand All @@ -1720,14 +1721,26 @@ public static class NextActionDisplayBankTransferInstructions extends StripeObje
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialAddresses extends StripeObject {
/** Iban Records contain E.U. bank account details per the SEPA format. */
@SerializedName("iban")
Iban iban;

/** Sort Code Records contain U.K. bank account details per the sort code format. */
@SerializedName("sort_code")
SortCode sortCode;

/** SPEI Records contain Mexico bank account details per the SPEI format. */
@SerializedName("spei")
Spei spei;

/** The payment networks supported by this FinancialAddress. */
@SerializedName("supported_networks")
List<String> supportedNetworks;

/**
* The type of financial address
*
* <p>One of {@code iban}, or {@code zengin}.
* <p>One of {@code iban}, {@code sort_code}, {@code spei}, or {@code zengin}.
*/
@SerializedName("type")
String type;
Expand All @@ -1736,6 +1749,64 @@ public static class FinancialAddresses extends StripeObject {
@SerializedName("zengin")
Zengin zengin;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Iban extends StripeObject {
/** The name of the person or business that owns the bank account. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The BIC/SWIFT code of the account. */
@SerializedName("bic")
String bic;

/**
* Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
* 3166-1 alpha-2</a>).
*/
@SerializedName("country")
String country;

/** The IBAN of the account. */
@SerializedName("iban")
String iban;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SortCode extends StripeObject {
/** The name of the person or business that owns the bank account. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The account number. */
@SerializedName("account_number")
String accountNumber;

/** The six-digit sort code. */
@SerializedName("sort_code")
String sortCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Spei extends StripeObject {
/** The three-digit bank code. */
@SerializedName("bank_code")
String bankCode;

/** The short banking institution name. */
@SerializedName("bank_name")
String bankName;

/** The CLABE number. */
@SerializedName("clabe")
String clabe;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -2262,23 +2333,43 @@ public static class Bancontact extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BankTransfer extends StripeObject {
@SerializedName("eu_bank_transfer")
EuBankTransfer euBankTransfer;

/**
* List of address types that should be returned in the financial_addresses response. If not
* specified, all valid types will be returned.
*
* <p>Permitted values include: {@code zengin}.
* <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
* spei}.
*/
@SerializedName("requested_address_types")
List<String> requestedAddressTypes;

/**
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
* values include: {@code jp_bank_transfer}.
* values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
* jp_bank_transfer}, or {@code mx_bank_transfer}.
*
* <p>Equal to {@code jp_bank_transfer}.
* <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer}, or
* {@code mx_bank_transfer}.
*/
@SerializedName("type")
String type;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class EuBankTransfer extends StripeObject {
/**
* The desired country code of the bank account information. Permitted values include:
* {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
*
* <p>One of {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
*/
@SerializedName("country")
String country;
}
}

@Getter
Expand Down

0 comments on commit 463b348

Please sign in to comment.