Skip to content

Commit 6978cd9

Browse files
Merge pull request #2183 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents 7dc924d + 0ff5105 commit 6978cd9

8 files changed

Lines changed: 1062 additions & 7 deletions

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2202
1+
v2203

src/main/java/com/stripe/model/PaymentIntent.java

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.stripe.param.PaymentIntentReauthorizeParams;
2121
import com.stripe.param.PaymentIntentRetrieveParams;
2222
import com.stripe.param.PaymentIntentSearchParams;
23+
import com.stripe.param.PaymentIntentSimulateCryptoDepositParams;
2324
import com.stripe.param.PaymentIntentTriggerActionParams;
2425
import com.stripe.param.PaymentIntentUpdateParams;
2526
import com.stripe.param.PaymentIntentVerifyMicrodepositsParams;
@@ -2113,6 +2114,9 @@ public static class NextAction extends StripeObject {
21132114
@SerializedName("cashapp_handle_redirect_or_display_qr_code")
21142115
CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode;
21152116

2117+
@SerializedName("crypto_display_details")
2118+
CryptoDisplayDetails cryptoDisplayDetails;
2119+
21162120
@SerializedName("display_bank_transfer_instructions")
21172121
DisplayBankTransferInstructions displayBankTransferInstructions;
21182122

@@ -2298,6 +2302,162 @@ public static class QrCode extends StripeObject {
22982302
}
22992303
}
23002304

2305+
/**
2306+
* For more details about CryptoDisplayDetails, please refer to the <a
2307+
* href="https://docs.stripe.com/api">API Reference.</a>
2308+
*/
2309+
@Getter
2310+
@Setter
2311+
@EqualsAndHashCode(callSuper = false)
2312+
public static class CryptoDisplayDetails extends StripeObject {
2313+
@SerializedName("deposit_addresses")
2314+
DepositAddresses depositAddresses;
2315+
2316+
/**
2317+
* For more details about DepositAddresses, please refer to the <a
2318+
* href="https://docs.stripe.com/api">API Reference.</a>
2319+
*/
2320+
@Getter
2321+
@Setter
2322+
@EqualsAndHashCode(callSuper = false)
2323+
public static class DepositAddresses extends StripeObject {
2324+
@SerializedName("base")
2325+
Base base;
2326+
2327+
@SerializedName("solana")
2328+
Solana solana;
2329+
2330+
@SerializedName("tempo")
2331+
Tempo tempo;
2332+
2333+
/**
2334+
* For more details about Base, please refer to the <a
2335+
* href="https://docs.stripe.com/api">API Reference.</a>
2336+
*/
2337+
@Getter
2338+
@Setter
2339+
@EqualsAndHashCode(callSuper = false)
2340+
public static class Base extends StripeObject {
2341+
/** Address of the deposit address. */
2342+
@SerializedName("address")
2343+
String address;
2344+
2345+
/** The token currencies supported on this network. */
2346+
@SerializedName("supported_tokens")
2347+
List<PaymentIntent.NextAction.CryptoDisplayDetails.DepositAddresses.Base.SupportedToken>
2348+
supportedTokens;
2349+
2350+
/**
2351+
* For more details about SupportedToken, please refer to the <a
2352+
* href="https://docs.stripe.com/api">API Reference.</a>
2353+
*/
2354+
@Getter
2355+
@Setter
2356+
@EqualsAndHashCode(callSuper = false)
2357+
public static class SupportedToken extends StripeObject {
2358+
/**
2359+
* The on-chain contract address for the supported token currency on this specific
2360+
* network.
2361+
*/
2362+
@SerializedName("token_contract_address")
2363+
String tokenContractAddress;
2364+
2365+
/**
2366+
* The supported token currency. Supported token currencies include: {@code usdc}.
2367+
*
2368+
* <p>Equal to {@code usdc}.
2369+
*/
2370+
@SerializedName("token_currency")
2371+
String tokenCurrency;
2372+
}
2373+
}
2374+
2375+
/**
2376+
* For more details about Solana, please refer to the <a
2377+
* href="https://docs.stripe.com/api">API Reference.</a>
2378+
*/
2379+
@Getter
2380+
@Setter
2381+
@EqualsAndHashCode(callSuper = false)
2382+
public static class Solana extends StripeObject {
2383+
/** Address of the deposit address. */
2384+
@SerializedName("address")
2385+
String address;
2386+
2387+
/** The token currencies supported on this network. */
2388+
@SerializedName("supported_tokens")
2389+
List<PaymentIntent.NextAction.CryptoDisplayDetails.DepositAddresses.Solana.SupportedToken>
2390+
supportedTokens;
2391+
2392+
/**
2393+
* For more details about SupportedToken, please refer to the <a
2394+
* href="https://docs.stripe.com/api">API Reference.</a>
2395+
*/
2396+
@Getter
2397+
@Setter
2398+
@EqualsAndHashCode(callSuper = false)
2399+
public static class SupportedToken extends StripeObject {
2400+
/**
2401+
* The on-chain contract address for the supported token currency on this specific
2402+
* network.
2403+
*/
2404+
@SerializedName("token_contract_address")
2405+
String tokenContractAddress;
2406+
2407+
/**
2408+
* The supported token currency. Supported token currencies include: {@code usdc}.
2409+
*
2410+
* <p>Equal to {@code usdc}.
2411+
*/
2412+
@SerializedName("token_currency")
2413+
String tokenCurrency;
2414+
}
2415+
}
2416+
2417+
/**
2418+
* For more details about Tempo, please refer to the <a
2419+
* href="https://docs.stripe.com/api">API Reference.</a>
2420+
*/
2421+
@Getter
2422+
@Setter
2423+
@EqualsAndHashCode(callSuper = false)
2424+
public static class Tempo extends StripeObject {
2425+
/** Address of the deposit address. */
2426+
@SerializedName("address")
2427+
String address;
2428+
2429+
/** The token currencies supported on this network. */
2430+
@SerializedName("supported_tokens")
2431+
List<PaymentIntent.NextAction.CryptoDisplayDetails.DepositAddresses.Tempo.SupportedToken>
2432+
supportedTokens;
2433+
2434+
/**
2435+
* For more details about SupportedToken, please refer to the <a
2436+
* href="https://docs.stripe.com/api">API Reference.</a>
2437+
*/
2438+
@Getter
2439+
@Setter
2440+
@EqualsAndHashCode(callSuper = false)
2441+
public static class SupportedToken extends StripeObject {
2442+
/**
2443+
* The on-chain contract address for the supported token currency on this specific
2444+
* network.
2445+
*/
2446+
@SerializedName("token_contract_address")
2447+
String tokenContractAddress;
2448+
2449+
/**
2450+
* The supported token currency. Supported token currencies include: {@code usdc}.
2451+
*
2452+
* <p>Equal to {@code usdc}.
2453+
*/
2454+
@SerializedName("token_currency")
2455+
String tokenCurrency;
2456+
}
2457+
}
2458+
}
2459+
}
2460+
23012461
/**
23022462
* For more details about DisplayBankTransferInstructions, please refer to the <a
23032463
* href="https://docs.stripe.com/api">API Reference.</a>
@@ -5718,6 +5878,17 @@ public static class Cashapp extends StripeObject {
57185878
@Setter
57195879
@EqualsAndHashCode(callSuper = false)
57205880
public static class Crypto extends StripeObject {
5881+
@SerializedName("deposit_options")
5882+
DepositOptions depositOptions;
5883+
5884+
/**
5885+
* The mode of the crypto payment.
5886+
*
5887+
* <p>One of {@code default}, or {@code deposit}.
5888+
*/
5889+
@SerializedName("mode")
5890+
String mode;
5891+
57215892
/**
57225893
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
57235894
*
@@ -5741,6 +5912,23 @@ public static class Crypto extends StripeObject {
57415912
*/
57425913
@SerializedName("setup_future_usage")
57435914
String setupFutureUsage;
5915+
5916+
/**
5917+
* For more details about DepositOptions, please refer to the <a
5918+
* href="https://docs.stripe.com/api">API Reference.</a>
5919+
*/
5920+
@Getter
5921+
@Setter
5922+
@EqualsAndHashCode(callSuper = false)
5923+
public static class DepositOptions extends StripeObject {
5924+
/**
5925+
* The blockchain networks to support for deposits. Learn more about <a
5926+
* href="https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support">supported
5927+
* networks and tokens</a>.
5928+
*/
5929+
@SerializedName("networks")
5930+
List<String> networks;
5931+
}
57445932
}
57455933

57465934
/**
@@ -7771,6 +7959,84 @@ public void setDestinationObject(Account expandableObject) {
77717959
}
77727960
}
77737961

7962+
public TestHelpers getTestHelpers() {
7963+
return new TestHelpers(this);
7964+
}
7965+
7966+
public static class TestHelpers {
7967+
private final PaymentIntent resource;
7968+
7969+
private TestHelpers(PaymentIntent resource) {
7970+
this.resource = resource;
7971+
}
7972+
7973+
/**
7974+
* Simulate an incoming crypto deposit for a testmode PaymentIntent with {@code
7975+
* payment_method_options[crypto][mode]=deposit}. The {@code transaction_hash} parameter
7976+
* determines whether the simulated deposit succeeds or fails. Learn more about <a
7977+
* href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
7978+
* your integration</a>.
7979+
*/
7980+
public PaymentIntent simulateCryptoDeposit(Map<String, Object> params) throws StripeException {
7981+
return simulateCryptoDeposit(params, (RequestOptions) null);
7982+
}
7983+
7984+
/**
7985+
* Simulate an incoming crypto deposit for a testmode PaymentIntent with {@code
7986+
* payment_method_options[crypto][mode]=deposit}. The {@code transaction_hash} parameter
7987+
* determines whether the simulated deposit succeeds or fails. Learn more about <a
7988+
* href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
7989+
* your integration</a>.
7990+
*/
7991+
public PaymentIntent simulateCryptoDeposit(Map<String, Object> params, RequestOptions options)
7992+
throws StripeException {
7993+
String path =
7994+
String.format(
7995+
"/v1/test_helpers/payment_intents/%s/simulate_crypto_deposit",
7996+
ApiResource.urlEncodeId(this.resource.getId()));
7997+
ApiRequest request =
7998+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
7999+
return resource.getResponseGetter().request(request, PaymentIntent.class);
8000+
}
8001+
8002+
/**
8003+
* Simulate an incoming crypto deposit for a testmode PaymentIntent with {@code
8004+
* payment_method_options[crypto][mode]=deposit}. The {@code transaction_hash} parameter
8005+
* determines whether the simulated deposit succeeds or fails. Learn more about <a
8006+
* href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
8007+
* your integration</a>.
8008+
*/
8009+
public PaymentIntent simulateCryptoDeposit(PaymentIntentSimulateCryptoDepositParams params)
8010+
throws StripeException {
8011+
return simulateCryptoDeposit(params, (RequestOptions) null);
8012+
}
8013+
8014+
/**
8015+
* Simulate an incoming crypto deposit for a testmode PaymentIntent with {@code
8016+
* payment_method_options[crypto][mode]=deposit}. The {@code transaction_hash} parameter
8017+
* determines whether the simulated deposit succeeds or fails. Learn more about <a
8018+
* href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
8019+
* your integration</a>.
8020+
*/
8021+
public PaymentIntent simulateCryptoDeposit(
8022+
PaymentIntentSimulateCryptoDepositParams params, RequestOptions options)
8023+
throws StripeException {
8024+
String path =
8025+
String.format(
8026+
"/v1/test_helpers/payment_intents/%s/simulate_crypto_deposit",
8027+
ApiResource.urlEncodeId(this.resource.getId()));
8028+
ApiResource.checkNullTypedParams(path, params);
8029+
ApiRequest request =
8030+
new ApiRequest(
8031+
BaseAddress.API,
8032+
ApiResource.RequestMethod.POST,
8033+
path,
8034+
ApiRequestParams.paramsToMap(params),
8035+
options);
8036+
return resource.getResponseGetter().request(request, PaymentIntent.class);
8037+
}
8038+
}
8039+
77748040
@Override
77758041
public void setResponseGetter(StripeResponseGetter responseGetter) {
77768042
super.setResponseGetter(responseGetter);

0 commit comments

Comments
 (0)