@dynamic-labs/sdk-api 0.0.1038 → 0.0.1039

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.0.1038",
3
+ "version": "0.0.1039",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -136,7 +136,7 @@ require('../models/WalletTransactionType.cjs');
136
136
  */
137
137
  class CheckoutApi extends runtime.BaseAPI {
138
138
  /**
139
- * Creates a new checkout config for the specified environment.
139
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
140
140
  * Create a checkout
141
141
  */
142
142
  async createCheckoutRaw(requestParameters, initOverrides) {
@@ -159,7 +159,7 @@ class CheckoutApi extends runtime.BaseAPI {
159
159
  return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
160
160
  }
161
161
  /**
162
- * Creates a new checkout config for the specified environment.
162
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
163
163
  * Create a checkout
164
164
  */
165
165
  async createCheckout(requestParameters, initOverrides) {
@@ -167,7 +167,38 @@ class CheckoutApi extends runtime.BaseAPI {
167
167
  return await response.value();
168
168
  }
169
169
  /**
170
- * Soft-deletes a checkout, preventing it from accepting new transactions.
170
+ * Creates a new checkout config for the specified environment.
171
+ * Create a checkout
172
+ */
173
+ async createFlowCheckoutRaw(requestParameters, initOverrides) {
174
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
175
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckout.');
176
+ }
177
+ if (requestParameters.checkoutCreateRequest === null || requestParameters.checkoutCreateRequest === undefined) {
178
+ throw new runtime.RequiredError('checkoutCreateRequest', 'Required parameter requestParameters.checkoutCreateRequest was null or undefined when calling createFlowCheckout.');
179
+ }
180
+ const queryParameters = {};
181
+ const headerParameters = {};
182
+ headerParameters['Content-Type'] = 'application/json';
183
+ const response = await this.request({
184
+ path: `/environments/{environmentId}/flow/checkouts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
185
+ method: 'POST',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ body: CheckoutCreateRequest.CheckoutCreateRequestToJSON(requestParameters.checkoutCreateRequest),
189
+ }, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
191
+ }
192
+ /**
193
+ * Creates a new checkout config for the specified environment.
194
+ * Create a checkout
195
+ */
196
+ async createFlowCheckout(requestParameters, initOverrides) {
197
+ const response = await this.createFlowCheckoutRaw(requestParameters, initOverrides);
198
+ return await response.value();
199
+ }
200
+ /**
201
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
171
202
  * Delete a checkout
172
203
  */
173
204
  async deleteCheckoutRaw(requestParameters, initOverrides) {
@@ -188,7 +219,7 @@ class CheckoutApi extends runtime.BaseAPI {
188
219
  return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
189
220
  }
190
221
  /**
191
- * Soft-deletes a checkout, preventing it from accepting new transactions.
222
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
192
223
  * Delete a checkout
193
224
  */
194
225
  async deleteCheckout(requestParameters, initOverrides) {
@@ -196,6 +227,36 @@ class CheckoutApi extends runtime.BaseAPI {
196
227
  return await response.value();
197
228
  }
198
229
  /**
230
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
231
+ * Delete a checkout
232
+ */
233
+ async deleteFlowCheckoutRaw(requestParameters, initOverrides) {
234
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
235
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling deleteFlowCheckout.');
236
+ }
237
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
238
+ throw new runtime.RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling deleteFlowCheckout.');
239
+ }
240
+ const queryParameters = {};
241
+ const headerParameters = {};
242
+ const response = await this.request({
243
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
244
+ method: 'DELETE',
245
+ headers: headerParameters,
246
+ query: queryParameters,
247
+ }, initOverrides);
248
+ return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
249
+ }
250
+ /**
251
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
252
+ * Delete a checkout
253
+ */
254
+ async deleteFlowCheckout(requestParameters, initOverrides) {
255
+ const response = await this.deleteFlowCheckoutRaw(requestParameters, initOverrides);
256
+ return await response.value();
257
+ }
258
+ /**
259
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
199
260
  * Get a checkout by ID
200
261
  */
201
262
  async getCheckoutRaw(requestParameters, initOverrides) {
@@ -216,6 +277,7 @@ class CheckoutApi extends runtime.BaseAPI {
216
277
  return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
217
278
  }
218
279
  /**
280
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
219
281
  * Get a checkout by ID
220
282
  */
221
283
  async getCheckout(requestParameters, initOverrides) {
@@ -223,6 +285,34 @@ class CheckoutApi extends runtime.BaseAPI {
223
285
  return await response.value();
224
286
  }
225
287
  /**
288
+ * Get a checkout by ID
289
+ */
290
+ async getFlowCheckoutRaw(requestParameters, initOverrides) {
291
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
292
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckout.');
293
+ }
294
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
295
+ throw new runtime.RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling getFlowCheckout.');
296
+ }
297
+ const queryParameters = {};
298
+ const headerParameters = {};
299
+ const response = await this.request({
300
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
301
+ method: 'GET',
302
+ headers: headerParameters,
303
+ query: queryParameters,
304
+ }, initOverrides);
305
+ return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
306
+ }
307
+ /**
308
+ * Get a checkout by ID
309
+ */
310
+ async getFlowCheckout(requestParameters, initOverrides) {
311
+ const response = await this.getFlowCheckoutRaw(requestParameters, initOverrides);
312
+ return await response.value();
313
+ }
314
+ /**
315
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
226
316
  * Update a checkout
227
317
  */
228
318
  async updateCheckoutRaw(requestParameters, initOverrides) {
@@ -248,12 +338,45 @@ class CheckoutApi extends runtime.BaseAPI {
248
338
  return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
249
339
  }
250
340
  /**
341
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
251
342
  * Update a checkout
252
343
  */
253
344
  async updateCheckout(requestParameters, initOverrides) {
254
345
  const response = await this.updateCheckoutRaw(requestParameters, initOverrides);
255
346
  return await response.value();
256
347
  }
348
+ /**
349
+ * Update a checkout
350
+ */
351
+ async updateFlowCheckoutRaw(requestParameters, initOverrides) {
352
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
353
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateFlowCheckout.');
354
+ }
355
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
356
+ throw new runtime.RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling updateFlowCheckout.');
357
+ }
358
+ if (requestParameters.checkoutUpdateRequest === null || requestParameters.checkoutUpdateRequest === undefined) {
359
+ throw new runtime.RequiredError('checkoutUpdateRequest', 'Required parameter requestParameters.checkoutUpdateRequest was null or undefined when calling updateFlowCheckout.');
360
+ }
361
+ const queryParameters = {};
362
+ const headerParameters = {};
363
+ headerParameters['Content-Type'] = 'application/json';
364
+ const response = await this.request({
365
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
366
+ method: 'PATCH',
367
+ headers: headerParameters,
368
+ query: queryParameters,
369
+ body: CheckoutUpdateRequest.CheckoutUpdateRequestToJSON(requestParameters.checkoutUpdateRequest),
370
+ }, initOverrides);
371
+ return new runtime.JSONApiResponse(response, (jsonValue) => Checkout.CheckoutFromJSON(jsonValue));
372
+ }
373
+ /**
374
+ * Update a checkout
375
+ */
376
+ async updateFlowCheckout(requestParameters, initOverrides) {
377
+ const response = await this.updateFlowCheckoutRaw(requestParameters, initOverrides);
378
+ return await response.value();
379
+ }
257
380
  }
258
381
 
259
382
  exports.CheckoutApi = CheckoutApi;
@@ -15,57 +15,114 @@ export interface CreateCheckoutRequest {
15
15
  environmentId: string;
16
16
  checkoutCreateRequest: CheckoutCreateRequest;
17
17
  }
18
+ export interface CreateFlowCheckoutRequest {
19
+ environmentId: string;
20
+ checkoutCreateRequest: CheckoutCreateRequest;
21
+ }
18
22
  export interface DeleteCheckoutRequest {
19
23
  environmentId: string;
20
24
  checkoutId: string;
21
25
  }
26
+ export interface DeleteFlowCheckoutRequest {
27
+ environmentId: string;
28
+ checkoutId: string;
29
+ }
22
30
  export interface GetCheckoutRequest {
23
31
  environmentId: string;
24
32
  checkoutId: string;
25
33
  }
34
+ export interface GetFlowCheckoutRequest {
35
+ environmentId: string;
36
+ checkoutId: string;
37
+ }
26
38
  export interface UpdateCheckoutRequest {
27
39
  environmentId: string;
28
40
  checkoutId: string;
29
41
  checkoutUpdateRequest: CheckoutUpdateRequest;
30
42
  }
43
+ export interface UpdateFlowCheckoutRequest {
44
+ environmentId: string;
45
+ checkoutId: string;
46
+ checkoutUpdateRequest: CheckoutUpdateRequest;
47
+ }
31
48
  /**
32
49
  *
33
50
  */
34
51
  export declare class CheckoutApi extends runtime.BaseAPI {
35
52
  /**
36
- * Creates a new checkout config for the specified environment.
53
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
37
54
  * Create a checkout
38
55
  */
39
56
  createCheckoutRaw(requestParameters: CreateCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
40
57
  /**
41
- * Creates a new checkout config for the specified environment.
58
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
42
59
  * Create a checkout
43
60
  */
44
61
  createCheckout(requestParameters: CreateCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
45
62
  /**
46
- * Soft-deletes a checkout, preventing it from accepting new transactions.
63
+ * Creates a new checkout config for the specified environment.
64
+ * Create a checkout
65
+ */
66
+ createFlowCheckoutRaw(requestParameters: CreateFlowCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
67
+ /**
68
+ * Creates a new checkout config for the specified environment.
69
+ * Create a checkout
70
+ */
71
+ createFlowCheckout(requestParameters: CreateFlowCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
72
+ /**
73
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
47
74
  * Delete a checkout
48
75
  */
49
76
  deleteCheckoutRaw(requestParameters: DeleteCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
50
77
  /**
51
- * Soft-deletes a checkout, preventing it from accepting new transactions.
78
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
52
79
  * Delete a checkout
53
80
  */
54
81
  deleteCheckout(requestParameters: DeleteCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
55
82
  /**
83
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
84
+ * Delete a checkout
85
+ */
86
+ deleteFlowCheckoutRaw(requestParameters: DeleteFlowCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
87
+ /**
88
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
89
+ * Delete a checkout
90
+ */
91
+ deleteFlowCheckout(requestParameters: DeleteFlowCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
92
+ /**
93
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
56
94
  * Get a checkout by ID
57
95
  */
58
96
  getCheckoutRaw(requestParameters: GetCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
59
97
  /**
98
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
60
99
  * Get a checkout by ID
61
100
  */
62
101
  getCheckout(requestParameters: GetCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
63
102
  /**
103
+ * Get a checkout by ID
104
+ */
105
+ getFlowCheckoutRaw(requestParameters: GetFlowCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
106
+ /**
107
+ * Get a checkout by ID
108
+ */
109
+ getFlowCheckout(requestParameters: GetFlowCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
110
+ /**
111
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
64
112
  * Update a checkout
65
113
  */
66
114
  updateCheckoutRaw(requestParameters: UpdateCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
67
115
  /**
116
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
68
117
  * Update a checkout
69
118
  */
70
119
  updateCheckout(requestParameters: UpdateCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
120
+ /**
121
+ * Update a checkout
122
+ */
123
+ updateFlowCheckoutRaw(requestParameters: UpdateFlowCheckoutRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Checkout>>;
124
+ /**
125
+ * Update a checkout
126
+ */
127
+ updateFlowCheckout(requestParameters: UpdateFlowCheckoutRequest, initOverrides?: RequestInit): Promise<Checkout>;
71
128
  }
@@ -132,7 +132,7 @@ import '../models/WalletTransactionType.js';
132
132
  */
133
133
  class CheckoutApi extends BaseAPI {
134
134
  /**
135
- * Creates a new checkout config for the specified environment.
135
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
136
136
  * Create a checkout
137
137
  */
138
138
  async createCheckoutRaw(requestParameters, initOverrides) {
@@ -155,7 +155,7 @@ class CheckoutApi extends BaseAPI {
155
155
  return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
156
156
  }
157
157
  /**
158
- * Creates a new checkout config for the specified environment.
158
+ * Deprecated: use POST /environments/{environmentId}/flow/checkouts instead. Creates a new checkout config for the specified environment.
159
159
  * Create a checkout
160
160
  */
161
161
  async createCheckout(requestParameters, initOverrides) {
@@ -163,7 +163,38 @@ class CheckoutApi extends BaseAPI {
163
163
  return await response.value();
164
164
  }
165
165
  /**
166
- * Soft-deletes a checkout, preventing it from accepting new transactions.
166
+ * Creates a new checkout config for the specified environment.
167
+ * Create a checkout
168
+ */
169
+ async createFlowCheckoutRaw(requestParameters, initOverrides) {
170
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
171
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createFlowCheckout.');
172
+ }
173
+ if (requestParameters.checkoutCreateRequest === null || requestParameters.checkoutCreateRequest === undefined) {
174
+ throw new RequiredError('checkoutCreateRequest', 'Required parameter requestParameters.checkoutCreateRequest was null or undefined when calling createFlowCheckout.');
175
+ }
176
+ const queryParameters = {};
177
+ const headerParameters = {};
178
+ headerParameters['Content-Type'] = 'application/json';
179
+ const response = await this.request({
180
+ path: `/environments/{environmentId}/flow/checkouts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
181
+ method: 'POST',
182
+ headers: headerParameters,
183
+ query: queryParameters,
184
+ body: CheckoutCreateRequestToJSON(requestParameters.checkoutCreateRequest),
185
+ }, initOverrides);
186
+ return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
187
+ }
188
+ /**
189
+ * Creates a new checkout config for the specified environment.
190
+ * Create a checkout
191
+ */
192
+ async createFlowCheckout(requestParameters, initOverrides) {
193
+ const response = await this.createFlowCheckoutRaw(requestParameters, initOverrides);
194
+ return await response.value();
195
+ }
196
+ /**
197
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
167
198
  * Delete a checkout
168
199
  */
169
200
  async deleteCheckoutRaw(requestParameters, initOverrides) {
@@ -184,7 +215,7 @@ class CheckoutApi extends BaseAPI {
184
215
  return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
185
216
  }
186
217
  /**
187
- * Soft-deletes a checkout, preventing it from accepting new transactions.
218
+ * Deprecated: use DELETE /environments/{environmentId}/flow/checkouts/{checkoutId} instead. Soft-deletes a checkout, preventing it from accepting new transactions.
188
219
  * Delete a checkout
189
220
  */
190
221
  async deleteCheckout(requestParameters, initOverrides) {
@@ -192,6 +223,36 @@ class CheckoutApi extends BaseAPI {
192
223
  return await response.value();
193
224
  }
194
225
  /**
226
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
227
+ * Delete a checkout
228
+ */
229
+ async deleteFlowCheckoutRaw(requestParameters, initOverrides) {
230
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
231
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling deleteFlowCheckout.');
232
+ }
233
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
234
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling deleteFlowCheckout.');
235
+ }
236
+ const queryParameters = {};
237
+ const headerParameters = {};
238
+ const response = await this.request({
239
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
240
+ method: 'DELETE',
241
+ headers: headerParameters,
242
+ query: queryParameters,
243
+ }, initOverrides);
244
+ return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
245
+ }
246
+ /**
247
+ * Soft-deletes a checkout, preventing it from accepting new transactions.
248
+ * Delete a checkout
249
+ */
250
+ async deleteFlowCheckout(requestParameters, initOverrides) {
251
+ const response = await this.deleteFlowCheckoutRaw(requestParameters, initOverrides);
252
+ return await response.value();
253
+ }
254
+ /**
255
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
195
256
  * Get a checkout by ID
196
257
  */
197
258
  async getCheckoutRaw(requestParameters, initOverrides) {
@@ -212,6 +273,7 @@ class CheckoutApi extends BaseAPI {
212
273
  return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
213
274
  }
214
275
  /**
276
+ * Deprecated: use GET /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
215
277
  * Get a checkout by ID
216
278
  */
217
279
  async getCheckout(requestParameters, initOverrides) {
@@ -219,6 +281,34 @@ class CheckoutApi extends BaseAPI {
219
281
  return await response.value();
220
282
  }
221
283
  /**
284
+ * Get a checkout by ID
285
+ */
286
+ async getFlowCheckoutRaw(requestParameters, initOverrides) {
287
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
288
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowCheckout.');
289
+ }
290
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
291
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling getFlowCheckout.');
292
+ }
293
+ const queryParameters = {};
294
+ const headerParameters = {};
295
+ const response = await this.request({
296
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
297
+ method: 'GET',
298
+ headers: headerParameters,
299
+ query: queryParameters,
300
+ }, initOverrides);
301
+ return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
302
+ }
303
+ /**
304
+ * Get a checkout by ID
305
+ */
306
+ async getFlowCheckout(requestParameters, initOverrides) {
307
+ const response = await this.getFlowCheckoutRaw(requestParameters, initOverrides);
308
+ return await response.value();
309
+ }
310
+ /**
311
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
222
312
  * Update a checkout
223
313
  */
224
314
  async updateCheckoutRaw(requestParameters, initOverrides) {
@@ -244,12 +334,45 @@ class CheckoutApi extends BaseAPI {
244
334
  return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
245
335
  }
246
336
  /**
337
+ * Deprecated: use PATCH /environments/{environmentId}/flow/checkouts/{checkoutId} instead.
247
338
  * Update a checkout
248
339
  */
249
340
  async updateCheckout(requestParameters, initOverrides) {
250
341
  const response = await this.updateCheckoutRaw(requestParameters, initOverrides);
251
342
  return await response.value();
252
343
  }
344
+ /**
345
+ * Update a checkout
346
+ */
347
+ async updateFlowCheckoutRaw(requestParameters, initOverrides) {
348
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
349
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateFlowCheckout.');
350
+ }
351
+ if (requestParameters.checkoutId === null || requestParameters.checkoutId === undefined) {
352
+ throw new RequiredError('checkoutId', 'Required parameter requestParameters.checkoutId was null or undefined when calling updateFlowCheckout.');
353
+ }
354
+ if (requestParameters.checkoutUpdateRequest === null || requestParameters.checkoutUpdateRequest === undefined) {
355
+ throw new RequiredError('checkoutUpdateRequest', 'Required parameter requestParameters.checkoutUpdateRequest was null or undefined when calling updateFlowCheckout.');
356
+ }
357
+ const queryParameters = {};
358
+ const headerParameters = {};
359
+ headerParameters['Content-Type'] = 'application/json';
360
+ const response = await this.request({
361
+ path: `/environments/{environmentId}/flow/checkouts/{checkoutId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"checkoutId"}}`, encodeURIComponent(String(requestParameters.checkoutId))),
362
+ method: 'PATCH',
363
+ headers: headerParameters,
364
+ query: queryParameters,
365
+ body: CheckoutUpdateRequestToJSON(requestParameters.checkoutUpdateRequest),
366
+ }, initOverrides);
367
+ return new JSONApiResponse(response, (jsonValue) => CheckoutFromJSON(jsonValue));
368
+ }
369
+ /**
370
+ * Update a checkout
371
+ */
372
+ async updateFlowCheckout(requestParameters, initOverrides) {
373
+ const response = await this.updateFlowCheckoutRaw(requestParameters, initOverrides);
374
+ return await response.value();
375
+ }
253
376
  }
254
377
 
255
378
  export { CheckoutApi };