Skip to content

Commit

Permalink
Merge upstream and update generated code for v1317
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 23, 2024
2 parents 0175949 + 87f69c4 commit 52e2b4e
Show file tree
Hide file tree
Showing 37 changed files with 3,602 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
* Remove support for `from_schedule` on `Quote.subscription_data`
* Add support for `allow_redisplay` on `terminal.ReaderCollectPaymentMethodParams.collect_config`

## 27.1.1 - 2024-10-18
* [#1901](https://github.com/stripe/stripe-java/pull/1901) update object tags for meter-related classes

- fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server.
* [#1898](https://github.com/stripe/stripe-java/pull/1898) Clean up examples
* [#1894](https://github.com/stripe/stripe-java/pull/1894) Fixed example for raw request in readme file

## 27.1.0 - 2024-10-03
* [#1890](https://github.com/stripe/stripe-java/pull/1890) Update the class for `ThinEvent` to include `livemode` and `reason`
* [#1891](https://github.com/stripe/stripe-java/pull/1891) Removed the class `RequestSigningAuthenticator` that was added in the previous release. Request Signing is not supported yet.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1314
v1317
37 changes: 37 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,23 @@ public static class Capabilities extends StripeObject {
@SerializedName("grabpay_payments")
String grabpayPayments;

/**
* The status of the Indonesia Bank Transfer payments capability of the account, or whether the
* account can directly process Indonesia Bank Transfer charges.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("id_bank_transfer_payments")
String idBankTransferPayments;

/**
* The status of Bank BCA onboarding of the account.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("id_bank_transfer_payments_bca")
String idBankTransferPaymentsBca;

/**
* The status of the iDEAL payments capability of the account, or whether the account can
* directly process iDEAL charges.
Expand Down Expand Up @@ -2312,6 +2329,9 @@ public static class Settings extends StripeObject {
@SerializedName("bacs_debit_payments")
BacsDebitPayments bacsDebitPayments;

@SerializedName("bank_bca_onboarding")
BankBcaOnboarding bankBcaOnboarding;

@SerializedName("branding")
Branding branding;

Expand Down Expand Up @@ -2373,6 +2393,23 @@ public static class BacsDebitPayments extends StripeObject {
String serviceUserNumber;
}

/**
* For more details about BankBcaOnboarding, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class BankBcaOnboarding extends StripeObject {
/** Bank BCA business account holder name. */
@SerializedName("account_holder_name")
String accountHolderName;

/** Bank BCA business account number. */
@SerializedName("business_account_number")
String businessAccountNumber;
}

/**
* For more details about Branding, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down
39 changes: 39 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("grabpay")
Grabpay grabpay;

@SerializedName("id_bank_transfer")
IdBankTransfer idBankTransfer;

@SerializedName("ideal")
Ideal ideal;

Expand Down Expand Up @@ -2647,6 +2650,42 @@ public static class Grabpay extends StripeObject {
String transactionId;
}

/**
* For more details about IdBankTransfer, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class IdBankTransfer extends StripeObject {
/** Account number of the bank account to transfer funds to. */
@SerializedName("account_number")
String accountNumber;

/**
* Bank where the account is located.
*
* <p>One of {@code bca}, {@code bni}, {@code bri}, {@code cimb}, or {@code permata}.
*/
@SerializedName("bank")
String bank;

/** Local bank code of the bank. */
@SerializedName("bank_code")
String bankCode;

/** Name of the bank associated with the bank account. */
@SerializedName("bank_name")
String bankName;

/**
* Merchant name and billing details name, for the customer to check for the correct merchant
* when performing the bank transfer.
*/
@SerializedName("display_name")
String displayName;
}

/**
* For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
38 changes: 31 additions & 7 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("grabpay")
Grabpay grabpay;

@SerializedName("id_bank_transfer")
IdBankTransfer idBankTransfer;

@SerializedName("ideal")
Ideal ideal;

Expand Down Expand Up @@ -400,13 +403,13 @@ public static class PaymentMethodPreview extends StripeObject {
* {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code
* bancontact}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code
* cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code gopay},
* {@code grabpay}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna},
* {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code
* multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code payco}, {@code paynow},
* {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code
* rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code shopeepay},
* {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or
* {@code zip}.
* {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code
* kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way},
* {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code
* payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code
* qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code
* shopeepay}, {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code
* wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1560,6 +1563,27 @@ public static class Gopay extends StripeObject {}
@EqualsAndHashCode(callSuper = false)
public static class Grabpay extends StripeObject {}

/**
* For more details about IdBankTransfer, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class IdBankTransfer extends StripeObject {
@SerializedName("bank")
String bank;

@SerializedName("bank_code")
String bankCode;

@SerializedName("bank_name")
String bankName;

@SerializedName("display_name")
String displayName;
}

/**
* For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ public class Event extends ApiResource implements HasId {
* issuing_personalization_design.deactivated}, {@code issuing_personalization_design.rejected},
* {@code issuing_personalization_design.updated}, {@code issuing_settlement.created}, {@code
* issuing_settlement.updated}, {@code issuing_token.created}, {@code issuing_token.updated},
* {@code issuing_transaction.created}, {@code issuing_transaction.updated}, {@code
* mandate.updated}, {@code payment_intent.amount_capturable_updated}, {@code
* {@code issuing_transaction.created}, {@code
* issuing_transaction.purchase_details_receipt_updated}, {@code issuing_transaction.updated},
* {@code mandate.updated}, {@code payment_intent.amount_capturable_updated}, {@code
* payment_intent.canceled}, {@code payment_intent.created}, {@code
* payment_intent.partially_funded}, {@code payment_intent.payment_failed}, {@code
* payment_intent.processing}, {@code payment_intent.requires_action}, {@code
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,13 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("customer_balance")
CustomerBalance customerBalance;

/**
* If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia
* bank transfer payment method options to pass to the invoice’s PaymentIntent.
*/
@SerializedName("id_bank_transfer")
IdBankTransfer idBankTransfer;

/**
* If paying by {@code konbini}, this sub-hash contains details about the Konbini payment
* method options to pass to the invoice’s PaymentIntent.
Expand Down Expand Up @@ -2944,6 +2951,15 @@ public static class EuBankTransfer extends StripeObject {
}
}

/**
* For more details about IdBankTransfer, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class IdBankTransfer extends StripeObject {}

/**
* For more details about Konbini, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down
92 changes: 92 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.stripe.param.PaymentIntentListParams;
import com.stripe.param.PaymentIntentRetrieveParams;
import com.stripe.param.PaymentIntentSearchParams;
import com.stripe.param.PaymentIntentTriggerActionParams;
import com.stripe.param.PaymentIntentUpdateParams;
import com.stripe.param.PaymentIntentVerifyMicrodepositsParams;
import java.util.List;
Expand Down Expand Up @@ -1486,6 +1487,47 @@ public static PaymentIntentSearchResult search(
return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class);
}

/** Trigger an external action on a PaymentIntent. */
public static PaymentIntent triggerAction(String intent, Map<String, Object> params)
throws StripeException {
return triggerAction(intent, params, (RequestOptions) null);
}

/** Trigger an external action on a PaymentIntent. */
public static PaymentIntent triggerAction(
String intent, Map<String, Object> params, RequestOptions options) throws StripeException {
String path =
String.format(
"/v1/test/payment_intents/%s/trigger_action", ApiResource.urlEncodeId(intent));
ApiRequest request =
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
return getGlobalResponseGetter().request(request, PaymentIntent.class);
}

/** Trigger an external action on a PaymentIntent. */
public static PaymentIntent triggerAction(String intent, PaymentIntentTriggerActionParams params)
throws StripeException {
return triggerAction(intent, params, (RequestOptions) null);
}

/** Trigger an external action on a PaymentIntent. */
public static PaymentIntent triggerAction(
String intent, PaymentIntentTriggerActionParams params, RequestOptions options)
throws StripeException {
String path =
String.format(
"/v1/test/payment_intents/%s/trigger_action", ApiResource.urlEncodeId(intent));
ApiResource.checkNullTypedParams(path, params);
ApiRequest request =
new ApiRequest(
BaseAddress.API,
ApiResource.RequestMethod.POST,
path,
ApiRequestParams.paramsToMap(params),
options);
return getGlobalResponseGetter().request(request, PaymentIntent.class);
}

/**
* Updates properties on a PaymentIntent object without confirming.
*
Expand Down Expand Up @@ -2997,6 +3039,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("grabpay")
Grabpay grabpay;

@SerializedName("id_bank_transfer")
IdBankTransfer idBankTransfer;

@SerializedName("ideal")
Ideal ideal;

Expand Down Expand Up @@ -4246,6 +4291,53 @@ public static class Grabpay extends StripeObject {
String setupFutureUsage;
}

/**
* For more details about IdBankTransfer, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class IdBankTransfer extends StripeObject {
/**
* The UNIX timestamp until which the virtual bank account is valid. Permitted range is from
* now till 2678400 seconds (31 days) from now.
*/
@SerializedName("expires_after")
Long expiresAfter;

/**
* The UNIX timestamp until which the virtual bank account is valid. Permitted range is from
* now until 30 days from now. If unset, it defaults to 1 days from now.
*/
@SerializedName("expires_at")
Long expiresAt;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
* href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still <a
* href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
* Customer after the transaction completes.
*
* <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a <a
* href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
* payment method representing the card to the Customer instead.
*
* <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as <a
* href="https://stripe.com/strong-customer-authentication">SCA</a>.
*
* <p>Equal to {@code none}.
*/
@SerializedName("setup_future_usage")
String setupFutureUsage;
}

/**
* For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
Loading

0 comments on commit 52e2b4e

Please sign in to comment.