stub() {
        this.remove();

        let interceptor = nock('https://api.stripe.com')
            .persist()
            .get(/v1\/.*/);
        this.nockInterceptors.push(interceptor);
        interceptor
            .reply((uri) => {
                const [match, resource, id] = uri.match(/\/?v1\/(\w+)\/?(\w+)/) || [null];

                if (!match) {
                    return [500];
                }

                if (resource === 'setup_intents') {
                    return this.#getData(this.setupIntents, id);
                }

                if (resource === 'customers') {
                    return this.#getData(this.customers, id);
                }

                if (resource === 'subscriptions') {
                    return this.#getData(this.subscriptions, id);
                }

                if (resource === 'coupons') {
                    return this.#getData(this.coupons, id);
                }

                if (resource === 'payment_methods') {
                    return this.#getData(this.paymentMethods, id);
                }

                if (resource === 'prices') {
                    return this.#getData(this.prices, id);
                }

                if (resource === 'products') {
                    return this.#getData(this.products, id);
                }

                return [500];
            });

        interceptor = nock('https://api.stripe.com')
            .persist()
            .post(/v1\/.*/);
        this.nockInterceptors.push(interceptor);
        interceptor
            .reply((uri, body) => {
                const [match, resource, id] = uri.match(/\/?v1\/(\w+)(?:\/?(\w+)){0,2}/) || [null];

                if (!match) {
                    return [500];
                }

                if (resource === 'payment_methods') {
                    return this.#postData(this.paymentMethods, id, body, resource);
                }

                if (resource === 'subscriptions') {
                    return this.#postData(this.subscriptions, id, body, resource);
                }

                if (resource === 'customers') {
                    return this.#postData(this.customers, id, body, resource);
                }

                if (resource === 'coupons') {
                    return this.#postData(this.coupons, id, body, resource);
                }

                if (resource === 'prices') {
                    return this.#postData(this.prices, id, body, resource);
                }

                if (resource === 'products') {
                    return this.#postData(this.products, id, body, resource);
                }

                if (resource === 'checkout' && id === 'sessions') {
                    return this.#postData(this.checkoutSessions, null, body, resource);
                }

                return [500];
            });

        interceptor = nock('https://api.stripe.com')
            .persist()
            .delete(/v1\/.*/);
        this.nockInterceptors.push(interceptor);
        interceptor
            .reply((uri) => {
                const [match, resource, id] = uri.match(/\/?v1\/(\w+)(?:\/?(\w+)){0,2}/) || [null];

                if (!match) {
                    return [500];
                }

                if (resource === 'subscriptions') {
                    return this.#postData(this.subscriptions, id, 'status=canceled', resource);
                }

                return [500];
            });
    }
Stubs the Stripe API.
This will intercept all requests to the Stripe API and return the mocked data.