ultracart_rest_api_v2_typescript 4.0.237 → 4.0.240
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/README.md +5 -2
- package/dist/apis/ChannelPartnerApi.d.ts +104 -1
- package/dist/apis/ChannelPartnerApi.js +212 -0
- package/dist/models/ConversationAgentAuth.d.ts +12 -0
- package/dist/models/ConversationAgentAuth.js +4 -0
- package/dist/models/CustomerQuery.d.ts +6 -0
- package/dist/models/CustomerQuery.js +2 -0
- package/package.json +1 -1
- package/src/apis/ChannelPartnerApi.ts +258 -0
- package/src/models/ConversationAgentAuth.ts +16 -0
- package/src/models/CustomerQuery.ts +8 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.240
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.240 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,9 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.240 | 01/09/2025 | fix for broken 4.0.39 due to incorrect query sig on getCustomers |
|
|
58
|
+
| 4.0.239 | 01/09/2025 | added emails parameter to customer queries, refundOrder added to Channel partner |
|
|
59
|
+
| 4.0.238 | 12/13/2024 | added user and group ids to conversation agent auth object |
|
|
57
60
|
| 4.0.237 | 11/11/2024 | added seo properties to item.content object |
|
|
58
61
|
| 4.0.236 | 11/07/2024 | Coupon - PercentOffWithItemsQuantityPurchase - added support for tags |
|
|
59
62
|
| 4.0.235 | 11/04/2024 | item - new constant for auto order schedule of every 5 months |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { ChannelPartnerCancelResponse, ChannelPartnerEstimateShippingResponse, ChannelPartnerEstimateTaxResponse, ChannelPartnerImportResponse, ChannelPartnerOrder, ChannelPartnerShipToPreference, ChannelPartnerShipToPreferenceResponse, ChannelPartnerShipToPreferencesResponse, ChannelPartnersResponse } from '../models';
|
|
13
|
+
import { ChannelPartnerCancelResponse, ChannelPartnerEstimateShippingResponse, ChannelPartnerEstimateTaxResponse, ChannelPartnerImportResponse, ChannelPartnerOrder, ChannelPartnerShipToPreference, ChannelPartnerShipToPreferenceResponse, ChannelPartnerShipToPreferencesResponse, ChannelPartnersResponse, Order, OrderResponse } from '../models';
|
|
14
14
|
export interface CancelOrderByChannelPartnerOrderIdRequest {
|
|
15
15
|
orderId: string;
|
|
16
16
|
}
|
|
@@ -27,6 +27,14 @@ export interface EstimateShippingForChannelPartnerOrderRequest {
|
|
|
27
27
|
export interface EstimateTaxForChannelPartnerOrderRequest {
|
|
28
28
|
channelPartnerOrder: ChannelPartnerOrder;
|
|
29
29
|
}
|
|
30
|
+
export interface GetChannelPartnerOrderRequest {
|
|
31
|
+
orderId: string;
|
|
32
|
+
expand?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetChannelPartnerOrderByChannelPartnerOrderIdRequest {
|
|
35
|
+
orderId: string;
|
|
36
|
+
expand?: string;
|
|
37
|
+
}
|
|
30
38
|
export interface GetChannelPartnerShipToPreferenceRequest {
|
|
31
39
|
channelPartnerOid: number;
|
|
32
40
|
channelPartnerShipToPreferenceOid: number;
|
|
@@ -41,6 +49,18 @@ export interface InsertChannelPartnerShipToPreferenceRequest {
|
|
|
41
49
|
channelPartnerOid: number;
|
|
42
50
|
shipToPreference: ChannelPartnerShipToPreference;
|
|
43
51
|
}
|
|
52
|
+
export interface RefundChannelPartnerOrderRequest {
|
|
53
|
+
orderId: string;
|
|
54
|
+
order: Order;
|
|
55
|
+
rejectAfterRefund?: boolean;
|
|
56
|
+
skipCustomerNotification?: boolean;
|
|
57
|
+
autoOrderCancel?: boolean;
|
|
58
|
+
manualRefund?: boolean;
|
|
59
|
+
reverseAffiliateTransactions?: boolean;
|
|
60
|
+
issueStoreCredit?: boolean;
|
|
61
|
+
autoOrderCancelReason?: string;
|
|
62
|
+
expand?: string;
|
|
63
|
+
}
|
|
44
64
|
export interface UpdateChannelPartnerShipToPreferenceRequest {
|
|
45
65
|
channelPartnerOid: number;
|
|
46
66
|
channelPartnerShipToPreferenceOid: number;
|
|
@@ -124,6 +144,36 @@ export interface ChannelPartnerApiInterface {
|
|
|
124
144
|
* Estimate tax for channel partner order
|
|
125
145
|
*/
|
|
126
146
|
estimateTaxForChannelPartnerOrder(requestParameters: EstimateTaxForChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerEstimateTaxResponse>;
|
|
147
|
+
/**
|
|
148
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
149
|
+
* @summary Retrieve a channel partner order
|
|
150
|
+
* @param {string} orderId The order id to retrieve.
|
|
151
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.getOrder documentation for examples
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
* @memberof ChannelPartnerApiInterface
|
|
155
|
+
*/
|
|
156
|
+
getChannelPartnerOrderRaw(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
157
|
+
/**
|
|
158
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
159
|
+
* Retrieve a channel partner order
|
|
160
|
+
*/
|
|
161
|
+
getChannelPartnerOrder(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
164
|
+
* @summary Retrieve a channel partner order by the channel partner order id
|
|
165
|
+
* @param {string} orderId The channel partner order id to retrieve.
|
|
166
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.getOrder documentation for examples
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
* @memberof ChannelPartnerApiInterface
|
|
170
|
+
*/
|
|
171
|
+
getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
172
|
+
/**
|
|
173
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
174
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
175
|
+
*/
|
|
176
|
+
getChannelPartnerOrderByChannelPartnerOrderId(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
127
177
|
/**
|
|
128
178
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
129
179
|
* @summary Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
@@ -195,6 +245,29 @@ export interface ChannelPartnerApiInterface {
|
|
|
195
245
|
* Insert a ship to preference record for the channel partner.
|
|
196
246
|
*/
|
|
197
247
|
insertChannelPartnerShipToPreference(requestParameters: InsertChannelPartnerShipToPreferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerShipToPreferenceResponse>;
|
|
248
|
+
/**
|
|
249
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
250
|
+
* @summary Refund a channel partner order
|
|
251
|
+
* @param {string} orderId The order id to refund.
|
|
252
|
+
* @param {Order} order Order to refund
|
|
253
|
+
* @param {boolean} [rejectAfterRefund] Reject order after refund
|
|
254
|
+
* @param {boolean} [skipCustomerNotification] Skip customer email notification
|
|
255
|
+
* @param {boolean} [autoOrderCancel] Cancel associated auto orders
|
|
256
|
+
* @param {boolean} [manualRefund] Consider a manual refund done externally
|
|
257
|
+
* @param {boolean} [reverseAffiliateTransactions] Reverse affiliate transactions
|
|
258
|
+
* @param {boolean} [issueStoreCredit] Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
|
|
259
|
+
* @param {string} [autoOrderCancelReason] Reason for auto orders cancellation
|
|
260
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.refundOrder documentation for examples
|
|
261
|
+
* @param {*} [options] Override http request option.
|
|
262
|
+
* @throws {RequiredError}
|
|
263
|
+
* @memberof ChannelPartnerApiInterface
|
|
264
|
+
*/
|
|
265
|
+
refundChannelPartnerOrderRaw(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
266
|
+
/**
|
|
267
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
268
|
+
* Refund a channel partner order
|
|
269
|
+
*/
|
|
270
|
+
refundChannelPartnerOrder(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
198
271
|
/**
|
|
199
272
|
* Update a ship to preference record for the channel partner.
|
|
200
273
|
* @summary Update a ship to preference record for the channel partner.
|
|
@@ -266,6 +339,26 @@ export declare class ChannelPartnerApi extends runtime.BaseAPI implements Channe
|
|
|
266
339
|
* Estimate tax for channel partner order
|
|
267
340
|
*/
|
|
268
341
|
estimateTaxForChannelPartnerOrder(requestParameters: EstimateTaxForChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerEstimateTaxResponse>;
|
|
342
|
+
/**
|
|
343
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
344
|
+
* Retrieve a channel partner order
|
|
345
|
+
*/
|
|
346
|
+
getChannelPartnerOrderRaw(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
347
|
+
/**
|
|
348
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
349
|
+
* Retrieve a channel partner order
|
|
350
|
+
*/
|
|
351
|
+
getChannelPartnerOrder(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
352
|
+
/**
|
|
353
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
354
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
355
|
+
*/
|
|
356
|
+
getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
357
|
+
/**
|
|
358
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
359
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
360
|
+
*/
|
|
361
|
+
getChannelPartnerOrderByChannelPartnerOrderId(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
269
362
|
/**
|
|
270
363
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
271
364
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
@@ -316,6 +409,16 @@ export declare class ChannelPartnerApi extends runtime.BaseAPI implements Channe
|
|
|
316
409
|
* Insert a ship to preference record for the channel partner.
|
|
317
410
|
*/
|
|
318
411
|
insertChannelPartnerShipToPreference(requestParameters: InsertChannelPartnerShipToPreferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerShipToPreferenceResponse>;
|
|
412
|
+
/**
|
|
413
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
414
|
+
* Refund a channel partner order
|
|
415
|
+
*/
|
|
416
|
+
refundChannelPartnerOrderRaw(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
417
|
+
/**
|
|
418
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
419
|
+
* Refund a channel partner order
|
|
420
|
+
*/
|
|
421
|
+
refundChannelPartnerOrder(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
319
422
|
/**
|
|
320
423
|
* Update a ship to preference record for the channel partner.
|
|
321
424
|
* Update a ship to preference record for the channel partner.
|
|
@@ -375,6 +375,130 @@ var ChannelPartnerApi = /** @class */ (function (_super) {
|
|
|
375
375
|
});
|
|
376
376
|
});
|
|
377
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
380
|
+
* Retrieve a channel partner order
|
|
381
|
+
*/
|
|
382
|
+
ChannelPartnerApi.prototype.getChannelPartnerOrderRaw = function (requestParameters, initOverrides) {
|
|
383
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
384
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
385
|
+
return __generator(this, function (_c) {
|
|
386
|
+
switch (_c.label) {
|
|
387
|
+
case 0:
|
|
388
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
389
|
+
throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling getChannelPartnerOrder.');
|
|
390
|
+
}
|
|
391
|
+
queryParameters = {};
|
|
392
|
+
if (requestParameters.expand !== undefined) {
|
|
393
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
394
|
+
}
|
|
395
|
+
headerParameters = {};
|
|
396
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
397
|
+
// oauth required
|
|
398
|
+
_a = headerParameters;
|
|
399
|
+
_b = "Authorization";
|
|
400
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["channel_partner_read"])];
|
|
401
|
+
case 1:
|
|
402
|
+
// oauth required
|
|
403
|
+
_a[_b] = _c.sent();
|
|
404
|
+
_c.label = 2;
|
|
405
|
+
case 2:
|
|
406
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
407
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
408
|
+
}
|
|
409
|
+
return [4 /*yield*/, this.request({
|
|
410
|
+
path: "/channel_partner/orders/{order_id}".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
|
|
411
|
+
method: 'GET',
|
|
412
|
+
headers: headerParameters,
|
|
413
|
+
query: queryParameters,
|
|
414
|
+
}, initOverrides)];
|
|
415
|
+
case 3:
|
|
416
|
+
response = _c.sent();
|
|
417
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderResponseFromJSON)(jsonValue); })];
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
424
|
+
* Retrieve a channel partner order
|
|
425
|
+
*/
|
|
426
|
+
ChannelPartnerApi.prototype.getChannelPartnerOrder = function (requestParameters, initOverrides) {
|
|
427
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
428
|
+
var response;
|
|
429
|
+
return __generator(this, function (_a) {
|
|
430
|
+
switch (_a.label) {
|
|
431
|
+
case 0: return [4 /*yield*/, this.getChannelPartnerOrderRaw(requestParameters, initOverrides)];
|
|
432
|
+
case 1:
|
|
433
|
+
response = _a.sent();
|
|
434
|
+
return [4 /*yield*/, response.value()];
|
|
435
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
442
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
443
|
+
*/
|
|
444
|
+
ChannelPartnerApi.prototype.getChannelPartnerOrderByChannelPartnerOrderIdRaw = function (requestParameters, initOverrides) {
|
|
445
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
446
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
447
|
+
return __generator(this, function (_c) {
|
|
448
|
+
switch (_c.label) {
|
|
449
|
+
case 0:
|
|
450
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
451
|
+
throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling getChannelPartnerOrderByChannelPartnerOrderId.');
|
|
452
|
+
}
|
|
453
|
+
queryParameters = {};
|
|
454
|
+
if (requestParameters.expand !== undefined) {
|
|
455
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
456
|
+
}
|
|
457
|
+
headerParameters = {};
|
|
458
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
459
|
+
// oauth required
|
|
460
|
+
_a = headerParameters;
|
|
461
|
+
_b = "Authorization";
|
|
462
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["channel_partner_read"])];
|
|
463
|
+
case 1:
|
|
464
|
+
// oauth required
|
|
465
|
+
_a[_b] = _c.sent();
|
|
466
|
+
_c.label = 2;
|
|
467
|
+
case 2:
|
|
468
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
469
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
470
|
+
}
|
|
471
|
+
return [4 /*yield*/, this.request({
|
|
472
|
+
path: "/channel_partner/orders/by_channel_partner_order_id/{order_id}".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
|
|
473
|
+
method: 'GET',
|
|
474
|
+
headers: headerParameters,
|
|
475
|
+
query: queryParameters,
|
|
476
|
+
}, initOverrides)];
|
|
477
|
+
case 3:
|
|
478
|
+
response = _c.sent();
|
|
479
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderResponseFromJSON)(jsonValue); })];
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
/**
|
|
485
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
486
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
487
|
+
*/
|
|
488
|
+
ChannelPartnerApi.prototype.getChannelPartnerOrderByChannelPartnerOrderId = function (requestParameters, initOverrides) {
|
|
489
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
490
|
+
var response;
|
|
491
|
+
return __generator(this, function (_a) {
|
|
492
|
+
switch (_a.label) {
|
|
493
|
+
case 0: return [4 /*yield*/, this.getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters, initOverrides)];
|
|
494
|
+
case 1:
|
|
495
|
+
response = _a.sent();
|
|
496
|
+
return [4 /*yield*/, response.value()];
|
|
497
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
};
|
|
378
502
|
/**
|
|
379
503
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
380
504
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
@@ -677,6 +801,94 @@ var ChannelPartnerApi = /** @class */ (function (_super) {
|
|
|
677
801
|
});
|
|
678
802
|
});
|
|
679
803
|
};
|
|
804
|
+
/**
|
|
805
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
806
|
+
* Refund a channel partner order
|
|
807
|
+
*/
|
|
808
|
+
ChannelPartnerApi.prototype.refundChannelPartnerOrderRaw = function (requestParameters, initOverrides) {
|
|
809
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
810
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
811
|
+
return __generator(this, function (_c) {
|
|
812
|
+
switch (_c.label) {
|
|
813
|
+
case 0:
|
|
814
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
815
|
+
throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling refundChannelPartnerOrder.');
|
|
816
|
+
}
|
|
817
|
+
if (requestParameters.order === null || requestParameters.order === undefined) {
|
|
818
|
+
throw new runtime.RequiredError('order', 'Required parameter requestParameters.order was null or undefined when calling refundChannelPartnerOrder.');
|
|
819
|
+
}
|
|
820
|
+
queryParameters = {};
|
|
821
|
+
if (requestParameters.rejectAfterRefund !== undefined) {
|
|
822
|
+
queryParameters['reject_after_refund'] = requestParameters.rejectAfterRefund;
|
|
823
|
+
}
|
|
824
|
+
if (requestParameters.skipCustomerNotification !== undefined) {
|
|
825
|
+
queryParameters['skip_customer_notification'] = requestParameters.skipCustomerNotification;
|
|
826
|
+
}
|
|
827
|
+
if (requestParameters.autoOrderCancel !== undefined) {
|
|
828
|
+
queryParameters['auto_order_cancel'] = requestParameters.autoOrderCancel;
|
|
829
|
+
}
|
|
830
|
+
if (requestParameters.manualRefund !== undefined) {
|
|
831
|
+
queryParameters['manual_refund'] = requestParameters.manualRefund;
|
|
832
|
+
}
|
|
833
|
+
if (requestParameters.reverseAffiliateTransactions !== undefined) {
|
|
834
|
+
queryParameters['reverse_affiliate_transactions'] = requestParameters.reverseAffiliateTransactions;
|
|
835
|
+
}
|
|
836
|
+
if (requestParameters.issueStoreCredit !== undefined) {
|
|
837
|
+
queryParameters['issue_store_credit'] = requestParameters.issueStoreCredit;
|
|
838
|
+
}
|
|
839
|
+
if (requestParameters.autoOrderCancelReason !== undefined) {
|
|
840
|
+
queryParameters['auto_order_cancel_reason'] = requestParameters.autoOrderCancelReason;
|
|
841
|
+
}
|
|
842
|
+
if (requestParameters.expand !== undefined) {
|
|
843
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
844
|
+
}
|
|
845
|
+
headerParameters = {};
|
|
846
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
847
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
848
|
+
// oauth required
|
|
849
|
+
_a = headerParameters;
|
|
850
|
+
_b = "Authorization";
|
|
851
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["channel_partner_write"])];
|
|
852
|
+
case 1:
|
|
853
|
+
// oauth required
|
|
854
|
+
_a[_b] = _c.sent();
|
|
855
|
+
_c.label = 2;
|
|
856
|
+
case 2:
|
|
857
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
858
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
859
|
+
}
|
|
860
|
+
return [4 /*yield*/, this.request({
|
|
861
|
+
path: "/channel_partner/orders/{order_id}/refund".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
|
|
862
|
+
method: 'PUT',
|
|
863
|
+
headers: headerParameters,
|
|
864
|
+
query: queryParameters,
|
|
865
|
+
body: (0, models_1.OrderToJSON)(requestParameters.order),
|
|
866
|
+
}, initOverrides)];
|
|
867
|
+
case 3:
|
|
868
|
+
response = _c.sent();
|
|
869
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderResponseFromJSON)(jsonValue); })];
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
});
|
|
873
|
+
};
|
|
874
|
+
/**
|
|
875
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
876
|
+
* Refund a channel partner order
|
|
877
|
+
*/
|
|
878
|
+
ChannelPartnerApi.prototype.refundChannelPartnerOrder = function (requestParameters, initOverrides) {
|
|
879
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
880
|
+
var response;
|
|
881
|
+
return __generator(this, function (_a) {
|
|
882
|
+
switch (_a.label) {
|
|
883
|
+
case 0: return [4 /*yield*/, this.refundChannelPartnerOrderRaw(requestParameters, initOverrides)];
|
|
884
|
+
case 1:
|
|
885
|
+
response = _a.sent();
|
|
886
|
+
return [4 /*yield*/, response.value()];
|
|
887
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
};
|
|
680
892
|
/**
|
|
681
893
|
* Update a ship to preference record for the channel partner.
|
|
682
894
|
* Update a ship to preference record for the channel partner.
|
|
@@ -28,6 +28,12 @@ export interface ConversationAgentAuth {
|
|
|
28
28
|
* @memberof ConversationAgentAuth
|
|
29
29
|
*/
|
|
30
30
|
conversation_participant_name?: string;
|
|
31
|
+
/**
|
|
32
|
+
* UltraCart Groups this user belongs to
|
|
33
|
+
* @type {Array<number>}
|
|
34
|
+
* @memberof ConversationAgentAuth
|
|
35
|
+
*/
|
|
36
|
+
group_ids?: Array<number>;
|
|
31
37
|
/**
|
|
32
38
|
*
|
|
33
39
|
* @type {string}
|
|
@@ -88,6 +94,12 @@ export interface ConversationAgentAuth {
|
|
|
88
94
|
* @memberof ConversationAgentAuth
|
|
89
95
|
*/
|
|
90
96
|
twilio_accounts?: Array<ConversationTwilioAccount>;
|
|
97
|
+
/**
|
|
98
|
+
* UltraCart User ID
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @memberof ConversationAgentAuth
|
|
101
|
+
*/
|
|
102
|
+
user_id?: number;
|
|
91
103
|
/**
|
|
92
104
|
*
|
|
93
105
|
* @type {string}
|
|
@@ -27,6 +27,7 @@ function ConversationAgentAuthFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
27
27
|
return {
|
|
28
28
|
'conversation_participant_arn': !(0, runtime_1.exists)(json, 'conversation_participant_arn') ? undefined : json['conversation_participant_arn'],
|
|
29
29
|
'conversation_participant_name': !(0, runtime_1.exists)(json, 'conversation_participant_name') ? undefined : json['conversation_participant_name'],
|
|
30
|
+
'group_ids': !(0, runtime_1.exists)(json, 'group_ids') ? undefined : json['group_ids'],
|
|
30
31
|
'jwt': !(0, runtime_1.exists)(json, 'jwt') ? undefined : json['jwt'],
|
|
31
32
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
32
33
|
'pbx_admin': !(0, runtime_1.exists)(json, 'pbx_admin') ? undefined : json['pbx_admin'],
|
|
@@ -37,6 +38,7 @@ function ConversationAgentAuthFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
38
|
'pbx_voice_token': !(0, runtime_1.exists)(json, 'pbx_voice_token') ? undefined : json['pbx_voice_token'],
|
|
38
39
|
'pbx_worker_token': !(0, runtime_1.exists)(json, 'pbx_worker_token') ? undefined : json['pbx_worker_token'],
|
|
39
40
|
'twilio_accounts': !(0, runtime_1.exists)(json, 'twilio_accounts') ? undefined : (json['twilio_accounts'].map(ConversationTwilioAccount_1.ConversationTwilioAccountFromJSON)),
|
|
41
|
+
'user_id': !(0, runtime_1.exists)(json, 'user_id') ? undefined : json['user_id'],
|
|
40
42
|
'websocket_url': !(0, runtime_1.exists)(json, 'websocket_url') ? undefined : json['websocket_url'],
|
|
41
43
|
};
|
|
42
44
|
}
|
|
@@ -51,6 +53,7 @@ function ConversationAgentAuthToJSON(value) {
|
|
|
51
53
|
return {
|
|
52
54
|
'conversation_participant_arn': value.conversation_participant_arn,
|
|
53
55
|
'conversation_participant_name': value.conversation_participant_name,
|
|
56
|
+
'group_ids': value.group_ids,
|
|
54
57
|
'jwt': value.jwt,
|
|
55
58
|
'merchant_id': value.merchant_id,
|
|
56
59
|
'pbx_admin': value.pbx_admin,
|
|
@@ -61,6 +64,7 @@ function ConversationAgentAuthToJSON(value) {
|
|
|
61
64
|
'pbx_voice_token': value.pbx_voice_token,
|
|
62
65
|
'pbx_worker_token': value.pbx_worker_token,
|
|
63
66
|
'twilio_accounts': value.twilio_accounts === undefined ? undefined : (value.twilio_accounts.map(ConversationTwilioAccount_1.ConversationTwilioAccountToJSON)),
|
|
67
|
+
'user_id': value.user_id,
|
|
64
68
|
'websocket_url': value.websocket_url,
|
|
65
69
|
};
|
|
66
70
|
}
|
|
@@ -87,6 +87,12 @@ export interface CustomerQuery {
|
|
|
87
87
|
* @memberof CustomerQuery
|
|
88
88
|
*/
|
|
89
89
|
email?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Emails allows for searching on multiple email addresses and work with our without the single email variable. You may specify a single email address here or use the email property.
|
|
92
|
+
* @type {Array<string>}
|
|
93
|
+
* @memberof CustomerQuery
|
|
94
|
+
*/
|
|
95
|
+
emails?: Array<string>;
|
|
90
96
|
/**
|
|
91
97
|
* Last modified date end
|
|
92
98
|
* @type {string}
|
|
@@ -36,6 +36,7 @@ function CustomerQueryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'billing_postal_code': !(0, runtime_1.exists)(json, 'billing_postal_code') ? undefined : json['billing_postal_code'],
|
|
37
37
|
'billing_state': !(0, runtime_1.exists)(json, 'billing_state') ? undefined : json['billing_state'],
|
|
38
38
|
'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'],
|
|
39
|
+
'emails': !(0, runtime_1.exists)(json, 'emails') ? undefined : json['emails'],
|
|
39
40
|
'last_modified_dts_end': !(0, runtime_1.exists)(json, 'last_modified_dts_end') ? undefined : json['last_modified_dts_end'],
|
|
40
41
|
'last_modified_dts_start': !(0, runtime_1.exists)(json, 'last_modified_dts_start') ? undefined : json['last_modified_dts_start'],
|
|
41
42
|
'pricing_tier_name': !(0, runtime_1.exists)(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
|
|
@@ -76,6 +77,7 @@ function CustomerQueryToJSON(value) {
|
|
|
76
77
|
'billing_postal_code': value.billing_postal_code,
|
|
77
78
|
'billing_state': value.billing_state,
|
|
78
79
|
'email': value.email,
|
|
80
|
+
'emails': value.emails,
|
|
79
81
|
'last_modified_dts_end': value.last_modified_dts_end,
|
|
80
82
|
'last_modified_dts_start': value.last_modified_dts_start,
|
|
81
83
|
'pricing_tier_name': value.pricing_tier_name,
|
package/package.json
CHANGED
|
@@ -45,6 +45,12 @@ import {
|
|
|
45
45
|
ErrorResponse,
|
|
46
46
|
ErrorResponseFromJSON,
|
|
47
47
|
ErrorResponseToJSON,
|
|
48
|
+
Order,
|
|
49
|
+
OrderFromJSON,
|
|
50
|
+
OrderToJSON,
|
|
51
|
+
OrderResponse,
|
|
52
|
+
OrderResponseFromJSON,
|
|
53
|
+
OrderResponseToJSON,
|
|
48
54
|
} from '../models';
|
|
49
55
|
|
|
50
56
|
export interface CancelOrderByChannelPartnerOrderIdRequest {
|
|
@@ -68,6 +74,16 @@ export interface EstimateTaxForChannelPartnerOrderRequest {
|
|
|
68
74
|
channelPartnerOrder: ChannelPartnerOrder;
|
|
69
75
|
}
|
|
70
76
|
|
|
77
|
+
export interface GetChannelPartnerOrderRequest {
|
|
78
|
+
orderId: string;
|
|
79
|
+
expand?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface GetChannelPartnerOrderByChannelPartnerOrderIdRequest {
|
|
83
|
+
orderId: string;
|
|
84
|
+
expand?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
71
87
|
export interface GetChannelPartnerShipToPreferenceRequest {
|
|
72
88
|
channelPartnerOid: number;
|
|
73
89
|
channelPartnerShipToPreferenceOid: number;
|
|
@@ -86,6 +102,19 @@ export interface InsertChannelPartnerShipToPreferenceRequest {
|
|
|
86
102
|
shipToPreference: ChannelPartnerShipToPreference;
|
|
87
103
|
}
|
|
88
104
|
|
|
105
|
+
export interface RefundChannelPartnerOrderRequest {
|
|
106
|
+
orderId: string;
|
|
107
|
+
order: Order;
|
|
108
|
+
rejectAfterRefund?: boolean;
|
|
109
|
+
skipCustomerNotification?: boolean;
|
|
110
|
+
autoOrderCancel?: boolean;
|
|
111
|
+
manualRefund?: boolean;
|
|
112
|
+
reverseAffiliateTransactions?: boolean;
|
|
113
|
+
issueStoreCredit?: boolean;
|
|
114
|
+
autoOrderCancelReason?: string;
|
|
115
|
+
expand?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
89
118
|
export interface UpdateChannelPartnerShipToPreferenceRequest {
|
|
90
119
|
channelPartnerOid: number;
|
|
91
120
|
channelPartnerShipToPreferenceOid: number;
|
|
@@ -180,6 +209,40 @@ export interface ChannelPartnerApiInterface {
|
|
|
180
209
|
*/
|
|
181
210
|
estimateTaxForChannelPartnerOrder(requestParameters: EstimateTaxForChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerEstimateTaxResponse>;
|
|
182
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
214
|
+
* @summary Retrieve a channel partner order
|
|
215
|
+
* @param {string} orderId The order id to retrieve.
|
|
216
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.getOrder documentation for examples
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
* @memberof ChannelPartnerApiInterface
|
|
220
|
+
*/
|
|
221
|
+
getChannelPartnerOrderRaw(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
225
|
+
* Retrieve a channel partner order
|
|
226
|
+
*/
|
|
227
|
+
getChannelPartnerOrder(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
231
|
+
* @summary Retrieve a channel partner order by the channel partner order id
|
|
232
|
+
* @param {string} orderId The channel partner order id to retrieve.
|
|
233
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.getOrder documentation for examples
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
* @memberof ChannelPartnerApiInterface
|
|
237
|
+
*/
|
|
238
|
+
getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
242
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
243
|
+
*/
|
|
244
|
+
getChannelPartnerOrderByChannelPartnerOrderId(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
245
|
+
|
|
183
246
|
/**
|
|
184
247
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
185
248
|
* @summary Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
@@ -261,6 +324,31 @@ export interface ChannelPartnerApiInterface {
|
|
|
261
324
|
*/
|
|
262
325
|
insertChannelPartnerShipToPreference(requestParameters: InsertChannelPartnerShipToPreferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChannelPartnerShipToPreferenceResponse>;
|
|
263
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
329
|
+
* @summary Refund a channel partner order
|
|
330
|
+
* @param {string} orderId The order id to refund.
|
|
331
|
+
* @param {Order} order Order to refund
|
|
332
|
+
* @param {boolean} [rejectAfterRefund] Reject order after refund
|
|
333
|
+
* @param {boolean} [skipCustomerNotification] Skip customer email notification
|
|
334
|
+
* @param {boolean} [autoOrderCancel] Cancel associated auto orders
|
|
335
|
+
* @param {boolean} [manualRefund] Consider a manual refund done externally
|
|
336
|
+
* @param {boolean} [reverseAffiliateTransactions] Reverse affiliate transactions
|
|
337
|
+
* @param {boolean} [issueStoreCredit] Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
|
|
338
|
+
* @param {string} [autoOrderCancelReason] Reason for auto orders cancellation
|
|
339
|
+
* @param {string} [expand] The object expansion to perform on the result. See OrderApi.refundOrder documentation for examples
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
* @memberof ChannelPartnerApiInterface
|
|
343
|
+
*/
|
|
344
|
+
refundChannelPartnerOrderRaw(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
348
|
+
* Refund a channel partner order
|
|
349
|
+
*/
|
|
350
|
+
refundChannelPartnerOrder(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
|
|
351
|
+
|
|
264
352
|
/**
|
|
265
353
|
* Update a ship to preference record for the channel partner.
|
|
266
354
|
* @summary Update a ship to preference record for the channel partner.
|
|
@@ -500,6 +588,96 @@ export class ChannelPartnerApi extends runtime.BaseAPI implements ChannelPartner
|
|
|
500
588
|
return await response.value();
|
|
501
589
|
}
|
|
502
590
|
|
|
591
|
+
/**
|
|
592
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
593
|
+
* Retrieve a channel partner order
|
|
594
|
+
*/
|
|
595
|
+
async getChannelPartnerOrderRaw(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>> {
|
|
596
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
597
|
+
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getChannelPartnerOrder.');
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
const queryParameters: any = {};
|
|
601
|
+
|
|
602
|
+
if (requestParameters.expand !== undefined) {
|
|
603
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
607
|
+
|
|
608
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
609
|
+
// oauth required
|
|
610
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["channel_partner_read"]);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
614
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
const response = await this.request({
|
|
618
|
+
path: `/channel_partner/orders/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
|
619
|
+
method: 'GET',
|
|
620
|
+
headers: headerParameters,
|
|
621
|
+
query: queryParameters,
|
|
622
|
+
}, initOverrides);
|
|
623
|
+
|
|
624
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrderResponseFromJSON(jsonValue));
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Retrieves a single order using the specified order id. Only orders belonging to this channel partner may be retrieved.
|
|
629
|
+
* Retrieve a channel partner order
|
|
630
|
+
*/
|
|
631
|
+
async getChannelPartnerOrder(requestParameters: GetChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse> {
|
|
632
|
+
const response = await this.getChannelPartnerOrderRaw(requestParameters, initOverrides);
|
|
633
|
+
return await response.value();
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
638
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
639
|
+
*/
|
|
640
|
+
async getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>> {
|
|
641
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
642
|
+
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getChannelPartnerOrderByChannelPartnerOrderId.');
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const queryParameters: any = {};
|
|
646
|
+
|
|
647
|
+
if (requestParameters.expand !== undefined) {
|
|
648
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
652
|
+
|
|
653
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
654
|
+
// oauth required
|
|
655
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["channel_partner_read"]);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
659
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
const response = await this.request({
|
|
663
|
+
path: `/channel_partner/orders/by_channel_partner_order_id/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
|
664
|
+
method: 'GET',
|
|
665
|
+
headers: headerParameters,
|
|
666
|
+
query: queryParameters,
|
|
667
|
+
}, initOverrides);
|
|
668
|
+
|
|
669
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrderResponseFromJSON(jsonValue));
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Retrieves a single order using the channel partner order id, not the ultracart order id. Only orders belonging to this channel partner may be retrieved.
|
|
674
|
+
* Retrieve a channel partner order by the channel partner order id
|
|
675
|
+
*/
|
|
676
|
+
async getChannelPartnerOrderByChannelPartnerOrderId(requestParameters: GetChannelPartnerOrderByChannelPartnerOrderIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse> {
|
|
677
|
+
const response = await this.getChannelPartnerOrderByChannelPartnerOrderIdRaw(requestParameters, initOverrides);
|
|
678
|
+
return await response.value();
|
|
679
|
+
}
|
|
680
|
+
|
|
503
681
|
/**
|
|
504
682
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
505
683
|
* Retrieve the ship to preference associated with the channel partner and the specific id.
|
|
@@ -715,6 +893,86 @@ export class ChannelPartnerApi extends runtime.BaseAPI implements ChannelPartner
|
|
|
715
893
|
return await response.value();
|
|
716
894
|
}
|
|
717
895
|
|
|
896
|
+
/**
|
|
897
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
898
|
+
* Refund a channel partner order
|
|
899
|
+
*/
|
|
900
|
+
async refundChannelPartnerOrderRaw(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>> {
|
|
901
|
+
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
|
902
|
+
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling refundChannelPartnerOrder.');
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
if (requestParameters.order === null || requestParameters.order === undefined) {
|
|
906
|
+
throw new runtime.RequiredError('order','Required parameter requestParameters.order was null or undefined when calling refundChannelPartnerOrder.');
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
const queryParameters: any = {};
|
|
910
|
+
|
|
911
|
+
if (requestParameters.rejectAfterRefund !== undefined) {
|
|
912
|
+
queryParameters['reject_after_refund'] = requestParameters.rejectAfterRefund;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
if (requestParameters.skipCustomerNotification !== undefined) {
|
|
916
|
+
queryParameters['skip_customer_notification'] = requestParameters.skipCustomerNotification;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
if (requestParameters.autoOrderCancel !== undefined) {
|
|
920
|
+
queryParameters['auto_order_cancel'] = requestParameters.autoOrderCancel;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
if (requestParameters.manualRefund !== undefined) {
|
|
924
|
+
queryParameters['manual_refund'] = requestParameters.manualRefund;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
if (requestParameters.reverseAffiliateTransactions !== undefined) {
|
|
928
|
+
queryParameters['reverse_affiliate_transactions'] = requestParameters.reverseAffiliateTransactions;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
if (requestParameters.issueStoreCredit !== undefined) {
|
|
932
|
+
queryParameters['issue_store_credit'] = requestParameters.issueStoreCredit;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if (requestParameters.autoOrderCancelReason !== undefined) {
|
|
936
|
+
queryParameters['auto_order_cancel_reason'] = requestParameters.autoOrderCancelReason;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
if (requestParameters.expand !== undefined) {
|
|
940
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
944
|
+
|
|
945
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
946
|
+
|
|
947
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
948
|
+
// oauth required
|
|
949
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["channel_partner_write"]);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
953
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
const response = await this.request({
|
|
957
|
+
path: `/channel_partner/orders/{order_id}/refund`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
|
958
|
+
method: 'PUT',
|
|
959
|
+
headers: headerParameters,
|
|
960
|
+
query: queryParameters,
|
|
961
|
+
body: OrderToJSON(requestParameters.order),
|
|
962
|
+
}, initOverrides);
|
|
963
|
+
|
|
964
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrderResponseFromJSON(jsonValue));
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Perform a refund operation on a channel partner order and then update the order if successful. All of the object properties ending in _refunded should be the TOTAL amount that should end up being refunded. UltraCart will calculate the actual amount to refund based upon the prior refunds.
|
|
969
|
+
* Refund a channel partner order
|
|
970
|
+
*/
|
|
971
|
+
async refundChannelPartnerOrder(requestParameters: RefundChannelPartnerOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse> {
|
|
972
|
+
const response = await this.refundChannelPartnerOrderRaw(requestParameters, initOverrides);
|
|
973
|
+
return await response.value();
|
|
974
|
+
}
|
|
975
|
+
|
|
718
976
|
/**
|
|
719
977
|
* Update a ship to preference record for the channel partner.
|
|
720
978
|
* Update a ship to preference record for the channel partner.
|
|
@@ -38,6 +38,12 @@ export interface ConversationAgentAuth {
|
|
|
38
38
|
* @memberof ConversationAgentAuth
|
|
39
39
|
*/
|
|
40
40
|
conversation_participant_name?: string;
|
|
41
|
+
/**
|
|
42
|
+
* UltraCart Groups this user belongs to
|
|
43
|
+
* @type {Array<number>}
|
|
44
|
+
* @memberof ConversationAgentAuth
|
|
45
|
+
*/
|
|
46
|
+
group_ids?: Array<number>;
|
|
41
47
|
/**
|
|
42
48
|
*
|
|
43
49
|
* @type {string}
|
|
@@ -98,6 +104,12 @@ export interface ConversationAgentAuth {
|
|
|
98
104
|
* @memberof ConversationAgentAuth
|
|
99
105
|
*/
|
|
100
106
|
twilio_accounts?: Array<ConversationTwilioAccount>;
|
|
107
|
+
/**
|
|
108
|
+
* UltraCart User ID
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @memberof ConversationAgentAuth
|
|
111
|
+
*/
|
|
112
|
+
user_id?: number;
|
|
101
113
|
/**
|
|
102
114
|
*
|
|
103
115
|
* @type {string}
|
|
@@ -118,6 +130,7 @@ export function ConversationAgentAuthFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
118
130
|
|
|
119
131
|
'conversation_participant_arn': !exists(json, 'conversation_participant_arn') ? undefined : json['conversation_participant_arn'],
|
|
120
132
|
'conversation_participant_name': !exists(json, 'conversation_participant_name') ? undefined : json['conversation_participant_name'],
|
|
133
|
+
'group_ids': !exists(json, 'group_ids') ? undefined : json['group_ids'],
|
|
121
134
|
'jwt': !exists(json, 'jwt') ? undefined : json['jwt'],
|
|
122
135
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
123
136
|
'pbx_admin': !exists(json, 'pbx_admin') ? undefined : json['pbx_admin'],
|
|
@@ -128,6 +141,7 @@ export function ConversationAgentAuthFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
128
141
|
'pbx_voice_token': !exists(json, 'pbx_voice_token') ? undefined : json['pbx_voice_token'],
|
|
129
142
|
'pbx_worker_token': !exists(json, 'pbx_worker_token') ? undefined : json['pbx_worker_token'],
|
|
130
143
|
'twilio_accounts': !exists(json, 'twilio_accounts') ? undefined : ((json['twilio_accounts'] as Array<any>).map(ConversationTwilioAccountFromJSON)),
|
|
144
|
+
'user_id': !exists(json, 'user_id') ? undefined : json['user_id'],
|
|
131
145
|
'websocket_url': !exists(json, 'websocket_url') ? undefined : json['websocket_url'],
|
|
132
146
|
};
|
|
133
147
|
}
|
|
@@ -143,6 +157,7 @@ export function ConversationAgentAuthToJSON(value?: ConversationAgentAuth | null
|
|
|
143
157
|
|
|
144
158
|
'conversation_participant_arn': value.conversation_participant_arn,
|
|
145
159
|
'conversation_participant_name': value.conversation_participant_name,
|
|
160
|
+
'group_ids': value.group_ids,
|
|
146
161
|
'jwt': value.jwt,
|
|
147
162
|
'merchant_id': value.merchant_id,
|
|
148
163
|
'pbx_admin': value.pbx_admin,
|
|
@@ -153,6 +168,7 @@ export function ConversationAgentAuthToJSON(value?: ConversationAgentAuth | null
|
|
|
153
168
|
'pbx_voice_token': value.pbx_voice_token,
|
|
154
169
|
'pbx_worker_token': value.pbx_worker_token,
|
|
155
170
|
'twilio_accounts': value.twilio_accounts === undefined ? undefined : ((value.twilio_accounts as Array<any>).map(ConversationTwilioAccountToJSON)),
|
|
171
|
+
'user_id': value.user_id,
|
|
156
172
|
'websocket_url': value.websocket_url,
|
|
157
173
|
};
|
|
158
174
|
}
|
|
@@ -91,6 +91,12 @@ export interface CustomerQuery {
|
|
|
91
91
|
* @memberof CustomerQuery
|
|
92
92
|
*/
|
|
93
93
|
email?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Emails allows for searching on multiple email addresses and work with our without the single email variable. You may specify a single email address here or use the email property.
|
|
96
|
+
* @type {Array<string>}
|
|
97
|
+
* @memberof CustomerQuery
|
|
98
|
+
*/
|
|
99
|
+
emails?: Array<string>;
|
|
94
100
|
/**
|
|
95
101
|
* Last modified date end
|
|
96
102
|
* @type {string}
|
|
@@ -217,6 +223,7 @@ export function CustomerQueryFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
217
223
|
'billing_postal_code': !exists(json, 'billing_postal_code') ? undefined : json['billing_postal_code'],
|
|
218
224
|
'billing_state': !exists(json, 'billing_state') ? undefined : json['billing_state'],
|
|
219
225
|
'email': !exists(json, 'email') ? undefined : json['email'],
|
|
226
|
+
'emails': !exists(json, 'emails') ? undefined : json['emails'],
|
|
220
227
|
'last_modified_dts_end': !exists(json, 'last_modified_dts_end') ? undefined : json['last_modified_dts_end'],
|
|
221
228
|
'last_modified_dts_start': !exists(json, 'last_modified_dts_start') ? undefined : json['last_modified_dts_start'],
|
|
222
229
|
'pricing_tier_name': !exists(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
|
|
@@ -258,6 +265,7 @@ export function CustomerQueryToJSON(value?: CustomerQuery | null): any {
|
|
|
258
265
|
'billing_postal_code': value.billing_postal_code,
|
|
259
266
|
'billing_state': value.billing_state,
|
|
260
267
|
'email': value.email,
|
|
268
|
+
'emails': value.emails,
|
|
261
269
|
'last_modified_dts_end': value.last_modified_dts_end,
|
|
262
270
|
'last_modified_dts_start': value.last_modified_dts_start,
|
|
263
271
|
'pricing_tier_name': value.pricing_tier_name,
|