Skip to content

Commit

Permalink
Codegen for openapi v163
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Jul 7, 2022
1 parent b719ddb commit f894866
Show file tree
Hide file tree
Showing 9 changed files with 539 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/apiVersion.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec

module.exports = {ApiVersion: '2020-08-27'};
module.exports = {ApiVersion: '2020-08-27; server_side_confirmation_beta=v1'};
59 changes: 59 additions & 0 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ declare module 'stripe' {
*/
review: string | Stripe.Review | null;

/**
* Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
*/
secret_key_confirmation?: PaymentIntent.SecretKeyConfirmation;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
Expand Down Expand Up @@ -1683,6 +1688,8 @@ declare module 'stripe' {
}
}

type SecretKeyConfirmation = 'optional' | 'required';

type SetupFutureUsage = 'off_session' | 'on_session';

interface Shipping {
Expand Down Expand Up @@ -1854,6 +1861,11 @@ declare module 'stripe' {
*/
return_url?: string;

/**
* Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
*/
secret_key_confirmation?: PaymentIntentCreateParams.SecretKeyConfirmation;

/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
Expand Down Expand Up @@ -3477,6 +3489,8 @@ declare module 'stripe' {
session?: string;
}

type SecretKeyConfirmation = 'optional' | 'required';

type SetupFutureUsage = 'off_session' | 'on_session';

interface Shipping {
Expand Down Expand Up @@ -3586,6 +3600,11 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* This hash contains details about the Mandate to create.
*/
mandate_data?: PaymentIntentUpdateParams.MandateData;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
Expand Down Expand Up @@ -3660,6 +3679,41 @@ declare module 'stripe' {
namespace PaymentIntentUpdateParams {
type CaptureMethod = 'automatic' | 'manual';

interface MandateData {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData.CustomerAcceptance;
}

namespace MandateData {
interface CustomerAcceptance {
/**
* If this is a Mandate accepted online, this hash contains details about the online acceptance.
*/
online: CustomerAcceptance.Online;

/**
* The type of customer acceptance information included with the Mandate.
*/
type: 'online';
}

namespace CustomerAcceptance {
interface Online {
/**
* The IP address from which the Mandate was accepted by the customer.
*/
ip_address?: string;

/**
* The user agent of the browser from which the Mandate was accepted by the customer.
*/
user_agent?: string;
}
}
}

interface PaymentMethodData {
/**
* If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
Expand Down Expand Up @@ -5318,6 +5372,11 @@ declare module 'stripe' {
}

interface PaymentIntentConfirmParams {
/**
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
*/
application_fee_amount?: Stripe.Emptyable<number>;

/**
* Controls when the funds will be captured from the customer's account.
*/
Expand Down
2 changes: 0 additions & 2 deletions types/2020-08-27/Refunds.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ declare module 'stripe' {
*/
expand?: Array<string>;

instructions_email?: string;

/**
* Address to send refund email, use customer email if not specified
*/
Expand Down
26 changes: 26 additions & 0 deletions types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ declare module 'stripe' {
* Initiating payment method details for the object.
*/
initiating_payment_method_details?: ReceivedCreditCreateParams.InitiatingPaymentMethodDetails;

/**
* Details about the network used for the ReceivedCredit.
*/
network_details?: ReceivedCreditCreateParams.NetworkDetails;
}

namespace ReceivedCreditCreateParams {
Expand Down Expand Up @@ -74,6 +79,27 @@ declare module 'stripe' {
}

type Network = 'ach' | 'us_domestic_wire';

interface NetworkDetails {
/**
* Optional fields for `ach`.
*/
ach?: NetworkDetails.Ach;

/**
* The type of flow that originated the ReceivedCredit.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* ACH Addenda record
*/
addenda?: string;
}
}
}
}

Expand Down
26 changes: 26 additions & 0 deletions types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ declare module 'stripe' {
* Initiating payment method details for the object.
*/
initiating_payment_method_details?: ReceivedDebitCreateParams.InitiatingPaymentMethodDetails;

/**
* Details about the network used for the ReceivedDebit.
*/
network_details?: ReceivedDebitCreateParams.NetworkDetails;
}

namespace ReceivedDebitCreateParams {
Expand Down Expand Up @@ -72,6 +77,27 @@ declare module 'stripe' {
routing_number?: string;
}
}

interface NetworkDetails {
/**
* Optional fields for `ach`.
*/
ach?: NetworkDetails.Ach;

/**
* The type of flow that originated the ReceivedDebit.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* Addenda record data associated with this ReceivedDebit.
*/
addenda?: string;
}
}
}
}

Expand Down
52 changes: 52 additions & 0 deletions types/2020-08-27/Treasury/OutboundTransfers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ declare module 'stripe' {
*/
metadata: Stripe.Metadata;

/**
* Details about the network used for the OutboundTransfer.
*/
network_details?: OutboundTransfer.NetworkDetails | null;

/**
* Details about a returned OutboundTransfer. Only set when the status is `returned`.
*/
Expand Down Expand Up @@ -170,6 +175,27 @@ declare module 'stripe' {
}
}

interface NetworkDetails {
/**
* Details about an ACH transaction.
*/
ach?: NetworkDetails.Ach | null;

/**
* The type of flow that originated the OutboundTransfer.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* ACH Addenda record
*/
addenda: string | null;
}
}

interface ReturnedDetails {
/**
* Reason for the return.
Expand Down Expand Up @@ -267,6 +293,11 @@ declare module 'stripe' {
*/
metadata?: Stripe.MetadataParam;

/**
* Details about the network used for the OutboundTransfer.
*/
network_details?: OutboundTransferCreateParams.NetworkDetails;

/**
* Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`.
*/
Expand Down Expand Up @@ -295,6 +326,27 @@ declare module 'stripe' {
type Network = 'ach' | 'us_domestic_wire';
}
}

interface NetworkDetails {
/**
* Optional fields for `ach`.
*/
ach?: NetworkDetails.Ach;

/**
* The type of flow that originated the OutboundTransfer.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* Addenda record data associated with this OutboundTransfer.
*/
addenda?: string;
}
}
}

interface OutboundTransferRetrieveParams {
Expand Down
26 changes: 26 additions & 0 deletions types/2020-08-27/Treasury/ReceivedCredits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ declare module 'stripe' {
*/
network: ReceivedCredit.Network;

/**
* Details specific to the money movement rails.
*/
network_details?: ReceivedCredit.NetworkDetails | null;

/**
* Details describing when a ReceivedCredit may be reversed.
*/
Expand Down Expand Up @@ -235,6 +240,27 @@ declare module 'stripe' {

type Network = 'ach' | 'card' | 'stripe' | 'us_domestic_wire';

interface NetworkDetails {
/**
* Details about an ACH transaction.
*/
ach?: NetworkDetails.Ach | null;

/**
* The type of flow that originated the ReceivedCredit.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* ACH Addenda record
*/
addenda: string | null;
}
}

interface ReversalDetails {
/**
* Time before which a ReceivedCredit can be reversed.
Expand Down
31 changes: 31 additions & 0 deletions types/2020-08-27/Treasury/ReceivedDebits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ declare module 'stripe' {
*/
network: ReceivedDebit.Network;

/**
* Details specific to the money movement rails.
*/
network_details?: ReceivedDebit.NetworkDetails | null;

/**
* Details describing when a ReceivedDebit might be reversed.
*/
Expand Down Expand Up @@ -184,10 +189,36 @@ declare module 'stripe' {
* Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.
*/
issuing_transaction: string | null;

/**
* The ReceivedCredit that Capital withheld from
*/
received_credit_capital_withholding?: string | null;
}

type Network = 'ach' | 'card' | 'stripe';

interface NetworkDetails {
/**
* Details about an ACH transaction.
*/
ach?: NetworkDetails.Ach | null;

/**
* The type of flow that originated the ReceivedDebit.
*/
type: 'ach';
}

namespace NetworkDetails {
interface Ach {
/**
* ACH Addenda record
*/
addenda: string | null;
}
}

interface ReversalDetails {
/**
* Time before which a ReceivedDebit can be reversed.
Expand Down
Loading

0 comments on commit f894866

Please sign in to comment.