@51eat/sdk 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/me/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/client/Client.js +9 -4
- package/dist/cjs/api/resources/customer/resources/me/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/index.js +4 -1
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.ts +88 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.js +329 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.js +21 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.js +18 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.js +19 -0
- package/dist/cjs/api/types/PaymentMethod.d.ts +8 -0
- package/dist/cjs/api/types/PaymentMethod.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/me/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/client/Client.mjs +5 -0
- package/dist/esm/api/resources/customer/resources/me/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.mts +88 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.mjs +292 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.mjs +3 -0
- package/dist/esm/api/types/PaymentMethod.d.mts +8 -0
- package/dist/esm/api/types/PaymentMethod.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +309 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.48",
|
|
47
|
+
"User-Agent": "@51eat/sdk/0.0.48",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -17,6 +17,7 @@ export interface CreatePaymentIntentRequest {
|
|
|
17
17
|
fulfillment_method?: CreatePaymentIntentRequest.FulfillmentMethod | null;
|
|
18
18
|
pickup_date?: CreatePaymentIntentRequest.PickupDate | null;
|
|
19
19
|
pickup_time?: string | null;
|
|
20
|
+
payment_method_id?: string | null;
|
|
20
21
|
billing_address: CreatePaymentIntentRequest.BillingAddress;
|
|
21
22
|
shipping_address?: CreatePaymentIntentRequest.ShippingAddress;
|
|
22
23
|
}
|
|
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
4
|
import * as FiveOneEat from "../../../../../index.js";
|
|
5
5
|
import { AddressesClient } from "../resources/addresses/client/Client.js";
|
|
6
|
+
import { PaymentMethodsClient } from "../resources/paymentMethods/client/Client.js";
|
|
6
7
|
import { TicketOrdersClient } from "../resources/ticketOrders/client/Client.js";
|
|
7
8
|
import { TicketsClient } from "../resources/tickets/client/Client.js";
|
|
8
9
|
export declare namespace MeClient {
|
|
@@ -15,10 +16,12 @@ export declare class MeClient {
|
|
|
15
16
|
protected _tickets: TicketsClient | undefined;
|
|
16
17
|
protected _ticketOrders: TicketOrdersClient | undefined;
|
|
17
18
|
protected _addresses: AddressesClient | undefined;
|
|
19
|
+
protected _paymentMethods: PaymentMethodsClient | undefined;
|
|
18
20
|
constructor(options?: MeClient.Options);
|
|
19
21
|
get tickets(): TicketsClient;
|
|
20
22
|
get ticketOrders(): TicketOrdersClient;
|
|
21
23
|
get addresses(): AddressesClient;
|
|
24
|
+
get paymentMethods(): PaymentMethodsClient;
|
|
22
25
|
/**
|
|
23
26
|
* Retrieve the authenticated user's favorited businesses with pagination.
|
|
24
27
|
*
|
|
@@ -52,24 +52,29 @@ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNo
|
|
|
52
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
53
|
const FiveOneEat = __importStar(require("../../../../../index.js"));
|
|
54
54
|
const Client_js_1 = require("../resources/addresses/client/Client.js");
|
|
55
|
-
const Client_js_2 = require("../resources/
|
|
56
|
-
const Client_js_3 = require("../resources/
|
|
55
|
+
const Client_js_2 = require("../resources/paymentMethods/client/Client.js");
|
|
56
|
+
const Client_js_3 = require("../resources/ticketOrders/client/Client.js");
|
|
57
|
+
const Client_js_4 = require("../resources/tickets/client/Client.js");
|
|
57
58
|
class MeClient {
|
|
58
59
|
constructor(options = {}) {
|
|
59
60
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
61
|
}
|
|
61
62
|
get tickets() {
|
|
62
63
|
var _a;
|
|
63
|
-
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new
|
|
64
|
+
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new Client_js_4.TicketsClient(this._options)));
|
|
64
65
|
}
|
|
65
66
|
get ticketOrders() {
|
|
66
67
|
var _a;
|
|
67
|
-
return ((_a = this._ticketOrders) !== null && _a !== void 0 ? _a : (this._ticketOrders = new
|
|
68
|
+
return ((_a = this._ticketOrders) !== null && _a !== void 0 ? _a : (this._ticketOrders = new Client_js_3.TicketOrdersClient(this._options)));
|
|
68
69
|
}
|
|
69
70
|
get addresses() {
|
|
70
71
|
var _a;
|
|
71
72
|
return ((_a = this._addresses) !== null && _a !== void 0 ? _a : (this._addresses = new Client_js_1.AddressesClient(this._options)));
|
|
72
73
|
}
|
|
74
|
+
get paymentMethods() {
|
|
75
|
+
var _a;
|
|
76
|
+
return ((_a = this._paymentMethods) !== null && _a !== void 0 ? _a : (this._paymentMethods = new Client_js_2.PaymentMethodsClient(this._options)));
|
|
77
|
+
}
|
|
73
78
|
/**
|
|
74
79
|
* Retrieve the authenticated user's favorited businesses with pagination.
|
|
75
80
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./addresses/client/requests/index.js";
|
|
2
2
|
export * as addresses from "./addresses/index.js";
|
|
3
3
|
export * from "./addresses/types/index.js";
|
|
4
|
+
export * from "./paymentMethods/client/requests/index.js";
|
|
5
|
+
export * as paymentMethods from "./paymentMethods/index.js";
|
|
6
|
+
export * from "./paymentMethods/types/index.js";
|
|
4
7
|
export * from "./ticketOrders/client/requests/index.js";
|
|
5
8
|
export * as ticketOrders from "./ticketOrders/index.js";
|
|
6
9
|
export * from "./ticketOrders/types/index.js";
|
|
@@ -36,10 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tickets = exports.ticketOrders = exports.addresses = void 0;
|
|
39
|
+
exports.tickets = exports.ticketOrders = exports.paymentMethods = exports.addresses = void 0;
|
|
40
40
|
__exportStar(require("./addresses/client/requests/index.js"), exports);
|
|
41
41
|
exports.addresses = __importStar(require("./addresses/index.js"));
|
|
42
42
|
__exportStar(require("./addresses/types/index.js"), exports);
|
|
43
|
+
__exportStar(require("./paymentMethods/client/requests/index.js"), exports);
|
|
44
|
+
exports.paymentMethods = __importStar(require("./paymentMethods/index.js"));
|
|
45
|
+
__exportStar(require("./paymentMethods/types/index.js"), exports);
|
|
43
46
|
__exportStar(require("./ticketOrders/client/requests/index.js"), exports);
|
|
44
47
|
exports.ticketOrders = __importStar(require("./ticketOrders/index.js"));
|
|
45
48
|
__exportStar(require("./ticketOrders/types/index.js"), exports);
|
package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
4
|
+
import * as FiveOneEat from "../../../../../../../index.js";
|
|
5
|
+
export declare namespace PaymentMethodsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class PaymentMethodsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PaymentMethodsClient.Options>;
|
|
12
|
+
constructor(options?: PaymentMethodsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns a Stripe SetupIntent client_secret. Use this with the Stripe mobile SDK
|
|
15
|
+
* to present the payment sheet and collect card details. Once confirmed, pass the
|
|
16
|
+
* resulting payment method ID to the store endpoint.
|
|
17
|
+
*
|
|
18
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.customer.me.paymentMethods.setupIntent()
|
|
24
|
+
*/
|
|
25
|
+
setupIntent(requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.SetupIntentPaymentMethodsResponse>;
|
|
26
|
+
private __setupIntent;
|
|
27
|
+
/**
|
|
28
|
+
* Returns all saved cards for the authenticated user.
|
|
29
|
+
*
|
|
30
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.customer.me.paymentMethods.list()
|
|
36
|
+
*/
|
|
37
|
+
list(requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.PaymentMethod[]>;
|
|
38
|
+
private __list;
|
|
39
|
+
/**
|
|
40
|
+
* Attaches a confirmed payment method to the customer's account. If `is_default` is
|
|
41
|
+
* true, or this is the first card saved, it becomes the default payment method.
|
|
42
|
+
*
|
|
43
|
+
* @param {FiveOneEat.customer.me.StorePaymentMethodRequest} request
|
|
44
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
47
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* await client.customer.me.paymentMethods.add({
|
|
51
|
+
* payment_method: "payment_method"
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
add(request: FiveOneEat.customer.me.StorePaymentMethodRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.AddPaymentMethodsResponse>;
|
|
55
|
+
private __add;
|
|
56
|
+
/**
|
|
57
|
+
* Marks an existing saved payment method as the default.
|
|
58
|
+
*
|
|
59
|
+
* @param {FiveOneEat.customer.me.SetDefaultPaymentMethodsRequest} request
|
|
60
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
63
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* await client.customer.me.paymentMethods.setDefault({
|
|
67
|
+
* paymentMethod: "paymentMethod"
|
|
68
|
+
* })
|
|
69
|
+
*/
|
|
70
|
+
setDefault(request: FiveOneEat.customer.me.SetDefaultPaymentMethodsRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.me.SetDefaultPaymentMethodsResponse>;
|
|
71
|
+
private __setDefault;
|
|
72
|
+
/**
|
|
73
|
+
* Removes a saved payment method from the customer's account.
|
|
74
|
+
*
|
|
75
|
+
* @param {FiveOneEat.customer.me.DeletePaymentMethodsRequest} request
|
|
76
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
79
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.customer.me.paymentMethods.delete({
|
|
83
|
+
* paymentMethod: "paymentMethod"
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
delete(request: FiveOneEat.customer.me.DeletePaymentMethodsRequest, requestOptions?: PaymentMethodsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
87
|
+
private __delete;
|
|
88
|
+
}
|
package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.js
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.PaymentMethodsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
53
|
+
const FiveOneEat = __importStar(require("../../../../../../../index.js"));
|
|
54
|
+
class PaymentMethodsClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns a Stripe SetupIntent client_secret. Use this with the Stripe mobile SDK
|
|
60
|
+
* to present the payment sheet and collect card details. Once confirmed, pass the
|
|
61
|
+
* resulting payment method ID to the store endpoint.
|
|
62
|
+
*
|
|
63
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.customer.me.paymentMethods.setupIntent()
|
|
69
|
+
*/
|
|
70
|
+
setupIntent(requestOptions) {
|
|
71
|
+
return core.HttpResponsePromise.fromPromise(this.__setupIntent(requestOptions));
|
|
72
|
+
}
|
|
73
|
+
__setupIntent(requestOptions) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
77
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
|
+
const _response = yield core.fetcher({
|
|
79
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/payment-methods/setup-intent"),
|
|
80
|
+
method: "GET",
|
|
81
|
+
headers: _headers,
|
|
82
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
83
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
84
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
85
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
86
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
87
|
+
logging: this._options.logging,
|
|
88
|
+
});
|
|
89
|
+
if (_response.ok) {
|
|
90
|
+
return {
|
|
91
|
+
data: _response.body,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (_response.error.reason === "status-code") {
|
|
96
|
+
switch (_response.error.statusCode) {
|
|
97
|
+
case 401:
|
|
98
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
99
|
+
default:
|
|
100
|
+
throw new errors.FiveOneEatError({
|
|
101
|
+
statusCode: _response.error.statusCode,
|
|
102
|
+
body: _response.error.body,
|
|
103
|
+
rawResponse: _response.rawResponse,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/payment-methods/setup-intent");
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Returns all saved cards for the authenticated user.
|
|
112
|
+
*
|
|
113
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.customer.me.paymentMethods.list()
|
|
119
|
+
*/
|
|
120
|
+
list(requestOptions) {
|
|
121
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
122
|
+
}
|
|
123
|
+
__list(requestOptions) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
126
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
127
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
128
|
+
const _response = yield core.fetcher({
|
|
129
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/payment-methods"),
|
|
130
|
+
method: "GET",
|
|
131
|
+
headers: _headers,
|
|
132
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
133
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
134
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
135
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
136
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
137
|
+
logging: this._options.logging,
|
|
138
|
+
});
|
|
139
|
+
if (_response.ok) {
|
|
140
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
141
|
+
}
|
|
142
|
+
if (_response.error.reason === "status-code") {
|
|
143
|
+
switch (_response.error.statusCode) {
|
|
144
|
+
case 401:
|
|
145
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
146
|
+
default:
|
|
147
|
+
throw new errors.FiveOneEatError({
|
|
148
|
+
statusCode: _response.error.statusCode,
|
|
149
|
+
body: _response.error.body,
|
|
150
|
+
rawResponse: _response.rawResponse,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/payment-methods");
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Attaches a confirmed payment method to the customer's account. If `is_default` is
|
|
159
|
+
* true, or this is the first card saved, it becomes the default payment method.
|
|
160
|
+
*
|
|
161
|
+
* @param {FiveOneEat.customer.me.StorePaymentMethodRequest} request
|
|
162
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
165
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* await client.customer.me.paymentMethods.add({
|
|
169
|
+
* payment_method: "payment_method"
|
|
170
|
+
* })
|
|
171
|
+
*/
|
|
172
|
+
add(request, requestOptions) {
|
|
173
|
+
return core.HttpResponsePromise.fromPromise(this.__add(request, requestOptions));
|
|
174
|
+
}
|
|
175
|
+
__add(request, requestOptions) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
178
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
179
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
180
|
+
const _response = yield core.fetcher({
|
|
181
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/payment-methods"),
|
|
182
|
+
method: "POST",
|
|
183
|
+
headers: _headers,
|
|
184
|
+
contentType: "application/json",
|
|
185
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
186
|
+
requestType: "json",
|
|
187
|
+
body: request,
|
|
188
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
189
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
190
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
192
|
+
logging: this._options.logging,
|
|
193
|
+
});
|
|
194
|
+
if (_response.ok) {
|
|
195
|
+
return {
|
|
196
|
+
data: _response.body,
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (_response.error.reason === "status-code") {
|
|
201
|
+
switch (_response.error.statusCode) {
|
|
202
|
+
case 401:
|
|
203
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 422:
|
|
205
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
206
|
+
default:
|
|
207
|
+
throw new errors.FiveOneEatError({
|
|
208
|
+
statusCode: _response.error.statusCode,
|
|
209
|
+
body: _response.error.body,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/payment-methods");
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Marks an existing saved payment method as the default.
|
|
219
|
+
*
|
|
220
|
+
* @param {FiveOneEat.customer.me.SetDefaultPaymentMethodsRequest} request
|
|
221
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
222
|
+
*
|
|
223
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
224
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* await client.customer.me.paymentMethods.setDefault({
|
|
228
|
+
* paymentMethod: "paymentMethod"
|
|
229
|
+
* })
|
|
230
|
+
*/
|
|
231
|
+
setDefault(request, requestOptions) {
|
|
232
|
+
return core.HttpResponsePromise.fromPromise(this.__setDefault(request, requestOptions));
|
|
233
|
+
}
|
|
234
|
+
__setDefault(request, requestOptions) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
237
|
+
const { paymentMethod } = request;
|
|
238
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
239
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
240
|
+
const _response = yield core.fetcher({
|
|
241
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/payment-methods/${core.url.encodePathParam(paymentMethod)}/default`),
|
|
242
|
+
method: "PUT",
|
|
243
|
+
headers: _headers,
|
|
244
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
245
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
246
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
247
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
248
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
249
|
+
logging: this._options.logging,
|
|
250
|
+
});
|
|
251
|
+
if (_response.ok) {
|
|
252
|
+
return {
|
|
253
|
+
data: _response.body,
|
|
254
|
+
rawResponse: _response.rawResponse,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
if (_response.error.reason === "status-code") {
|
|
258
|
+
switch (_response.error.statusCode) {
|
|
259
|
+
case 401:
|
|
260
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
261
|
+
case 404:
|
|
262
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
263
|
+
default:
|
|
264
|
+
throw new errors.FiveOneEatError({
|
|
265
|
+
statusCode: _response.error.statusCode,
|
|
266
|
+
body: _response.error.body,
|
|
267
|
+
rawResponse: _response.rawResponse,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/customer/payment-methods/{paymentMethod}/default");
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Removes a saved payment method from the customer's account.
|
|
276
|
+
*
|
|
277
|
+
* @param {FiveOneEat.customer.me.DeletePaymentMethodsRequest} request
|
|
278
|
+
* @param {PaymentMethodsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
279
|
+
*
|
|
280
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
281
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* await client.customer.me.paymentMethods.delete({
|
|
285
|
+
* paymentMethod: "paymentMethod"
|
|
286
|
+
* })
|
|
287
|
+
*/
|
|
288
|
+
delete(request, requestOptions) {
|
|
289
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
290
|
+
}
|
|
291
|
+
__delete(request, requestOptions) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
294
|
+
const { paymentMethod } = request;
|
|
295
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
296
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
297
|
+
const _response = yield core.fetcher({
|
|
298
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/payment-methods/${core.url.encodePathParam(paymentMethod)}`),
|
|
299
|
+
method: "DELETE",
|
|
300
|
+
headers: _headers,
|
|
301
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
302
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
303
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
304
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
305
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
306
|
+
logging: this._options.logging,
|
|
307
|
+
});
|
|
308
|
+
if (_response.ok) {
|
|
309
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
310
|
+
}
|
|
311
|
+
if (_response.error.reason === "status-code") {
|
|
312
|
+
switch (_response.error.statusCode) {
|
|
313
|
+
case 401:
|
|
314
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
315
|
+
case 404:
|
|
316
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
317
|
+
default:
|
|
318
|
+
throw new errors.FiveOneEatError({
|
|
319
|
+
statusCode: _response.error.statusCode,
|
|
320
|
+
body: _response.error.body,
|
|
321
|
+
rawResponse: _response.rawResponse,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/payment-methods/{paymentMethod}");
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
exports.PaymentMethodsClient = PaymentMethodsClient;
|
package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PaymentMethodsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "PaymentMethodsClient", { enumerable: true, get: function () { return Client_js_1.PaymentMethodsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|