hey-pharmacist-ecommerce 1.1.25 → 1.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -207
- package/dist/index.d.ts +4 -207
- package/dist/index.js +188 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +189 -235
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/CartItem.tsx +0 -10
- package/src/components/ProductCard.tsx +4 -5
- package/src/index.ts +1 -0
- package/src/lib/Apis/api.ts +0 -8
- package/src/lib/Apis/apis/product-variants-api.ts +0 -96
- package/src/lib/Apis/apis/products-api.ts +7 -15
- package/src/lib/Apis/apis/shipping-api.ts +12 -214
- package/src/lib/Apis/models/category-filters.ts +0 -6
- package/src/lib/Apis/models/create-variant-dto.ts +0 -6
- package/src/lib/Apis/models/discounts-insights-dto.ts +0 -6
- package/src/lib/Apis/models/index.ts +0 -29
- package/src/lib/Apis/models/orders-insights-dto.ts +0 -6
- package/src/lib/Apis/models/payment.ts +0 -7
- package/src/lib/Apis/models/product-variant.ts +0 -6
- package/src/lib/Apis/models/products-insights-dto.ts +0 -6
- package/src/lib/Apis/models/rate-dto.ts +0 -6
- package/src/lib/Apis/models/update-product-variant-dto.ts +0 -6
- package/src/providers/WishlistProvider.tsx +3 -4
- package/src/screens/CheckoutScreen.tsx +25 -73
- package/src/lib/Apis/apis/chats-api.ts +0 -1101
- package/src/lib/Apis/apis/drafts-api.ts +0 -448
- package/src/lib/Apis/apis/open-aiapi.ts +0 -513
- package/src/lib/Apis/apis/payment-methods-api.ts +0 -411
- package/src/lib/Apis/apis/product-attributes-api.ts +0 -538
- package/src/lib/Apis/apis/product-favorite-list-api.ts +0 -321
- package/src/lib/Apis/apis/roles-api.ts +0 -614
- package/src/lib/Apis/apis/statistics-api.ts +0 -234
- package/src/lib/Apis/models/add-message-dto.ts +0 -56
- package/src/lib/Apis/models/chat.ts +0 -33
- package/src/lib/Apis/models/create-chat-dto.ts +0 -39
- package/src/lib/Apis/models/create-draft-dto.ts +0 -67
- package/src/lib/Apis/models/create-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/create-role-dto.ts +0 -57
- package/src/lib/Apis/models/create-zone-dto.ts +0 -82
- package/src/lib/Apis/models/default-payment-method-request-dto.ts +0 -27
- package/src/lib/Apis/models/draft.ts +0 -79
- package/src/lib/Apis/models/google-analytics-request-dto.ts +0 -55
- package/src/lib/Apis/models/google-analytics-response-dto.ts +0 -39
- package/src/lib/Apis/models/my-favorite-list-dto.ts +0 -52
- package/src/lib/Apis/models/open-api.ts +0 -33
- package/src/lib/Apis/models/payment-method-data.ts +0 -34
- package/src/lib/Apis/models/payment-method.ts +0 -51
- package/src/lib/Apis/models/populated-chat-dto.ts +0 -95
- package/src/lib/Apis/models/product-attribute.ts +0 -57
- package/src/lib/Apis/models/product.ts +0 -142
- package/src/lib/Apis/models/role.ts +0 -69
- package/src/lib/Apis/models/single-message-populated.ts +0 -59
- package/src/lib/Apis/models/single-suggest-attribute.ts +0 -33
- package/src/lib/Apis/models/statistic-dto.ts +0 -171
- package/src/lib/Apis/models/suggest-attributes.ts +0 -28
- package/src/lib/Apis/models/update-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/update-role-dto.ts +0 -57
- package/src/lib/Apis/models/update-zone-dto.ts +0 -82
- package/src/lib/Apis/models/user.ts +0 -232
- package/src/lib/Apis/models/zone-single-size.ts +0 -51
- package/src/lib/Apis/models/zone.ts +0 -106
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Hey Pharamcist API
|
|
5
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
6
|
-
*
|
|
7
|
-
* OpenAPI spec version: 1.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
15
|
-
import { Configuration } from '../configuration';
|
|
16
|
-
// Some imports not used depending on template conditions
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
|
-
import { DefaultPaymentMethodRequestDTO } from '../models';
|
|
20
|
-
import { PaymentMethodData } from '../models';
|
|
21
|
-
/**
|
|
22
|
-
* PaymentMethodsApi - axios parameter creator
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
|
-
export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
26
|
-
return {
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @summary Set an existing payment method as the default for the authenticated user
|
|
30
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
31
|
-
* @param {*} [options] Override http request option.
|
|
32
|
-
* @throws {RequiredError}
|
|
33
|
-
*/
|
|
34
|
-
changeDefaultPayment: async (body: DefaultPaymentMethodRequestDTO, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35
|
-
// verify required parameter 'body' is not null or undefined
|
|
36
|
-
if (body === null || body === undefined) {
|
|
37
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling changeDefaultPayment.');
|
|
38
|
-
}
|
|
39
|
-
const localVarPath = `/payment-methods/set-existing-as-default`;
|
|
40
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
42
|
-
let baseOptions;
|
|
43
|
-
if (configuration) {
|
|
44
|
-
baseOptions = configuration.baseOptions;
|
|
45
|
-
}
|
|
46
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options};
|
|
47
|
-
const localVarHeaderParameter = {} as any;
|
|
48
|
-
const localVarQueryParameter = {} as any;
|
|
49
|
-
|
|
50
|
-
// authentication bearer required
|
|
51
|
-
// http bearer authentication required
|
|
52
|
-
if (configuration && configuration.accessToken) {
|
|
53
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
54
|
-
? await configuration.accessToken()
|
|
55
|
-
: await configuration.accessToken;
|
|
56
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// authentication x-store-key required
|
|
60
|
-
if (configuration && configuration.apiKey) {
|
|
61
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
62
|
-
? await configuration.apiKey("x-store-key")
|
|
63
|
-
: await configuration.apiKey;
|
|
64
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
68
|
-
|
|
69
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
70
|
-
for (const key in localVarQueryParameter) {
|
|
71
|
-
query.set(key, localVarQueryParameter[key]);
|
|
72
|
-
}
|
|
73
|
-
for (const key in options.params) {
|
|
74
|
-
query.set(key, options.params[key]);
|
|
75
|
-
}
|
|
76
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
77
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
79
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
80
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
84
|
-
options: localVarRequestOptions,
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* @summary Attach a new payment method for the authenticated user
|
|
90
|
-
* @param {*} [options] Override http request option.
|
|
91
|
-
* @throws {RequiredError}
|
|
92
|
-
*/
|
|
93
|
-
changePaymentMethod: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
94
|
-
const localVarPath = `/payment-methods/attach`;
|
|
95
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
96
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
97
|
-
let baseOptions;
|
|
98
|
-
if (configuration) {
|
|
99
|
-
baseOptions = configuration.baseOptions;
|
|
100
|
-
}
|
|
101
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
102
|
-
const localVarHeaderParameter = {} as any;
|
|
103
|
-
const localVarQueryParameter = {} as any;
|
|
104
|
-
|
|
105
|
-
// authentication bearer required
|
|
106
|
-
// http bearer authentication required
|
|
107
|
-
if (configuration && configuration.accessToken) {
|
|
108
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
109
|
-
? await configuration.accessToken()
|
|
110
|
-
: await configuration.accessToken;
|
|
111
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// authentication x-store-key required
|
|
115
|
-
if (configuration && configuration.apiKey) {
|
|
116
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
117
|
-
? await configuration.apiKey("x-store-key")
|
|
118
|
-
: await configuration.apiKey;
|
|
119
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
123
|
-
for (const key in localVarQueryParameter) {
|
|
124
|
-
query.set(key, localVarQueryParameter[key]);
|
|
125
|
-
}
|
|
126
|
-
for (const key in options.params) {
|
|
127
|
-
query.set(key, options.params[key]);
|
|
128
|
-
}
|
|
129
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
130
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
131
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
132
|
-
|
|
133
|
-
return {
|
|
134
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
135
|
-
options: localVarRequestOptions,
|
|
136
|
-
};
|
|
137
|
-
},
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
* @summary Detach a payment method from the authenticated user
|
|
141
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
142
|
-
* @param {*} [options] Override http request option.
|
|
143
|
-
* @throws {RequiredError}
|
|
144
|
-
*/
|
|
145
|
-
detachPaymentMethod: async (body: DefaultPaymentMethodRequestDTO, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
146
|
-
// verify required parameter 'body' is not null or undefined
|
|
147
|
-
if (body === null || body === undefined) {
|
|
148
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling detachPaymentMethod.');
|
|
149
|
-
}
|
|
150
|
-
const localVarPath = `/payment-methods/detach`;
|
|
151
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
152
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
153
|
-
let baseOptions;
|
|
154
|
-
if (configuration) {
|
|
155
|
-
baseOptions = configuration.baseOptions;
|
|
156
|
-
}
|
|
157
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
158
|
-
const localVarHeaderParameter = {} as any;
|
|
159
|
-
const localVarQueryParameter = {} as any;
|
|
160
|
-
|
|
161
|
-
// authentication bearer required
|
|
162
|
-
// http bearer authentication required
|
|
163
|
-
if (configuration && configuration.accessToken) {
|
|
164
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
165
|
-
? await configuration.accessToken()
|
|
166
|
-
: await configuration.accessToken;
|
|
167
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// authentication x-store-key required
|
|
171
|
-
if (configuration && configuration.apiKey) {
|
|
172
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
173
|
-
? await configuration.apiKey("x-store-key")
|
|
174
|
-
: await configuration.apiKey;
|
|
175
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
179
|
-
|
|
180
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
181
|
-
for (const key in localVarQueryParameter) {
|
|
182
|
-
query.set(key, localVarQueryParameter[key]);
|
|
183
|
-
}
|
|
184
|
-
for (const key in options.params) {
|
|
185
|
-
query.set(key, options.params[key]);
|
|
186
|
-
}
|
|
187
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
188
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
189
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
190
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
191
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
195
|
-
options: localVarRequestOptions,
|
|
196
|
-
};
|
|
197
|
-
},
|
|
198
|
-
/**
|
|
199
|
-
*
|
|
200
|
-
* @summary List the authenticated user's payment methods
|
|
201
|
-
* @param {*} [options] Override http request option.
|
|
202
|
-
* @throws {RequiredError}
|
|
203
|
-
*/
|
|
204
|
-
getPaymentMethods: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
205
|
-
const localVarPath = `/payment-methods/list`;
|
|
206
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
207
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
208
|
-
let baseOptions;
|
|
209
|
-
if (configuration) {
|
|
210
|
-
baseOptions = configuration.baseOptions;
|
|
211
|
-
}
|
|
212
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
213
|
-
const localVarHeaderParameter = {} as any;
|
|
214
|
-
const localVarQueryParameter = {} as any;
|
|
215
|
-
|
|
216
|
-
// authentication bearer required
|
|
217
|
-
// http bearer authentication required
|
|
218
|
-
if (configuration && configuration.accessToken) {
|
|
219
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
220
|
-
? await configuration.accessToken()
|
|
221
|
-
: await configuration.accessToken;
|
|
222
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// authentication x-store-key required
|
|
226
|
-
if (configuration && configuration.apiKey) {
|
|
227
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
228
|
-
? await configuration.apiKey("x-store-key")
|
|
229
|
-
: await configuration.apiKey;
|
|
230
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
234
|
-
for (const key in localVarQueryParameter) {
|
|
235
|
-
query.set(key, localVarQueryParameter[key]);
|
|
236
|
-
}
|
|
237
|
-
for (const key in options.params) {
|
|
238
|
-
query.set(key, options.params[key]);
|
|
239
|
-
}
|
|
240
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
241
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
242
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
243
|
-
|
|
244
|
-
return {
|
|
245
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
246
|
-
options: localVarRequestOptions,
|
|
247
|
-
};
|
|
248
|
-
},
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* PaymentMethodsApi - functional programming interface
|
|
254
|
-
* @export
|
|
255
|
-
*/
|
|
256
|
-
export const PaymentMethodsApiFp = function(configuration?: Configuration) {
|
|
257
|
-
return {
|
|
258
|
-
/**
|
|
259
|
-
*
|
|
260
|
-
* @summary Set an existing payment method as the default for the authenticated user
|
|
261
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
262
|
-
* @param {*} [options] Override http request option.
|
|
263
|
-
* @throws {RequiredError}
|
|
264
|
-
*/
|
|
265
|
-
async changeDefaultPayment(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaymentMethodData>>> {
|
|
266
|
-
const localVarAxiosArgs = await PaymentMethodsApiAxiosParamCreator(configuration).changeDefaultPayment(body, options);
|
|
267
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
268
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
269
|
-
return axios.request(axiosRequestArgs);
|
|
270
|
-
};
|
|
271
|
-
},
|
|
272
|
-
/**
|
|
273
|
-
*
|
|
274
|
-
* @summary Attach a new payment method for the authenticated user
|
|
275
|
-
* @param {*} [options] Override http request option.
|
|
276
|
-
* @throws {RequiredError}
|
|
277
|
-
*/
|
|
278
|
-
async changePaymentMethod(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaymentMethodData>>> {
|
|
279
|
-
const localVarAxiosArgs = await PaymentMethodsApiAxiosParamCreator(configuration).changePaymentMethod(options);
|
|
280
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
281
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
282
|
-
return axios.request(axiosRequestArgs);
|
|
283
|
-
};
|
|
284
|
-
},
|
|
285
|
-
/**
|
|
286
|
-
*
|
|
287
|
-
* @summary Detach a payment method from the authenticated user
|
|
288
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
289
|
-
* @param {*} [options] Override http request option.
|
|
290
|
-
* @throws {RequiredError}
|
|
291
|
-
*/
|
|
292
|
-
async detachPaymentMethod(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaymentMethodData>>> {
|
|
293
|
-
const localVarAxiosArgs = await PaymentMethodsApiAxiosParamCreator(configuration).detachPaymentMethod(body, options);
|
|
294
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
295
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
296
|
-
return axios.request(axiosRequestArgs);
|
|
297
|
-
};
|
|
298
|
-
},
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @summary List the authenticated user's payment methods
|
|
302
|
-
* @param {*} [options] Override http request option.
|
|
303
|
-
* @throws {RequiredError}
|
|
304
|
-
*/
|
|
305
|
-
async getPaymentMethods(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaymentMethodData>>> {
|
|
306
|
-
const localVarAxiosArgs = await PaymentMethodsApiAxiosParamCreator(configuration).getPaymentMethods(options);
|
|
307
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
308
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
309
|
-
return axios.request(axiosRequestArgs);
|
|
310
|
-
};
|
|
311
|
-
},
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* PaymentMethodsApi - factory interface
|
|
317
|
-
* @export
|
|
318
|
-
*/
|
|
319
|
-
export const PaymentMethodsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
320
|
-
return {
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
* @summary Set an existing payment method as the default for the authenticated user
|
|
324
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
325
|
-
* @param {*} [options] Override http request option.
|
|
326
|
-
* @throws {RequiredError}
|
|
327
|
-
*/
|
|
328
|
-
async changeDefaultPayment(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig): Promise<AxiosResponse<PaymentMethodData>> {
|
|
329
|
-
return PaymentMethodsApiFp(configuration).changeDefaultPayment(body, options).then((request) => request(axios, basePath));
|
|
330
|
-
},
|
|
331
|
-
/**
|
|
332
|
-
*
|
|
333
|
-
* @summary Attach a new payment method for the authenticated user
|
|
334
|
-
* @param {*} [options] Override http request option.
|
|
335
|
-
* @throws {RequiredError}
|
|
336
|
-
*/
|
|
337
|
-
async changePaymentMethod(options?: AxiosRequestConfig): Promise<AxiosResponse<PaymentMethodData>> {
|
|
338
|
-
return PaymentMethodsApiFp(configuration).changePaymentMethod(options).then((request) => request(axios, basePath));
|
|
339
|
-
},
|
|
340
|
-
/**
|
|
341
|
-
*
|
|
342
|
-
* @summary Detach a payment method from the authenticated user
|
|
343
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
344
|
-
* @param {*} [options] Override http request option.
|
|
345
|
-
* @throws {RequiredError}
|
|
346
|
-
*/
|
|
347
|
-
async detachPaymentMethod(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig): Promise<AxiosResponse<PaymentMethodData>> {
|
|
348
|
-
return PaymentMethodsApiFp(configuration).detachPaymentMethod(body, options).then((request) => request(axios, basePath));
|
|
349
|
-
},
|
|
350
|
-
/**
|
|
351
|
-
*
|
|
352
|
-
* @summary List the authenticated user's payment methods
|
|
353
|
-
* @param {*} [options] Override http request option.
|
|
354
|
-
* @throws {RequiredError}
|
|
355
|
-
*/
|
|
356
|
-
async getPaymentMethods(options?: AxiosRequestConfig): Promise<AxiosResponse<PaymentMethodData>> {
|
|
357
|
-
return PaymentMethodsApiFp(configuration).getPaymentMethods(options).then((request) => request(axios, basePath));
|
|
358
|
-
},
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* PaymentMethodsApi - object-oriented interface
|
|
364
|
-
* @export
|
|
365
|
-
* @class PaymentMethodsApi
|
|
366
|
-
* @extends {BaseAPI}
|
|
367
|
-
*/
|
|
368
|
-
export class PaymentMethodsApi extends BaseAPI {
|
|
369
|
-
/**
|
|
370
|
-
*
|
|
371
|
-
* @summary Set an existing payment method as the default for the authenticated user
|
|
372
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
373
|
-
* @param {*} [options] Override http request option.
|
|
374
|
-
* @throws {RequiredError}
|
|
375
|
-
* @memberof PaymentMethodsApi
|
|
376
|
-
*/
|
|
377
|
-
public async changeDefaultPayment(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaymentMethodData>> {
|
|
378
|
-
return PaymentMethodsApiFp(this.configuration).changeDefaultPayment(body, options).then((request) => request(this.axios, this.basePath));
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
*
|
|
382
|
-
* @summary Attach a new payment method for the authenticated user
|
|
383
|
-
* @param {*} [options] Override http request option.
|
|
384
|
-
* @throws {RequiredError}
|
|
385
|
-
* @memberof PaymentMethodsApi
|
|
386
|
-
*/
|
|
387
|
-
public async changePaymentMethod(options?: AxiosRequestConfig) : Promise<AxiosResponse<PaymentMethodData>> {
|
|
388
|
-
return PaymentMethodsApiFp(this.configuration).changePaymentMethod(options).then((request) => request(this.axios, this.basePath));
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
*
|
|
392
|
-
* @summary Detach a payment method from the authenticated user
|
|
393
|
-
* @param {DefaultPaymentMethodRequestDTO} body
|
|
394
|
-
* @param {*} [options] Override http request option.
|
|
395
|
-
* @throws {RequiredError}
|
|
396
|
-
* @memberof PaymentMethodsApi
|
|
397
|
-
*/
|
|
398
|
-
public async detachPaymentMethod(body: DefaultPaymentMethodRequestDTO, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaymentMethodData>> {
|
|
399
|
-
return PaymentMethodsApiFp(this.configuration).detachPaymentMethod(body, options).then((request) => request(this.axios, this.basePath));
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
*
|
|
403
|
-
* @summary List the authenticated user's payment methods
|
|
404
|
-
* @param {*} [options] Override http request option.
|
|
405
|
-
* @throws {RequiredError}
|
|
406
|
-
* @memberof PaymentMethodsApi
|
|
407
|
-
*/
|
|
408
|
-
public async getPaymentMethods(options?: AxiosRequestConfig) : Promise<AxiosResponse<PaymentMethodData>> {
|
|
409
|
-
return PaymentMethodsApiFp(this.configuration).getPaymentMethods(options).then((request) => request(this.axios, this.basePath));
|
|
410
|
-
}
|
|
411
|
-
}
|