@onflay/node 0.3.0 → 1.0.0-staging-20261206080029
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/CHANGELOG.md +74 -0
- package/README.md +211 -48
- package/dist/chunk-4RUPPDC2.mjs +121 -0
- package/dist/chunk-4RUPPDC2.mjs.map +1 -0
- package/dist/chunk-63KSRMJG.mjs +47 -0
- package/dist/chunk-63KSRMJG.mjs.map +1 -0
- package/dist/chunk-7LYAEZCT.mjs +197 -0
- package/dist/chunk-7LYAEZCT.mjs.map +1 -0
- package/dist/chunk-A3TRCKHK.mjs +60 -0
- package/dist/chunk-A3TRCKHK.mjs.map +1 -0
- package/dist/chunk-AFAU2FH2.js +47 -0
- package/dist/chunk-AFAU2FH2.js.map +1 -0
- package/dist/chunk-DBE2YZWE.mjs +38 -0
- package/dist/chunk-DBE2YZWE.mjs.map +1 -0
- package/dist/chunk-EOHFYWFQ.mjs +154 -0
- package/dist/chunk-EOHFYWFQ.mjs.map +1 -0
- package/dist/chunk-I2IVHBFA.js +197 -0
- package/dist/chunk-I2IVHBFA.js.map +1 -0
- package/dist/chunk-J4MYKTPN.mjs +37 -0
- package/dist/chunk-J4MYKTPN.mjs.map +1 -0
- package/dist/chunk-JQPANXLV.mjs +37 -0
- package/dist/chunk-JQPANXLV.mjs.map +1 -0
- package/dist/chunk-JXP6V2P2.mjs +1057 -0
- package/dist/chunk-JXP6V2P2.mjs.map +1 -0
- package/dist/chunk-M52GW7GQ.js +1057 -0
- package/dist/chunk-M52GW7GQ.js.map +1 -0
- package/dist/chunk-MMMUKAI6.js +37 -0
- package/dist/chunk-MMMUKAI6.js.map +1 -0
- package/dist/chunk-NSR4UQLV.js +87 -0
- package/dist/chunk-NSR4UQLV.js.map +1 -0
- package/dist/chunk-SUONZUVK.js +154 -0
- package/dist/chunk-SUONZUVK.js.map +1 -0
- package/dist/chunk-T26CPULH.js +121 -0
- package/dist/chunk-T26CPULH.js.map +1 -0
- package/dist/chunk-V2XJ4GZU.js +38 -0
- package/dist/chunk-V2XJ4GZU.js.map +1 -0
- package/dist/chunk-W6AEPYUG.js +37 -0
- package/dist/chunk-W6AEPYUG.js.map +1 -0
- package/dist/chunk-YHQ7XIC6.js +60 -0
- package/dist/chunk-YHQ7XIC6.js.map +1 -0
- package/dist/chunk-YSXUZYUY.mjs +87 -0
- package/dist/chunk-YSXUZYUY.mjs.map +1 -0
- package/dist/index-C1KFW_9r.d.mts +3989 -0
- package/dist/index-C1KFW_9r.d.ts +3989 -0
- package/dist/index.d.mts +918 -0
- package/dist/index.d.ts +918 -29
- package/dist/index.js +2990 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2991 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/config.d.mts +59 -0
- package/dist/lib/config.d.ts +59 -0
- package/dist/lib/config.js +15 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/config.mjs +15 -0
- package/dist/lib/config.mjs.map +1 -0
- package/dist/lib/http.d.mts +51 -0
- package/dist/lib/http.d.ts +51 -0
- package/dist/lib/http.js +13 -0
- package/dist/lib/http.js.map +1 -0
- package/dist/lib/http.mjs +13 -0
- package/dist/lib/http.mjs.map +1 -0
- package/dist/lib/retries.d.mts +41 -0
- package/dist/lib/retries.d.ts +41 -0
- package/dist/lib/retries.js +16 -0
- package/dist/lib/retries.js.map +1 -0
- package/dist/lib/retries.mjs +16 -0
- package/dist/lib/retries.mjs.map +1 -0
- package/dist/lib/sdks.d.mts +61 -0
- package/dist/lib/sdks.d.ts +61 -0
- package/dist/lib/sdks.js +12 -0
- package/dist/lib/sdks.js.map +1 -0
- package/dist/lib/sdks.mjs +12 -0
- package/dist/lib/sdks.mjs.map +1 -0
- package/dist/models/components/index.d.mts +1 -0
- package/dist/models/components/index.d.ts +1 -0
- package/dist/models/components/index.js +1 -0
- package/dist/models/components/index.js.map +1 -0
- package/dist/models/components/index.mjs +1 -0
- package/dist/models/components/index.mjs.map +1 -0
- package/dist/models/errors/index.d.mts +161 -0
- package/dist/models/errors/index.d.ts +161 -0
- package/dist/models/errors/index.js +29 -0
- package/dist/models/errors/index.js.map +1 -0
- package/dist/models/errors/index.mjs +29 -0
- package/dist/models/errors/index.mjs.map +1 -0
- package/dist/models/operations/index.d.mts +769 -0
- package/dist/models/operations/index.d.ts +769 -0
- package/dist/models/operations/index.js +1 -0
- package/dist/models/operations/index.js.map +1 -0
- package/dist/models/operations/index.mjs +1 -0
- package/dist/models/operations/index.mjs.map +1 -0
- package/dist/types/index.d.mts +26 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/verify-tF2BsJK6.d.mts +325 -0
- package/dist/verify-tF2BsJK6.d.ts +325 -0
- package/dist/webhooks/express.d.mts +39 -0
- package/dist/webhooks/express.d.ts +39 -0
- package/dist/webhooks/express.js +10 -0
- package/dist/webhooks/express.js.map +1 -0
- package/dist/webhooks/express.mjs +10 -0
- package/dist/webhooks/express.mjs.map +1 -0
- package/dist/webhooks/hono.d.mts +33 -0
- package/dist/webhooks/hono.d.ts +33 -0
- package/dist/webhooks/hono.js +10 -0
- package/dist/webhooks/hono.js.map +1 -0
- package/dist/webhooks/hono.mjs +10 -0
- package/dist/webhooks/hono.mjs.map +1 -0
- package/dist/webhooks/index.d.mts +34 -0
- package/dist/webhooks/index.d.ts +34 -0
- package/dist/webhooks/index.js +75 -0
- package/dist/webhooks/index.js.map +1 -0
- package/dist/webhooks/index.mjs +75 -0
- package/dist/webhooks/index.mjs.map +1 -0
- package/dist/webhooks/next.d.mts +38 -0
- package/dist/webhooks/next.d.ts +38 -0
- package/dist/webhooks/next.js +10 -0
- package/dist/webhooks/next.js.map +1 -0
- package/dist/webhooks/next.mjs +10 -0
- package/dist/webhooks/next.mjs.map +1 -0
- package/package.json +273 -14
- package/dist/client.d.ts +0 -65
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -216
- package/dist/client.js.map +0 -1
- package/dist/errors.d.ts +0 -61
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -134
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/onflay.d.ts +0 -44
- package/dist/onflay.d.ts.map +0 -1
- package/dist/onflay.js +0 -63
- package/dist/onflay.js.map +0 -1
- package/dist/pagination.d.ts +0 -19
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js +0 -61
- package/dist/pagination.js.map +0 -1
- package/dist/resources/checkout-sessions.d.ts +0 -11
- package/dist/resources/checkout-sessions.d.ts.map +0 -1
- package/dist/resources/checkout-sessions.js +0 -20
- package/dist/resources/checkout-sessions.js.map +0 -1
- package/dist/resources/customers.d.ts +0 -17
- package/dist/resources/customers.d.ts.map +0 -1
- package/dist/resources/customers.js +0 -39
- package/dist/resources/customers.js.map +0 -1
- package/dist/resources/invoices.d.ts +0 -60
- package/dist/resources/invoices.d.ts.map +0 -1
- package/dist/resources/invoices.js +0 -69
- package/dist/resources/invoices.js.map +0 -1
- package/dist/resources/payments.d.ts +0 -11
- package/dist/resources/payments.d.ts.map +0 -1
- package/dist/resources/payments.js +0 -27
- package/dist/resources/payments.js.map +0 -1
- package/dist/resources/prices.d.ts +0 -24
- package/dist/resources/prices.d.ts.map +0 -1
- package/dist/resources/prices.js +0 -46
- package/dist/resources/prices.js.map +0 -1
- package/dist/resources/products.d.ts +0 -18
- package/dist/resources/products.d.ts.map +0 -1
- package/dist/resources/products.js +0 -40
- package/dist/resources/products.js.map +0 -1
- package/dist/resources/subscriptions.d.ts +0 -39
- package/dist/resources/subscriptions.d.ts.map +0 -1
- package/dist/resources/subscriptions.js +0 -62
- package/dist/resources/subscriptions.js.map +0 -1
- package/dist/resources/usage.d.ts +0 -26
- package/dist/resources/usage.d.ts.map +0 -1
- package/dist/resources/usage.js +0 -43
- package/dist/resources/usage.js.map +0 -1
- package/dist/resources/webhook-endpoints.d.ts +0 -20
- package/dist/resources/webhook-endpoints.d.ts.map +0 -1
- package/dist/resources/webhook-endpoints.js +0 -47
- package/dist/resources/webhook-endpoints.js.map +0 -1
- package/dist/types/checkout-sessions.d.ts +0 -67
- package/dist/types/checkout-sessions.d.ts.map +0 -1
- package/dist/types/checkout-sessions.js +0 -3
- package/dist/types/checkout-sessions.js.map +0 -1
- package/dist/types/customers.d.ts +0 -28
- package/dist/types/customers.d.ts.map +0 -1
- package/dist/types/customers.js +0 -3
- package/dist/types/customers.js.map +0 -1
- package/dist/types/events.d.ts +0 -118
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -28
- package/dist/types/events.js.map +0 -1
- package/dist/types/invoices.d.ts +0 -65
- package/dist/types/invoices.d.ts.map +0 -1
- package/dist/types/invoices.js +0 -3
- package/dist/types/invoices.js.map +0 -1
- package/dist/types/payments.d.ts +0 -25
- package/dist/types/payments.d.ts.map +0 -1
- package/dist/types/payments.js +0 -3
- package/dist/types/payments.js.map +0 -1
- package/dist/types/prices.d.ts +0 -57
- package/dist/types/prices.d.ts.map +0 -1
- package/dist/types/prices.js +0 -3
- package/dist/types/prices.js.map +0 -1
- package/dist/types/products.d.ts +0 -29
- package/dist/types/products.d.ts.map +0 -1
- package/dist/types/products.js +0 -3
- package/dist/types/products.js.map +0 -1
- package/dist/types/shared.d.ts +0 -34
- package/dist/types/shared.d.ts.map +0 -1
- package/dist/types/shared.js +0 -4
- package/dist/types/shared.js.map +0 -1
- package/dist/types/subscriptions.d.ts +0 -85
- package/dist/types/subscriptions.d.ts.map +0 -1
- package/dist/types/subscriptions.js +0 -3
- package/dist/types/subscriptions.js.map +0 -1
- package/dist/types/usage.d.ts +0 -35
- package/dist/types/usage.d.ts.map +0 -1
- package/dist/types/usage.js +0 -3
- package/dist/types/usage.js.map +0 -1
- package/dist/types/webhook-endpoints.d.ts +0 -48
- package/dist/types/webhook-endpoints.d.ts.map +0 -1
- package/dist/types/webhook-endpoints.js +0 -3
- package/dist/types/webhook-endpoints.js.map +0 -1
- package/dist/version.d.ts +0 -4
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -7
- package/dist/version.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,43 +1,2991 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkM52GW7GQjs = require('./chunk-M52GW7GQ.js');
|
|
6
|
+
require('./chunk-SUONZUVK.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkYHQ7XIC6js = require('./chunk-YHQ7XIC6.js');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkNSR4UQLVjs = require('./chunk-NSR4UQLV.js');
|
|
17
|
+
require('./chunk-T26CPULH.js');
|
|
18
|
+
require('./chunk-V2XJ4GZU.js');
|
|
19
|
+
|
|
20
|
+
// src/generated/hey-api/client.gen.ts
|
|
21
|
+
var client = _chunkM52GW7GQjs.createClient.call(void 0, _chunkM52GW7GQjs.createConfig.call(void 0, { baseUrl: "https://api.onflay.com" }));
|
|
22
|
+
|
|
23
|
+
// src/generated/hey-api/transformers.gen.ts
|
|
24
|
+
var catalogProductSummarySchemaResponseTransformer = (data) => {
|
|
25
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
var catalogProductListSchemaResponseTransformer = (data) => {
|
|
29
|
+
data.data = data.data.map((item) => catalogProductSummarySchemaResponseTransformer(item));
|
|
30
|
+
return data;
|
|
31
|
+
};
|
|
32
|
+
var catalogListResponseTransformer = async (data) => {
|
|
33
|
+
data = catalogProductListSchemaResponseTransformer(data);
|
|
34
|
+
return data;
|
|
35
|
+
};
|
|
36
|
+
var listingRecipeSchemaResponseTransformer = (data) => {
|
|
37
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
var integrationGuideSchemaResponseTransformer = (data) => {
|
|
41
|
+
data.recipe = listingRecipeSchemaResponseTransformer(data.recipe);
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
var catalogListingsRetrieveIntegrationGuideResponseTransformer = async (data) => {
|
|
45
|
+
data = integrationGuideSchemaResponseTransformer(data);
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
var catalogListingsRetrieveRecipeResponseTransformer = async (data) => {
|
|
49
|
+
data = listingRecipeSchemaResponseTransformer(data);
|
|
50
|
+
return data;
|
|
51
|
+
};
|
|
52
|
+
var catalogProductSchemaResponseTransformer = (data) => {
|
|
53
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
var catalogProductsRetrieveResponseTransformer = async (data) => {
|
|
57
|
+
data = catalogProductSchemaResponseTransformer(data);
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
var catalogProductsUpsertResponseTransformer = async (data) => {
|
|
61
|
+
data = catalogProductSchemaResponseTransformer(data);
|
|
62
|
+
return data;
|
|
63
|
+
};
|
|
64
|
+
var catalogPlansUpsertResponseTransformer = async (data) => {
|
|
65
|
+
data = catalogProductSchemaResponseTransformer(data);
|
|
66
|
+
return data;
|
|
67
|
+
};
|
|
68
|
+
var checkoutSessionSchemaResponseTransformer = (data) => {
|
|
69
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
70
|
+
data.createdAt = new Date(data.createdAt);
|
|
71
|
+
return data;
|
|
72
|
+
};
|
|
73
|
+
var checkoutSessionsRetrieveResponseTransformer = async (data) => {
|
|
74
|
+
data = checkoutSessionSchemaResponseTransformer(data);
|
|
75
|
+
return data;
|
|
76
|
+
};
|
|
77
|
+
var customerAccessActivePlanSchemaResponseTransformer = (data) => {
|
|
78
|
+
if (data.currentPeriodEnd) {
|
|
79
|
+
data.currentPeriodEnd = new Date(data.currentPeriodEnd);
|
|
80
|
+
}
|
|
81
|
+
if (data.accessUntil) {
|
|
82
|
+
data.accessUntil = new Date(data.accessUntil);
|
|
83
|
+
}
|
|
84
|
+
if (data.trialEndsAt) {
|
|
85
|
+
data.trialEndsAt = new Date(data.trialEndsAt);
|
|
86
|
+
}
|
|
87
|
+
return data;
|
|
88
|
+
};
|
|
89
|
+
var customerAccessOwnedProductSchemaResponseTransformer = (data) => {
|
|
90
|
+
data.purchasedAt = new Date(data.purchasedAt);
|
|
91
|
+
return data;
|
|
92
|
+
};
|
|
93
|
+
var customerAccessTicketSchemaResponseTransformer = (data) => {
|
|
94
|
+
if (data.startsAt) {
|
|
95
|
+
data.startsAt = new Date(data.startsAt);
|
|
96
|
+
}
|
|
97
|
+
if (data.endsAt) {
|
|
98
|
+
data.endsAt = new Date(data.endsAt);
|
|
99
|
+
}
|
|
100
|
+
if (data.checkedInAt) {
|
|
101
|
+
data.checkedInAt = new Date(data.checkedInAt);
|
|
102
|
+
}
|
|
103
|
+
return data;
|
|
104
|
+
};
|
|
105
|
+
var customerAccessBookingSchemaResponseTransformer = (data) => {
|
|
106
|
+
data.startsAt = new Date(data.startsAt);
|
|
107
|
+
data.endsAt = new Date(data.endsAt);
|
|
108
|
+
return data;
|
|
109
|
+
};
|
|
110
|
+
var customerAccessCreditSchemaResponseTransformer = (data) => {
|
|
111
|
+
if (data.expiresSoonest) {
|
|
112
|
+
data.expiresSoonest = new Date(data.expiresSoonest);
|
|
113
|
+
}
|
|
114
|
+
return data;
|
|
115
|
+
};
|
|
116
|
+
var customerAccessLicenseKeySchemaResponseTransformer = (data) => {
|
|
117
|
+
if (data.expiresAt) {
|
|
118
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
119
|
+
}
|
|
120
|
+
return data;
|
|
121
|
+
};
|
|
122
|
+
var customerAccessSchemaResponseTransformer = (data) => {
|
|
123
|
+
data.activePlans = data.activePlans.map((item) => customerAccessActivePlanSchemaResponseTransformer(item));
|
|
124
|
+
data.ownedProducts = data.ownedProducts.map((item) => customerAccessOwnedProductSchemaResponseTransformer(item));
|
|
125
|
+
data.tickets = data.tickets.map((item) => customerAccessTicketSchemaResponseTransformer(item));
|
|
126
|
+
data.bookings = data.bookings.map((item) => customerAccessBookingSchemaResponseTransformer(item));
|
|
127
|
+
data.credits = data.credits.map((item) => customerAccessCreditSchemaResponseTransformer(item));
|
|
128
|
+
data.licenseKeys = data.licenseKeys.map((item) => customerAccessLicenseKeySchemaResponseTransformer(item));
|
|
129
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
130
|
+
return data;
|
|
131
|
+
};
|
|
132
|
+
var checkoutReceiptSchemaResponseTransformer = (data) => {
|
|
133
|
+
if (data.access) {
|
|
134
|
+
data.access = customerAccessSchemaResponseTransformer(data.access);
|
|
135
|
+
}
|
|
136
|
+
return data;
|
|
137
|
+
};
|
|
138
|
+
var checkoutSessionsRetrieveReceiptResponseTransformer = async (data) => {
|
|
139
|
+
data = checkoutReceiptSchemaResponseTransformer(data);
|
|
140
|
+
return data;
|
|
141
|
+
};
|
|
142
|
+
var creditLedgerEntrySchemaResponseTransformer = (data) => {
|
|
143
|
+
data.createdAt = new Date(data.createdAt);
|
|
144
|
+
return data;
|
|
145
|
+
};
|
|
146
|
+
var creditOperationSchemaResponseTransformer = (data) => {
|
|
147
|
+
data.entry = creditLedgerEntrySchemaResponseTransformer(data.entry);
|
|
148
|
+
return data;
|
|
149
|
+
};
|
|
150
|
+
var creditsAdjustResponseTransformer = async (data) => {
|
|
151
|
+
data = creditOperationSchemaResponseTransformer(data);
|
|
152
|
+
return data;
|
|
153
|
+
};
|
|
154
|
+
var creditsConsumeResponseTransformer = async (data) => {
|
|
155
|
+
data = creditOperationSchemaResponseTransformer(data);
|
|
156
|
+
return data;
|
|
157
|
+
};
|
|
158
|
+
var creditBalanceSchemaResponseTransformer = (data) => {
|
|
159
|
+
if (data.expiresSoonest) {
|
|
160
|
+
data.expiresSoonest = new Date(data.expiresSoonest);
|
|
161
|
+
}
|
|
162
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
163
|
+
return data;
|
|
164
|
+
};
|
|
165
|
+
var creditBalancesSchemaResponseTransformer = (data) => {
|
|
166
|
+
data.balances = data.balances.map((item) => creditBalanceSchemaResponseTransformer(item));
|
|
167
|
+
return data;
|
|
168
|
+
};
|
|
169
|
+
var creditsRetrieveResponseTransformer = async (data) => {
|
|
170
|
+
data = creditBalancesSchemaResponseTransformer(data);
|
|
171
|
+
return data;
|
|
172
|
+
};
|
|
173
|
+
var creditLedgerEntryListSchemaResponseTransformer = (data) => {
|
|
174
|
+
data.data = data.data.map((item) => creditLedgerEntrySchemaResponseTransformer(item));
|
|
175
|
+
return data;
|
|
176
|
+
};
|
|
177
|
+
var creditsListLedgerResponseTransformer = async (data) => {
|
|
178
|
+
data = creditLedgerEntryListSchemaResponseTransformer(data);
|
|
179
|
+
return data;
|
|
180
|
+
};
|
|
181
|
+
var customerAccessRetrieveResponseTransformer = async (data) => {
|
|
182
|
+
data = customerAccessSchemaResponseTransformer(data);
|
|
183
|
+
return data;
|
|
184
|
+
};
|
|
185
|
+
var customerSchemaResponseTransformer = (data) => {
|
|
186
|
+
data.createdAt = new Date(data.createdAt);
|
|
187
|
+
return data;
|
|
188
|
+
};
|
|
189
|
+
var customerListSchemaResponseTransformer = (data) => {
|
|
190
|
+
data.data = data.data.map((item) => customerSchemaResponseTransformer(item));
|
|
191
|
+
return data;
|
|
192
|
+
};
|
|
193
|
+
var customersListResponseTransformer = async (data) => {
|
|
194
|
+
data = customerListSchemaResponseTransformer(data);
|
|
195
|
+
return data;
|
|
196
|
+
};
|
|
197
|
+
var customersCreateResponseTransformer = async (data) => {
|
|
198
|
+
data = customerSchemaResponseTransformer(data);
|
|
199
|
+
return data;
|
|
200
|
+
};
|
|
201
|
+
var customersRetrieveResponseTransformer = async (data) => {
|
|
202
|
+
data = customerSchemaResponseTransformer(data);
|
|
203
|
+
return data;
|
|
204
|
+
};
|
|
205
|
+
var customersUpdateResponseTransformer = async (data) => {
|
|
206
|
+
data = customerSchemaResponseTransformer(data);
|
|
207
|
+
return data;
|
|
208
|
+
};
|
|
209
|
+
var paymentMethodSchemaResponseTransformer = (data) => {
|
|
210
|
+
data.createdAt = new Date(data.createdAt);
|
|
211
|
+
return data;
|
|
212
|
+
};
|
|
213
|
+
var customersListPaymentMethodsResponseTransformer = async (data) => {
|
|
214
|
+
data.data = data.data.map((item) => paymentMethodSchemaResponseTransformer(item));
|
|
215
|
+
return data;
|
|
216
|
+
};
|
|
217
|
+
var discountSchemaResponseTransformer = (data) => {
|
|
218
|
+
data.startsAt = new Date(data.startsAt);
|
|
219
|
+
if (data.expiresAt) {
|
|
220
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
221
|
+
}
|
|
222
|
+
data.createdAt = new Date(data.createdAt);
|
|
223
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
224
|
+
return data;
|
|
225
|
+
};
|
|
226
|
+
var discountListSchemaResponseTransformer = (data) => {
|
|
227
|
+
data.data = data.data.map((item) => discountSchemaResponseTransformer(item));
|
|
228
|
+
return data;
|
|
229
|
+
};
|
|
230
|
+
var discountsListResponseTransformer = async (data) => {
|
|
231
|
+
data = discountListSchemaResponseTransformer(data);
|
|
232
|
+
return data;
|
|
233
|
+
};
|
|
234
|
+
var discountsCreateResponseTransformer = async (data) => {
|
|
235
|
+
data = discountSchemaResponseTransformer(data);
|
|
236
|
+
return data;
|
|
237
|
+
};
|
|
238
|
+
var discountsRetrieveResponseTransformer = async (data) => {
|
|
239
|
+
data = discountSchemaResponseTransformer(data);
|
|
240
|
+
return data;
|
|
241
|
+
};
|
|
242
|
+
var discountsUpdateResponseTransformer = async (data) => {
|
|
243
|
+
data = discountSchemaResponseTransformer(data);
|
|
244
|
+
return data;
|
|
245
|
+
};
|
|
246
|
+
var discountsDeactivateResponseTransformer = async (data) => {
|
|
247
|
+
data = discountSchemaResponseTransformer(data);
|
|
248
|
+
return data;
|
|
249
|
+
};
|
|
250
|
+
var integrationVerificationSchemaResponseTransformer = (data) => {
|
|
251
|
+
data.verifiedAt = new Date(data.verifiedAt);
|
|
252
|
+
data.createdAt = new Date(data.createdAt);
|
|
253
|
+
return data;
|
|
254
|
+
};
|
|
255
|
+
var integrationVerificationsCreateResponseTransformer = async (data) => {
|
|
256
|
+
data = integrationVerificationSchemaResponseTransformer(data);
|
|
257
|
+
return data;
|
|
258
|
+
};
|
|
259
|
+
var integrationVerificationListSchemaResponseTransformer = (data) => {
|
|
260
|
+
data.data = data.data.map((item) => integrationVerificationSchemaResponseTransformer(item));
|
|
261
|
+
return data;
|
|
262
|
+
};
|
|
263
|
+
var integrationVerificationsListForListingResponseTransformer = async (data) => {
|
|
264
|
+
data = integrationVerificationListSchemaResponseTransformer(data);
|
|
265
|
+
return data;
|
|
266
|
+
};
|
|
267
|
+
var invoiceSchemaResponseTransformer = (data) => {
|
|
268
|
+
if (data.periodStart) {
|
|
269
|
+
data.periodStart = new Date(data.periodStart);
|
|
270
|
+
}
|
|
271
|
+
if (data.periodEnd) {
|
|
272
|
+
data.periodEnd = new Date(data.periodEnd);
|
|
273
|
+
}
|
|
274
|
+
data.createdAt = new Date(data.createdAt);
|
|
275
|
+
return data;
|
|
276
|
+
};
|
|
277
|
+
var invoiceListSchemaResponseTransformer = (data) => {
|
|
278
|
+
data.data = data.data.map((item) => invoiceSchemaResponseTransformer(item));
|
|
279
|
+
return data;
|
|
280
|
+
};
|
|
281
|
+
var invoicesListResponseTransformer = async (data) => {
|
|
282
|
+
data = invoiceListSchemaResponseTransformer(data);
|
|
283
|
+
return data;
|
|
284
|
+
};
|
|
285
|
+
var invoicesCreateResponseTransformer = async (data) => {
|
|
286
|
+
data = invoiceSchemaResponseTransformer(data);
|
|
287
|
+
return data;
|
|
288
|
+
};
|
|
289
|
+
var invoicesRetrieveResponseTransformer = async (data) => {
|
|
290
|
+
data = invoiceSchemaResponseTransformer(data);
|
|
291
|
+
return data;
|
|
292
|
+
};
|
|
293
|
+
var licenseKeyActivationSchemaResponseTransformer = (data) => {
|
|
294
|
+
data.activatedAt = new Date(data.activatedAt);
|
|
295
|
+
return data;
|
|
296
|
+
};
|
|
297
|
+
var licenseKeySchemaResponseTransformer = (data) => {
|
|
298
|
+
data.activations = data.activations.map((item) => licenseKeyActivationSchemaResponseTransformer(item));
|
|
299
|
+
if (data.expiresAt) {
|
|
300
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
301
|
+
}
|
|
302
|
+
if (data.revokedAt) {
|
|
303
|
+
data.revokedAt = new Date(data.revokedAt);
|
|
304
|
+
}
|
|
305
|
+
data.createdAt = new Date(data.createdAt);
|
|
306
|
+
return data;
|
|
307
|
+
};
|
|
308
|
+
var licenseKeyListSchemaResponseTransformer = (data) => {
|
|
309
|
+
data.data = data.data.map((item) => licenseKeySchemaResponseTransformer(item));
|
|
310
|
+
return data;
|
|
311
|
+
};
|
|
312
|
+
var licenseKeysListResponseTransformer = async (data) => {
|
|
313
|
+
data = licenseKeyListSchemaResponseTransformer(data);
|
|
314
|
+
return data;
|
|
315
|
+
};
|
|
316
|
+
var licenseKeyStatusSchemaResponseTransformer = (data) => {
|
|
317
|
+
if (data.expiresAt) {
|
|
318
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
319
|
+
}
|
|
320
|
+
return data;
|
|
321
|
+
};
|
|
322
|
+
var licenseKeysActivateResponseTransformer = async (data) => {
|
|
323
|
+
data = licenseKeyStatusSchemaResponseTransformer(data);
|
|
324
|
+
return data;
|
|
325
|
+
};
|
|
326
|
+
var licenseKeysDeactivateResponseTransformer = async (data) => {
|
|
327
|
+
data = licenseKeyStatusSchemaResponseTransformer(data);
|
|
328
|
+
return data;
|
|
329
|
+
};
|
|
330
|
+
var licenseKeysValidateResponseTransformer = async (data) => {
|
|
331
|
+
data = licenseKeyStatusSchemaResponseTransformer(data);
|
|
332
|
+
return data;
|
|
333
|
+
};
|
|
334
|
+
var licenseKeysRetrieveResponseTransformer = async (data) => {
|
|
335
|
+
data = licenseKeySchemaResponseTransformer(data);
|
|
336
|
+
return data;
|
|
337
|
+
};
|
|
338
|
+
var licenseKeysRevokeResponseTransformer = async (data) => {
|
|
339
|
+
data = licenseKeySchemaResponseTransformer(data);
|
|
340
|
+
return data;
|
|
341
|
+
};
|
|
342
|
+
var meterSchemaResponseTransformer = (data) => {
|
|
343
|
+
data.createdAt = new Date(data.createdAt);
|
|
344
|
+
return data;
|
|
345
|
+
};
|
|
346
|
+
var metersListResponseTransformer = async (data) => {
|
|
347
|
+
data.data = data.data.map((item) => meterSchemaResponseTransformer(item));
|
|
348
|
+
return data;
|
|
349
|
+
};
|
|
350
|
+
var metersCreateResponseTransformer = async (data) => {
|
|
351
|
+
data = meterSchemaResponseTransformer(data);
|
|
352
|
+
return data;
|
|
353
|
+
};
|
|
354
|
+
var paymentConfirmationSchemaResponseTransformer = (data) => {
|
|
355
|
+
data.expiresAt = new Date(data.expiresAt);
|
|
356
|
+
return data;
|
|
357
|
+
};
|
|
358
|
+
var paymentConfirmationsRetrieveResponseTransformer = async (data) => {
|
|
359
|
+
data = paymentConfirmationSchemaResponseTransformer(data);
|
|
360
|
+
return data;
|
|
361
|
+
};
|
|
362
|
+
var paymentSchemaResponseTransformer = (data) => {
|
|
363
|
+
data.createdAt = new Date(data.createdAt);
|
|
364
|
+
return data;
|
|
365
|
+
};
|
|
366
|
+
var paymentListSchemaResponseTransformer = (data) => {
|
|
367
|
+
data.data = data.data.map((item) => paymentSchemaResponseTransformer(item));
|
|
368
|
+
return data;
|
|
369
|
+
};
|
|
370
|
+
var paymentsListResponseTransformer = async (data) => {
|
|
371
|
+
data = paymentListSchemaResponseTransformer(data);
|
|
372
|
+
return data;
|
|
373
|
+
};
|
|
374
|
+
var paymentsCreateResponseTransformer = async (data) => {
|
|
375
|
+
data = paymentSchemaResponseTransformer(data);
|
|
376
|
+
return data;
|
|
377
|
+
};
|
|
378
|
+
var paymentsRetrieveResponseTransformer = async (data) => {
|
|
379
|
+
data = paymentSchemaResponseTransformer(data);
|
|
380
|
+
return data;
|
|
381
|
+
};
|
|
382
|
+
var refundSchemaResponseTransformer = (data) => {
|
|
383
|
+
data.createdAt = new Date(data.createdAt);
|
|
384
|
+
return data;
|
|
385
|
+
};
|
|
386
|
+
var refundListSchemaResponseTransformer = (data) => {
|
|
387
|
+
data.data = data.data.map((item) => refundSchemaResponseTransformer(item));
|
|
388
|
+
return data;
|
|
389
|
+
};
|
|
390
|
+
var paymentsRefundsListResponseTransformer = async (data) => {
|
|
391
|
+
data = refundListSchemaResponseTransformer(data);
|
|
392
|
+
return data;
|
|
393
|
+
};
|
|
394
|
+
var paymentsRefundsCreateResponseTransformer = async (data) => {
|
|
395
|
+
data = refundSchemaResponseTransformer(data);
|
|
396
|
+
return data;
|
|
397
|
+
};
|
|
398
|
+
var paymentsRefundsRetrieveResponseTransformer = async (data) => {
|
|
399
|
+
data = refundSchemaResponseTransformer(data);
|
|
400
|
+
return data;
|
|
401
|
+
};
|
|
402
|
+
var priceSchemaResponseTransformer = (data) => {
|
|
403
|
+
data.createdAt = new Date(data.createdAt);
|
|
404
|
+
return data;
|
|
405
|
+
};
|
|
406
|
+
var priceListSchemaResponseTransformer = (data) => {
|
|
407
|
+
data.data = data.data.map((item) => priceSchemaResponseTransformer(item));
|
|
408
|
+
return data;
|
|
409
|
+
};
|
|
410
|
+
var pricesListResponseTransformer = async (data) => {
|
|
411
|
+
data = priceListSchemaResponseTransformer(data);
|
|
412
|
+
return data;
|
|
413
|
+
};
|
|
414
|
+
var pricesCreateResponseTransformer = async (data) => {
|
|
415
|
+
data = priceSchemaResponseTransformer(data);
|
|
416
|
+
return data;
|
|
417
|
+
};
|
|
418
|
+
var pricesRetrieveResponseTransformer = async (data) => {
|
|
419
|
+
data = priceSchemaResponseTransformer(data);
|
|
420
|
+
return data;
|
|
421
|
+
};
|
|
422
|
+
var pricesUpdateResponseTransformer = async (data) => {
|
|
423
|
+
data = priceSchemaResponseTransformer(data);
|
|
424
|
+
return data;
|
|
425
|
+
};
|
|
426
|
+
var productSchemaResponseTransformer = (data) => {
|
|
427
|
+
data.createdAt = new Date(data.createdAt);
|
|
428
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
429
|
+
return data;
|
|
430
|
+
};
|
|
431
|
+
var productListSchemaResponseTransformer = (data) => {
|
|
432
|
+
data.data = data.data.map((item) => productSchemaResponseTransformer(item));
|
|
433
|
+
return data;
|
|
434
|
+
};
|
|
435
|
+
var productsListResponseTransformer = async (data) => {
|
|
436
|
+
data = productListSchemaResponseTransformer(data);
|
|
437
|
+
return data;
|
|
438
|
+
};
|
|
439
|
+
var productsCreateResponseTransformer = async (data) => {
|
|
440
|
+
data = productSchemaResponseTransformer(data);
|
|
441
|
+
return data;
|
|
442
|
+
};
|
|
443
|
+
var productsRetrieveResponseTransformer = async (data) => {
|
|
444
|
+
data = productSchemaResponseTransformer(data);
|
|
445
|
+
return data;
|
|
446
|
+
};
|
|
447
|
+
var productsUpdateResponseTransformer = async (data) => {
|
|
448
|
+
data = productSchemaResponseTransformer(data);
|
|
449
|
+
return data;
|
|
450
|
+
};
|
|
451
|
+
var subscriptionPendingChangeSchemaResponseTransformer = (data) => {
|
|
452
|
+
data.effectiveAt = new Date(data.effectiveAt);
|
|
453
|
+
data.requestedAt = new Date(data.requestedAt);
|
|
454
|
+
return data;
|
|
455
|
+
};
|
|
456
|
+
var subscriptionSchemaResponseTransformer = (data) => {
|
|
457
|
+
data.currentPeriodStart = new Date(data.currentPeriodStart);
|
|
458
|
+
data.currentPeriodEnd = new Date(data.currentPeriodEnd);
|
|
459
|
+
if (data.canceledAt) {
|
|
460
|
+
data.canceledAt = new Date(data.canceledAt);
|
|
461
|
+
}
|
|
462
|
+
if (data.pendingChange) {
|
|
463
|
+
data.pendingChange = subscriptionPendingChangeSchemaResponseTransformer(data.pendingChange);
|
|
464
|
+
}
|
|
465
|
+
if (data.trialEndsAt) {
|
|
466
|
+
data.trialEndsAt = new Date(data.trialEndsAt);
|
|
467
|
+
}
|
|
468
|
+
data.createdAt = new Date(data.createdAt);
|
|
469
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
470
|
+
return data;
|
|
471
|
+
};
|
|
472
|
+
var subscriptionListSchemaResponseTransformer = (data) => {
|
|
473
|
+
data.data = data.data.map((item) => subscriptionSchemaResponseTransformer(item));
|
|
474
|
+
return data;
|
|
475
|
+
};
|
|
476
|
+
var subscriptionsListResponseTransformer = async (data) => {
|
|
477
|
+
data = subscriptionListSchemaResponseTransformer(data);
|
|
478
|
+
return data;
|
|
479
|
+
};
|
|
480
|
+
var subscriptionCancellationSchemaResponseTransformer = (data) => {
|
|
481
|
+
if (data.canceledAt) {
|
|
482
|
+
data.canceledAt = new Date(data.canceledAt);
|
|
483
|
+
}
|
|
484
|
+
data.currentPeriodEnd = new Date(data.currentPeriodEnd);
|
|
485
|
+
if (data.accessUntil) {
|
|
486
|
+
data.accessUntil = new Date(data.accessUntil);
|
|
487
|
+
}
|
|
488
|
+
data.subscription = subscriptionSchemaResponseTransformer(data.subscription);
|
|
489
|
+
return data;
|
|
490
|
+
};
|
|
491
|
+
var subscriptionsCancelByExternalCustomerResponseTransformer = async (data) => {
|
|
492
|
+
data = subscriptionCancellationSchemaResponseTransformer(data);
|
|
493
|
+
return data;
|
|
494
|
+
};
|
|
495
|
+
var subscriptionsUncancelByExternalCustomerResponseTransformer = async (data) => {
|
|
496
|
+
data = subscriptionSchemaResponseTransformer(data);
|
|
497
|
+
return data;
|
|
498
|
+
};
|
|
499
|
+
var subscriptionsRetrieveResponseTransformer = async (data) => {
|
|
500
|
+
data = subscriptionSchemaResponseTransformer(data);
|
|
501
|
+
return data;
|
|
502
|
+
};
|
|
503
|
+
var subscriptionsCancelResponseTransformer = async (data) => {
|
|
504
|
+
data = subscriptionCancellationSchemaResponseTransformer(data);
|
|
505
|
+
return data;
|
|
506
|
+
};
|
|
507
|
+
var subscriptionUpdatePreviewNextInvoiceSchemaResponseTransformer = (data) => {
|
|
508
|
+
data.date = new Date(data.date);
|
|
509
|
+
return data;
|
|
510
|
+
};
|
|
511
|
+
var subscriptionUpdatePreviewLineSchemaResponseTransformer = (data) => {
|
|
512
|
+
data.periodStart = new Date(data.periodStart);
|
|
513
|
+
data.periodEnd = new Date(data.periodEnd);
|
|
514
|
+
return data;
|
|
515
|
+
};
|
|
516
|
+
var subscriptionUpdatePreviewSchemaResponseTransformer = (data) => {
|
|
517
|
+
data.nextInvoice = subscriptionUpdatePreviewNextInvoiceSchemaResponseTransformer(data.nextInvoice);
|
|
518
|
+
data.lines = data.lines.map((item) => subscriptionUpdatePreviewLineSchemaResponseTransformer(item));
|
|
519
|
+
return data;
|
|
520
|
+
};
|
|
521
|
+
var subscriptionsPreviewUpdateResponseTransformer = async (data) => {
|
|
522
|
+
data = subscriptionUpdatePreviewSchemaResponseTransformer(data);
|
|
523
|
+
return data;
|
|
524
|
+
};
|
|
525
|
+
var usageBillingPlanSchemaResponseTransformer = (data) => {
|
|
526
|
+
data.createdAt = new Date(data.createdAt);
|
|
527
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
528
|
+
return data;
|
|
529
|
+
};
|
|
530
|
+
var usageBillingPlansCreateResponseTransformer = async (data) => {
|
|
531
|
+
data = usageBillingPlanSchemaResponseTransformer(data);
|
|
532
|
+
return data;
|
|
533
|
+
};
|
|
534
|
+
var usageBillingPlansRetrieveResponseTransformer = async (data) => {
|
|
535
|
+
data = usageBillingPlanSchemaResponseTransformer(data);
|
|
536
|
+
return data;
|
|
537
|
+
};
|
|
538
|
+
var webhookDeliverySchemaResponseTransformer = (data) => {
|
|
539
|
+
if (data.lastAttemptAt) {
|
|
540
|
+
data.lastAttemptAt = new Date(data.lastAttemptAt);
|
|
541
|
+
}
|
|
542
|
+
if (data.nextRetryAt) {
|
|
543
|
+
data.nextRetryAt = new Date(data.nextRetryAt);
|
|
544
|
+
}
|
|
545
|
+
data.createdAt = new Date(data.createdAt);
|
|
546
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
547
|
+
return data;
|
|
548
|
+
};
|
|
549
|
+
var webhookDeliveryListSchemaResponseTransformer = (data) => {
|
|
550
|
+
data.data = data.data.map((item) => webhookDeliverySchemaResponseTransformer(item));
|
|
551
|
+
return data;
|
|
552
|
+
};
|
|
553
|
+
var webhookDeliveriesListResponseTransformer = async (data) => {
|
|
554
|
+
data = webhookDeliveryListSchemaResponseTransformer(data);
|
|
555
|
+
return data;
|
|
556
|
+
};
|
|
557
|
+
var webhookDeliveriesRetrieveResponseTransformer = async (data) => {
|
|
558
|
+
data = webhookDeliverySchemaResponseTransformer(data);
|
|
559
|
+
return data;
|
|
560
|
+
};
|
|
561
|
+
var webhookDeliveriesResendResponseTransformer = async (data) => {
|
|
562
|
+
data = webhookDeliverySchemaResponseTransformer(data);
|
|
563
|
+
return data;
|
|
564
|
+
};
|
|
565
|
+
var webhookEndpointSchemaResponseTransformer = (data) => {
|
|
566
|
+
if (data.disabledAt) {
|
|
567
|
+
data.disabledAt = new Date(data.disabledAt);
|
|
568
|
+
}
|
|
569
|
+
data.createdAt = new Date(data.createdAt);
|
|
570
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
571
|
+
return data;
|
|
572
|
+
};
|
|
573
|
+
var webhookEndpointListSchemaResponseTransformer = (data) => {
|
|
574
|
+
data.data = data.data.map((item) => webhookEndpointSchemaResponseTransformer(item));
|
|
575
|
+
return data;
|
|
576
|
+
};
|
|
577
|
+
var webhookEndpointsListResponseTransformer = async (data) => {
|
|
578
|
+
data = webhookEndpointListSchemaResponseTransformer(data);
|
|
579
|
+
return data;
|
|
580
|
+
};
|
|
581
|
+
var webhookEndpointWithSecretSchemaResponseTransformer = (data) => {
|
|
582
|
+
if (data.disabledAt) {
|
|
583
|
+
data.disabledAt = new Date(data.disabledAt);
|
|
584
|
+
}
|
|
585
|
+
data.createdAt = new Date(data.createdAt);
|
|
586
|
+
data.updatedAt = new Date(data.updatedAt);
|
|
587
|
+
return data;
|
|
588
|
+
};
|
|
589
|
+
var webhookEndpointsCreateResponseTransformer = async (data) => {
|
|
590
|
+
data = webhookEndpointWithSecretSchemaResponseTransformer(data);
|
|
591
|
+
return data;
|
|
592
|
+
};
|
|
593
|
+
var webhookEndpointsRetrieveResponseTransformer = async (data) => {
|
|
594
|
+
data = webhookEndpointSchemaResponseTransformer(data);
|
|
595
|
+
return data;
|
|
596
|
+
};
|
|
597
|
+
var webhookEndpointsUpdateResponseTransformer = async (data) => {
|
|
598
|
+
data = webhookEndpointSchemaResponseTransformer(data);
|
|
599
|
+
return data;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
// src/generated/hey-api/sdk.gen.ts
|
|
603
|
+
var jwksRetrieve = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.client]), () => ( client))).get({ url: "/v1/.well-known/jwks.json", ...options });
|
|
604
|
+
var catalogList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _2 => _2.client]), () => ( client))).get({
|
|
605
|
+
responseTransformer: catalogListResponseTransformer,
|
|
606
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
607
|
+
url: "/v1/catalog",
|
|
608
|
+
...options
|
|
609
|
+
});
|
|
610
|
+
var catalogListingsRetrieveIntegrationGuide = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
611
|
+
responseTransformer: catalogListingsRetrieveIntegrationGuideResponseTransformer,
|
|
612
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
613
|
+
url: "/v1/catalog/listings/{catalogKey}/integration-guide",
|
|
614
|
+
...options
|
|
615
|
+
});
|
|
616
|
+
var catalogListingsRetrieveRecipe = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
617
|
+
responseTransformer: catalogListingsRetrieveRecipeResponseTransformer,
|
|
618
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
619
|
+
url: "/v1/catalog/listings/{catalogKey}/recipe",
|
|
620
|
+
...options
|
|
621
|
+
});
|
|
622
|
+
var catalogProductsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
623
|
+
responseTransformer: catalogProductsRetrieveResponseTransformer,
|
|
624
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
625
|
+
url: "/v1/catalog/products/{key}",
|
|
626
|
+
...options
|
|
627
|
+
});
|
|
628
|
+
var catalogProductsUpsert = (options) => (_nullishCoalesce(options.client, () => ( client))).put({
|
|
629
|
+
responseTransformer: catalogProductsUpsertResponseTransformer,
|
|
630
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
631
|
+
url: "/v1/catalog/products/{key}",
|
|
632
|
+
...options,
|
|
633
|
+
headers: {
|
|
634
|
+
"Content-Type": "application/json",
|
|
635
|
+
...options.headers
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
var catalogPlansUpsert = (options) => (_nullishCoalesce(options.client, () => ( client))).put({
|
|
639
|
+
responseTransformer: catalogPlansUpsertResponseTransformer,
|
|
640
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
641
|
+
url: "/v1/catalog/products/{key}/plans/{planKey}",
|
|
642
|
+
...options,
|
|
643
|
+
headers: {
|
|
644
|
+
"Content-Type": "application/json",
|
|
645
|
+
...options.headers
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
var checkoutSessionsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
649
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
650
|
+
url: "/v1/checkout-sessions",
|
|
651
|
+
...options,
|
|
652
|
+
headers: {
|
|
653
|
+
"Content-Type": "application/json",
|
|
654
|
+
...options.headers
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
var checkoutSessionsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
658
|
+
responseTransformer: checkoutSessionsRetrieveResponseTransformer,
|
|
659
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
660
|
+
url: "/v1/checkout-sessions/{id}",
|
|
661
|
+
...options
|
|
662
|
+
});
|
|
663
|
+
var checkoutSessionsRetrieveReceipt = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
664
|
+
responseTransformer: checkoutSessionsRetrieveReceiptResponseTransformer,
|
|
665
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
666
|
+
url: "/v1/checkout-sessions/{id}/receipt",
|
|
667
|
+
...options
|
|
668
|
+
});
|
|
669
|
+
var creditsAdjust = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
670
|
+
responseTransformer: creditsAdjustResponseTransformer,
|
|
671
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
672
|
+
url: "/v1/credits/adjust",
|
|
673
|
+
...options,
|
|
674
|
+
headers: {
|
|
675
|
+
"Content-Type": "application/json",
|
|
676
|
+
...options.headers
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
var creditsConsume = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
680
|
+
responseTransformer: creditsConsumeResponseTransformer,
|
|
681
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
682
|
+
url: "/v1/credits/consume",
|
|
683
|
+
...options,
|
|
684
|
+
headers: {
|
|
685
|
+
"Content-Type": "application/json",
|
|
686
|
+
...options.headers
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
var creditsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
690
|
+
responseTransformer: creditsRetrieveResponseTransformer,
|
|
691
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
692
|
+
url: "/v1/credits/{externalCustomerId}",
|
|
693
|
+
...options
|
|
694
|
+
});
|
|
695
|
+
var creditsListLedger = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
696
|
+
responseTransformer: creditsListLedgerResponseTransformer,
|
|
697
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
698
|
+
url: "/v1/credits/{externalCustomerId}/ledger",
|
|
699
|
+
...options
|
|
700
|
+
});
|
|
701
|
+
var customerAccessRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
702
|
+
responseTransformer: customerAccessRetrieveResponseTransformer,
|
|
703
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
704
|
+
url: "/v1/customer-access/{externalCustomerId}",
|
|
705
|
+
...options
|
|
706
|
+
});
|
|
707
|
+
var customerPortalSessionsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
708
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
709
|
+
url: "/v1/customer-portal/sessions",
|
|
710
|
+
...options,
|
|
711
|
+
headers: {
|
|
712
|
+
"Content-Type": "application/json",
|
|
713
|
+
...options.headers
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
var customersList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _3 => _3.client]), () => ( client))).get({
|
|
717
|
+
responseTransformer: customersListResponseTransformer,
|
|
718
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
719
|
+
url: "/v1/customers",
|
|
720
|
+
...options
|
|
721
|
+
});
|
|
722
|
+
var customersCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
723
|
+
responseTransformer: customersCreateResponseTransformer,
|
|
724
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
725
|
+
url: "/v1/customers",
|
|
726
|
+
...options,
|
|
727
|
+
headers: {
|
|
728
|
+
"Content-Type": "application/json",
|
|
729
|
+
...options.headers
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
var customersRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
733
|
+
responseTransformer: customersRetrieveResponseTransformer,
|
|
734
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
735
|
+
url: "/v1/customers/{id}",
|
|
736
|
+
...options
|
|
737
|
+
});
|
|
738
|
+
var customersUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
739
|
+
responseTransformer: customersUpdateResponseTransformer,
|
|
740
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
741
|
+
url: "/v1/customers/{id}",
|
|
742
|
+
...options,
|
|
743
|
+
headers: {
|
|
744
|
+
"Content-Type": "application/json",
|
|
745
|
+
...options.headers
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
var customersListPaymentMethods = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
749
|
+
responseTransformer: customersListPaymentMethodsResponseTransformer,
|
|
750
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
751
|
+
url: "/v1/customers/{id}/payment-methods",
|
|
752
|
+
...options
|
|
753
|
+
});
|
|
754
|
+
var customersCreateSetupIntent = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
755
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
756
|
+
url: "/v1/customers/{id}/setup-intent",
|
|
757
|
+
...options,
|
|
758
|
+
headers: {
|
|
759
|
+
"Content-Type": "application/json",
|
|
760
|
+
...options.headers
|
|
761
|
+
}
|
|
762
|
+
});
|
|
763
|
+
var discountsList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _4 => _4.client]), () => ( client))).get({
|
|
764
|
+
responseTransformer: discountsListResponseTransformer,
|
|
765
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
766
|
+
url: "/v1/discounts",
|
|
767
|
+
...options
|
|
768
|
+
});
|
|
769
|
+
var discountsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
770
|
+
responseTransformer: discountsCreateResponseTransformer,
|
|
771
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
772
|
+
url: "/v1/discounts",
|
|
773
|
+
...options,
|
|
774
|
+
headers: {
|
|
775
|
+
"Content-Type": "application/json",
|
|
776
|
+
...options.headers
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
var discountsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
780
|
+
responseTransformer: discountsRetrieveResponseTransformer,
|
|
781
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
782
|
+
url: "/v1/discounts/{id}",
|
|
783
|
+
...options
|
|
784
|
+
});
|
|
785
|
+
var discountsUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
786
|
+
responseTransformer: discountsUpdateResponseTransformer,
|
|
787
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
788
|
+
url: "/v1/discounts/{id}",
|
|
789
|
+
...options,
|
|
790
|
+
headers: {
|
|
791
|
+
"Content-Type": "application/json",
|
|
792
|
+
...options.headers
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
var discountsDeactivate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
796
|
+
responseTransformer: discountsDeactivateResponseTransformer,
|
|
797
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
798
|
+
url: "/v1/discounts/{id}/deactivate",
|
|
799
|
+
...options
|
|
800
|
+
});
|
|
801
|
+
var integrationVerificationsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
802
|
+
responseTransformer: integrationVerificationsCreateResponseTransformer,
|
|
803
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
804
|
+
url: "/v1/integration-verifications",
|
|
805
|
+
...options,
|
|
806
|
+
headers: {
|
|
807
|
+
"Content-Type": "application/json",
|
|
808
|
+
...options.headers
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
var integrationVerificationsListForListing = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
812
|
+
responseTransformer: integrationVerificationsListForListingResponseTransformer,
|
|
813
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
814
|
+
url: "/v1/integration-verifications/listings/{listingId}",
|
|
815
|
+
...options
|
|
816
|
+
});
|
|
817
|
+
var invoicesList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _5 => _5.client]), () => ( client))).get({
|
|
818
|
+
responseTransformer: invoicesListResponseTransformer,
|
|
819
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
820
|
+
url: "/v1/invoices",
|
|
821
|
+
...options
|
|
822
|
+
});
|
|
823
|
+
var invoicesCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
824
|
+
responseTransformer: invoicesCreateResponseTransformer,
|
|
825
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
826
|
+
url: "/v1/invoices",
|
|
827
|
+
...options,
|
|
828
|
+
headers: {
|
|
829
|
+
"Content-Type": "application/json",
|
|
830
|
+
...options.headers
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
var invoicesRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
834
|
+
responseTransformer: invoicesRetrieveResponseTransformer,
|
|
835
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
836
|
+
url: "/v1/invoices/{id}",
|
|
837
|
+
...options
|
|
838
|
+
});
|
|
839
|
+
var licenseKeysList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _6 => _6.client]), () => ( client))).get({
|
|
840
|
+
responseTransformer: licenseKeysListResponseTransformer,
|
|
841
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
842
|
+
url: "/v1/license-keys",
|
|
843
|
+
...options
|
|
844
|
+
});
|
|
845
|
+
var licenseKeysActivate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
846
|
+
responseTransformer: licenseKeysActivateResponseTransformer,
|
|
847
|
+
url: "/v1/license-keys/activate",
|
|
848
|
+
...options,
|
|
849
|
+
headers: {
|
|
850
|
+
"Content-Type": "application/json",
|
|
851
|
+
...options.headers
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
var licenseKeysDeactivate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
855
|
+
responseTransformer: licenseKeysDeactivateResponseTransformer,
|
|
856
|
+
url: "/v1/license-keys/deactivate",
|
|
857
|
+
...options,
|
|
858
|
+
headers: {
|
|
859
|
+
"Content-Type": "application/json",
|
|
860
|
+
...options.headers
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
var licenseKeysValidate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
864
|
+
responseTransformer: licenseKeysValidateResponseTransformer,
|
|
865
|
+
url: "/v1/license-keys/validate",
|
|
866
|
+
...options,
|
|
867
|
+
headers: {
|
|
868
|
+
"Content-Type": "application/json",
|
|
869
|
+
...options.headers
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
var licenseKeysRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
873
|
+
responseTransformer: licenseKeysRetrieveResponseTransformer,
|
|
874
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
875
|
+
url: "/v1/license-keys/{id}",
|
|
876
|
+
...options
|
|
877
|
+
});
|
|
878
|
+
var licenseKeysRevoke = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
879
|
+
responseTransformer: licenseKeysRevokeResponseTransformer,
|
|
880
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
881
|
+
url: "/v1/license-keys/{id}/revoke",
|
|
882
|
+
...options
|
|
883
|
+
});
|
|
884
|
+
var metersList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _7 => _7.client]), () => ( client))).get({
|
|
885
|
+
responseTransformer: metersListResponseTransformer,
|
|
886
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
887
|
+
url: "/v1/meters",
|
|
888
|
+
...options
|
|
889
|
+
});
|
|
890
|
+
var metersCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
891
|
+
responseTransformer: metersCreateResponseTransformer,
|
|
892
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
893
|
+
url: "/v1/meters",
|
|
894
|
+
...options,
|
|
895
|
+
headers: {
|
|
896
|
+
"Content-Type": "application/json",
|
|
897
|
+
...options.headers
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
var paymentConfirmationsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
901
|
+
responseTransformer: paymentConfirmationsRetrieveResponseTransformer,
|
|
902
|
+
url: "/v1/payment-confirmations/{token}",
|
|
903
|
+
...options
|
|
904
|
+
});
|
|
905
|
+
var paymentsList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _8 => _8.client]), () => ( client))).get({
|
|
906
|
+
responseTransformer: paymentsListResponseTransformer,
|
|
907
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
908
|
+
url: "/v1/payments",
|
|
909
|
+
...options
|
|
910
|
+
});
|
|
911
|
+
var paymentsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
912
|
+
responseTransformer: paymentsCreateResponseTransformer,
|
|
913
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
914
|
+
url: "/v1/payments",
|
|
915
|
+
...options,
|
|
916
|
+
headers: {
|
|
917
|
+
"Content-Type": "application/json",
|
|
918
|
+
...options.headers
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
var paymentsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
922
|
+
responseTransformer: paymentsRetrieveResponseTransformer,
|
|
923
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
924
|
+
url: "/v1/payments/{id}",
|
|
925
|
+
...options
|
|
926
|
+
});
|
|
927
|
+
var paymentsRefundsList = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
928
|
+
responseTransformer: paymentsRefundsListResponseTransformer,
|
|
929
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
930
|
+
url: "/v1/payments/{id}/refunds",
|
|
931
|
+
...options
|
|
932
|
+
});
|
|
933
|
+
var paymentsRefundsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
934
|
+
responseTransformer: paymentsRefundsCreateResponseTransformer,
|
|
935
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
936
|
+
url: "/v1/payments/{id}/refunds",
|
|
937
|
+
...options,
|
|
938
|
+
headers: {
|
|
939
|
+
"Content-Type": "application/json",
|
|
940
|
+
...options.headers
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
var paymentsRefundsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
944
|
+
responseTransformer: paymentsRefundsRetrieveResponseTransformer,
|
|
945
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
946
|
+
url: "/v1/payments/{id}/refunds/{refundId}",
|
|
947
|
+
...options
|
|
948
|
+
});
|
|
949
|
+
var pricesList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _9 => _9.client]), () => ( client))).get({
|
|
950
|
+
responseTransformer: pricesListResponseTransformer,
|
|
951
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
952
|
+
url: "/v1/prices",
|
|
953
|
+
...options
|
|
954
|
+
});
|
|
955
|
+
var pricesCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
956
|
+
responseTransformer: pricesCreateResponseTransformer,
|
|
957
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
958
|
+
url: "/v1/prices",
|
|
959
|
+
...options,
|
|
960
|
+
headers: {
|
|
961
|
+
"Content-Type": "application/json",
|
|
962
|
+
...options.headers
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
var pricesRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
966
|
+
responseTransformer: pricesRetrieveResponseTransformer,
|
|
967
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
968
|
+
url: "/v1/prices/{id}",
|
|
969
|
+
...options
|
|
970
|
+
});
|
|
971
|
+
var pricesUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
972
|
+
responseTransformer: pricesUpdateResponseTransformer,
|
|
973
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
974
|
+
url: "/v1/prices/{id}",
|
|
975
|
+
...options,
|
|
976
|
+
headers: {
|
|
977
|
+
"Content-Type": "application/json",
|
|
978
|
+
...options.headers
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
var productsList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _10 => _10.client]), () => ( client))).get({
|
|
982
|
+
responseTransformer: productsListResponseTransformer,
|
|
983
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
984
|
+
url: "/v1/products",
|
|
985
|
+
...options
|
|
986
|
+
});
|
|
987
|
+
var productsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
988
|
+
responseTransformer: productsCreateResponseTransformer,
|
|
989
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
990
|
+
url: "/v1/products",
|
|
991
|
+
...options,
|
|
992
|
+
headers: {
|
|
993
|
+
"Content-Type": "application/json",
|
|
994
|
+
...options.headers
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
var productsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
998
|
+
responseTransformer: productsRetrieveResponseTransformer,
|
|
999
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1000
|
+
url: "/v1/products/{id}",
|
|
1001
|
+
...options
|
|
1002
|
+
});
|
|
1003
|
+
var productsUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
1004
|
+
responseTransformer: productsUpdateResponseTransformer,
|
|
1005
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1006
|
+
url: "/v1/products/{id}",
|
|
1007
|
+
...options,
|
|
1008
|
+
headers: {
|
|
1009
|
+
"Content-Type": "application/json",
|
|
1010
|
+
...options.headers
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
var sandboxPayoutMethodsCreateTest = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _11 => _11.client]), () => ( client))).post({
|
|
1014
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1015
|
+
url: "/v1/sandbox/payout-methods/test",
|
|
1016
|
+
...options
|
|
1017
|
+
});
|
|
1018
|
+
var setupSessionsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({ url: "/v1/setup-sessions/{token}", ...options });
|
|
1019
|
+
var subscriptionsList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _12 => _12.client]), () => ( client))).get({
|
|
1020
|
+
responseTransformer: subscriptionsListResponseTransformer,
|
|
1021
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1022
|
+
url: "/v1/subscriptions",
|
|
1023
|
+
...options
|
|
1024
|
+
});
|
|
1025
|
+
var subscriptionsCancelByExternalCustomer = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1026
|
+
responseTransformer: subscriptionsCancelByExternalCustomerResponseTransformer,
|
|
1027
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1028
|
+
url: "/v1/subscriptions/cancel",
|
|
1029
|
+
...options,
|
|
1030
|
+
headers: {
|
|
1031
|
+
"Content-Type": "application/json",
|
|
1032
|
+
...options.headers
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
var subscriptionsUncancelByExternalCustomer = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1036
|
+
responseTransformer: subscriptionsUncancelByExternalCustomerResponseTransformer,
|
|
1037
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1038
|
+
url: "/v1/subscriptions/uncancel",
|
|
1039
|
+
...options,
|
|
1040
|
+
headers: {
|
|
1041
|
+
"Content-Type": "application/json",
|
|
1042
|
+
...options.headers
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
var subscriptionsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
1046
|
+
responseTransformer: subscriptionsRetrieveResponseTransformer,
|
|
1047
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1048
|
+
url: "/v1/subscriptions/{id}",
|
|
1049
|
+
...options
|
|
1050
|
+
});
|
|
1051
|
+
var subscriptionsUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
1052
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1053
|
+
url: "/v1/subscriptions/{id}",
|
|
1054
|
+
...options,
|
|
1055
|
+
headers: {
|
|
1056
|
+
"Content-Type": "application/json",
|
|
1057
|
+
...options.headers
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
var subscriptionsCancel = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1061
|
+
responseTransformer: subscriptionsCancelResponseTransformer,
|
|
1062
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1063
|
+
url: "/v1/subscriptions/{id}/cancel",
|
|
1064
|
+
...options,
|
|
1065
|
+
headers: {
|
|
1066
|
+
"Content-Type": "application/json",
|
|
1067
|
+
...options.headers
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
var subscriptionsPreviewUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1071
|
+
responseTransformer: subscriptionsPreviewUpdateResponseTransformer,
|
|
1072
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1073
|
+
url: "/v1/subscriptions/{id}/preview",
|
|
1074
|
+
...options,
|
|
1075
|
+
headers: {
|
|
1076
|
+
"Content-Type": "application/json",
|
|
1077
|
+
...options.headers
|
|
1078
|
+
}
|
|
1079
|
+
});
|
|
1080
|
+
var usageBillingPlansCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1081
|
+
responseTransformer: usageBillingPlansCreateResponseTransformer,
|
|
1082
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1083
|
+
url: "/v1/usage/billing-plans",
|
|
1084
|
+
...options,
|
|
1085
|
+
headers: {
|
|
1086
|
+
"Content-Type": "application/json",
|
|
1087
|
+
...options.headers
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
var usageBillingPlansRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
1091
|
+
responseTransformer: usageBillingPlansRetrieveResponseTransformer,
|
|
1092
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1093
|
+
url: "/v1/usage/billing-plans/{subscriptionId}",
|
|
1094
|
+
...options
|
|
1095
|
+
});
|
|
1096
|
+
var usageRecordsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1097
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1098
|
+
url: "/v1/usage/records",
|
|
1099
|
+
...options,
|
|
1100
|
+
headers: {
|
|
1101
|
+
"Content-Type": "application/json",
|
|
1102
|
+
...options.headers
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
var webhookDeliveriesList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _13 => _13.client]), () => ( client))).get({
|
|
1106
|
+
responseTransformer: webhookDeliveriesListResponseTransformer,
|
|
1107
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1108
|
+
url: "/v1/webhook-deliveries",
|
|
1109
|
+
...options
|
|
1110
|
+
});
|
|
1111
|
+
var webhookDeliveriesRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
1112
|
+
responseTransformer: webhookDeliveriesRetrieveResponseTransformer,
|
|
1113
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1114
|
+
url: "/v1/webhook-deliveries/{id}",
|
|
1115
|
+
...options
|
|
1116
|
+
});
|
|
1117
|
+
var webhookDeliveriesResend = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1118
|
+
responseTransformer: webhookDeliveriesResendResponseTransformer,
|
|
1119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1120
|
+
url: "/v1/webhook-deliveries/{id}/resend",
|
|
1121
|
+
...options
|
|
1122
|
+
});
|
|
1123
|
+
var webhookEndpointsList = (options) => (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _14 => _14.client]), () => ( client))).get({
|
|
1124
|
+
responseTransformer: webhookEndpointsListResponseTransformer,
|
|
1125
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1126
|
+
url: "/v1/webhook-endpoints",
|
|
1127
|
+
...options
|
|
1128
|
+
});
|
|
1129
|
+
var webhookEndpointsCreate = (options) => (_nullishCoalesce(options.client, () => ( client))).post({
|
|
1130
|
+
responseTransformer: webhookEndpointsCreateResponseTransformer,
|
|
1131
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1132
|
+
url: "/v1/webhook-endpoints",
|
|
1133
|
+
...options,
|
|
1134
|
+
headers: {
|
|
1135
|
+
"Content-Type": "application/json",
|
|
1136
|
+
...options.headers
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
var webhookEndpointsDelete = (options) => (_nullishCoalesce(options.client, () => ( client))).delete({
|
|
1140
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1141
|
+
url: "/v1/webhook-endpoints/{id}",
|
|
1142
|
+
...options
|
|
1143
|
+
});
|
|
1144
|
+
var webhookEndpointsRetrieve = (options) => (_nullishCoalesce(options.client, () => ( client))).get({
|
|
1145
|
+
responseTransformer: webhookEndpointsRetrieveResponseTransformer,
|
|
1146
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1147
|
+
url: "/v1/webhook-endpoints/{id}",
|
|
1148
|
+
...options
|
|
1149
|
+
});
|
|
1150
|
+
var webhookEndpointsUpdate = (options) => (_nullishCoalesce(options.client, () => ( client))).patch({
|
|
1151
|
+
responseTransformer: webhookEndpointsUpdateResponseTransformer,
|
|
1152
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1153
|
+
url: "/v1/webhook-endpoints/{id}",
|
|
1154
|
+
...options,
|
|
1155
|
+
headers: {
|
|
1156
|
+
"Content-Type": "application/json",
|
|
1157
|
+
...options.headers
|
|
1158
|
+
}
|
|
1159
|
+
});
|
|
1160
|
+
|
|
1161
|
+
// src/generated/defs.ts
|
|
1162
|
+
var jwksRetrieve2 = {
|
|
1163
|
+
id: "jwks_retrieve",
|
|
1164
|
+
method: "GET",
|
|
1165
|
+
path: "/v1/.well-known/jwks.json",
|
|
1166
|
+
fn: jwksRetrieve,
|
|
1167
|
+
auth: false,
|
|
1168
|
+
params: [],
|
|
1169
|
+
errorCodes: [],
|
|
1170
|
+
emptyCodes: []
|
|
1171
|
+
};
|
|
1172
|
+
var catalogList2 = {
|
|
1173
|
+
id: "catalog_list",
|
|
1174
|
+
method: "GET",
|
|
1175
|
+
path: "/v1/catalog",
|
|
1176
|
+
fn: catalogList,
|
|
1177
|
+
auth: true,
|
|
1178
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false]],
|
|
1179
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1180
|
+
emptyCodes: [],
|
|
1181
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1182
|
+
};
|
|
1183
|
+
var catalogListingsRetrieveIntegrationGuide2 = {
|
|
1184
|
+
id: "catalog_listings_retrieve_integration_guide",
|
|
1185
|
+
method: "GET",
|
|
1186
|
+
path: "/v1/catalog/listings/{catalogKey}/integration-guide",
|
|
1187
|
+
fn: catalogListingsRetrieveIntegrationGuide,
|
|
1188
|
+
auth: true,
|
|
1189
|
+
params: [["catalogKey", "catalogKey", "path", true], ["target", "target", "query", false]],
|
|
1190
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1191
|
+
emptyCodes: []
|
|
1192
|
+
};
|
|
1193
|
+
var catalogListingsRetrieveRecipe2 = {
|
|
1194
|
+
id: "catalog_listings_retrieve_recipe",
|
|
1195
|
+
method: "GET",
|
|
1196
|
+
path: "/v1/catalog/listings/{catalogKey}/recipe",
|
|
1197
|
+
fn: catalogListingsRetrieveRecipe,
|
|
1198
|
+
auth: true,
|
|
1199
|
+
params: [["catalogKey", "catalogKey", "path", true], ["ifNoneMatch", "if-none-match", "header", false]],
|
|
1200
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1201
|
+
emptyCodes: [304]
|
|
1202
|
+
};
|
|
1203
|
+
var catalogProductsRetrieve2 = {
|
|
1204
|
+
id: "catalog_products_retrieve",
|
|
1205
|
+
method: "GET",
|
|
1206
|
+
path: "/v1/catalog/products/{key}",
|
|
1207
|
+
fn: catalogProductsRetrieve,
|
|
1208
|
+
auth: true,
|
|
1209
|
+
params: [["key", "key", "path", true], ["ifNoneMatch", "if-none-match", "header", false]],
|
|
1210
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1211
|
+
emptyCodes: [304]
|
|
1212
|
+
};
|
|
1213
|
+
var catalogProductsUpsert2 = {
|
|
1214
|
+
id: "catalog_products_upsert",
|
|
1215
|
+
method: "PUT",
|
|
1216
|
+
path: "/v1/catalog/products/{key}",
|
|
1217
|
+
fn: catalogProductsUpsert,
|
|
1218
|
+
auth: true,
|
|
1219
|
+
params: [["key", "key", "path", true]],
|
|
1220
|
+
body: "upsertCatalogProduct",
|
|
1221
|
+
errorCodes: ["400", "401", "403", "409", "429", "500"],
|
|
1222
|
+
emptyCodes: []
|
|
1223
|
+
};
|
|
1224
|
+
var catalogPlansUpsert2 = {
|
|
1225
|
+
id: "catalog_plans_upsert",
|
|
1226
|
+
method: "PUT",
|
|
1227
|
+
path: "/v1/catalog/products/{key}/plans/{planKey}",
|
|
1228
|
+
fn: catalogPlansUpsert,
|
|
1229
|
+
auth: true,
|
|
1230
|
+
params: [["key", "key", "path", true], ["planKey", "planKey", "path", true]],
|
|
1231
|
+
body: "upsertCatalogPlan",
|
|
1232
|
+
errorCodes: ["400", "401", "403", "404", "409", "429", "500"],
|
|
1233
|
+
emptyCodes: []
|
|
1234
|
+
};
|
|
1235
|
+
var checkoutSessionsCreate2 = {
|
|
1236
|
+
id: "checkout_sessions_create",
|
|
1237
|
+
method: "POST",
|
|
1238
|
+
path: "/v1/checkout-sessions",
|
|
1239
|
+
fn: checkoutSessionsCreate,
|
|
1240
|
+
auth: true,
|
|
1241
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1242
|
+
body: "createCheckout",
|
|
1243
|
+
errorCodes: ["400", "401", "403", "404", "409", "410", "422", "429", "500"],
|
|
1244
|
+
emptyCodes: []
|
|
1245
|
+
};
|
|
1246
|
+
var checkoutSessionsRetrieve2 = {
|
|
1247
|
+
id: "checkout_sessions_retrieve",
|
|
1248
|
+
method: "GET",
|
|
1249
|
+
path: "/v1/checkout-sessions/{id}",
|
|
1250
|
+
fn: checkoutSessionsRetrieve,
|
|
1251
|
+
auth: true,
|
|
1252
|
+
params: [["id", "id", "path", true]],
|
|
1253
|
+
errorCodes: ["400", "401", "403", "404", "409", "410", "429", "500"],
|
|
1254
|
+
emptyCodes: []
|
|
1255
|
+
};
|
|
1256
|
+
var checkoutSessionsRetrieveReceipt2 = {
|
|
1257
|
+
id: "checkout_sessions_retrieve_receipt",
|
|
1258
|
+
method: "GET",
|
|
1259
|
+
path: "/v1/checkout-sessions/{id}/receipt",
|
|
1260
|
+
fn: checkoutSessionsRetrieveReceipt,
|
|
1261
|
+
auth: true,
|
|
1262
|
+
params: [["id", "id", "path", true], ["headless", "headless", "query", false], ["xOnflayReturnToken", "X-Onflay-Return-Token", "header", false]],
|
|
1263
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1264
|
+
emptyCodes: []
|
|
1265
|
+
};
|
|
1266
|
+
var creditsAdjust2 = {
|
|
1267
|
+
id: "credits_adjust",
|
|
1268
|
+
method: "POST",
|
|
1269
|
+
path: "/v1/credits/adjust",
|
|
1270
|
+
fn: creditsAdjust,
|
|
1271
|
+
auth: true,
|
|
1272
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1273
|
+
body: "adjustCredits",
|
|
1274
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "422", "429", "500"],
|
|
1275
|
+
emptyCodes: []
|
|
1276
|
+
};
|
|
1277
|
+
var creditsConsume2 = {
|
|
1278
|
+
id: "credits_consume",
|
|
1279
|
+
method: "POST",
|
|
1280
|
+
path: "/v1/credits/consume",
|
|
1281
|
+
fn: creditsConsume,
|
|
1282
|
+
auth: true,
|
|
1283
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1284
|
+
body: "consumeCredits",
|
|
1285
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "422", "429", "500"],
|
|
1286
|
+
emptyCodes: []
|
|
1287
|
+
};
|
|
1288
|
+
var creditsRetrieve2 = {
|
|
1289
|
+
id: "credits_retrieve",
|
|
1290
|
+
method: "GET",
|
|
1291
|
+
path: "/v1/credits/{externalCustomerId}",
|
|
1292
|
+
fn: creditsRetrieve,
|
|
1293
|
+
auth: true,
|
|
1294
|
+
params: [["externalCustomerId", "externalCustomerId", "path", true]],
|
|
1295
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1296
|
+
emptyCodes: []
|
|
1297
|
+
};
|
|
1298
|
+
var creditsListLedger2 = {
|
|
1299
|
+
id: "credits_list_ledger",
|
|
1300
|
+
method: "GET",
|
|
1301
|
+
path: "/v1/credits/{externalCustomerId}/ledger",
|
|
1302
|
+
fn: creditsListLedger,
|
|
1303
|
+
auth: true,
|
|
1304
|
+
params: [["externalCustomerId", "externalCustomerId", "path", true], ["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["key", "key", "query", false]],
|
|
1305
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1306
|
+
emptyCodes: [],
|
|
1307
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1308
|
+
};
|
|
1309
|
+
var customerAccessRetrieve2 = {
|
|
1310
|
+
id: "customer_access_retrieve",
|
|
1311
|
+
method: "GET",
|
|
1312
|
+
path: "/v1/customer-access/{externalCustomerId}",
|
|
1313
|
+
fn: customerAccessRetrieve,
|
|
1314
|
+
auth: true,
|
|
1315
|
+
params: [["externalCustomerId", "externalCustomerId", "path", true], ["includeToken", "includeToken", "query", false], ["ifNoneMatch", "if-none-match", "header", false]],
|
|
1316
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1317
|
+
emptyCodes: [304]
|
|
1318
|
+
};
|
|
1319
|
+
var customerPortalSessionsCreate2 = {
|
|
1320
|
+
id: "customer_portal_sessions_create",
|
|
1321
|
+
method: "POST",
|
|
1322
|
+
path: "/v1/customer-portal/sessions",
|
|
1323
|
+
fn: customerPortalSessionsCreate,
|
|
1324
|
+
auth: true,
|
|
1325
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1326
|
+
body: "createCustomerPortalSession",
|
|
1327
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1328
|
+
emptyCodes: []
|
|
1329
|
+
};
|
|
1330
|
+
var customersList2 = {
|
|
1331
|
+
id: "customers_list",
|
|
1332
|
+
method: "GET",
|
|
1333
|
+
path: "/v1/customers",
|
|
1334
|
+
fn: customersList,
|
|
1335
|
+
auth: true,
|
|
1336
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["search", "search", "query", false], ["externalCustomerId", "externalCustomerId", "query", false]],
|
|
1337
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1338
|
+
emptyCodes: [],
|
|
1339
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1340
|
+
};
|
|
1341
|
+
var customersCreate2 = {
|
|
1342
|
+
id: "customers_create",
|
|
1343
|
+
method: "POST",
|
|
1344
|
+
path: "/v1/customers",
|
|
1345
|
+
fn: customersCreate,
|
|
1346
|
+
auth: true,
|
|
1347
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1348
|
+
body: "createCustomer",
|
|
1349
|
+
errorCodes: ["400", "401", "403", "409", "422", "429", "500"],
|
|
1350
|
+
emptyCodes: []
|
|
1351
|
+
};
|
|
1352
|
+
var customersRetrieve2 = {
|
|
1353
|
+
id: "customers_retrieve",
|
|
1354
|
+
method: "GET",
|
|
1355
|
+
path: "/v1/customers/{id}",
|
|
1356
|
+
fn: customersRetrieve,
|
|
1357
|
+
auth: true,
|
|
1358
|
+
params: [["id", "id", "path", true]],
|
|
1359
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1360
|
+
emptyCodes: []
|
|
1361
|
+
};
|
|
1362
|
+
var customersUpdate2 = {
|
|
1363
|
+
id: "customers_update",
|
|
1364
|
+
method: "PATCH",
|
|
1365
|
+
path: "/v1/customers/{id}",
|
|
1366
|
+
fn: customersUpdate,
|
|
1367
|
+
auth: true,
|
|
1368
|
+
params: [["id", "id", "path", true]],
|
|
1369
|
+
body: "updateCustomer",
|
|
1370
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1371
|
+
emptyCodes: []
|
|
1372
|
+
};
|
|
1373
|
+
var customersListPaymentMethods2 = {
|
|
1374
|
+
id: "customers_list_payment_methods",
|
|
1375
|
+
method: "GET",
|
|
1376
|
+
path: "/v1/customers/{id}/payment-methods",
|
|
1377
|
+
fn: customersListPaymentMethods,
|
|
1378
|
+
auth: true,
|
|
1379
|
+
params: [["id", "id", "path", true]],
|
|
1380
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1381
|
+
emptyCodes: []
|
|
1382
|
+
};
|
|
1383
|
+
var customersCreateSetupIntent2 = {
|
|
1384
|
+
id: "customers_create_setup_intent",
|
|
1385
|
+
method: "POST",
|
|
1386
|
+
path: "/v1/customers/{id}/setup-intent",
|
|
1387
|
+
fn: customersCreateSetupIntent,
|
|
1388
|
+
auth: true,
|
|
1389
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1390
|
+
body: "createSetupIntentParams",
|
|
1391
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1392
|
+
emptyCodes: []
|
|
1393
|
+
};
|
|
1394
|
+
var discountsList2 = {
|
|
1395
|
+
id: "discounts_list",
|
|
1396
|
+
method: "GET",
|
|
1397
|
+
path: "/v1/discounts",
|
|
1398
|
+
fn: discountsList,
|
|
1399
|
+
auth: true,
|
|
1400
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["active", "active", "query", false], ["type", "type", "query", false], ["code", "code", "query", false]],
|
|
1401
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1402
|
+
emptyCodes: [],
|
|
1403
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1404
|
+
};
|
|
1405
|
+
var discountsCreate2 = {
|
|
1406
|
+
id: "discounts_create",
|
|
1407
|
+
method: "POST",
|
|
1408
|
+
path: "/v1/discounts",
|
|
1409
|
+
fn: discountsCreate,
|
|
1410
|
+
auth: true,
|
|
1411
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1412
|
+
body: "createDiscount",
|
|
1413
|
+
errorCodes: ["400", "401", "403", "404", "409", "429", "500"],
|
|
1414
|
+
emptyCodes: []
|
|
1415
|
+
};
|
|
1416
|
+
var discountsRetrieve2 = {
|
|
1417
|
+
id: "discounts_retrieve",
|
|
1418
|
+
method: "GET",
|
|
1419
|
+
path: "/v1/discounts/{id}",
|
|
1420
|
+
fn: discountsRetrieve,
|
|
1421
|
+
auth: true,
|
|
1422
|
+
params: [["id", "id", "path", true]],
|
|
1423
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1424
|
+
emptyCodes: []
|
|
1425
|
+
};
|
|
1426
|
+
var discountsUpdate2 = {
|
|
1427
|
+
id: "discounts_update",
|
|
1428
|
+
method: "PATCH",
|
|
1429
|
+
path: "/v1/discounts/{id}",
|
|
1430
|
+
fn: discountsUpdate,
|
|
1431
|
+
auth: true,
|
|
1432
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1433
|
+
body: "updateDiscount",
|
|
1434
|
+
errorCodes: ["400", "401", "403", "404", "409", "429", "500"],
|
|
1435
|
+
emptyCodes: []
|
|
1436
|
+
};
|
|
1437
|
+
var discountsDeactivate2 = {
|
|
1438
|
+
id: "discounts_deactivate",
|
|
1439
|
+
method: "POST",
|
|
1440
|
+
path: "/v1/discounts/{id}/deactivate",
|
|
1441
|
+
fn: discountsDeactivate,
|
|
1442
|
+
auth: true,
|
|
1443
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1444
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1445
|
+
emptyCodes: []
|
|
1446
|
+
};
|
|
1447
|
+
var integrationVerificationsCreate2 = {
|
|
1448
|
+
id: "integration_verifications_create",
|
|
1449
|
+
method: "POST",
|
|
1450
|
+
path: "/v1/integration-verifications",
|
|
1451
|
+
fn: integrationVerificationsCreate,
|
|
1452
|
+
auth: true,
|
|
1453
|
+
params: [],
|
|
1454
|
+
body: "",
|
|
1455
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1456
|
+
emptyCodes: []
|
|
1457
|
+
};
|
|
1458
|
+
var integrationVerificationsListForListing2 = {
|
|
1459
|
+
id: "integration_verifications_list_for_listing",
|
|
1460
|
+
method: "GET",
|
|
1461
|
+
path: "/v1/integration-verifications/listings/{listingId}",
|
|
1462
|
+
fn: integrationVerificationsListForListing,
|
|
1463
|
+
auth: true,
|
|
1464
|
+
params: [["listingId", "listingId", "path", true], ["limit", "limit", "query", false], ["cursor", "cursor", "query", false]],
|
|
1465
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1466
|
+
emptyCodes: [],
|
|
1467
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1468
|
+
};
|
|
1469
|
+
var invoicesList2 = {
|
|
1470
|
+
id: "invoices_list",
|
|
1471
|
+
method: "GET",
|
|
1472
|
+
path: "/v1/invoices",
|
|
1473
|
+
fn: invoicesList,
|
|
1474
|
+
auth: true,
|
|
1475
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["customerId", "customerId", "query", false]],
|
|
1476
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1477
|
+
emptyCodes: [],
|
|
1478
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1479
|
+
};
|
|
1480
|
+
var invoicesCreate2 = {
|
|
1481
|
+
id: "invoices_create",
|
|
1482
|
+
method: "POST",
|
|
1483
|
+
path: "/v1/invoices",
|
|
1484
|
+
fn: invoicesCreate,
|
|
1485
|
+
auth: true,
|
|
1486
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1487
|
+
body: "createBillingInvoice",
|
|
1488
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "422", "429", "500"],
|
|
1489
|
+
emptyCodes: []
|
|
1490
|
+
};
|
|
1491
|
+
var invoicesRetrieve2 = {
|
|
1492
|
+
id: "invoices_retrieve",
|
|
1493
|
+
method: "GET",
|
|
1494
|
+
path: "/v1/invoices/{id}",
|
|
1495
|
+
fn: invoicesRetrieve,
|
|
1496
|
+
auth: true,
|
|
1497
|
+
params: [["id", "id", "path", true]],
|
|
1498
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1499
|
+
emptyCodes: []
|
|
1500
|
+
};
|
|
1501
|
+
var licenseKeysList2 = {
|
|
1502
|
+
id: "license_keys_list",
|
|
1503
|
+
method: "GET",
|
|
1504
|
+
path: "/v1/license-keys",
|
|
1505
|
+
fn: licenseKeysList,
|
|
1506
|
+
auth: true,
|
|
1507
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["externalCustomerId", "externalCustomerId", "query", false]],
|
|
1508
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1509
|
+
emptyCodes: [],
|
|
1510
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1511
|
+
};
|
|
1512
|
+
var licenseKeysActivate2 = {
|
|
1513
|
+
id: "license_keys_activate",
|
|
1514
|
+
method: "POST",
|
|
1515
|
+
path: "/v1/license-keys/activate",
|
|
1516
|
+
fn: licenseKeysActivate,
|
|
1517
|
+
auth: false,
|
|
1518
|
+
params: [],
|
|
1519
|
+
body: "",
|
|
1520
|
+
errorCodes: ["400", "403", "404", "409", "429", "500"],
|
|
1521
|
+
emptyCodes: []
|
|
1522
|
+
};
|
|
1523
|
+
var licenseKeysDeactivate2 = {
|
|
1524
|
+
id: "license_keys_deactivate",
|
|
1525
|
+
method: "POST",
|
|
1526
|
+
path: "/v1/license-keys/deactivate",
|
|
1527
|
+
fn: licenseKeysDeactivate,
|
|
1528
|
+
auth: false,
|
|
1529
|
+
params: [],
|
|
1530
|
+
body: "",
|
|
1531
|
+
errorCodes: ["400", "404", "429", "500"],
|
|
1532
|
+
emptyCodes: []
|
|
1533
|
+
};
|
|
1534
|
+
var licenseKeysValidate2 = {
|
|
1535
|
+
id: "license_keys_validate",
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
path: "/v1/license-keys/validate",
|
|
1538
|
+
fn: licenseKeysValidate,
|
|
1539
|
+
auth: false,
|
|
1540
|
+
params: [],
|
|
1541
|
+
body: "",
|
|
1542
|
+
errorCodes: ["400", "404", "429", "500"],
|
|
1543
|
+
emptyCodes: []
|
|
1544
|
+
};
|
|
1545
|
+
var licenseKeysRetrieve2 = {
|
|
1546
|
+
id: "license_keys_retrieve",
|
|
1547
|
+
method: "GET",
|
|
1548
|
+
path: "/v1/license-keys/{id}",
|
|
1549
|
+
fn: licenseKeysRetrieve,
|
|
1550
|
+
auth: true,
|
|
1551
|
+
params: [["id", "id", "path", true]],
|
|
1552
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1553
|
+
emptyCodes: []
|
|
1554
|
+
};
|
|
1555
|
+
var licenseKeysRevoke2 = {
|
|
1556
|
+
id: "license_keys_revoke",
|
|
1557
|
+
method: "POST",
|
|
1558
|
+
path: "/v1/license-keys/{id}/revoke",
|
|
1559
|
+
fn: licenseKeysRevoke,
|
|
1560
|
+
auth: true,
|
|
1561
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1562
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1563
|
+
emptyCodes: []
|
|
1564
|
+
};
|
|
1565
|
+
var metersList2 = {
|
|
1566
|
+
id: "meters_list",
|
|
1567
|
+
method: "GET",
|
|
1568
|
+
path: "/v1/meters",
|
|
1569
|
+
fn: metersList,
|
|
1570
|
+
auth: true,
|
|
1571
|
+
params: [],
|
|
1572
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1573
|
+
emptyCodes: []
|
|
1574
|
+
};
|
|
1575
|
+
var metersCreate2 = {
|
|
1576
|
+
id: "meters_create",
|
|
1577
|
+
method: "POST",
|
|
1578
|
+
path: "/v1/meters",
|
|
1579
|
+
fn: metersCreate,
|
|
1580
|
+
auth: true,
|
|
1581
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1582
|
+
body: "createMeter",
|
|
1583
|
+
errorCodes: ["400", "401", "403", "409", "422", "429", "500"],
|
|
1584
|
+
emptyCodes: []
|
|
1585
|
+
};
|
|
1586
|
+
var paymentConfirmationsRetrieve2 = {
|
|
1587
|
+
id: "payment_confirmations_retrieve",
|
|
1588
|
+
method: "GET",
|
|
1589
|
+
path: "/v1/payment-confirmations/{token}",
|
|
1590
|
+
fn: paymentConfirmationsRetrieve,
|
|
1591
|
+
auth: true,
|
|
1592
|
+
params: [["token", "token", "path", true]],
|
|
1593
|
+
errorCodes: ["404", "429", "500"],
|
|
1594
|
+
emptyCodes: []
|
|
1595
|
+
};
|
|
1596
|
+
var paymentsList2 = {
|
|
1597
|
+
id: "payments_list",
|
|
1598
|
+
method: "GET",
|
|
1599
|
+
path: "/v1/payments",
|
|
1600
|
+
fn: paymentsList,
|
|
1601
|
+
auth: true,
|
|
1602
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["status", "status", "query", false], ["listingId", "listingId", "query", false], ["listingType", "listingType", "query", false], ["period", "period", "query", false], ["startDate", "startDate", "query", false], ["endDate", "endDate", "query", false], ["search", "search", "query", false]],
|
|
1603
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1604
|
+
emptyCodes: [],
|
|
1605
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1606
|
+
};
|
|
1607
|
+
var paymentsCreate2 = {
|
|
1608
|
+
id: "payments_create",
|
|
1609
|
+
method: "POST",
|
|
1610
|
+
path: "/v1/payments",
|
|
1611
|
+
fn: paymentsCreate,
|
|
1612
|
+
auth: true,
|
|
1613
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", true]],
|
|
1614
|
+
body: "createPayment",
|
|
1615
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "422", "429", "500"],
|
|
1616
|
+
emptyCodes: []
|
|
1617
|
+
};
|
|
1618
|
+
var paymentsRetrieve2 = {
|
|
1619
|
+
id: "payments_retrieve",
|
|
1620
|
+
method: "GET",
|
|
1621
|
+
path: "/v1/payments/{id}",
|
|
1622
|
+
fn: paymentsRetrieve,
|
|
1623
|
+
auth: true,
|
|
1624
|
+
params: [["id", "id", "path", true]],
|
|
1625
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1626
|
+
emptyCodes: []
|
|
1627
|
+
};
|
|
1628
|
+
var paymentsRefundsList2 = {
|
|
1629
|
+
id: "payments_refunds_list",
|
|
1630
|
+
method: "GET",
|
|
1631
|
+
path: "/v1/payments/{id}/refunds",
|
|
1632
|
+
fn: paymentsRefundsList,
|
|
1633
|
+
auth: true,
|
|
1634
|
+
params: [["id", "id", "path", true], ["limit", "limit", "query", false], ["cursor", "cursor", "query", false]],
|
|
1635
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1636
|
+
emptyCodes: [],
|
|
1637
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1638
|
+
};
|
|
1639
|
+
var paymentsRefundsCreate2 = {
|
|
1640
|
+
id: "payments_refunds_create",
|
|
1641
|
+
method: "POST",
|
|
1642
|
+
path: "/v1/payments/{id}/refunds",
|
|
1643
|
+
fn: paymentsRefundsCreate,
|
|
1644
|
+
auth: true,
|
|
1645
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", true]],
|
|
1646
|
+
body: "createRefund",
|
|
1647
|
+
errorCodes: ["400", "401", "403", "404", "409", "429", "500"],
|
|
1648
|
+
emptyCodes: []
|
|
1649
|
+
};
|
|
1650
|
+
var paymentsRefundsRetrieve2 = {
|
|
1651
|
+
id: "payments_refunds_retrieve",
|
|
1652
|
+
method: "GET",
|
|
1653
|
+
path: "/v1/payments/{id}/refunds/{refundId}",
|
|
1654
|
+
fn: paymentsRefundsRetrieve,
|
|
1655
|
+
auth: true,
|
|
1656
|
+
params: [["id", "id", "path", true], ["refundId", "refundId", "path", true]],
|
|
1657
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1658
|
+
emptyCodes: []
|
|
1659
|
+
};
|
|
1660
|
+
var pricesList2 = {
|
|
1661
|
+
id: "prices_list",
|
|
1662
|
+
method: "GET",
|
|
1663
|
+
path: "/v1/prices",
|
|
1664
|
+
fn: pricesList,
|
|
1665
|
+
auth: true,
|
|
1666
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["productId", "productId", "query", false], ["active", "active", "query", false]],
|
|
1667
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1668
|
+
emptyCodes: [],
|
|
1669
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1670
|
+
};
|
|
1671
|
+
var pricesCreate2 = {
|
|
1672
|
+
id: "prices_create",
|
|
1673
|
+
method: "POST",
|
|
1674
|
+
path: "/v1/prices",
|
|
1675
|
+
fn: pricesCreate,
|
|
1676
|
+
auth: true,
|
|
1677
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1678
|
+
body: "createPrice",
|
|
1679
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1680
|
+
emptyCodes: []
|
|
1681
|
+
};
|
|
1682
|
+
var pricesRetrieve2 = {
|
|
1683
|
+
id: "prices_retrieve",
|
|
1684
|
+
method: "GET",
|
|
1685
|
+
path: "/v1/prices/{id}",
|
|
1686
|
+
fn: pricesRetrieve,
|
|
1687
|
+
auth: true,
|
|
1688
|
+
params: [["id", "id", "path", true]],
|
|
1689
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1690
|
+
emptyCodes: []
|
|
1691
|
+
};
|
|
1692
|
+
var pricesUpdate2 = {
|
|
1693
|
+
id: "prices_update",
|
|
1694
|
+
method: "PATCH",
|
|
1695
|
+
path: "/v1/prices/{id}",
|
|
1696
|
+
fn: pricesUpdate,
|
|
1697
|
+
auth: true,
|
|
1698
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1699
|
+
body: "updatePrice",
|
|
1700
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1701
|
+
emptyCodes: []
|
|
1702
|
+
};
|
|
1703
|
+
var productsList2 = {
|
|
1704
|
+
id: "products_list",
|
|
1705
|
+
method: "GET",
|
|
1706
|
+
path: "/v1/products",
|
|
1707
|
+
fn: productsList,
|
|
1708
|
+
auth: true,
|
|
1709
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["active", "active", "query", false]],
|
|
1710
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1711
|
+
emptyCodes: [],
|
|
1712
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1713
|
+
};
|
|
1714
|
+
var productsCreate2 = {
|
|
1715
|
+
id: "products_create",
|
|
1716
|
+
method: "POST",
|
|
1717
|
+
path: "/v1/products",
|
|
1718
|
+
fn: productsCreate,
|
|
1719
|
+
auth: true,
|
|
1720
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1721
|
+
body: "createProduct",
|
|
1722
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1723
|
+
emptyCodes: []
|
|
1724
|
+
};
|
|
1725
|
+
var productsRetrieve2 = {
|
|
1726
|
+
id: "products_retrieve",
|
|
1727
|
+
method: "GET",
|
|
1728
|
+
path: "/v1/products/{id}",
|
|
1729
|
+
fn: productsRetrieve,
|
|
1730
|
+
auth: true,
|
|
1731
|
+
params: [["id", "id", "path", true]],
|
|
1732
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1733
|
+
emptyCodes: []
|
|
1734
|
+
};
|
|
1735
|
+
var productsUpdate2 = {
|
|
1736
|
+
id: "products_update",
|
|
1737
|
+
method: "PATCH",
|
|
1738
|
+
path: "/v1/products/{id}",
|
|
1739
|
+
fn: productsUpdate,
|
|
1740
|
+
auth: true,
|
|
1741
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1742
|
+
body: "updateProduct",
|
|
1743
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1744
|
+
emptyCodes: []
|
|
1745
|
+
};
|
|
1746
|
+
var sandboxPayoutMethodsCreateTest2 = {
|
|
1747
|
+
id: "sandbox_payout_methods_create_test",
|
|
1748
|
+
method: "POST",
|
|
1749
|
+
path: "/v1/sandbox/payout-methods/test",
|
|
1750
|
+
fn: sandboxPayoutMethodsCreateTest,
|
|
1751
|
+
auth: true,
|
|
1752
|
+
params: [],
|
|
1753
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1754
|
+
emptyCodes: []
|
|
1755
|
+
};
|
|
1756
|
+
var setupSessionsRetrieve2 = {
|
|
1757
|
+
id: "setup_sessions_retrieve",
|
|
1758
|
+
method: "GET",
|
|
1759
|
+
path: "/v1/setup-sessions/{token}",
|
|
1760
|
+
fn: setupSessionsRetrieve,
|
|
1761
|
+
auth: true,
|
|
1762
|
+
params: [["token", "token", "path", true]],
|
|
1763
|
+
errorCodes: ["404", "429", "500"],
|
|
1764
|
+
emptyCodes: []
|
|
1765
|
+
};
|
|
1766
|
+
var subscriptionsList2 = {
|
|
1767
|
+
id: "subscriptions_list",
|
|
1768
|
+
method: "GET",
|
|
1769
|
+
path: "/v1/subscriptions",
|
|
1770
|
+
fn: subscriptionsList,
|
|
1771
|
+
auth: true,
|
|
1772
|
+
params: [["limit", "limit", "query", false], ["cursor", "cursor", "query", false], ["status", "status", "query", false], ["externalCustomerId", "externalCustomerId", "query", false]],
|
|
1773
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1774
|
+
emptyCodes: [],
|
|
1775
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1776
|
+
};
|
|
1777
|
+
var subscriptionsCancelByExternalCustomer2 = {
|
|
1778
|
+
id: "subscriptions_cancel_by_external_customer",
|
|
1779
|
+
method: "POST",
|
|
1780
|
+
path: "/v1/subscriptions/cancel",
|
|
1781
|
+
fn: subscriptionsCancelByExternalCustomer,
|
|
1782
|
+
auth: true,
|
|
1783
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1784
|
+
body: "cancelByExternalCustomer",
|
|
1785
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1786
|
+
emptyCodes: []
|
|
1787
|
+
};
|
|
1788
|
+
var subscriptionsUncancelByExternalCustomer2 = {
|
|
1789
|
+
id: "subscriptions_uncancel_by_external_customer",
|
|
1790
|
+
method: "POST",
|
|
1791
|
+
path: "/v1/subscriptions/uncancel",
|
|
1792
|
+
fn: subscriptionsUncancelByExternalCustomer,
|
|
1793
|
+
auth: true,
|
|
1794
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1795
|
+
body: "uncancelByExternalCustomer",
|
|
1796
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1797
|
+
emptyCodes: []
|
|
1798
|
+
};
|
|
1799
|
+
var subscriptionsRetrieve2 = {
|
|
1800
|
+
id: "subscriptions_retrieve",
|
|
1801
|
+
method: "GET",
|
|
1802
|
+
path: "/v1/subscriptions/{id}",
|
|
1803
|
+
fn: subscriptionsRetrieve,
|
|
1804
|
+
auth: true,
|
|
1805
|
+
params: [["id", "id", "path", true]],
|
|
1806
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1807
|
+
emptyCodes: []
|
|
1808
|
+
};
|
|
1809
|
+
var subscriptionsUpdate2 = {
|
|
1810
|
+
id: "subscriptions_update",
|
|
1811
|
+
method: "PATCH",
|
|
1812
|
+
path: "/v1/subscriptions/{id}",
|
|
1813
|
+
fn: subscriptionsUpdate,
|
|
1814
|
+
auth: true,
|
|
1815
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1816
|
+
body: "updateSubscription",
|
|
1817
|
+
errorCodes: ["400", "401", "402", "403", "404", "409", "422", "429", "500"],
|
|
1818
|
+
emptyCodes: []
|
|
1819
|
+
};
|
|
1820
|
+
var subscriptionsCancel2 = {
|
|
1821
|
+
id: "subscriptions_cancel",
|
|
1822
|
+
method: "POST",
|
|
1823
|
+
path: "/v1/subscriptions/{id}/cancel",
|
|
1824
|
+
fn: subscriptionsCancel,
|
|
1825
|
+
auth: true,
|
|
1826
|
+
params: [["id", "id", "path", true], ["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1827
|
+
body: "cancelSubscription",
|
|
1828
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1829
|
+
emptyCodes: []
|
|
1830
|
+
};
|
|
1831
|
+
var subscriptionsPreviewUpdate2 = {
|
|
1832
|
+
id: "subscriptions_preview_update",
|
|
1833
|
+
method: "POST",
|
|
1834
|
+
path: "/v1/subscriptions/{id}/preview",
|
|
1835
|
+
fn: subscriptionsPreviewUpdate,
|
|
1836
|
+
auth: true,
|
|
1837
|
+
params: [["id", "id", "path", true]],
|
|
1838
|
+
body: "previewSubscriptionUpdate",
|
|
1839
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1840
|
+
emptyCodes: []
|
|
1841
|
+
};
|
|
1842
|
+
var usageBillingPlansCreate2 = {
|
|
1843
|
+
id: "usage_billing_plans_create",
|
|
1844
|
+
method: "POST",
|
|
1845
|
+
path: "/v1/usage/billing-plans",
|
|
1846
|
+
fn: usageBillingPlansCreate,
|
|
1847
|
+
auth: true,
|
|
1848
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1849
|
+
body: "createBillingPlan",
|
|
1850
|
+
errorCodes: ["400", "401", "403", "404", "409", "422", "429", "500"],
|
|
1851
|
+
emptyCodes: []
|
|
1852
|
+
};
|
|
1853
|
+
var usageBillingPlansRetrieve2 = {
|
|
1854
|
+
id: "usage_billing_plans_retrieve",
|
|
1855
|
+
method: "GET",
|
|
1856
|
+
path: "/v1/usage/billing-plans/{subscriptionId}",
|
|
1857
|
+
fn: usageBillingPlansRetrieve,
|
|
1858
|
+
auth: true,
|
|
1859
|
+
params: [["subscriptionId", "subscriptionId", "path", true]],
|
|
1860
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1861
|
+
emptyCodes: []
|
|
1862
|
+
};
|
|
1863
|
+
var usageRecordsCreate2 = {
|
|
1864
|
+
id: "usage_records_create",
|
|
1865
|
+
method: "POST",
|
|
1866
|
+
path: "/v1/usage/records",
|
|
1867
|
+
fn: usageRecordsCreate,
|
|
1868
|
+
auth: true,
|
|
1869
|
+
params: [],
|
|
1870
|
+
body: "",
|
|
1871
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1872
|
+
emptyCodes: []
|
|
1873
|
+
};
|
|
1874
|
+
var webhookDeliveriesList2 = {
|
|
1875
|
+
id: "webhook_deliveries_list",
|
|
1876
|
+
method: "GET",
|
|
1877
|
+
path: "/v1/webhook-deliveries",
|
|
1878
|
+
fn: webhookDeliveriesList,
|
|
1879
|
+
auth: true,
|
|
1880
|
+
params: [["endpointId", "endpointId", "query", false], ["status", "status", "query", false], ["cursor", "cursor", "query", false], ["limit", "limit", "query", false]],
|
|
1881
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1882
|
+
emptyCodes: [],
|
|
1883
|
+
pagination: { input: "cursor", output: "nextCursor" }
|
|
1884
|
+
};
|
|
1885
|
+
var webhookDeliveriesRetrieve2 = {
|
|
1886
|
+
id: "webhook_deliveries_retrieve",
|
|
1887
|
+
method: "GET",
|
|
1888
|
+
path: "/v1/webhook-deliveries/{id}",
|
|
1889
|
+
fn: webhookDeliveriesRetrieve,
|
|
1890
|
+
auth: true,
|
|
1891
|
+
params: [["id", "id", "path", true]],
|
|
1892
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1893
|
+
emptyCodes: []
|
|
1894
|
+
};
|
|
1895
|
+
var webhookDeliveriesResend2 = {
|
|
1896
|
+
id: "webhook_deliveries_resend",
|
|
1897
|
+
method: "POST",
|
|
1898
|
+
path: "/v1/webhook-deliveries/{id}/resend",
|
|
1899
|
+
fn: webhookDeliveriesResend,
|
|
1900
|
+
auth: true,
|
|
1901
|
+
params: [["id", "id", "path", true]],
|
|
1902
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1903
|
+
emptyCodes: []
|
|
1904
|
+
};
|
|
1905
|
+
var webhookEndpointsList2 = {
|
|
1906
|
+
id: "webhook_endpoints_list",
|
|
1907
|
+
method: "GET",
|
|
1908
|
+
path: "/v1/webhook-endpoints",
|
|
1909
|
+
fn: webhookEndpointsList,
|
|
1910
|
+
auth: true,
|
|
1911
|
+
params: [],
|
|
1912
|
+
errorCodes: ["400", "401", "403", "429", "500"],
|
|
1913
|
+
emptyCodes: []
|
|
1914
|
+
};
|
|
1915
|
+
var webhookEndpointsCreate2 = {
|
|
1916
|
+
id: "webhook_endpoints_create",
|
|
1917
|
+
method: "POST",
|
|
1918
|
+
path: "/v1/webhook-endpoints",
|
|
1919
|
+
fn: webhookEndpointsCreate,
|
|
1920
|
+
auth: true,
|
|
1921
|
+
params: [["idempotencyKey", "Idempotency-Key", "header", false]],
|
|
1922
|
+
body: "createWebhookEndpoint",
|
|
1923
|
+
errorCodes: ["400", "401", "403", "409", "422", "429", "500"],
|
|
1924
|
+
emptyCodes: []
|
|
1925
|
+
};
|
|
1926
|
+
var webhookEndpointsRetrieve2 = {
|
|
1927
|
+
id: "webhook_endpoints_retrieve",
|
|
1928
|
+
method: "GET",
|
|
1929
|
+
path: "/v1/webhook-endpoints/{id}",
|
|
1930
|
+
fn: webhookEndpointsRetrieve,
|
|
1931
|
+
auth: true,
|
|
1932
|
+
params: [["id", "id", "path", true]],
|
|
1933
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1934
|
+
emptyCodes: []
|
|
1935
|
+
};
|
|
1936
|
+
var webhookEndpointsDelete2 = {
|
|
1937
|
+
id: "webhook_endpoints_delete",
|
|
1938
|
+
method: "DELETE",
|
|
1939
|
+
path: "/v1/webhook-endpoints/{id}",
|
|
1940
|
+
fn: webhookEndpointsDelete,
|
|
1941
|
+
auth: true,
|
|
1942
|
+
params: [["id", "id", "path", true]],
|
|
1943
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1944
|
+
emptyCodes: [204]
|
|
1945
|
+
};
|
|
1946
|
+
var webhookEndpointsUpdate2 = {
|
|
1947
|
+
id: "webhook_endpoints_update",
|
|
1948
|
+
method: "PATCH",
|
|
1949
|
+
path: "/v1/webhook-endpoints/{id}",
|
|
1950
|
+
fn: webhookEndpointsUpdate,
|
|
1951
|
+
auth: true,
|
|
1952
|
+
params: [["id", "id", "path", true]],
|
|
1953
|
+
body: "updateWebhookEndpoint",
|
|
1954
|
+
errorCodes: ["400", "401", "403", "404", "429", "500"],
|
|
1955
|
+
emptyCodes: []
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
// src/generated/sdk.ts
|
|
1959
|
+
var Jwks = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
1960
|
+
/**
|
|
1961
|
+
* Retrieve the JWKS
|
|
1962
|
+
*
|
|
1963
|
+
* @remarks
|
|
1964
|
+
* The public keys (JWKS) that verify customer-access JWTs. No API key needed. Use the key whose `kid` matches the token header.
|
|
1965
|
+
*
|
|
1966
|
+
* `GET /v1/.well-known/jwks.json`
|
|
1967
|
+
*/
|
|
1968
|
+
async retrieve(options) {
|
|
1969
|
+
return this._call(jwksRetrieve2, void 0, options);
|
|
1970
|
+
}
|
|
1971
|
+
};
|
|
1972
|
+
var CatalogListings = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
1973
|
+
/**
|
|
1974
|
+
* Retrieve an integration guide
|
|
1975
|
+
*
|
|
1976
|
+
* @remarks
|
|
1977
|
+
* A generated integration prompt and checklist for an app builder.
|
|
1978
|
+
*
|
|
1979
|
+
* `GET /v1/catalog/listings/{catalogKey}/integration-guide`
|
|
1980
|
+
*/
|
|
1981
|
+
async retrieveIntegrationGuide(request, options) {
|
|
1982
|
+
return this._call(catalogListingsRetrieveIntegrationGuide2, request, options);
|
|
1983
|
+
}
|
|
1984
|
+
/**
|
|
1985
|
+
* Retrieve a listing recipe
|
|
1986
|
+
*
|
|
1987
|
+
* @remarks
|
|
1988
|
+
* The agent-readable recipe (plans, prices, entitlements, endpoints) of a listing. Supports conditional requests: send the `ETag` back in `If-None-Match` to get `304 Not Modified` while the recipe is unchanged.
|
|
1989
|
+
*
|
|
1990
|
+
* `GET /v1/catalog/listings/{catalogKey}/recipe`
|
|
1991
|
+
*/
|
|
1992
|
+
async retrieveRecipe(request, options) {
|
|
1993
|
+
return this._call(catalogListingsRetrieveRecipe2, request, options);
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
var CatalogProducts = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
1997
|
+
/**
|
|
1998
|
+
* Retrieve a catalog product
|
|
1999
|
+
*
|
|
2000
|
+
* @remarks
|
|
2001
|
+
* A product with its plans, prices and entitlements. Each price includes the `checkout` selection to send to `POST /v1/checkout-sessions`. Supports conditional requests: send the `ETag` back in `If-None-Match` to get `304 Not Modified` while the product is unchanged.
|
|
2002
|
+
*
|
|
2003
|
+
* `GET /v1/catalog/products/{key}`
|
|
2004
|
+
*/
|
|
2005
|
+
async retrieve(request, options) {
|
|
2006
|
+
return this._call(catalogProductsRetrieve2, request, options);
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* Upsert a product
|
|
2010
|
+
*
|
|
2011
|
+
* @remarks
|
|
2012
|
+
* Creates the product when no product has this key, otherwise updates it. `type` is required when creating and cannot change. With `active` (default `true` on create) the product goes on sale as soon as it has a plan.
|
|
2013
|
+
*
|
|
2014
|
+
* `PUT /v1/catalog/products/{key}`
|
|
2015
|
+
*/
|
|
2016
|
+
async upsert(request, options) {
|
|
2017
|
+
return this._call(catalogProductsUpsert2, request, options);
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
var CatalogPlans = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2021
|
+
/**
|
|
2022
|
+
* Upsert a plan
|
|
2023
|
+
*
|
|
2024
|
+
* @remarks
|
|
2025
|
+
* Creates or updates a plan of a product by key, with its prices. `prices` is the complete set for the plan: prices you leave out stop being sold. Subscription products take a monthly price and optionally a yearly one; other products take exactly one `one_time` price. Returns the whole product.
|
|
2026
|
+
*
|
|
2027
|
+
* `PUT /v1/catalog/products/{key}/plans/{planKey}`
|
|
2028
|
+
*/
|
|
2029
|
+
async upsert(request, options) {
|
|
2030
|
+
return this._call(catalogPlansUpsert2, request, options);
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
var Catalog = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2034
|
+
|
|
2035
|
+
get listings() {
|
|
2036
|
+
return this._listings ??= new CatalogListings(this._options);
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
get products() {
|
|
2040
|
+
return this._products ??= new CatalogProducts(this._options);
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
get plans() {
|
|
2044
|
+
return this._plans ??= new CatalogPlans(this._options);
|
|
2045
|
+
}
|
|
2046
|
+
/**
|
|
2047
|
+
* List catalog products
|
|
2048
|
+
*
|
|
2049
|
+
* @remarks
|
|
2050
|
+
* Lists the products of your catalog with their plan keys. Only products with a key are listed. Oldest first; follow `nextCursor` for more.
|
|
2051
|
+
*
|
|
2052
|
+
* `GET /v1/catalog`
|
|
2053
|
+
*/
|
|
2054
|
+
async list(request, options) {
|
|
2055
|
+
return this._paginate(catalogList2, request, options);
|
|
2056
|
+
}
|
|
2057
|
+
};
|
|
2058
|
+
var CheckoutSessions = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2059
|
+
/**
|
|
2060
|
+
* Create a checkout session
|
|
2061
|
+
*
|
|
2062
|
+
* @remarks
|
|
2063
|
+
* Creates a hosted (or embedded) checkout session for one of your products. Send either `listingId` (optionally with `variantId`) or `catalog` together with `externalCustomerId`, not both. Requires the `checkout_sessions:write` scope.
|
|
2064
|
+
*
|
|
2065
|
+
* `POST /v1/checkout-sessions`
|
|
2066
|
+
*/
|
|
2067
|
+
async create(request, options) {
|
|
2068
|
+
return this._call(checkoutSessionsCreate2, request, options);
|
|
2069
|
+
}
|
|
2070
|
+
/**
|
|
2071
|
+
* Retrieve a checkout session
|
|
2072
|
+
*
|
|
2073
|
+
* @remarks
|
|
2074
|
+
* Returns one of your checkout sessions that is still pending payment, with what a custom embedded flow needs (`checkoutUrl`, `clientSecret`, `stripePublishableKey`). Sessions of other accounts return 404, and sessions in any other state return 400; use the receipt route to confirm payment. Requires the `checkout_sessions:read` scope.
|
|
2075
|
+
*
|
|
2076
|
+
* `GET /v1/checkout-sessions/{id}`
|
|
2077
|
+
*/
|
|
2078
|
+
async retrieve(request, options) {
|
|
2079
|
+
return this._call(checkoutSessionsRetrieve2, request, options);
|
|
2080
|
+
}
|
|
2081
|
+
/**
|
|
2082
|
+
* Retrieve a checkout receipt
|
|
2083
|
+
*
|
|
2084
|
+
* @remarks
|
|
2085
|
+
* Confirms payment without webhooks. Send the `X-Onflay-Return-Token` from the success redirect, or pass `headless=true` to poll with the secret key alone. While `status` is `processing`, retry after `retryAfterMs`. Requires the `checkout_sessions:read` scope.
|
|
2086
|
+
*
|
|
2087
|
+
* `GET /v1/checkout-sessions/{id}/receipt`
|
|
2088
|
+
*/
|
|
2089
|
+
async retrieveReceipt(request, options) {
|
|
2090
|
+
return this._call(checkoutSessionsRetrieveReceipt2, request, options);
|
|
2091
|
+
}
|
|
2092
|
+
};
|
|
2093
|
+
var Credits = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2094
|
+
/**
|
|
2095
|
+
* Adjust credits
|
|
2096
|
+
*
|
|
2097
|
+
* @remarks
|
|
2098
|
+
* Manual grant (positive `amount`) or correction (negative `amount`), recorded with reason `adjustment`. A removal larger than the balance answers 402 `insufficient_credits`: balances never go negative. Same idempotency rules as consume. Bumps the customer-access `version` and, for a grant, sends `credits.granted`. A positive adjustment can expire: `expiresInDays` (1 to 3650) makes the added credits expire that many days from now; it is rejected (400 `expires_in_days_not_allowed`) with a negative `amount`.
|
|
2099
|
+
*
|
|
2100
|
+
* `POST /v1/credits/adjust`
|
|
2101
|
+
*/
|
|
2102
|
+
async adjust(request, options) {
|
|
2103
|
+
return this._call(creditsAdjust2, request, options);
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Consume credits
|
|
2107
|
+
*
|
|
2108
|
+
* @remarks
|
|
2109
|
+
* Spends `amount` credits atomically: concurrent consumes never spend more than the balance. Not enough credits answers 402 `insufficient_credits` and consumes nothing. Reusing an `idempotencyKey` returns the first result (`replayed: true`) without consuming twice; reusing it for a different customer, key or amount answers 409 `idempotency_key_reused`. A consume bumps the customer-access `version` (and sends `customer.access_changed` with `credits`) only when it empties the balance; other consumes do not.
|
|
2110
|
+
*
|
|
2111
|
+
* `POST /v1/credits/consume`
|
|
2112
|
+
*/
|
|
2113
|
+
async consume(request, options) {
|
|
2114
|
+
return this._call(creditsConsume2, request, options);
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* Retrieve credit balances
|
|
2118
|
+
*
|
|
2119
|
+
* @remarks
|
|
2120
|
+
* A customer's credit balances. One balance per credit key. The same balances appear in customer access as `credits`.
|
|
2121
|
+
*
|
|
2122
|
+
* `GET /v1/credits/{externalCustomerId}`
|
|
2123
|
+
*/
|
|
2124
|
+
async retrieve(request, options) {
|
|
2125
|
+
return this._call(creditsRetrieve2, request, options);
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* List a customer's credit ledger
|
|
2129
|
+
*
|
|
2130
|
+
* @remarks
|
|
2131
|
+
* Every credit movement of the customer, newest first, cursor-paginated. Filter by credit `key`.
|
|
2132
|
+
*
|
|
2133
|
+
* `GET /v1/credits/{externalCustomerId}/ledger`
|
|
2134
|
+
*/
|
|
2135
|
+
async listLedger(request, options) {
|
|
2136
|
+
return this._paginate(creditsListLedger2, request, options);
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
var CustomerAccess = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2140
|
+
/**
|
|
2141
|
+
* Retrieve customer access
|
|
2142
|
+
*
|
|
2143
|
+
* @remarks
|
|
2144
|
+
* What a customer has right now: plans, purchases, tickets, bookings, credits, license keys and entitlements. Supports conditional requests: the response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` with no body while access is unchanged. Pass `includeToken=true` to also receive a short-lived signed JWT of the same claims.
|
|
2145
|
+
*
|
|
2146
|
+
* `GET /v1/customer-access/{externalCustomerId}`
|
|
2147
|
+
*/
|
|
2148
|
+
async retrieve(request, options) {
|
|
2149
|
+
return this._call(customerAccessRetrieve2, request, options);
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2152
|
+
var CustomerPortalSessions = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2153
|
+
/**
|
|
2154
|
+
* Create a customer portal session
|
|
2155
|
+
*
|
|
2156
|
+
* @remarks
|
|
2157
|
+
* Returns a 1-hour link to the Onflay-hosted portal where the customer sees their subscriptions, cancels or resumes them, updates the card their renewals use, and sees their billing history. Create one each time the customer clicks "Manage billing" and redirect to `url`. Requires the `customers:write` scope.
|
|
2158
|
+
*
|
|
2159
|
+
* `POST /v1/customer-portal/sessions`
|
|
2160
|
+
*/
|
|
2161
|
+
async create(request, options) {
|
|
2162
|
+
return this._call(customerPortalSessionsCreate2, request, options);
|
|
2163
|
+
}
|
|
2164
|
+
};
|
|
2165
|
+
var CustomerPortal = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2166
|
+
|
|
2167
|
+
get sessions() {
|
|
2168
|
+
return this._sessions ??= new CustomerPortalSessions(this._options);
|
|
2169
|
+
}
|
|
2170
|
+
};
|
|
2171
|
+
var Customers = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2172
|
+
/**
|
|
2173
|
+
* List customers
|
|
2174
|
+
*
|
|
2175
|
+
* @remarks
|
|
2176
|
+
* Lists the customers linked to your account (created through the API or checkout) or with a payment on it, newest first. Cursor-paginated. Requires the `customers:read` scope.
|
|
2177
|
+
*
|
|
2178
|
+
* `GET /v1/customers`
|
|
2179
|
+
*/
|
|
2180
|
+
async list(request, options) {
|
|
2181
|
+
return this._paginate(customersList2, request, options);
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Create a customer
|
|
2185
|
+
*
|
|
2186
|
+
* @remarks
|
|
2187
|
+
* Creates a customer and links it to your account. Emails are unique across Onflay: if a customer with this email already exists it is linked to your account and returned unchanged (`name` and `phone` are ignored). Requires the `customers:write` scope.
|
|
2188
|
+
*
|
|
2189
|
+
* `POST /v1/customers`
|
|
2190
|
+
*/
|
|
2191
|
+
async create(request, options) {
|
|
2192
|
+
return this._call(customersCreate2, request, options);
|
|
2193
|
+
}
|
|
2194
|
+
/**
|
|
2195
|
+
* Retrieve a customer
|
|
2196
|
+
*
|
|
2197
|
+
* @remarks
|
|
2198
|
+
* Requires the `customers:read` scope.
|
|
2199
|
+
*
|
|
2200
|
+
* `GET /v1/customers/{id}`
|
|
2201
|
+
*/
|
|
2202
|
+
async retrieve(request, options) {
|
|
2203
|
+
return this._call(customersRetrieve2, request, options);
|
|
2204
|
+
}
|
|
2205
|
+
/**
|
|
2206
|
+
* Update a customer
|
|
2207
|
+
*
|
|
2208
|
+
* @remarks
|
|
2209
|
+
* Updates `name` and/or `phone`. Requires the `customers:write` scope.
|
|
2210
|
+
*
|
|
2211
|
+
* `PATCH /v1/customers/{id}`
|
|
2212
|
+
*/
|
|
2213
|
+
async update(request, options) {
|
|
2214
|
+
return this._call(customersUpdate2, request, options);
|
|
2215
|
+
}
|
|
2216
|
+
/**
|
|
2217
|
+
* List a customer's payment methods
|
|
2218
|
+
*
|
|
2219
|
+
* @remarks
|
|
2220
|
+
* Cards the customer saved with your account (through a setup intent), default first, then newest first. Cards they saved with another seller on Onflay are never listed. Not paginated. Requires the `customers:read` scope.
|
|
2221
|
+
*
|
|
2222
|
+
* `GET /v1/customers/{id}/payment-methods`
|
|
2223
|
+
*/
|
|
2224
|
+
async listPaymentMethods(request, options) {
|
|
2225
|
+
return this._call(customersListPaymentMethods2, request, options);
|
|
2226
|
+
}
|
|
2227
|
+
/**
|
|
2228
|
+
* Create a setup intent
|
|
2229
|
+
*
|
|
2230
|
+
* @remarks
|
|
2231
|
+
* Creates a Stripe SetupIntent so the customer can save a card for off-session charges by your account. Returns a hosted page URL and a 1-hour session token. The saved card becomes the one your invoices charge for this customer; it is never visible to or chargeable by other sellers. Requires the `customers:write` scope.
|
|
2232
|
+
*
|
|
2233
|
+
* `POST /v1/customers/{id}/setup-intent`
|
|
2234
|
+
*/
|
|
2235
|
+
async createSetupIntent(request, options) {
|
|
2236
|
+
return this._call(customersCreateSetupIntent2, request, options);
|
|
2237
|
+
}
|
|
2238
|
+
};
|
|
2239
|
+
var Discounts = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2240
|
+
/**
|
|
2241
|
+
* List discounts
|
|
2242
|
+
*
|
|
2243
|
+
* @remarks
|
|
2244
|
+
* Lists your discounts, newest first. Cursor-paginated. Filter by `active`, `type` or `code`. Requires the `discounts:read` scope.
|
|
2245
|
+
*
|
|
2246
|
+
* `GET /v1/discounts`
|
|
2247
|
+
*/
|
|
2248
|
+
async list(request, options) {
|
|
2249
|
+
return this._paginate(discountsList2, request, options);
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* Create a discount
|
|
2253
|
+
*
|
|
2254
|
+
* @remarks
|
|
2255
|
+
* Creates a discount code (`type: discount_code`, buyers enter `code`) or a time-limited offer (`type: time_limited_offer`, applies on its own in its window). Target products and plans by key. Requires the `discounts:write` scope.
|
|
2256
|
+
*
|
|
2257
|
+
* `POST /v1/discounts`
|
|
2258
|
+
*/
|
|
2259
|
+
async create(request, options) {
|
|
2260
|
+
return this._call(discountsCreate2, request, options);
|
|
2261
|
+
}
|
|
2262
|
+
/**
|
|
2263
|
+
* Retrieve a discount
|
|
2264
|
+
*
|
|
2265
|
+
* @remarks
|
|
2266
|
+
* Returns one discount. Requires the `discounts:read` scope.
|
|
2267
|
+
*
|
|
2268
|
+
* `GET /v1/discounts/{id}`
|
|
2269
|
+
*/
|
|
2270
|
+
async retrieve(request, options) {
|
|
2271
|
+
return this._call(discountsRetrieve2, request, options);
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Update a discount
|
|
2275
|
+
*
|
|
2276
|
+
* @remarks
|
|
2277
|
+
* Changes the fields you send; the others keep their value. `type` cannot change. `productKeys` replaces the products (and clears `planKeys` unless you send it too). Send `{ "active": true }` to turn a deactivated discount back on. Requires the `discounts:write` scope.
|
|
2278
|
+
*
|
|
2279
|
+
* `PATCH /v1/discounts/{id}`
|
|
2280
|
+
*/
|
|
2281
|
+
async update(request, options) {
|
|
2282
|
+
return this._call(discountsUpdate2, request, options);
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* Deactivate a discount
|
|
2286
|
+
*
|
|
2287
|
+
* @remarks
|
|
2288
|
+
* Turns the discount off (`active: false`): buyers can no longer use it, and its code stays reserved. Orders that already used it are not affected. Deactivating twice is fine. Requires the `discounts:write` scope.
|
|
2289
|
+
*
|
|
2290
|
+
* `POST /v1/discounts/{id}/deactivate`
|
|
2291
|
+
*/
|
|
2292
|
+
async deactivate(request, options) {
|
|
2293
|
+
return this._call(discountsDeactivate2, request, options);
|
|
2294
|
+
}
|
|
2295
|
+
};
|
|
2296
|
+
var IntegrationVerifications = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2297
|
+
/**
|
|
2298
|
+
* Record an integration check
|
|
2299
|
+
*
|
|
2300
|
+
* @remarks
|
|
2301
|
+
* Records a self-reported integration check for a listing. Deprecated: nothing is checked. On the sandbox, `npx onflay verify` (`POST /v1/sandbox/verifications`) checks the integration on Onflay’s side. Still accepted. The listing (and `checkoutSessionId`, when given) must belong to your account; otherwise 404.
|
|
2302
|
+
* @deprecated
|
|
2303
|
+
*
|
|
2304
|
+
* `POST /v1/integration-verifications`
|
|
2305
|
+
*/
|
|
2306
|
+
async create(request, options) {
|
|
2307
|
+
return this._call(integrationVerificationsCreate2, request, options);
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* List integration checks
|
|
2311
|
+
*
|
|
2312
|
+
* @remarks
|
|
2313
|
+
* The integration checks recorded for a listing, newest first. Cursor-paginated; `data` is empty when the listing has none (or is not yours).
|
|
2314
|
+
*
|
|
2315
|
+
* `GET /v1/integration-verifications/listings/{listingId}`
|
|
2316
|
+
*/
|
|
2317
|
+
async listForListing(request, options) {
|
|
2318
|
+
return this._paginate(integrationVerificationsListForListing2, request, options);
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
var Invoices = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2322
|
+
/**
|
|
2323
|
+
* List invoices
|
|
2324
|
+
*
|
|
2325
|
+
* @remarks
|
|
2326
|
+
* Cursor-paginated list of invoices, newest first. Filter by `customerId`.
|
|
2327
|
+
*
|
|
2328
|
+
* `GET /v1/invoices`
|
|
2329
|
+
*/
|
|
2330
|
+
async list(request, options) {
|
|
2331
|
+
return this._paginate(invoicesList2, request, options);
|
|
2332
|
+
}
|
|
2333
|
+
/**
|
|
2334
|
+
* Create and charge an invoice
|
|
2335
|
+
*
|
|
2336
|
+
* @remarks
|
|
2337
|
+
* Creates an invoice from pre-computed line items and charges the default card the customer saved with your account (never a card saved with another seller). Returns `payment_method_required` (402) when there is none. With an `Idempotency-Key`, a repeated request returns the invoice already created for that key, or finishes the same charge if the first attempt timed out.
|
|
2338
|
+
*
|
|
2339
|
+
* `POST /v1/invoices`
|
|
2340
|
+
*/
|
|
2341
|
+
async create(request, options) {
|
|
2342
|
+
return this._call(invoicesCreate2, request, options);
|
|
2343
|
+
}
|
|
2344
|
+
/**
|
|
2345
|
+
* Retrieve an invoice
|
|
2346
|
+
*
|
|
2347
|
+
* `GET /v1/invoices/{id}`
|
|
2348
|
+
*/
|
|
2349
|
+
async retrieve(request, options) {
|
|
2350
|
+
return this._call(invoicesRetrieve2, request, options);
|
|
2351
|
+
}
|
|
2352
|
+
};
|
|
2353
|
+
var LicenseKeys = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2354
|
+
/**
|
|
2355
|
+
* List license keys
|
|
2356
|
+
*
|
|
2357
|
+
* @remarks
|
|
2358
|
+
* Cursor-paginated, newest first. Filter by `externalCustomerId`. Each item includes the key itself.
|
|
2359
|
+
*
|
|
2360
|
+
* `GET /v1/license-keys`
|
|
2361
|
+
*/
|
|
2362
|
+
async list(request, options) {
|
|
2363
|
+
return this._paginate(licenseKeysList2, request, options);
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* Activate a license key
|
|
2367
|
+
*
|
|
2368
|
+
* @remarks
|
|
2369
|
+
* Activates a license key on an instance. No API key. Registers `instanceId` (machine or install) against the key; activating an instance that is already active changes nothing. A revoked key answers 403 `license_key_revoked`, an expired one 403 `license_key_expired`, a key at its `activationLimit` 409 `activation_limit_reached`. Unknown or malformed keys answer 404 `license_key_not_found`. Limited to about 3 requests a second per IP (429 `rate_limited`).
|
|
2370
|
+
*
|
|
2371
|
+
* `POST /v1/license-keys/activate`
|
|
2372
|
+
*/
|
|
2373
|
+
async activate(request, options) {
|
|
2374
|
+
return this._call(licenseKeysActivate2, request, options);
|
|
2375
|
+
}
|
|
2376
|
+
/**
|
|
2377
|
+
* Deactivate a license key
|
|
2378
|
+
*
|
|
2379
|
+
* @remarks
|
|
2380
|
+
* Deactivates a license key on an instance. No API key. Frees the seat `instanceId` used, so the key can be activated elsewhere. Idempotent; also works on revoked and expired keys. Unknown or malformed keys answer 404 `license_key_not_found`. Limited to about 3 requests a second per IP (429 `rate_limited`).
|
|
2381
|
+
*
|
|
2382
|
+
* `POST /v1/license-keys/deactivate`
|
|
2383
|
+
*/
|
|
2384
|
+
async deactivate(request, options) {
|
|
2385
|
+
return this._call(licenseKeysDeactivate2, request, options);
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Validate a license key
|
|
2389
|
+
*
|
|
2390
|
+
* @remarks
|
|
2391
|
+
* No API key: call it from your app. Answers 200 for any existing key with `valid`, `status` (`active`, `revoked` or `expired`), the product and plan keys, `expiresAt` and the activation count. With `instanceId`, `valid` also requires that instance to be activated. Unknown or malformed keys answer 404 `license_key_not_found`. Limited to about 3 requests a second per IP (429 `rate_limited`).
|
|
2392
|
+
*
|
|
2393
|
+
* `POST /v1/license-keys/validate`
|
|
2394
|
+
*/
|
|
2395
|
+
async validate(request, options) {
|
|
2396
|
+
return this._call(licenseKeysValidate2, request, options);
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Retrieve a license key
|
|
2400
|
+
*
|
|
2401
|
+
* `GET /v1/license-keys/{id}`
|
|
2402
|
+
*/
|
|
2403
|
+
async retrieve(request, options) {
|
|
2404
|
+
return this._call(licenseKeysRetrieve2, request, options);
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Revoke a license key
|
|
2408
|
+
*
|
|
2409
|
+
* @remarks
|
|
2410
|
+
* The key stops validating and activating at once (`status: revoked`). Idempotent. Sends `license_key.revoked` and bumps the customer-access `version`.
|
|
2411
|
+
*
|
|
2412
|
+
* `POST /v1/license-keys/{id}/revoke`
|
|
2413
|
+
*/
|
|
2414
|
+
async revoke(request, options) {
|
|
2415
|
+
return this._call(licenseKeysRevoke2, request, options);
|
|
2416
|
+
}
|
|
2417
|
+
};
|
|
2418
|
+
var Meters = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2419
|
+
/**
|
|
2420
|
+
* List meters
|
|
2421
|
+
*
|
|
2422
|
+
* @remarks
|
|
2423
|
+
* All meters of the account, newest first.
|
|
2424
|
+
*
|
|
2425
|
+
* `GET /v1/meters`
|
|
2426
|
+
*/
|
|
2427
|
+
async list(options) {
|
|
2428
|
+
return this._call(metersList2, void 0, options);
|
|
2429
|
+
}
|
|
2430
|
+
/**
|
|
2431
|
+
* Create a meter
|
|
2432
|
+
*
|
|
2433
|
+
* `POST /v1/meters`
|
|
2434
|
+
*/
|
|
2435
|
+
async create(request, options) {
|
|
2436
|
+
return this._call(metersCreate2, request, options);
|
|
2437
|
+
}
|
|
2438
|
+
};
|
|
2439
|
+
var PaymentConfirmations = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2440
|
+
/**
|
|
2441
|
+
* Retrieve a payment confirmation
|
|
2442
|
+
*
|
|
2443
|
+
* @remarks
|
|
2444
|
+
* Resolves the token of a `confirmUrl` (a payment with `status: "requires_action"`). No API key: the token itself is the credential. Used by the Onflay-hosted confirmation page; you do not need to call it.
|
|
2445
|
+
*
|
|
2446
|
+
* `GET /v1/payment-confirmations/{token}`
|
|
2447
|
+
*/
|
|
2448
|
+
async retrieve(request, options) {
|
|
2449
|
+
return this._call(paymentConfirmationsRetrieve2, request, options);
|
|
2450
|
+
}
|
|
2451
|
+
};
|
|
2452
|
+
var PaymentsRefunds = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2453
|
+
/**
|
|
2454
|
+
* List refunds of a payment
|
|
2455
|
+
*
|
|
2456
|
+
* @remarks
|
|
2457
|
+
* Lists the refunds of one payment, newest first, including `pending` and `failed` ones. Cursor-paginated. Requires the `refunds:read` scope.
|
|
2458
|
+
*
|
|
2459
|
+
* `GET /v1/payments/{id}/refunds`
|
|
2460
|
+
*/
|
|
2461
|
+
async list(request, options) {
|
|
2462
|
+
return this._paginate(paymentsRefundsList2, request, options);
|
|
2463
|
+
}
|
|
2464
|
+
/**
|
|
2465
|
+
* Refund a payment
|
|
2466
|
+
*
|
|
2467
|
+
* @remarks
|
|
2468
|
+
* Refunds all or part of a payment to the buyer’s original payment method. Omit `amountInCents` to refund everything that is left. Requires the `refunds:write` scope and an `Idempotency-Key` header: a retry with the same key and body returns the first refund instead of refunding again. A full refund revokes what the payment granted; a refund never cancels a subscription.
|
|
2469
|
+
*
|
|
2470
|
+
* `POST /v1/payments/{id}/refunds`
|
|
2471
|
+
*/
|
|
2472
|
+
async create(request, options) {
|
|
2473
|
+
return this._call(paymentsRefundsCreate2, request, options);
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Retrieve a refund
|
|
2477
|
+
*
|
|
2478
|
+
* @remarks
|
|
2479
|
+
* Returns one refund of a payment. Requires the `refunds:read` scope.
|
|
2480
|
+
*
|
|
2481
|
+
* `GET /v1/payments/{id}/refunds/{refundId}`
|
|
2482
|
+
*/
|
|
2483
|
+
async retrieve(request, options) {
|
|
2484
|
+
return this._call(paymentsRefundsRetrieve2, request, options);
|
|
2485
|
+
}
|
|
2486
|
+
};
|
|
2487
|
+
var Payments = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2488
|
+
|
|
2489
|
+
get refunds() {
|
|
2490
|
+
return this._refunds ??= new PaymentsRefunds(this._options);
|
|
2491
|
+
}
|
|
2492
|
+
/**
|
|
2493
|
+
* List payments
|
|
2494
|
+
*
|
|
2495
|
+
* @remarks
|
|
2496
|
+
* Lists payments on your account, newest first. Cursor-paginated. Requires the `payments:read` scope.
|
|
2497
|
+
*
|
|
2498
|
+
* `GET /v1/payments`
|
|
2499
|
+
*/
|
|
2500
|
+
async list(request, options) {
|
|
2501
|
+
return this._paginate(paymentsList2, request, options);
|
|
2502
|
+
}
|
|
2503
|
+
/**
|
|
2504
|
+
* Charge a saved card
|
|
2505
|
+
*
|
|
2506
|
+
* @remarks
|
|
2507
|
+
* Charges a card the customer saved with your account (at checkout with `savePaymentMethod`, or through a setup intent), off-session, now. Send `amountInCents` + `currency`, or `catalog` to charge a one-time plan at its price (its grants apply). Returns the payment: `completed` when charged, `failed` with `failureCode` when declined, or `requires_action` with `confirmUrl` when the bank needs the customer to confirm (Onflay emails them the link). Cards saved with other sellers are never charged (`payment_method_required`). Requires the `payments:write` scope and an `Idempotency-Key` header: a retry with the same key returns the same payment and never charges twice.
|
|
2508
|
+
*
|
|
2509
|
+
* `POST /v1/payments`
|
|
2510
|
+
*/
|
|
2511
|
+
async create(request, options) {
|
|
2512
|
+
return this._call(paymentsCreate2, request, options);
|
|
2513
|
+
}
|
|
2514
|
+
/**
|
|
2515
|
+
* Retrieve a payment
|
|
2516
|
+
*
|
|
2517
|
+
* @remarks
|
|
2518
|
+
* Returns one payment on your account. Requires the `payments:read` scope.
|
|
2519
|
+
*
|
|
2520
|
+
* `GET /v1/payments/{id}`
|
|
2521
|
+
*/
|
|
2522
|
+
async retrieve(request, options) {
|
|
2523
|
+
return this._call(paymentsRetrieve2, request, options);
|
|
2524
|
+
}
|
|
2525
|
+
};
|
|
2526
|
+
var Prices = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2527
|
+
/**
|
|
2528
|
+
* List prices
|
|
2529
|
+
*
|
|
2530
|
+
* @remarks
|
|
2531
|
+
* Cursor-paginated list of the account prices, newest first. `limit` counts prices. Filter by `productId` or `active`. Requires the `prices:read` scope.
|
|
2532
|
+
*
|
|
2533
|
+
* `GET /v1/prices`
|
|
2534
|
+
*/
|
|
2535
|
+
async list(request, options) {
|
|
2536
|
+
return this._paginate(pricesList2, request, options);
|
|
2537
|
+
}
|
|
2538
|
+
/**
|
|
2539
|
+
* Create a price
|
|
2540
|
+
*
|
|
2541
|
+
* @remarks
|
|
2542
|
+
* Creates (or updates the matching) USD price on a product. Only `billingScheme: "flat"` is supported. Requires the `prices:write` scope.
|
|
2543
|
+
*
|
|
2544
|
+
* `POST /v1/prices`
|
|
2545
|
+
*/
|
|
2546
|
+
async create(request, options) {
|
|
2547
|
+
return this._call(pricesCreate2, request, options);
|
|
2548
|
+
}
|
|
2549
|
+
/**
|
|
2550
|
+
* Retrieve a price
|
|
2551
|
+
*
|
|
2552
|
+
* @remarks
|
|
2553
|
+
* Requires the `prices:read` scope.
|
|
2554
|
+
*
|
|
2555
|
+
* `GET /v1/prices/{id}`
|
|
2556
|
+
*/
|
|
2557
|
+
async retrieve(request, options) {
|
|
2558
|
+
return this._call(pricesRetrieve2, request, options);
|
|
2559
|
+
}
|
|
2560
|
+
/**
|
|
2561
|
+
* Update a price
|
|
2562
|
+
*
|
|
2563
|
+
* @remarks
|
|
2564
|
+
* Activates or deactivates a price and merges `metadata`. Requires the `prices:write` scope.
|
|
2565
|
+
*
|
|
2566
|
+
* `PATCH /v1/prices/{id}`
|
|
2567
|
+
*/
|
|
2568
|
+
async update(request, options) {
|
|
2569
|
+
return this._call(pricesUpdate2, request, options);
|
|
2570
|
+
}
|
|
2571
|
+
};
|
|
2572
|
+
var Products = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2573
|
+
/**
|
|
2574
|
+
* List products
|
|
2575
|
+
*
|
|
2576
|
+
* @remarks
|
|
2577
|
+
* Cursor-paginated list of the account products, newest first. Filter by `active`. Requires the `products:read` scope.
|
|
2578
|
+
*
|
|
2579
|
+
* `GET /v1/products`
|
|
2580
|
+
*/
|
|
2581
|
+
async list(request, options) {
|
|
2582
|
+
return this._paginate(productsList2, request, options);
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Create a product
|
|
2586
|
+
*
|
|
2587
|
+
* @remarks
|
|
2588
|
+
* Creates a digital product. It is published for sale unless `active` is false. Requires the `products:write` scope.
|
|
2589
|
+
*
|
|
2590
|
+
* `POST /v1/products`
|
|
2591
|
+
*/
|
|
2592
|
+
async create(request, options) {
|
|
2593
|
+
return this._call(productsCreate2, request, options);
|
|
2594
|
+
}
|
|
2595
|
+
/**
|
|
2596
|
+
* Retrieve a product
|
|
2597
|
+
*
|
|
2598
|
+
* @remarks
|
|
2599
|
+
* Requires the `products:read` scope.
|
|
2600
|
+
*
|
|
2601
|
+
* `GET /v1/products/{id}`
|
|
2602
|
+
*/
|
|
2603
|
+
async retrieve(request, options) {
|
|
2604
|
+
return this._call(productsRetrieve2, request, options);
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* Update a product
|
|
2608
|
+
*
|
|
2609
|
+
* @remarks
|
|
2610
|
+
* Updates the provided fields. `metadata` is merged into the existing metadata. Requires the `products:write` scope.
|
|
2611
|
+
*
|
|
2612
|
+
* `PATCH /v1/products/{id}`
|
|
2613
|
+
*/
|
|
2614
|
+
async update(request, options) {
|
|
2615
|
+
return this._call(productsUpdate2, request, options);
|
|
2616
|
+
}
|
|
2617
|
+
};
|
|
2618
|
+
var SandboxPayoutMethods = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2619
|
+
/**
|
|
2620
|
+
* Create a test payout method
|
|
2621
|
+
*
|
|
2622
|
+
* @remarks
|
|
2623
|
+
* Provisions a test payout method for this sandbox account. Sandbox only (`sk_test_*` keys); returns 403 on the production plane. Safe to call repeatedly.
|
|
2624
|
+
*
|
|
2625
|
+
* `POST /v1/sandbox/payout-methods/test`
|
|
2626
|
+
*/
|
|
2627
|
+
async createTest(options) {
|
|
2628
|
+
return this._call(sandboxPayoutMethodsCreateTest2, void 0, options);
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
var Sandbox = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2632
|
+
|
|
2633
|
+
get payoutMethods() {
|
|
2634
|
+
return this._payoutMethods ??= new SandboxPayoutMethods(this._options);
|
|
2635
|
+
}
|
|
2636
|
+
};
|
|
2637
|
+
var SetupSessions = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2638
|
+
/**
|
|
2639
|
+
* Retrieve a setup session
|
|
2640
|
+
*
|
|
2641
|
+
* @remarks
|
|
2642
|
+
* Resolves a setup session token from `POST /v1/customers/{id}/setup-intent`. No API key: the token itself is the credential. Tokens expire after 1 hour.
|
|
2643
|
+
*
|
|
2644
|
+
* `GET /v1/setup-sessions/{token}`
|
|
2645
|
+
*/
|
|
2646
|
+
async retrieve(request, options) {
|
|
2647
|
+
return this._call(setupSessionsRetrieve2, request, options);
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
var Subscriptions = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2651
|
+
/**
|
|
2652
|
+
* List subscriptions
|
|
2653
|
+
*
|
|
2654
|
+
* @remarks
|
|
2655
|
+
* Cursor-paginated list of the account subscriptions, newest first. Filter by `status` or `externalCustomerId`.
|
|
2656
|
+
*
|
|
2657
|
+
* `GET /v1/subscriptions`
|
|
2658
|
+
*/
|
|
2659
|
+
async list(request, options) {
|
|
2660
|
+
return this._paginate(subscriptionsList2, request, options);
|
|
2661
|
+
}
|
|
2662
|
+
/**
|
|
2663
|
+
* Cancel by externalCustomerId
|
|
2664
|
+
*
|
|
2665
|
+
* @remarks
|
|
2666
|
+
* Resolves the customer's single cancelable subscription (optionally scoped by catalogKey) and cancels it. Defaults to cancel at period end.
|
|
2667
|
+
*
|
|
2668
|
+
* `POST /v1/subscriptions/cancel`
|
|
2669
|
+
*/
|
|
2670
|
+
async cancelByExternalCustomer(request, options) {
|
|
2671
|
+
return this._call(subscriptionsCancelByExternalCustomer2, request, options);
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* Uncancel by externalCustomerId
|
|
2675
|
+
*
|
|
2676
|
+
* @remarks
|
|
2677
|
+
* Clears the customer's single scheduled period-end cancellation (optionally scoped by catalogKey).
|
|
2678
|
+
*
|
|
2679
|
+
* `POST /v1/subscriptions/uncancel`
|
|
2680
|
+
*/
|
|
2681
|
+
async uncancelByExternalCustomer(request, options) {
|
|
2682
|
+
return this._call(subscriptionsUncancelByExternalCustomer2, request, options);
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Retrieve a subscription
|
|
2686
|
+
*
|
|
2687
|
+
* `GET /v1/subscriptions/{id}`
|
|
2688
|
+
*/
|
|
2689
|
+
async retrieve(request, options) {
|
|
2690
|
+
return this._call(subscriptionsRetrieve2, request, options);
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* Update a subscription
|
|
2694
|
+
*
|
|
2695
|
+
* @remarks
|
|
2696
|
+
* Cancels, resumes or switches the plan of a subscription. Provide exactly one intent. `{ cancelAtPeriodEnd }` returns a `SubscriptionCancellation`; `{ uncancel: true }`, `{ catalog }` and `{ cancelPendingChange: true }` return the updated `Subscription`. A plan switch applies now (`effective: "now"`, default, prorated with `prorationBehavior`) or at the end of the paid period (`effective: "period_end"`: the subscription shows `pendingChange` and `subscription.updated` fires when the new plan starts). Price either with `POST /v1/subscriptions/{id}/preview` first.
|
|
2697
|
+
*
|
|
2698
|
+
* `PATCH /v1/subscriptions/{id}`
|
|
2699
|
+
*/
|
|
2700
|
+
async update(request, options) {
|
|
2701
|
+
return this._call(subscriptionsUpdate2, request, options);
|
|
2702
|
+
}
|
|
2703
|
+
/**
|
|
2704
|
+
* Cancel a subscription
|
|
2705
|
+
*
|
|
2706
|
+
* @remarks
|
|
2707
|
+
* Defaults to cancel at period end (status stays `active` with cancelAtPeriodEnd=true). Pass cancelAtPeriodEnd=false to cancel immediately.
|
|
2708
|
+
*
|
|
2709
|
+
* `POST /v1/subscriptions/{id}/cancel`
|
|
2710
|
+
*/
|
|
2711
|
+
async cancel(request, options) {
|
|
2712
|
+
return this._call(subscriptionsCancel2, request, options);
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Preview a plan switch
|
|
2716
|
+
*
|
|
2717
|
+
* @remarks
|
|
2718
|
+
* Returns what a plan switch would cost without changing anything: `amountDueNow` (charged when you switch), the next invoice and its lines. Takes the plan-switch fields of `PATCH /v1/subscriptions/{id}` (`catalog`, `prorationBehavior`, `effective`) and runs the same checks, so it fails with the same errors (`plan_unchanged`, `cross_listing_switch_forbidden`, `cancellation_scheduled`, ...). Amounts exclude tax Onflay adds to invoices of tax-collected subscriptions.
|
|
2719
|
+
*
|
|
2720
|
+
* `POST /v1/subscriptions/{id}/preview`
|
|
2721
|
+
*/
|
|
2722
|
+
async previewUpdate(request, options) {
|
|
2723
|
+
return this._call(subscriptionsPreviewUpdate2, request, options);
|
|
2724
|
+
}
|
|
2725
|
+
};
|
|
2726
|
+
var UsageBillingPlans = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2727
|
+
/**
|
|
2728
|
+
* Create a usage billing plan
|
|
2729
|
+
*
|
|
2730
|
+
* @remarks
|
|
2731
|
+
* Attaches metered billing (meter + price) to a subscription. One plan per subscription.
|
|
2732
|
+
*
|
|
2733
|
+
* `POST /v1/usage/billing-plans`
|
|
2734
|
+
*/
|
|
2735
|
+
async create(request, options) {
|
|
2736
|
+
return this._call(usageBillingPlansCreate2, request, options);
|
|
2737
|
+
}
|
|
2738
|
+
/**
|
|
2739
|
+
* Retrieve a usage billing plan
|
|
2740
|
+
*
|
|
2741
|
+
* @remarks
|
|
2742
|
+
* The usage billing plan of a subscription.
|
|
2743
|
+
*
|
|
2744
|
+
* `GET /v1/usage/billing-plans/{subscriptionId}`
|
|
2745
|
+
*/
|
|
2746
|
+
async retrieve(request, options) {
|
|
2747
|
+
return this._call(usageBillingPlansRetrieve2, request, options);
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
var UsageRecords = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2751
|
+
/**
|
|
2752
|
+
* Report usage
|
|
2753
|
+
*
|
|
2754
|
+
* @remarks
|
|
2755
|
+
* Buffers a usage event for a subscription and meter; it is persisted asynchronously. Deduplicated by the body `idempotencyKey`.
|
|
2756
|
+
*
|
|
2757
|
+
* `POST /v1/usage/records`
|
|
2758
|
+
*/
|
|
2759
|
+
async create(request, options) {
|
|
2760
|
+
return this._call(usageRecordsCreate2, request, options);
|
|
2761
|
+
}
|
|
2762
|
+
};
|
|
2763
|
+
var Usage = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2764
|
+
|
|
2765
|
+
get billingPlans() {
|
|
2766
|
+
return this._billingPlans ??= new UsageBillingPlans(this._options);
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
get records() {
|
|
2770
|
+
return this._records ??= new UsageRecords(this._options);
|
|
2771
|
+
}
|
|
2772
|
+
};
|
|
2773
|
+
var WebhookDeliveries = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2774
|
+
/**
|
|
2775
|
+
* List webhook deliveries
|
|
2776
|
+
*
|
|
2777
|
+
* @remarks
|
|
2778
|
+
* Newest first. Cursor-paginated. List items omit `payload`; retrieve a delivery to see it.
|
|
2779
|
+
*
|
|
2780
|
+
* `GET /v1/webhook-deliveries`
|
|
2781
|
+
*/
|
|
2782
|
+
async list(request, options) {
|
|
2783
|
+
return this._paginate(webhookDeliveriesList2, request, options);
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* Retrieve a webhook delivery
|
|
2787
|
+
*
|
|
2788
|
+
* @remarks
|
|
2789
|
+
* Includes the payload that was sent.
|
|
2790
|
+
*
|
|
2791
|
+
* `GET /v1/webhook-deliveries/{id}`
|
|
2792
|
+
*/
|
|
2793
|
+
async retrieve(request, options) {
|
|
2794
|
+
return this._call(webhookDeliveriesRetrieve2, request, options);
|
|
2795
|
+
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Resend a webhook delivery
|
|
2798
|
+
*
|
|
2799
|
+
* @remarks
|
|
2800
|
+
* Queues the delivery for another attempt now. Sets the status back to `PENDING` and enqueues a new attempt. The response omits `payload`.
|
|
2801
|
+
*
|
|
2802
|
+
* `POST /v1/webhook-deliveries/{id}/resend`
|
|
2803
|
+
*/
|
|
2804
|
+
async resend(request, options) {
|
|
2805
|
+
return this._call(webhookDeliveriesResend2, request, options);
|
|
2806
|
+
}
|
|
2807
|
+
};
|
|
2808
|
+
var WebhookEndpoints = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2809
|
+
/**
|
|
2810
|
+
* List webhook endpoints
|
|
2811
|
+
*
|
|
2812
|
+
* @remarks
|
|
2813
|
+
* Newest first. Returns every endpoint in one page; `nextCursor` is always null.
|
|
2814
|
+
*
|
|
2815
|
+
* `GET /v1/webhook-endpoints`
|
|
2816
|
+
*/
|
|
2817
|
+
async list(options) {
|
|
2818
|
+
return this._call(webhookEndpointsList2, void 0, options);
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Create a webhook endpoint
|
|
2822
|
+
*
|
|
2823
|
+
* @remarks
|
|
2824
|
+
* The signing secret is returned once, in `secret`.
|
|
2825
|
+
*
|
|
2826
|
+
* `POST /v1/webhook-endpoints`
|
|
2827
|
+
*/
|
|
2828
|
+
async create(request, options) {
|
|
2829
|
+
return this._call(webhookEndpointsCreate2, request, options);
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* Retrieve a webhook endpoint
|
|
2833
|
+
*
|
|
2834
|
+
* `GET /v1/webhook-endpoints/{id}`
|
|
2835
|
+
*/
|
|
2836
|
+
async retrieve(request, options) {
|
|
2837
|
+
return this._call(webhookEndpointsRetrieve2, request, options);
|
|
2838
|
+
}
|
|
2839
|
+
/**
|
|
2840
|
+
* Delete a webhook endpoint
|
|
2841
|
+
*
|
|
2842
|
+
* @remarks
|
|
2843
|
+
* Deletes the endpoint and its delivery log.
|
|
2844
|
+
*
|
|
2845
|
+
* `DELETE /v1/webhook-endpoints/{id}`
|
|
2846
|
+
*/
|
|
2847
|
+
async delete(request, options) {
|
|
2848
|
+
return this._call(webhookEndpointsDelete2, request, options);
|
|
2849
|
+
}
|
|
2850
|
+
/**
|
|
2851
|
+
* Update a webhook endpoint
|
|
2852
|
+
*
|
|
2853
|
+
* @remarks
|
|
2854
|
+
* Updates the URL, events, description or `isActive`.
|
|
2855
|
+
*
|
|
2856
|
+
* `PATCH /v1/webhook-endpoints/{id}`
|
|
2857
|
+
*/
|
|
2858
|
+
async update(request, options) {
|
|
2859
|
+
return this._call(webhookEndpointsUpdate2, request, options);
|
|
2860
|
+
}
|
|
2861
|
+
};
|
|
2862
|
+
var Onflay = class extends _chunkM52GW7GQjs.ClientSDK {
|
|
2863
|
+
|
|
2864
|
+
get jwks() {
|
|
2865
|
+
return this._jwks ??= new Jwks(this._options);
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
get catalog() {
|
|
2869
|
+
return this._catalog ??= new Catalog(this._options);
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
get checkoutSessions() {
|
|
2873
|
+
return this._checkoutSessions ??= new CheckoutSessions(this._options);
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
get credits() {
|
|
2877
|
+
return this._credits ??= new Credits(this._options);
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2880
|
+
get customerAccess() {
|
|
2881
|
+
return this._customerAccess ??= new CustomerAccess(this._options);
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
get customerPortal() {
|
|
2885
|
+
return this._customerPortal ??= new CustomerPortal(this._options);
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
get customers() {
|
|
2889
|
+
return this._customers ??= new Customers(this._options);
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
get discounts() {
|
|
2893
|
+
return this._discounts ??= new Discounts(this._options);
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
get integrationVerifications() {
|
|
2897
|
+
return this._integrationVerifications ??= new IntegrationVerifications(this._options);
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
get invoices() {
|
|
2901
|
+
return this._invoices ??= new Invoices(this._options);
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
get licenseKeys() {
|
|
2905
|
+
return this._licenseKeys ??= new LicenseKeys(this._options);
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
get meters() {
|
|
2909
|
+
return this._meters ??= new Meters(this._options);
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
get paymentConfirmations() {
|
|
2913
|
+
return this._paymentConfirmations ??= new PaymentConfirmations(this._options);
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
get payments() {
|
|
2917
|
+
return this._payments ??= new Payments(this._options);
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
get prices() {
|
|
2921
|
+
return this._prices ??= new Prices(this._options);
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
get products() {
|
|
2925
|
+
return this._products ??= new Products(this._options);
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
get sandbox() {
|
|
2929
|
+
return this._sandbox ??= new Sandbox(this._options);
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
get setupSessions() {
|
|
2933
|
+
return this._setupSessions ??= new SetupSessions(this._options);
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
get subscriptions() {
|
|
2937
|
+
return this._subscriptions ??= new Subscriptions(this._options);
|
|
2938
|
+
}
|
|
2939
|
+
|
|
2940
|
+
get usage() {
|
|
2941
|
+
return this._usage ??= new Usage(this._options);
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
get webhookDeliveries() {
|
|
2945
|
+
return this._webhookDeliveries ??= new WebhookDeliveries(this._options);
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
get webhookEndpoints() {
|
|
2949
|
+
return this._webhookEndpoints ??= new WebhookEndpoints(this._options);
|
|
2950
|
+
}
|
|
2951
|
+
};
|
|
2952
|
+
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
|
|
2958
|
+
|
|
2959
|
+
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
|
|
2981
|
+
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
|
|
2989
|
+
|
|
2990
|
+
exports.Catalog = Catalog; exports.CatalogListings = CatalogListings; exports.CatalogPlans = CatalogPlans; exports.CatalogProducts = CatalogProducts; exports.CheckoutSessions = CheckoutSessions; exports.Credits = Credits; exports.CustomerAccess = CustomerAccess; exports.CustomerPortal = CustomerPortal; exports.CustomerPortalSessions = CustomerPortalSessions; exports.Customers = Customers; exports.Discounts = Discounts; exports.HTTPClient = _chunkNSR4UQLVjs.HTTPClient; exports.IntegrationVerifications = IntegrationVerifications; exports.Invoices = Invoices; exports.Jwks = Jwks; exports.LicenseKeys = LicenseKeys; exports.Meters = Meters; exports.Onflay = Onflay; exports.PaymentConfirmations = PaymentConfirmations; exports.Payments = Payments; exports.PaymentsRefunds = PaymentsRefunds; exports.Prices = Prices; exports.Products = Products; exports.SDK_METADATA = _chunkYHQ7XIC6js.SDK_METADATA; exports.Sandbox = Sandbox; exports.SandboxPayoutMethods = SandboxPayoutMethods; exports.ServerList = _chunkYHQ7XIC6js.ServerList; exports.ServerProduction = _chunkYHQ7XIC6js.ServerProduction; exports.ServerSandbox = _chunkYHQ7XIC6js.ServerSandbox; exports.SetupSessions = SetupSessions; exports.Subscriptions = Subscriptions; exports.Usage = Usage; exports.UsageBillingPlans = UsageBillingPlans; exports.UsageRecords = UsageRecords; exports.WebhookDeliveries = WebhookDeliveries; exports.WebhookEndpoints = WebhookEndpoints; exports.serverURLFromOptions = _chunkYHQ7XIC6js.serverURLFromOptions;
|
|
43
2991
|
//# sourceMappingURL=index.js.map
|