ultracart_rest_api_v2_typescript 4.1.129 → 4.1.131

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.
@@ -812,6 +812,7 @@ src/models/OrderChannelPartner.ts
812
812
  src/models/OrderCheckout.ts
813
813
  src/models/OrderCoupon.ts
814
814
  src/models/OrderCurrentStageHistory.ts
815
+ src/models/OrderCustomerActivityResponse.ts
815
816
  src/models/OrderDigitalItem.ts
816
817
  src/models/OrderDigitalOrder.ts
817
818
  src/models/OrderEdi.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.129
2
+ ## ultracart_rest_api_v2_typescript@4.1.131
3
3
 
4
4
  Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
5
5
 
6
6
  Installation
7
7
 
8
8
  ```
9
- npm install ultracart_rest_api_v2_typescript@4.1.129 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.131 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -85,6 +85,8 @@ Not every change is committed to every SDK.
85
85
 
86
86
  | Version | Date | Comments |
87
87
  | --: | :-: | --- |
88
+ | 4.1.131 | 08/18/2026 | customer activity now returns the SF communications active flag and last_activity_dts |
89
+ | 4.1.130 | 08/17/2026 | order api - new method to obtain customer activity similar to the customer endpoint for a profile |
88
90
  | 4.1.129 | 08/13/2026 | ChannelPartnerOrder and OrderChannelPartner were missing a property |
89
91
  | 4.1.128 | 08/13/2026 | channel partner - added arbitrary discount to ChannelPartnerOrder |
90
92
  | 4.1.127 | 08/13/2026 | added arbitrary discounts to order creation for historical imports |
@@ -348,7 +348,7 @@ export interface AutoOrderApiInterface {
348
348
  */
349
349
  pauseAutoOrder(requestParameters: PauseAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
350
350
  /**
351
- * Update an auto order on the UltraCart account.
351
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
352
352
  * @summary Update an auto order
353
353
  * @param {number} autoOrderOid The auto order oid to update.
354
354
  * @param {AutoOrder} autoOrder Auto order to update
@@ -360,7 +360,7 @@ export interface AutoOrderApiInterface {
360
360
  */
361
361
  updateAutoOrderRaw(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderResponse>>;
362
362
  /**
363
- * Update an auto order on the UltraCart account.
363
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
364
364
  * Update an auto order
365
365
  */
366
366
  updateAutoOrder(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
@@ -431,7 +431,7 @@ export interface AutoOrderApiInterface {
431
431
  */
432
432
  updateAutoOrderProperties(requestParameters: UpdateAutoOrderPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
433
433
  /**
434
- * Update multiple auto orders on the UltraCart account.
434
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
435
435
  * @summary Update multiple auto orders
436
436
  * @param {AutoOrdersRequest} autoOrdersRequest Auto orders to update (synchronous maximum 20 / asynchronous maximum 100)
437
437
  * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
@@ -443,7 +443,7 @@ export interface AutoOrderApiInterface {
443
443
  */
444
444
  updateAutoOrdersBatchRaw(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrdersResponse>>;
445
445
  /**
446
- * Update multiple auto orders on the UltraCart account.
446
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
447
447
  * Update multiple auto orders
448
448
  */
449
449
  updateAutoOrdersBatch(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrdersResponse>;
@@ -583,12 +583,12 @@ export declare class AutoOrderApi extends runtime.BaseAPI implements AutoOrderAp
583
583
  */
584
584
  pauseAutoOrder(requestParameters: PauseAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
585
585
  /**
586
- * Update an auto order on the UltraCart account.
586
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
587
587
  * Update an auto order
588
588
  */
589
589
  updateAutoOrderRaw(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderResponse>>;
590
590
  /**
591
- * Update an auto order on the UltraCart account.
591
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
592
592
  * Update an auto order
593
593
  */
594
594
  updateAutoOrder(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
@@ -633,12 +633,12 @@ export declare class AutoOrderApi extends runtime.BaseAPI implements AutoOrderAp
633
633
  */
634
634
  updateAutoOrderProperties(requestParameters: UpdateAutoOrderPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
635
635
  /**
636
- * Update multiple auto orders on the UltraCart account.
636
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
637
637
  * Update multiple auto orders
638
638
  */
639
639
  updateAutoOrdersBatchRaw(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrdersResponse>>;
640
640
  /**
641
- * Update multiple auto orders on the UltraCart account.
641
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
642
642
  * Update multiple auto orders
643
643
  */
644
644
  updateAutoOrdersBatch(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrdersResponse>;
@@ -965,7 +965,7 @@ var AutoOrderApi = /** @class */ (function (_super) {
965
965
  });
966
966
  };
967
967
  /**
968
- * Update an auto order on the UltraCart account.
968
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
969
969
  * Update an auto order
970
970
  */
971
971
  AutoOrderApi.prototype.updateAutoOrderRaw = function (requestParameters, initOverrides) {
@@ -1017,7 +1017,7 @@ var AutoOrderApi = /** @class */ (function (_super) {
1017
1017
  });
1018
1018
  };
1019
1019
  /**
1020
- * Update an auto order on the UltraCart account.
1020
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1021
1021
  * Update an auto order
1022
1022
  */
1023
1023
  AutoOrderApi.prototype.updateAutoOrder = function (requestParameters, initOverrides) {
@@ -1309,7 +1309,7 @@ var AutoOrderApi = /** @class */ (function (_super) {
1309
1309
  });
1310
1310
  };
1311
1311
  /**
1312
- * Update multiple auto orders on the UltraCart account.
1312
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1313
1313
  * Update multiple auto orders
1314
1314
  */
1315
1315
  AutoOrderApi.prototype.updateAutoOrdersBatchRaw = function (requestParameters, initOverrides) {
@@ -1361,7 +1361,7 @@ var AutoOrderApi = /** @class */ (function (_super) {
1361
1361
  });
1362
1362
  };
1363
1363
  /**
1364
- * Update multiple auto orders on the UltraCart account.
1364
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1365
1365
  * Update multiple auto orders
1366
1366
  */
1367
1367
  AutoOrderApi.prototype.updateAutoOrdersBatch = function (requestParameters, initOverrides) {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AccountsReceivableRetryConfig, AccountsReceivableRetryConfigResponse, AccountsReceivableRetryStatsResponse, BaseResponse, Order, OrderAddItemsAndReleaseRequest, OrderAssignToAffiliateRequest, OrderByTokenQuery, OrderEdiDocumentsResponse, OrderEmailsResponse, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderPageViewHistoryResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrderUpsellCartRequest, OrderValidationRequest, OrderValidationResponse, OrdersResponse, ReplaceOrderItemIdRequest } from '../models';
13
+ import { AccountsReceivableRetryConfig, AccountsReceivableRetryConfigResponse, AccountsReceivableRetryStatsResponse, BaseResponse, Order, OrderAddItemsAndReleaseRequest, OrderAssignToAffiliateRequest, OrderByTokenQuery, OrderCustomerActivityResponse, OrderEdiDocumentsResponse, OrderEmailsResponse, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderPageViewHistoryResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrderUpsellCartRequest, OrderValidationRequest, OrderValidationResponse, OrdersResponse, ReplaceOrderItemIdRequest } from '../models';
14
14
  export interface AdjustOrderTotalRequest {
15
15
  orderId: string;
16
16
  desiredTotal: string;
@@ -69,6 +69,9 @@ export interface GetOrderByTokenRequest {
69
69
  orderByTokenQuery: OrderByTokenQuery;
70
70
  expand?: string;
71
71
  }
72
+ export interface GetOrderCustomerActivityRequest {
73
+ orderId: string;
74
+ }
72
75
  export interface GetOrderEdiDocumentsRequest {
73
76
  orderId: string;
74
77
  }
@@ -444,6 +447,20 @@ export interface OrderApiInterface {
444
447
  * Retrieve an order using a token
445
448
  */
446
449
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
450
+ /**
451
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
452
+ * @summary Retrieve customer activity for this order.
453
+ * @param {string} orderId The order id to retrieve customer activity for.
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ * @memberof OrderApiInterface
457
+ */
458
+ getOrderCustomerActivityRaw(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderCustomerActivityResponse>>;
459
+ /**
460
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
461
+ * Retrieve customer activity for this order.
462
+ */
463
+ getOrderCustomerActivity(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderCustomerActivityResponse>;
447
464
  /**
448
465
  * Retrieve EDI documents associated with this order.
449
466
  * @summary Retrieve EDI documents associated with this order.
@@ -969,6 +986,16 @@ export declare class OrderApi extends runtime.BaseAPI implements OrderApiInterfa
969
986
  * Retrieve an order using a token
970
987
  */
971
988
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
989
+ /**
990
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
991
+ * Retrieve customer activity for this order.
992
+ */
993
+ getOrderCustomerActivityRaw(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderCustomerActivityResponse>>;
994
+ /**
995
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
996
+ * Retrieve customer activity for this order.
997
+ */
998
+ getOrderCustomerActivity(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderCustomerActivityResponse>;
972
999
  /**
973
1000
  * Retrieve EDI documents associated with this order.
974
1001
  * Retrieve EDI documents associated with this order.
@@ -1113,6 +1113,65 @@ var OrderApi = /** @class */ (function (_super) {
1113
1113
  });
1114
1114
  });
1115
1115
  };
1116
+ /**
1117
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
1118
+ * Retrieve customer activity for this order.
1119
+ */
1120
+ OrderApi.prototype.getOrderCustomerActivityRaw = function (requestParameters, initOverrides) {
1121
+ return __awaiter(this, void 0, void 0, function () {
1122
+ var queryParameters, headerParameters, _a, _b, response;
1123
+ return __generator(this, function (_c) {
1124
+ switch (_c.label) {
1125
+ case 0:
1126
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
1127
+ throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling getOrderCustomerActivity.');
1128
+ }
1129
+ queryParameters = {};
1130
+ headerParameters = {};
1131
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1132
+ // oauth required
1133
+ _a = headerParameters;
1134
+ _b = "Authorization";
1135
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["order_read"])];
1136
+ case 1:
1137
+ // oauth required
1138
+ _a[_b] = _c.sent();
1139
+ _c.label = 2;
1140
+ case 2:
1141
+ if (this.configuration && this.configuration.apiKey) {
1142
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1143
+ }
1144
+ return [4 /*yield*/, this.request({
1145
+ path: "/order/orders/{order_id}/customer_activity".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
1146
+ method: 'GET',
1147
+ headers: headerParameters,
1148
+ query: queryParameters,
1149
+ }, initOverrides)];
1150
+ case 3:
1151
+ response = _c.sent();
1152
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderCustomerActivityResponseFromJSON)(jsonValue); })];
1153
+ }
1154
+ });
1155
+ });
1156
+ };
1157
+ /**
1158
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
1159
+ * Retrieve customer activity for this order.
1160
+ */
1161
+ OrderApi.prototype.getOrderCustomerActivity = function (requestParameters, initOverrides) {
1162
+ return __awaiter(this, void 0, void 0, function () {
1163
+ var response;
1164
+ return __generator(this, function (_a) {
1165
+ switch (_a.label) {
1166
+ case 0: return [4 /*yield*/, this.getOrderCustomerActivityRaw(requestParameters, initOverrides)];
1167
+ case 1:
1168
+ response = _a.sent();
1169
+ return [4 /*yield*/, response.value()];
1170
+ case 2: return [2 /*return*/, _a.sent()];
1171
+ }
1172
+ });
1173
+ });
1174
+ };
1116
1175
  /**
1117
1176
  * Retrieve EDI documents associated with this order.
1118
1177
  * Retrieve EDI documents associated with this order.
@@ -53,7 +53,7 @@ export interface AutoOrder {
53
53
  */
54
54
  cancel_downgrade?: boolean;
55
55
  /**
56
- * The reason this auto order was canceled by either merchant or customer
56
+ * The reason this auto order was canceled by either merchant or customer. Supplying this when setting enabled to false records the change as a cancellation rather than a disable.
57
57
  * @type {string}
58
58
  * @memberof AutoOrder
59
59
  */
@@ -65,13 +65,13 @@ export interface AutoOrder {
65
65
  */
66
66
  cancel_upgrade?: boolean;
67
67
  /**
68
- * The user that canceled the auto order
68
+ * The user that canceled the auto order. Supplying this when setting enabled to false records the change as a cancellation rather than a disable.
69
69
  * @type {string}
70
70
  * @memberof AutoOrder
71
71
  */
72
72
  canceled_by_user?: string;
73
73
  /**
74
- * The date/time that the auto order was canceled
74
+ * The date/time that the auto order was canceled. Supply this to record an explicit cancellation time, otherwise it is stamped automatically when enabled is set to false along with cancel_reason or canceled_by_user.
75
75
  * @type {string}
76
76
  * @memberof AutoOrder
77
77
  */
@@ -89,7 +89,7 @@ export interface AutoOrder {
89
89
  */
90
90
  credit_card_attempt?: number;
91
91
  /**
92
- * The date/time the auto order was disabled due to failed rebills
92
+ * The date/time the auto order was disabled, either by a failed rebill or by setting enabled to false without a cancellation
93
93
  * @type {string}
94
94
  * @memberof AutoOrder
95
95
  */
@@ -101,7 +101,7 @@ export interface AutoOrder {
101
101
  */
102
102
  emails?: Array<AutoOrderEmail>;
103
103
  /**
104
- * True if this auto order is enabled
104
+ * True if this auto order is enabled. Setting this to false along with cancel_reason or canceled_by_user records the change as a cancellation and fires the auto order cancel notifications. Setting it to false without either field records a disable instead.
105
105
  * @type {boolean}
106
106
  * @memberof AutoOrder
107
107
  */
@@ -15,6 +15,12 @@
15
15
  * @interface Metric
16
16
  */
17
17
  export interface Metric {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof Metric
22
+ */
23
+ active?: boolean;
18
24
  /**
19
25
  *
20
26
  * @type {number}
@@ -39,6 +45,12 @@ export interface Metric {
39
45
  * @memberof Metric
40
46
  */
41
47
  last_30_formatted?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof Metric
52
+ */
53
+ last_activity_dts?: string;
42
54
  /**
43
55
  *
44
56
  * @type {string}
@@ -32,10 +32,12 @@ function MetricFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
+ 'active': !(0, runtime_1.exists)(json, 'active') ? undefined : json['active'],
35
36
  'all_time': !(0, runtime_1.exists)(json, 'all_time') ? undefined : json['all_time'],
36
37
  'all_time_formatted': !(0, runtime_1.exists)(json, 'all_time_formatted') ? undefined : json['all_time_formatted'],
37
38
  'last_30': !(0, runtime_1.exists)(json, 'last_30') ? undefined : json['last_30'],
38
39
  'last_30_formatted': !(0, runtime_1.exists)(json, 'last_30_formatted') ? undefined : json['last_30_formatted'],
40
+ 'last_activity_dts': !(0, runtime_1.exists)(json, 'last_activity_dts') ? undefined : json['last_activity_dts'],
39
41
  'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
40
42
  'prior_30': !(0, runtime_1.exists)(json, 'prior_30') ? undefined : json['prior_30'],
41
43
  'prior_30_formatted': !(0, runtime_1.exists)(json, 'prior_30_formatted') ? undefined : json['prior_30_formatted'],
@@ -51,10 +53,12 @@ function MetricToJSON(value) {
51
53
  return null;
52
54
  }
53
55
  return {
56
+ 'active': value.active,
54
57
  'all_time': value.all_time,
55
58
  'all_time_formatted': value.all_time_formatted,
56
59
  'last_30': value.last_30,
57
60
  'last_30_formatted': value.last_30_formatted,
61
+ 'last_activity_dts': value.last_activity_dts,
58
62
  'name': value.name,
59
63
  'prior_30': value.prior_30,
60
64
  'prior_30_formatted': value.prior_30_formatted,
@@ -0,0 +1,65 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { CustomerActivity } from './CustomerActivity';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface OrderCustomerActivityResponse
20
+ */
21
+ export interface OrderCustomerActivityResponse {
22
+ /**
23
+ *
24
+ * @type {CustomerActivity}
25
+ * @memberof OrderCustomerActivityResponse
26
+ */
27
+ customer_activity?: CustomerActivity;
28
+ /**
29
+ * Email address on the order that the customer activity was retrieved for
30
+ * @type {string}
31
+ * @memberof OrderCustomerActivityResponse
32
+ */
33
+ email?: string;
34
+ /**
35
+ *
36
+ * @type {ModelError}
37
+ * @memberof OrderCustomerActivityResponse
38
+ */
39
+ error?: ModelError;
40
+ /**
41
+ *
42
+ * @type {ResponseMetadata}
43
+ * @memberof OrderCustomerActivityResponse
44
+ */
45
+ metadata?: ResponseMetadata;
46
+ /**
47
+ * Indicates if API call was successful
48
+ * @type {boolean}
49
+ * @memberof OrderCustomerActivityResponse
50
+ */
51
+ success?: boolean;
52
+ /**
53
+ *
54
+ * @type {Warning}
55
+ * @memberof OrderCustomerActivityResponse
56
+ */
57
+ warning?: Warning;
58
+ }
59
+ /**
60
+ * Check if a given object implements the OrderCustomerActivityResponse interface.
61
+ */
62
+ export declare function instanceOfOrderCustomerActivityResponse(value: object): boolean;
63
+ export declare function OrderCustomerActivityResponseFromJSON(json: any): OrderCustomerActivityResponse;
64
+ export declare function OrderCustomerActivityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderCustomerActivityResponse;
65
+ export declare function OrderCustomerActivityResponseToJSON(value?: OrderCustomerActivityResponse | null): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.OrderCustomerActivityResponseToJSON = exports.OrderCustomerActivityResponseFromJSONTyped = exports.OrderCustomerActivityResponseFromJSON = exports.instanceOfOrderCustomerActivityResponse = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var CustomerActivity_1 = require("./CustomerActivity");
19
+ var ModelError_1 = require("./ModelError");
20
+ var ResponseMetadata_1 = require("./ResponseMetadata");
21
+ var Warning_1 = require("./Warning");
22
+ /**
23
+ * Check if a given object implements the OrderCustomerActivityResponse interface.
24
+ */
25
+ function instanceOfOrderCustomerActivityResponse(value) {
26
+ var isInstance = true;
27
+ return isInstance;
28
+ }
29
+ exports.instanceOfOrderCustomerActivityResponse = instanceOfOrderCustomerActivityResponse;
30
+ function OrderCustomerActivityResponseFromJSON(json) {
31
+ return OrderCustomerActivityResponseFromJSONTyped(json, false);
32
+ }
33
+ exports.OrderCustomerActivityResponseFromJSON = OrderCustomerActivityResponseFromJSON;
34
+ function OrderCustomerActivityResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'customer_activity': !(0, runtime_1.exists)(json, 'customer_activity') ? undefined : (0, CustomerActivity_1.CustomerActivityFromJSON)(json['customer_activity']),
40
+ 'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'],
41
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
42
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
43
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
44
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
45
+ };
46
+ }
47
+ exports.OrderCustomerActivityResponseFromJSONTyped = OrderCustomerActivityResponseFromJSONTyped;
48
+ function OrderCustomerActivityResponseToJSON(value) {
49
+ if (value === undefined) {
50
+ return undefined;
51
+ }
52
+ if (value === null) {
53
+ return null;
54
+ }
55
+ return {
56
+ 'customer_activity': (0, CustomerActivity_1.CustomerActivityToJSON)(value.customer_activity),
57
+ 'email': value.email,
58
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
59
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
60
+ 'success': value.success,
61
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
62
+ };
63
+ }
64
+ exports.OrderCustomerActivityResponseToJSON = OrderCustomerActivityResponseToJSON;
@@ -783,6 +783,7 @@ export * from './OrderChannelPartner';
783
783
  export * from './OrderCheckout';
784
784
  export * from './OrderCoupon';
785
785
  export * from './OrderCurrentStageHistory';
786
+ export * from './OrderCustomerActivityResponse';
786
787
  export * from './OrderDigitalItem';
787
788
  export * from './OrderDigitalOrder';
788
789
  export * from './OrderEdi';
@@ -801,6 +801,7 @@ __exportStar(require("./OrderChannelPartner"), exports);
801
801
  __exportStar(require("./OrderCheckout"), exports);
802
802
  __exportStar(require("./OrderCoupon"), exports);
803
803
  __exportStar(require("./OrderCurrentStageHistory"), exports);
804
+ __exportStar(require("./OrderCustomerActivityResponse"), exports);
804
805
  __exportStar(require("./OrderDigitalItem"), exports);
805
806
  __exportStar(require("./OrderDigitalOrder"), exports);
806
807
  __exportStar(require("./OrderEdi"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.129",
3
+ "version": "4.1.131",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -443,7 +443,7 @@ export interface AutoOrderApiInterface {
443
443
  pauseAutoOrder(requestParameters: PauseAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
444
444
 
445
445
  /**
446
- * Update an auto order on the UltraCart account.
446
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
447
447
  * @summary Update an auto order
448
448
  * @param {number} autoOrderOid The auto order oid to update.
449
449
  * @param {AutoOrder} autoOrder Auto order to update
@@ -456,7 +456,7 @@ export interface AutoOrderApiInterface {
456
456
  updateAutoOrderRaw(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderResponse>>;
457
457
 
458
458
  /**
459
- * Update an auto order on the UltraCart account.
459
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
460
460
  * Update an auto order
461
461
  */
462
462
  updateAutoOrder(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
@@ -536,7 +536,7 @@ export interface AutoOrderApiInterface {
536
536
  updateAutoOrderProperties(requestParameters: UpdateAutoOrderPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
537
537
 
538
538
  /**
539
- * Update multiple auto orders on the UltraCart account.
539
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
540
540
  * @summary Update multiple auto orders
541
541
  * @param {AutoOrdersRequest} autoOrdersRequest Auto orders to update (synchronous maximum 20 / asynchronous maximum 100)
542
542
  * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
@@ -549,7 +549,7 @@ export interface AutoOrderApiInterface {
549
549
  updateAutoOrdersBatchRaw(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrdersResponse>>;
550
550
 
551
551
  /**
552
- * Update multiple auto orders on the UltraCart account.
552
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
553
553
  * Update multiple auto orders
554
554
  */
555
555
  updateAutoOrdersBatch(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrdersResponse>;
@@ -1258,7 +1258,7 @@ export class AutoOrderApi extends runtime.BaseAPI implements AutoOrderApiInterfa
1258
1258
  }
1259
1259
 
1260
1260
  /**
1261
- * Update an auto order on the UltraCart account.
1261
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1262
1262
  * Update an auto order
1263
1263
  */
1264
1264
  async updateAutoOrderRaw(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderResponse>> {
@@ -1305,7 +1305,7 @@ export class AutoOrderApi extends runtime.BaseAPI implements AutoOrderApiInterfa
1305
1305
  }
1306
1306
 
1307
1307
  /**
1308
- * Update an auto order on the UltraCart account.
1308
+ * Update an auto order on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1309
1309
  * Update an auto order
1310
1310
  */
1311
1311
  async updateAutoOrder(requestParameters: UpdateAutoOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse> {
@@ -1530,7 +1530,7 @@ export class AutoOrderApi extends runtime.BaseAPI implements AutoOrderApiInterfa
1530
1530
  }
1531
1531
 
1532
1532
  /**
1533
- * Update multiple auto orders on the UltraCart account.
1533
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1534
1534
  * Update multiple auto orders
1535
1535
  */
1536
1536
  async updateAutoOrdersBatchRaw(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrdersResponse>> {
@@ -1577,7 +1577,7 @@ export class AutoOrderApi extends runtime.BaseAPI implements AutoOrderApiInterfa
1577
1577
  }
1578
1578
 
1579
1579
  /**
1580
- * Update multiple auto orders on the UltraCart account.
1580
+ * Update multiple auto orders on the UltraCart account. To cancel an auto order, set enabled to false and supply either cancel_reason or canceled_by_user, which records the change as a cancellation and fires the auto order cancel notifications. Setting enabled to false without either field records a disable.
1581
1581
  * Update multiple auto orders
1582
1582
  */
1583
1583
  async updateAutoOrdersBatch(requestParameters: UpdateAutoOrdersBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrdersResponse> {
@@ -42,6 +42,9 @@ import {
42
42
  OrderByTokenQuery,
43
43
  OrderByTokenQueryFromJSON,
44
44
  OrderByTokenQueryToJSON,
45
+ OrderCustomerActivityResponse,
46
+ OrderCustomerActivityResponseFromJSON,
47
+ OrderCustomerActivityResponseToJSON,
45
48
  OrderEdiDocumentsResponse,
46
49
  OrderEdiDocumentsResponseFromJSON,
47
50
  OrderEdiDocumentsResponseToJSON,
@@ -180,6 +183,10 @@ export interface GetOrderByTokenRequest {
180
183
  expand?: string;
181
184
  }
182
185
 
186
+ export interface GetOrderCustomerActivityRequest {
187
+ orderId: string;
188
+ }
189
+
183
190
  export interface GetOrderEdiDocumentsRequest {
184
191
  orderId: string;
185
192
  }
@@ -610,6 +617,22 @@ export interface OrderApiInterface {
610
617
  */
611
618
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
612
619
 
620
+ /**
621
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
622
+ * @summary Retrieve customer activity for this order.
623
+ * @param {string} orderId The order id to retrieve customer activity for.
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ * @memberof OrderApiInterface
627
+ */
628
+ getOrderCustomerActivityRaw(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderCustomerActivityResponse>>;
629
+
630
+ /**
631
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
632
+ * Retrieve customer activity for this order.
633
+ */
634
+ getOrderCustomerActivity(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderCustomerActivityResponse>;
635
+
613
636
  /**
614
637
  * Retrieve EDI documents associated with this order.
615
638
  * @summary Retrieve EDI documents associated with this order.
@@ -1759,6 +1782,47 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
1759
1782
  return await response.value();
1760
1783
  }
1761
1784
 
1785
+ /**
1786
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
1787
+ * Retrieve customer activity for this order.
1788
+ */
1789
+ async getOrderCustomerActivityRaw(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderCustomerActivityResponse>> {
1790
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
1791
+ throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderCustomerActivity.');
1792
+ }
1793
+
1794
+ const queryParameters: any = {};
1795
+
1796
+ const headerParameters: runtime.HTTPHeaders = {};
1797
+
1798
+ if (this.configuration && this.configuration.accessToken) {
1799
+ // oauth required
1800
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["order_read"]);
1801
+ }
1802
+
1803
+ if (this.configuration && this.configuration.apiKey) {
1804
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1805
+ }
1806
+
1807
+ const response = await this.request({
1808
+ path: `/order/orders/{order_id}/customer_activity`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
1809
+ method: 'GET',
1810
+ headers: headerParameters,
1811
+ query: queryParameters,
1812
+ }, initOverrides);
1813
+
1814
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrderCustomerActivityResponseFromJSON(jsonValue));
1815
+ }
1816
+
1817
+ /**
1818
+ * Retrieves the customer activity associated with the email address on this order. This includes email engagement history, email list and segment membership, lifetime metrics and email suppression status. A customer profile is not required and is not consulted, so this method works for guest orders that have never had a customer profile established. For the page views captured during the session that placed the order, see the page view history method instead.
1819
+ * Retrieve customer activity for this order.
1820
+ */
1821
+ async getOrderCustomerActivity(requestParameters: GetOrderCustomerActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderCustomerActivityResponse> {
1822
+ const response = await this.getOrderCustomerActivityRaw(requestParameters, initOverrides);
1823
+ return await response.value();
1824
+ }
1825
+
1762
1826
  /**
1763
1827
  * Retrieve EDI documents associated with this order.
1764
1828
  * Retrieve EDI documents associated with this order.
@@ -93,7 +93,7 @@ export interface AutoOrder {
93
93
  */
94
94
  cancel_downgrade?: boolean;
95
95
  /**
96
- * The reason this auto order was canceled by either merchant or customer
96
+ * The reason this auto order was canceled by either merchant or customer. Supplying this when setting enabled to false records the change as a cancellation rather than a disable.
97
97
  * @type {string}
98
98
  * @memberof AutoOrder
99
99
  */
@@ -105,13 +105,13 @@ export interface AutoOrder {
105
105
  */
106
106
  cancel_upgrade?: boolean;
107
107
  /**
108
- * The user that canceled the auto order
108
+ * The user that canceled the auto order. Supplying this when setting enabled to false records the change as a cancellation rather than a disable.
109
109
  * @type {string}
110
110
  * @memberof AutoOrder
111
111
  */
112
112
  canceled_by_user?: string;
113
113
  /**
114
- * The date/time that the auto order was canceled
114
+ * The date/time that the auto order was canceled. Supply this to record an explicit cancellation time, otherwise it is stamped automatically when enabled is set to false along with cancel_reason or canceled_by_user.
115
115
  * @type {string}
116
116
  * @memberof AutoOrder
117
117
  */
@@ -129,7 +129,7 @@ export interface AutoOrder {
129
129
  */
130
130
  credit_card_attempt?: number;
131
131
  /**
132
- * The date/time the auto order was disabled due to failed rebills
132
+ * The date/time the auto order was disabled, either by a failed rebill or by setting enabled to false without a cancellation
133
133
  * @type {string}
134
134
  * @memberof AutoOrder
135
135
  */
@@ -141,7 +141,7 @@ export interface AutoOrder {
141
141
  */
142
142
  emails?: Array<AutoOrderEmail>;
143
143
  /**
144
- * True if this auto order is enabled
144
+ * True if this auto order is enabled. Setting this to false along with cancel_reason or canceled_by_user records the change as a cancellation and fires the auto order cancel notifications. Setting it to false without either field records a disable instead.
145
145
  * @type {boolean}
146
146
  * @memberof AutoOrder
147
147
  */
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
19
19
  * @interface Metric
20
20
  */
21
21
  export interface Metric {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof Metric
26
+ */
27
+ active?: boolean;
22
28
  /**
23
29
  *
24
30
  * @type {number}
@@ -43,6 +49,12 @@ export interface Metric {
43
49
  * @memberof Metric
44
50
  */
45
51
  last_30_formatted?: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof Metric
56
+ */
57
+ last_activity_dts?: string;
46
58
  /**
47
59
  *
48
60
  * @type {string}
@@ -90,10 +102,12 @@ export function MetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): Me
90
102
  }
91
103
  return {
92
104
 
105
+ 'active': !exists(json, 'active') ? undefined : json['active'],
93
106
  'all_time': !exists(json, 'all_time') ? undefined : json['all_time'],
94
107
  'all_time_formatted': !exists(json, 'all_time_formatted') ? undefined : json['all_time_formatted'],
95
108
  'last_30': !exists(json, 'last_30') ? undefined : json['last_30'],
96
109
  'last_30_formatted': !exists(json, 'last_30_formatted') ? undefined : json['last_30_formatted'],
110
+ 'last_activity_dts': !exists(json, 'last_activity_dts') ? undefined : json['last_activity_dts'],
97
111
  'name': !exists(json, 'name') ? undefined : json['name'],
98
112
  'prior_30': !exists(json, 'prior_30') ? undefined : json['prior_30'],
99
113
  'prior_30_formatted': !exists(json, 'prior_30_formatted') ? undefined : json['prior_30_formatted'],
@@ -110,10 +124,12 @@ export function MetricToJSON(value?: Metric | null): any {
110
124
  }
111
125
  return {
112
126
 
127
+ 'active': value.active,
113
128
  'all_time': value.all_time,
114
129
  'all_time_formatted': value.all_time_formatted,
115
130
  'last_30': value.last_30,
116
131
  'last_30_formatted': value.last_30_formatted,
132
+ 'last_activity_dts': value.last_activity_dts,
117
133
  'name': value.name,
118
134
  'prior_30': value.prior_30,
119
135
  'prior_30_formatted': value.prior_30_formatted,
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ CustomerActivity,
18
+ CustomerActivityFromJSON,
19
+ CustomerActivityFromJSONTyped,
20
+ CustomerActivityToJSON,
21
+ } from './CustomerActivity';
22
+ import {
23
+ ModelError,
24
+ ModelErrorFromJSON,
25
+ ModelErrorFromJSONTyped,
26
+ ModelErrorToJSON,
27
+ } from './ModelError';
28
+ import {
29
+ ResponseMetadata,
30
+ ResponseMetadataFromJSON,
31
+ ResponseMetadataFromJSONTyped,
32
+ ResponseMetadataToJSON,
33
+ } from './ResponseMetadata';
34
+ import {
35
+ Warning,
36
+ WarningFromJSON,
37
+ WarningFromJSONTyped,
38
+ WarningToJSON,
39
+ } from './Warning';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface OrderCustomerActivityResponse
45
+ */
46
+ export interface OrderCustomerActivityResponse {
47
+ /**
48
+ *
49
+ * @type {CustomerActivity}
50
+ * @memberof OrderCustomerActivityResponse
51
+ */
52
+ customer_activity?: CustomerActivity;
53
+ /**
54
+ * Email address on the order that the customer activity was retrieved for
55
+ * @type {string}
56
+ * @memberof OrderCustomerActivityResponse
57
+ */
58
+ email?: string;
59
+ /**
60
+ *
61
+ * @type {ModelError}
62
+ * @memberof OrderCustomerActivityResponse
63
+ */
64
+ error?: ModelError;
65
+ /**
66
+ *
67
+ * @type {ResponseMetadata}
68
+ * @memberof OrderCustomerActivityResponse
69
+ */
70
+ metadata?: ResponseMetadata;
71
+ /**
72
+ * Indicates if API call was successful
73
+ * @type {boolean}
74
+ * @memberof OrderCustomerActivityResponse
75
+ */
76
+ success?: boolean;
77
+ /**
78
+ *
79
+ * @type {Warning}
80
+ * @memberof OrderCustomerActivityResponse
81
+ */
82
+ warning?: Warning;
83
+ }
84
+
85
+
86
+
87
+ /**
88
+ * Check if a given object implements the OrderCustomerActivityResponse interface.
89
+ */
90
+ export function instanceOfOrderCustomerActivityResponse(value: object): boolean {
91
+ let isInstance = true;
92
+
93
+ return isInstance;
94
+ }
95
+
96
+ export function OrderCustomerActivityResponseFromJSON(json: any): OrderCustomerActivityResponse {
97
+ return OrderCustomerActivityResponseFromJSONTyped(json, false);
98
+ }
99
+
100
+ export function OrderCustomerActivityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderCustomerActivityResponse {
101
+ if ((json === undefined) || (json === null)) {
102
+ return json;
103
+ }
104
+ return {
105
+
106
+ 'customer_activity': !exists(json, 'customer_activity') ? undefined : CustomerActivityFromJSON(json['customer_activity']),
107
+ 'email': !exists(json, 'email') ? undefined : json['email'],
108
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
109
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
110
+ 'success': !exists(json, 'success') ? undefined : json['success'],
111
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
112
+ };
113
+ }
114
+
115
+ export function OrderCustomerActivityResponseToJSON(value?: OrderCustomerActivityResponse | null): any {
116
+ if (value === undefined) {
117
+ return undefined;
118
+ }
119
+ if (value === null) {
120
+ return null;
121
+ }
122
+ return {
123
+
124
+ 'customer_activity': CustomerActivityToJSON(value.customer_activity),
125
+ 'email': value.email,
126
+ 'error': ModelErrorToJSON(value.error),
127
+ 'metadata': ResponseMetadataToJSON(value.metadata),
128
+ 'success': value.success,
129
+ 'warning': WarningToJSON(value.warning),
130
+ };
131
+ }
132
+
@@ -785,6 +785,7 @@ export * from './OrderChannelPartner';
785
785
  export * from './OrderCheckout';
786
786
  export * from './OrderCoupon';
787
787
  export * from './OrderCurrentStageHistory';
788
+ export * from './OrderCustomerActivityResponse';
788
789
  export * from './OrderDigitalItem';
789
790
  export * from './OrderDigitalOrder';
790
791
  export * from './OrderEdi';