Skip to content

Commit

Permalink
Update generated code for v1334
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Nov 7, 2024
1 parent 1486a0f commit 57209d7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1333
v1334
5 changes: 5 additions & 0 deletions src/resources/TestHelpers/Issuing/Authorizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const Authorizations = StripeResource.extend({
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/increment',
}),
respond: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond',
}),
reverse: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/issuing/authorizations/{authorization}/reverse',
Expand Down
40 changes: 40 additions & 0 deletions types/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ declare module 'stripe' {
*/
fleet: Authorization.Fleet | null;

/**
* Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
*/
fraud_challenges?: Array<Authorization.FraudChallenge> | null;

/**
* Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
*/
Expand Down Expand Up @@ -135,6 +140,11 @@ declare module 'stripe' {

verification_data: Authorization.VerificationData;

/**
* Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
*/
verified_by_fraud_challenge?: boolean | null;

/**
* The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
*/
Expand Down Expand Up @@ -273,6 +283,36 @@ declare module 'stripe' {
| 'self_service';
}

interface FraudChallenge {
/**
* The method by which the fraud challenge was delivered to the cardholder.
*/
channel: 'sms';

/**
* The status of the fraud challenge.
*/
status: FraudChallenge.Status;

/**
* If the challenge is not deliverable, the reason why.
*/
undeliverable_reason: FraudChallenge.UndeliverableReason | null;
}

namespace FraudChallenge {
type Status =
| 'expired'
| 'pending'
| 'rejected'
| 'undeliverable'
| 'verified';

type UndeliverableReason =
| 'no_phone_number'
| 'unsupported_phone_number';
}

interface Fuel {
/**
* [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
Expand Down
23 changes: 23 additions & 0 deletions types/TestHelpers/Issuing/AuthorizationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,20 @@ declare module 'stripe' {
}
}

namespace Issuing {
interface AuthorizationRespondParams {
/**
* Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false).
*/
confirmed: boolean;

/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

namespace Issuing {
interface AuthorizationReverseParams {
/**
Expand Down Expand Up @@ -1256,6 +1270,15 @@ declare module 'stripe' {
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;

/**
* Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
*/
respond(
id: string,
params: AuthorizationRespondParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;

/**
* Reverse a test-mode Authorization.
*/
Expand Down

0 comments on commit 57209d7

Please sign in to comment.