ultracart_rest_api_v2_typescript 4.1.121 → 4.1.124

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.
Files changed (39) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +5 -2
  3. package/dist/apis/AutoOrderApi.d.ts +61 -1
  4. package/dist/apis/AutoOrderApi.js +129 -0
  5. package/dist/apis/CustomerApi.d.ts +30 -1
  6. package/dist/apis/CustomerApi.js +64 -0
  7. package/dist/models/AutoOrderPaymentUpdateRequest.d.ts +73 -0
  8. package/dist/models/AutoOrderPaymentUpdateRequest.js +71 -0
  9. package/dist/models/AutoOrderRebillResponse.d.ts +83 -0
  10. package/dist/models/AutoOrderRebillResponse.js +70 -0
  11. package/dist/models/CustomerEmailSuppressionRequest.d.ts +67 -0
  12. package/dist/models/CustomerEmailSuppressionRequest.js +69 -0
  13. package/dist/models/CustomerEmailSuppressionResponse.d.ts +59 -0
  14. package/dist/models/CustomerEmailSuppressionResponse.js +62 -0
  15. package/dist/models/CustomerEmailSuppressionResult.d.ts +98 -0
  16. package/dist/models/CustomerEmailSuppressionResult.js +73 -0
  17. package/dist/models/EmailSettings.d.ts +6 -0
  18. package/dist/models/EmailSettings.js +2 -0
  19. package/dist/models/EmailSuppressionSurfaces.d.ts +43 -0
  20. package/dist/models/EmailSuppressionSurfaces.js +54 -0
  21. package/dist/models/TaxCountry.d.ts +12 -0
  22. package/dist/models/TaxCountry.js +4 -0
  23. package/dist/models/TaxState.d.ts +12 -0
  24. package/dist/models/TaxState.js +4 -0
  25. package/dist/models/index.d.ts +6 -0
  26. package/dist/models/index.js +6 -0
  27. package/package.json +1 -1
  28. package/src/apis/AutoOrderApi.ts +149 -0
  29. package/src/apis/CustomerApi.ts +76 -0
  30. package/src/models/AutoOrderPaymentUpdateRequest.ts +121 -0
  31. package/src/models/AutoOrderRebillResponse.ts +156 -0
  32. package/src/models/CustomerEmailSuppressionRequest.ts +113 -0
  33. package/src/models/CustomerEmailSuppressionResponse.ts +124 -0
  34. package/src/models/CustomerEmailSuppressionResult.ts +162 -0
  35. package/src/models/EmailSettings.ts +8 -0
  36. package/src/models/EmailSuppressionSurfaces.ts +83 -0
  37. package/src/models/TaxCountry.ts +16 -0
  38. package/src/models/TaxState.ts +16 -0
  39. package/src/models/index.ts +6 -0
@@ -74,10 +74,12 @@ src/models/AutoOrderItemOption.ts
74
74
  src/models/AutoOrderItemSimpleSchedule.ts
75
75
  src/models/AutoOrderLog.ts
76
76
  src/models/AutoOrderManagement.ts
77
+ src/models/AutoOrderPaymentUpdateRequest.ts
77
78
  src/models/AutoOrderPropertiesUpdateRequest.ts
78
79
  src/models/AutoOrderProperty.ts
79
80
  src/models/AutoOrderQuery.ts
80
81
  src/models/AutoOrderQueryBatch.ts
82
+ src/models/AutoOrderRebillResponse.ts
81
83
  src/models/AutoOrderResponse.ts
82
84
  src/models/AutoOrdersRequest.ts
83
85
  src/models/AutoOrdersResponse.ts
@@ -463,6 +465,9 @@ src/models/CustomerEDI.ts
463
465
  src/models/CustomerEditorValues.ts
464
466
  src/models/CustomerEmail.ts
465
467
  src/models/CustomerEmailListChanges.ts
468
+ src/models/CustomerEmailSuppressionRequest.ts
469
+ src/models/CustomerEmailSuppressionResponse.ts
470
+ src/models/CustomerEmailSuppressionResult.ts
466
471
  src/models/CustomerLoyalty.ts
467
472
  src/models/CustomerLoyaltyLedger.ts
468
473
  src/models/CustomerLoyaltyRedemption.ts
@@ -610,6 +615,7 @@ src/models/EmailStepStatRequest.ts
610
615
  src/models/EmailStepStatResponse.ts
611
616
  src/models/EmailStepWaitingRequest.ts
612
617
  src/models/EmailStepWaitingResponse.ts
618
+ src/models/EmailSuppressionSurfaces.ts
613
619
  src/models/EmailTemplate.ts
614
620
  src/models/EmailTemplatesResponse.ts
615
621
  src/models/EmailThirdPartyList.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.121
2
+ ## ultracart_rest_api_v2_typescript@4.1.124
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.121 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.124 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -85,6 +85,9 @@ Not every change is committed to every SDK.
85
85
 
86
86
  | Version | Date | Comments |
87
87
  | --: | :-: | --- |
88
+ | 4.1.124 | 08/04/2026 | customer - method to remove customer profile from email suppression |
89
+ | 4.1.123 | 08/04/2026 | customer - method to remove customer profile from email suppression |
90
+ | 4.1.122 | 07/29/2026 | auto order api - new methods for payment information and rebill |
88
91
  | 4.1.121 | 07/15/2026 | storefront - parameter to include details on dispatch log methods |
89
92
  | 4.1.120 | 07/15/2026 | storefront - parameter to include details on dispatch log methods |
90
93
  | 4.1.119 | 07/15/2026 | order api - query transaction details for cache target |
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AutoOrder, AutoOrderAddonItemsUpdateRequest, AutoOrderCancelReasonsResponse, AutoOrderConsolidate, AutoOrderEmailsResponse, AutoOrderItemCancelRequest, AutoOrderPropertiesUpdateRequest, AutoOrderQuery, AutoOrderQueryBatch, AutoOrderResponse, AutoOrdersRequest, AutoOrdersResponse } from '../models';
13
+ import { AutoOrder, AutoOrderAddonItemsUpdateRequest, AutoOrderCancelReasonsResponse, AutoOrderConsolidate, AutoOrderEmailsResponse, AutoOrderItemCancelRequest, AutoOrderPaymentUpdateRequest, AutoOrderPropertiesUpdateRequest, AutoOrderQuery, AutoOrderQueryBatch, AutoOrderRebillResponse, AutoOrderResponse, AutoOrdersRequest, AutoOrdersResponse } from '../models';
14
+ export interface AttemptAutoOrderRebillRequest {
15
+ autoOrderOid: number;
16
+ expand?: string;
17
+ }
14
18
  export interface CancelAutoOrderItemByReferenceOrderIdRequest {
15
19
  referenceOrderId: string;
16
20
  originalItemId: string;
@@ -100,6 +104,11 @@ export interface UpdateAutoOrderItemPropertiesRequest {
100
104
  autoOrderPropertiesUpdateRequest: AutoOrderPropertiesUpdateRequest;
101
105
  expand?: string;
102
106
  }
107
+ export interface UpdateAutoOrderPaymentRequest {
108
+ autoOrderOid: number;
109
+ autoOrderPaymentUpdateRequest: AutoOrderPaymentUpdateRequest;
110
+ expand?: string;
111
+ }
103
112
  export interface UpdateAutoOrderPropertiesRequest {
104
113
  autoOrderOid: number;
105
114
  autoOrderPropertiesUpdateRequest: AutoOrderPropertiesUpdateRequest;
@@ -118,6 +127,21 @@ export interface UpdateAutoOrdersBatchRequest {
118
127
  * @interface AutoOrderApiInterface
119
128
  */
120
129
  export interface AutoOrderApiInterface {
130
+ /**
131
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
132
+ * @summary Attempt a failed rebill on an auto order
133
+ * @param {number} autoOrderOid The auto order oid to rebill.
134
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ * @memberof AutoOrderApiInterface
138
+ */
139
+ attemptAutoOrderRebillRaw(requestParameters: AttemptAutoOrderRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderRebillResponse>>;
140
+ /**
141
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
142
+ * Attempt a failed rebill on an auto order
143
+ */
144
+ attemptAutoOrderRebill(requestParameters: AttemptAutoOrderRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderRebillResponse>;
121
145
  /**
122
146
  * Cancels a single item on an auto order identified by the original order id and the item\'s original_item_id. The request body may specify mode=end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
123
147
  * @summary Cancel a single item on an auto order
@@ -374,6 +398,22 @@ export interface AutoOrderApiInterface {
374
398
  * Update an auto order item properties
375
399
  */
376
400
  updateAutoOrderItemProperties(requestParameters: UpdateAutoOrderItemPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
401
+ /**
402
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
403
+ * @summary Update the payment information on an auto order
404
+ * @param {number} autoOrderOid The auto order oid to update payment information on.
405
+ * @param {AutoOrderPaymentUpdateRequest} autoOrderPaymentUpdateRequest Payment information to place on the auto order
406
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ * @memberof AutoOrderApiInterface
410
+ */
411
+ updateAutoOrderPaymentRaw(requestParameters: UpdateAutoOrderPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderRebillResponse>>;
412
+ /**
413
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
414
+ * Update the payment information on an auto order
415
+ */
416
+ updateAutoOrderPayment(requestParameters: UpdateAutoOrderPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderRebillResponse>;
377
417
  /**
378
418
  * Update an auto order properties. Returns the auto order based upon expansion
379
419
  * @summary Update an auto order properties
@@ -412,6 +452,16 @@ export interface AutoOrderApiInterface {
412
452
  *
413
453
  */
414
454
  export declare class AutoOrderApi extends runtime.BaseAPI implements AutoOrderApiInterface {
455
+ /**
456
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
457
+ * Attempt a failed rebill on an auto order
458
+ */
459
+ attemptAutoOrderRebillRaw(requestParameters: AttemptAutoOrderRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderRebillResponse>>;
460
+ /**
461
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
462
+ * Attempt a failed rebill on an auto order
463
+ */
464
+ attemptAutoOrderRebill(requestParameters: AttemptAutoOrderRebillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderRebillResponse>;
415
465
  /**
416
466
  * Cancels a single item on an auto order identified by the original order id and the item\'s original_item_id. The request body may specify mode=end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
417
467
  * Cancel a single item on an auto order
@@ -562,6 +612,16 @@ export declare class AutoOrderApi extends runtime.BaseAPI implements AutoOrderAp
562
612
  * Update an auto order item properties
563
613
  */
564
614
  updateAutoOrderItemProperties(requestParameters: UpdateAutoOrderItemPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderResponse>;
615
+ /**
616
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
617
+ * Update the payment information on an auto order
618
+ */
619
+ updateAutoOrderPaymentRaw(requestParameters: UpdateAutoOrderPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoOrderRebillResponse>>;
620
+ /**
621
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
622
+ * Update the payment information on an auto order
623
+ */
624
+ updateAutoOrderPayment(requestParameters: UpdateAutoOrderPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoOrderRebillResponse>;
565
625
  /**
566
626
  * Update an auto order properties. Returns the auto order based upon expansion
567
627
  * Update an auto order properties
@@ -75,6 +75,68 @@ var AutoOrderApi = /** @class */ (function (_super) {
75
75
  function AutoOrderApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
80
+ * Attempt a failed rebill on an auto order
81
+ */
82
+ AutoOrderApi.prototype.attemptAutoOrderRebillRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, _a, _b, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
+ case 0:
88
+ if (requestParameters.autoOrderOid === null || requestParameters.autoOrderOid === undefined) {
89
+ throw new runtime.RequiredError('autoOrderOid', 'Required parameter requestParameters.autoOrderOid was null or undefined when calling attemptAutoOrderRebill.');
90
+ }
91
+ queryParameters = {};
92
+ if (requestParameters.expand !== undefined) {
93
+ queryParameters['_expand'] = requestParameters.expand;
94
+ }
95
+ headerParameters = {};
96
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
97
+ // oauth required
98
+ _a = headerParameters;
99
+ _b = "Authorization";
100
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["auto_order_write"])];
101
+ case 1:
102
+ // oauth required
103
+ _a[_b] = _c.sent();
104
+ _c.label = 2;
105
+ case 2:
106
+ if (this.configuration && this.configuration.apiKey) {
107
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
108
+ }
109
+ return [4 /*yield*/, this.request({
110
+ path: "/auto_order/auto_orders/{auto_order_oid}/rebill".replace("{".concat("auto_order_oid", "}"), encodeURIComponent(String(requestParameters.autoOrderOid))),
111
+ method: 'POST',
112
+ headers: headerParameters,
113
+ query: queryParameters,
114
+ }, initOverrides)];
115
+ case 3:
116
+ response = _c.sent();
117
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.AutoOrderRebillResponseFromJSON)(jsonValue); })];
118
+ }
119
+ });
120
+ });
121
+ };
122
+ /**
123
+ * Attempts to rebill an auto order using the payment information already on the original order. The attempt is refused if the auto order is scheduled to charge within the next five minutes, or if it was already billed within the last 24 hours, both of which guard against double charging. Runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
124
+ * Attempt a failed rebill on an auto order
125
+ */
126
+ AutoOrderApi.prototype.attemptAutoOrderRebill = function (requestParameters, initOverrides) {
127
+ return __awaiter(this, void 0, void 0, function () {
128
+ var response;
129
+ return __generator(this, function (_a) {
130
+ switch (_a.label) {
131
+ case 0: return [4 /*yield*/, this.attemptAutoOrderRebillRaw(requestParameters, initOverrides)];
132
+ case 1:
133
+ response = _a.sent();
134
+ return [4 /*yield*/, response.value()];
135
+ case 2: return [2 /*return*/, _a.sent()];
136
+ }
137
+ });
138
+ });
139
+ };
78
140
  /**
79
141
  * Cancels a single item on an auto order identified by the original order id and the item\'s original_item_id. The request body may specify mode=end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
80
142
  * Cancel a single item on an auto order
@@ -1112,6 +1174,73 @@ var AutoOrderApi = /** @class */ (function (_super) {
1112
1174
  });
1113
1175
  });
1114
1176
  };
1177
+ /**
1178
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
1179
+ * Update the payment information on an auto order
1180
+ */
1181
+ AutoOrderApi.prototype.updateAutoOrderPaymentRaw = function (requestParameters, initOverrides) {
1182
+ return __awaiter(this, void 0, void 0, function () {
1183
+ var queryParameters, headerParameters, _a, _b, response;
1184
+ return __generator(this, function (_c) {
1185
+ switch (_c.label) {
1186
+ case 0:
1187
+ if (requestParameters.autoOrderOid === null || requestParameters.autoOrderOid === undefined) {
1188
+ throw new runtime.RequiredError('autoOrderOid', 'Required parameter requestParameters.autoOrderOid was null or undefined when calling updateAutoOrderPayment.');
1189
+ }
1190
+ if (requestParameters.autoOrderPaymentUpdateRequest === null || requestParameters.autoOrderPaymentUpdateRequest === undefined) {
1191
+ throw new runtime.RequiredError('autoOrderPaymentUpdateRequest', 'Required parameter requestParameters.autoOrderPaymentUpdateRequest was null or undefined when calling updateAutoOrderPayment.');
1192
+ }
1193
+ queryParameters = {};
1194
+ if (requestParameters.expand !== undefined) {
1195
+ queryParameters['_expand'] = requestParameters.expand;
1196
+ }
1197
+ headerParameters = {};
1198
+ headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
1199
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1200
+ // oauth required
1201
+ _a = headerParameters;
1202
+ _b = "Authorization";
1203
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["auto_order_write"])];
1204
+ case 1:
1205
+ // oauth required
1206
+ _a[_b] = _c.sent();
1207
+ _c.label = 2;
1208
+ case 2:
1209
+ if (this.configuration && this.configuration.apiKey) {
1210
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1211
+ }
1212
+ return [4 /*yield*/, this.request({
1213
+ path: "/auto_order/auto_orders/{auto_order_oid}/payment".replace("{".concat("auto_order_oid", "}"), encodeURIComponent(String(requestParameters.autoOrderOid))),
1214
+ method: 'PUT',
1215
+ headers: headerParameters,
1216
+ query: queryParameters,
1217
+ body: (0, models_1.AutoOrderPaymentUpdateRequestToJSON)(requestParameters.autoOrderPaymentUpdateRequest),
1218
+ }, initOverrides)];
1219
+ case 3:
1220
+ response = _c.sent();
1221
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.AutoOrderRebillResponseFromJSON)(jsonValue); })];
1222
+ }
1223
+ });
1224
+ });
1225
+ };
1226
+ /**
1227
+ * Updates the credit card on the original order behind an auto order, along with any rebills sitting in accounts receivable, and reactivates the auto order. Card data is accepted as hosted field tokens only. raw card numbers and card verification numbers are rejected. Set attempt_rebill to true to also attempt the rebill immediately, which runs synchronously and may take some time while the gateway is contacted. A declined card is reported in the response body rather than as an API error.
1228
+ * Update the payment information on an auto order
1229
+ */
1230
+ AutoOrderApi.prototype.updateAutoOrderPayment = function (requestParameters, initOverrides) {
1231
+ return __awaiter(this, void 0, void 0, function () {
1232
+ var response;
1233
+ return __generator(this, function (_a) {
1234
+ switch (_a.label) {
1235
+ case 0: return [4 /*yield*/, this.updateAutoOrderPaymentRaw(requestParameters, initOverrides)];
1236
+ case 1:
1237
+ response = _a.sent();
1238
+ return [4 /*yield*/, response.value()];
1239
+ case 2: return [2 /*return*/, _a.sent()];
1240
+ }
1241
+ });
1242
+ });
1243
+ };
1115
1244
  /**
1116
1245
  * Update an auto order properties. Returns the auto order based upon expansion
1117
1246
  * Update an auto order properties
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerMagicLinkResponse, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomerWishListItem, CustomerWishListItemResponse, CustomerWishListItemsResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse, QuickBooksOnlineCustomersResponse } from '../models';
13
+ import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerEmailSuppressionRequest, CustomerEmailSuppressionResponse, CustomerMagicLinkResponse, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomerWishListItem, CustomerWishListItemResponse, CustomerWishListItemsResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse, QuickBooksOnlineCustomersResponse } from '../models';
14
14
  export interface AddCustomerStoreCreditRequest {
15
15
  customerProfileOid: number;
16
16
  storeCreditRequest: CustomerStoreCreditAddRequest;
@@ -134,6 +134,10 @@ export interface UpdateCustomerEmailListsRequest {
134
134
  customerProfileOid: number;
135
135
  listChanges: CustomerEmailListChanges;
136
136
  }
137
+ export interface UpdateCustomerEmailSuppressionRequest {
138
+ customerProfileOid: number;
139
+ suppressionChanges: CustomerEmailSuppressionRequest;
140
+ }
137
141
  export interface UpdateWishListItemRequest {
138
142
  customerProfileOid: number;
139
143
  customerWishlistItemOid: number;
@@ -539,6 +543,21 @@ export interface CustomerApiInterface {
539
543
  * Update email list subscriptions for a customer
540
544
  */
541
545
  updateCustomerEmailLists(requestParameters: UpdateCustomerEmailListsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailListChanges>;
546
+ /**
547
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
548
+ * @summary Clear email suppression for a customer
549
+ * @param {number} customerProfileOid The customer profile oid
550
+ * @param {CustomerEmailSuppressionRequest} suppressionChanges Suppression changes
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ * @memberof CustomerApiInterface
554
+ */
555
+ updateCustomerEmailSuppressionRaw(requestParameters: UpdateCustomerEmailSuppressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerEmailSuppressionResponse>>;
556
+ /**
557
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
558
+ * Clear email suppression for a customer
559
+ */
560
+ updateCustomerEmailSuppression(requestParameters: UpdateCustomerEmailSuppressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailSuppressionResponse>;
542
561
  /**
543
562
  * Update a customer wishlist item
544
563
  * @summary Update a customer wishlist item
@@ -812,6 +831,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
812
831
  * Update email list subscriptions for a customer
813
832
  */
814
833
  updateCustomerEmailLists(requestParameters: UpdateCustomerEmailListsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailListChanges>;
834
+ /**
835
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
836
+ * Clear email suppression for a customer
837
+ */
838
+ updateCustomerEmailSuppressionRaw(requestParameters: UpdateCustomerEmailSuppressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerEmailSuppressionResponse>>;
839
+ /**
840
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
841
+ * Clear email suppression for a customer
842
+ */
843
+ updateCustomerEmailSuppression(requestParameters: UpdateCustomerEmailSuppressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailSuppressionResponse>;
815
844
  /**
816
845
  * Update a customer wishlist item
817
846
  * Update a customer wishlist item
@@ -1675,6 +1675,70 @@ var CustomerApi = /** @class */ (function (_super) {
1675
1675
  });
1676
1676
  });
1677
1677
  };
1678
+ /**
1679
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
1680
+ * Clear email suppression for a customer
1681
+ */
1682
+ CustomerApi.prototype.updateCustomerEmailSuppressionRaw = function (requestParameters, initOverrides) {
1683
+ return __awaiter(this, void 0, void 0, function () {
1684
+ var queryParameters, headerParameters, _a, _b, response;
1685
+ return __generator(this, function (_c) {
1686
+ switch (_c.label) {
1687
+ case 0:
1688
+ if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
1689
+ throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling updateCustomerEmailSuppression.');
1690
+ }
1691
+ if (requestParameters.suppressionChanges === null || requestParameters.suppressionChanges === undefined) {
1692
+ throw new runtime.RequiredError('suppressionChanges', 'Required parameter requestParameters.suppressionChanges was null or undefined when calling updateCustomerEmailSuppression.');
1693
+ }
1694
+ queryParameters = {};
1695
+ headerParameters = {};
1696
+ headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
1697
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1698
+ // oauth required
1699
+ _a = headerParameters;
1700
+ _b = "Authorization";
1701
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
1702
+ case 1:
1703
+ // oauth required
1704
+ _a[_b] = _c.sent();
1705
+ _c.label = 2;
1706
+ case 2:
1707
+ if (this.configuration && this.configuration.apiKey) {
1708
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1709
+ }
1710
+ return [4 /*yield*/, this.request({
1711
+ path: "/customer/customers/{customer_profile_oid}/email_suppression".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))),
1712
+ method: 'POST',
1713
+ headers: headerParameters,
1714
+ query: queryParameters,
1715
+ body: (0, models_1.CustomerEmailSuppressionRequestToJSON)(requestParameters.suppressionChanges),
1716
+ }, initOverrides)];
1717
+ case 3:
1718
+ response = _c.sent();
1719
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerEmailSuppressionResponseFromJSON)(jsonValue); })];
1720
+ }
1721
+ });
1722
+ });
1723
+ };
1724
+ /**
1725
+ * Clears global unsubscribe, spam complaint and/or bounce suppression for a customer. This method is clear-only and cannot set a suppression flag. Clearing a suppression removes the send gate but does not subscribe the customer to any email list -- list membership survives a global unsubscribe untouched, so the customer\'s original lists become deliverable again with no further action. Returns 200 with a warning if the flags were cleared but an upstream ESP suppression removal failed; the profile was still modified in that case.
1726
+ * Clear email suppression for a customer
1727
+ */
1728
+ CustomerApi.prototype.updateCustomerEmailSuppression = function (requestParameters, initOverrides) {
1729
+ return __awaiter(this, void 0, void 0, function () {
1730
+ var response;
1731
+ return __generator(this, function (_a) {
1732
+ switch (_a.label) {
1733
+ case 0: return [4 /*yield*/, this.updateCustomerEmailSuppressionRaw(requestParameters, initOverrides)];
1734
+ case 1:
1735
+ response = _a.sent();
1736
+ return [4 /*yield*/, response.value()];
1737
+ case 2: return [2 /*return*/, _a.sent()];
1738
+ }
1739
+ });
1740
+ });
1741
+ };
1678
1742
  /**
1679
1743
  * Update a customer wishlist item
1680
1744
  * Update a customer wishlist item
@@ -0,0 +1,73 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AutoOrderPaymentUpdateRequest
16
+ */
17
+ export interface AutoOrderPaymentUpdateRequest {
18
+ /**
19
+ * Attempt to rebill the auto order immediately after the payment information is updated. Defaults to false.
20
+ * @type {boolean}
21
+ * @memberof AutoOrderPaymentUpdateRequest
22
+ */
23
+ attempt_rebill?: boolean;
24
+ /**
25
+ * Card expiration month (1-12)
26
+ * @type {number}
27
+ * @memberof AutoOrderPaymentUpdateRequest
28
+ */
29
+ card_expiration_month?: number;
30
+ /**
31
+ * Card expiration year (four digit)
32
+ * @type {number}
33
+ * @memberof AutoOrderPaymentUpdateRequest
34
+ */
35
+ card_expiration_year?: number;
36
+ /**
37
+ * Hosted field token for the credit card number. Tokens are valid for two hours.
38
+ * @type {string}
39
+ * @memberof AutoOrderPaymentUpdateRequest
40
+ */
41
+ card_number_token?: string;
42
+ /**
43
+ * Credit card type. Optional. When the hosted field token carries the card type, the token wins.
44
+ * @type {string}
45
+ * @memberof AutoOrderPaymentUpdateRequest
46
+ */
47
+ card_type?: AutoOrderPaymentUpdateRequestCardTypeEnum;
48
+ /**
49
+ * Hosted field token for the card verification number (CVV). Required when the order has a vaulted card that must be re-vaulted.
50
+ * @type {string}
51
+ * @memberof AutoOrderPaymentUpdateRequest
52
+ */
53
+ card_verification_number_token?: string;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const AutoOrderPaymentUpdateRequestCardTypeEnum: {
59
+ readonly Amex: "AMEX";
60
+ readonly DinersClub: "Diners Club";
61
+ readonly Discover: "Discover";
62
+ readonly Jcb: "JCB";
63
+ readonly MasterCard: "MasterCard";
64
+ readonly Visa: "VISA";
65
+ };
66
+ export type AutoOrderPaymentUpdateRequestCardTypeEnum = typeof AutoOrderPaymentUpdateRequestCardTypeEnum[keyof typeof AutoOrderPaymentUpdateRequestCardTypeEnum];
67
+ /**
68
+ * Check if a given object implements the AutoOrderPaymentUpdateRequest interface.
69
+ */
70
+ export declare function instanceOfAutoOrderPaymentUpdateRequest(value: object): boolean;
71
+ export declare function AutoOrderPaymentUpdateRequestFromJSON(json: any): AutoOrderPaymentUpdateRequest;
72
+ export declare function AutoOrderPaymentUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoOrderPaymentUpdateRequest;
73
+ export declare function AutoOrderPaymentUpdateRequestToJSON(value?: AutoOrderPaymentUpdateRequest | null): any;
@@ -0,0 +1,71 @@
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.AutoOrderPaymentUpdateRequestToJSON = exports.AutoOrderPaymentUpdateRequestFromJSONTyped = exports.AutoOrderPaymentUpdateRequestFromJSON = exports.instanceOfAutoOrderPaymentUpdateRequest = exports.AutoOrderPaymentUpdateRequestCardTypeEnum = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.AutoOrderPaymentUpdateRequestCardTypeEnum = {
22
+ Amex: 'AMEX',
23
+ DinersClub: 'Diners Club',
24
+ Discover: 'Discover',
25
+ Jcb: 'JCB',
26
+ MasterCard: 'MasterCard',
27
+ Visa: 'VISA'
28
+ };
29
+ /**
30
+ * Check if a given object implements the AutoOrderPaymentUpdateRequest interface.
31
+ */
32
+ function instanceOfAutoOrderPaymentUpdateRequest(value) {
33
+ var isInstance = true;
34
+ return isInstance;
35
+ }
36
+ exports.instanceOfAutoOrderPaymentUpdateRequest = instanceOfAutoOrderPaymentUpdateRequest;
37
+ function AutoOrderPaymentUpdateRequestFromJSON(json) {
38
+ return AutoOrderPaymentUpdateRequestFromJSONTyped(json, false);
39
+ }
40
+ exports.AutoOrderPaymentUpdateRequestFromJSON = AutoOrderPaymentUpdateRequestFromJSON;
41
+ function AutoOrderPaymentUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
42
+ if ((json === undefined) || (json === null)) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'attempt_rebill': !(0, runtime_1.exists)(json, 'attempt_rebill') ? undefined : json['attempt_rebill'],
47
+ 'card_expiration_month': !(0, runtime_1.exists)(json, 'card_expiration_month') ? undefined : json['card_expiration_month'],
48
+ 'card_expiration_year': !(0, runtime_1.exists)(json, 'card_expiration_year') ? undefined : json['card_expiration_year'],
49
+ 'card_number_token': !(0, runtime_1.exists)(json, 'card_number_token') ? undefined : json['card_number_token'],
50
+ 'card_type': !(0, runtime_1.exists)(json, 'card_type') ? undefined : json['card_type'],
51
+ 'card_verification_number_token': !(0, runtime_1.exists)(json, 'card_verification_number_token') ? undefined : json['card_verification_number_token'],
52
+ };
53
+ }
54
+ exports.AutoOrderPaymentUpdateRequestFromJSONTyped = AutoOrderPaymentUpdateRequestFromJSONTyped;
55
+ function AutoOrderPaymentUpdateRequestToJSON(value) {
56
+ if (value === undefined) {
57
+ return undefined;
58
+ }
59
+ if (value === null) {
60
+ return null;
61
+ }
62
+ return {
63
+ 'attempt_rebill': value.attempt_rebill,
64
+ 'card_expiration_month': value.card_expiration_month,
65
+ 'card_expiration_year': value.card_expiration_year,
66
+ 'card_number_token': value.card_number_token,
67
+ 'card_type': value.card_type,
68
+ 'card_verification_number_token': value.card_verification_number_token,
69
+ };
70
+ }
71
+ exports.AutoOrderPaymentUpdateRequestToJSON = AutoOrderPaymentUpdateRequestToJSON;