ultracart_rest_api_v2_typescript 4.1.134 → 4.1.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +3 -0
- package/README.md +4 -2
- package/dist/apis/CustomerApi.d.ts +57 -1
- package/dist/apis/CustomerApi.js +123 -0
- package/dist/models/AdjustLoyaltyPointsRequest.d.ts +49 -0
- package/dist/models/AdjustLoyaltyPointsRequest.js +56 -0
- package/dist/models/AdjustLoyaltyPointsResponse.d.ts +70 -0
- package/dist/models/AdjustLoyaltyPointsResponse.js +65 -0
- package/dist/models/ConversationPbxMenuMapping.d.ts +6 -0
- package/dist/models/ConversationPbxMenuMapping.js +2 -0
- package/dist/models/CustomerLoyaltyResponse.d.ts +59 -0
- package/dist/models/CustomerLoyaltyResponse.js +62 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/CustomerApi.ts +140 -0
- package/src/models/AdjustLoyaltyPointsRequest.ts +91 -0
- package/src/models/AdjustLoyaltyPointsResponse.ts +134 -0
- package/src/models/ConversationPbxMenuMapping.ts +8 -0
- package/src/models/CustomerLoyaltyResponse.ts +124 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -39,6 +39,8 @@ src/models/Activity.ts
|
|
|
39
39
|
src/models/AddLibraryItemRequest.ts
|
|
40
40
|
src/models/AdjustInternalCertificateRequest.ts
|
|
41
41
|
src/models/AdjustInternalCertificateResponse.ts
|
|
42
|
+
src/models/AdjustLoyaltyPointsRequest.ts
|
|
43
|
+
src/models/AdjustLoyaltyPointsResponse.ts
|
|
42
44
|
src/models/Affiliate.ts
|
|
43
45
|
src/models/AffiliateAttribute.ts
|
|
44
46
|
src/models/AffiliateClick.ts
|
|
@@ -471,6 +473,7 @@ src/models/CustomerEmailSuppressionResult.ts
|
|
|
471
473
|
src/models/CustomerLoyalty.ts
|
|
472
474
|
src/models/CustomerLoyaltyLedger.ts
|
|
473
475
|
src/models/CustomerLoyaltyRedemption.ts
|
|
476
|
+
src/models/CustomerLoyaltyResponse.ts
|
|
474
477
|
src/models/CustomerMagicLinkResponse.ts
|
|
475
478
|
src/models/CustomerMergeRequest.ts
|
|
476
479
|
src/models/CustomerOrdersSummary.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.136
|
|
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.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.136 --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.136 | 08/24/2026 | customer api - adjust method for loyalty points |
|
|
89
|
+
| 4.1.135 | 08/21/2026 | conversation pbx - support send text operation as a menu item froma different phone number |
|
|
88
90
|
| 4.1.134 | 08/21/2026 | conversation - pbx menu mapping for send text |
|
|
89
91
|
| 4.1.133 | 08/20/2026 | conversations - pbx agent setting for creating tickets in zoho desk for outgoing calls |
|
|
90
92
|
| 4.1.132 | 08/18/2026 | customer activity bug fix |
|
|
@@ -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, CustomerEmailSuppressionRequest, CustomerEmailSuppressionResponse, 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, AdjustLoyaltyPointsRequest, AdjustLoyaltyPointsResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerEmailSuppressionRequest, CustomerEmailSuppressionResponse, CustomerLoyaltyResponse, 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;
|
|
@@ -19,6 +19,10 @@ export interface AdjustInternalCertificateOperationRequest {
|
|
|
19
19
|
customerProfileOid: number;
|
|
20
20
|
adjustInternalCertificateRequest: AdjustInternalCertificateRequest;
|
|
21
21
|
}
|
|
22
|
+
export interface AdjustLoyaltyPointsOperationRequest {
|
|
23
|
+
customerProfileOid: number;
|
|
24
|
+
adjustLoyaltyPointsRequest: AdjustLoyaltyPointsRequest;
|
|
25
|
+
}
|
|
22
26
|
export interface DeleteCustomerRequest {
|
|
23
27
|
customerProfileOid: number;
|
|
24
28
|
}
|
|
@@ -34,6 +38,9 @@ export interface GetCustomerByEmailRequest {
|
|
|
34
38
|
email: string;
|
|
35
39
|
expand?: string;
|
|
36
40
|
}
|
|
41
|
+
export interface GetCustomerLoyaltyRequest {
|
|
42
|
+
customerProfileOid: number;
|
|
43
|
+
}
|
|
37
44
|
export interface GetCustomerStoreCreditRequest {
|
|
38
45
|
customerProfileOid: number;
|
|
39
46
|
}
|
|
@@ -183,6 +190,21 @@ export interface CustomerApiInterface {
|
|
|
183
190
|
* Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
|
|
184
191
|
*/
|
|
185
192
|
adjustInternalCertificate(requestParameters: AdjustInternalCertificateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustInternalCertificateResponse>;
|
|
193
|
+
/**
|
|
194
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
195
|
+
* @summary Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
196
|
+
* @param {number} customerProfileOid The customer profile oid
|
|
197
|
+
* @param {AdjustLoyaltyPointsRequest} adjustLoyaltyPointsRequest adjustLoyaltyPointsRequest
|
|
198
|
+
* @param {*} [options] Override http request option.
|
|
199
|
+
* @throws {RequiredError}
|
|
200
|
+
* @memberof CustomerApiInterface
|
|
201
|
+
*/
|
|
202
|
+
adjustLoyaltyPointsRaw(requestParameters: AdjustLoyaltyPointsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdjustLoyaltyPointsResponse>>;
|
|
203
|
+
/**
|
|
204
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
205
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
206
|
+
*/
|
|
207
|
+
adjustLoyaltyPoints(requestParameters: AdjustLoyaltyPointsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustLoyaltyPointsResponse>;
|
|
186
208
|
/**
|
|
187
209
|
* Delete a customer on the UltraCart account.
|
|
188
210
|
* @summary Delete a customer
|
|
@@ -268,6 +290,20 @@ export interface CustomerApiInterface {
|
|
|
268
290
|
* Retrieve all email lists across all storefronts
|
|
269
291
|
*/
|
|
270
292
|
getCustomerEmailLists(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailListsResponse>;
|
|
293
|
+
/**
|
|
294
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
295
|
+
* @summary Retrieve the loyalty points, ledger and redemptions for a customer
|
|
296
|
+
* @param {number} customerProfileOid The customer oid to retrieve.
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
* @memberof CustomerApiInterface
|
|
300
|
+
*/
|
|
301
|
+
getCustomerLoyaltyRaw(requestParameters: GetCustomerLoyaltyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerLoyaltyResponse>>;
|
|
302
|
+
/**
|
|
303
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
304
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer
|
|
305
|
+
*/
|
|
306
|
+
getCustomerLoyalty(requestParameters: GetCustomerLoyaltyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerLoyaltyResponse>;
|
|
271
307
|
/**
|
|
272
308
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
273
309
|
* @summary Retrieve the customer store credit accumulated through loyalty programs
|
|
@@ -613,6 +649,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
613
649
|
* Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
|
|
614
650
|
*/
|
|
615
651
|
adjustInternalCertificate(requestParameters: AdjustInternalCertificateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustInternalCertificateResponse>;
|
|
652
|
+
/**
|
|
653
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
654
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
655
|
+
*/
|
|
656
|
+
adjustLoyaltyPointsRaw(requestParameters: AdjustLoyaltyPointsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdjustLoyaltyPointsResponse>>;
|
|
657
|
+
/**
|
|
658
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
659
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
660
|
+
*/
|
|
661
|
+
adjustLoyaltyPoints(requestParameters: AdjustLoyaltyPointsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustLoyaltyPointsResponse>;
|
|
616
662
|
/**
|
|
617
663
|
* Delete a customer on the UltraCart account.
|
|
618
664
|
* Delete a customer
|
|
@@ -673,6 +719,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
673
719
|
* Retrieve all email lists across all storefronts
|
|
674
720
|
*/
|
|
675
721
|
getCustomerEmailLists(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailListsResponse>;
|
|
722
|
+
/**
|
|
723
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
724
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer
|
|
725
|
+
*/
|
|
726
|
+
getCustomerLoyaltyRaw(requestParameters: GetCustomerLoyaltyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerLoyaltyResponse>>;
|
|
727
|
+
/**
|
|
728
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
729
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer
|
|
730
|
+
*/
|
|
731
|
+
getCustomerLoyalty(requestParameters: GetCustomerLoyaltyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerLoyaltyResponse>;
|
|
676
732
|
/**
|
|
677
733
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
678
734
|
* Retrieve the customer store credit accumulated through loyalty programs
|
package/dist/apis/CustomerApi.js
CHANGED
|
@@ -203,6 +203,70 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
203
203
|
});
|
|
204
204
|
});
|
|
205
205
|
};
|
|
206
|
+
/**
|
|
207
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
208
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
209
|
+
*/
|
|
210
|
+
CustomerApi.prototype.adjustLoyaltyPointsRaw = function (requestParameters, initOverrides) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
213
|
+
return __generator(this, function (_c) {
|
|
214
|
+
switch (_c.label) {
|
|
215
|
+
case 0:
|
|
216
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
217
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling adjustLoyaltyPoints.');
|
|
218
|
+
}
|
|
219
|
+
if (requestParameters.adjustLoyaltyPointsRequest === null || requestParameters.adjustLoyaltyPointsRequest === undefined) {
|
|
220
|
+
throw new runtime.RequiredError('adjustLoyaltyPointsRequest', 'Required parameter requestParameters.adjustLoyaltyPointsRequest was null or undefined when calling adjustLoyaltyPoints.');
|
|
221
|
+
}
|
|
222
|
+
queryParameters = {};
|
|
223
|
+
headerParameters = {};
|
|
224
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
225
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
226
|
+
// oauth required
|
|
227
|
+
_a = headerParameters;
|
|
228
|
+
_b = "Authorization";
|
|
229
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
|
|
230
|
+
case 1:
|
|
231
|
+
// oauth required
|
|
232
|
+
_a[_b] = _c.sent();
|
|
233
|
+
_c.label = 2;
|
|
234
|
+
case 2:
|
|
235
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
236
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
237
|
+
}
|
|
238
|
+
return [4 /*yield*/, this.request({
|
|
239
|
+
path: "/customer/customers/{customer_profile_oid}/adjust_loyalty_points".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))),
|
|
240
|
+
method: 'POST',
|
|
241
|
+
headers: headerParameters,
|
|
242
|
+
query: queryParameters,
|
|
243
|
+
body: (0, models_1.AdjustLoyaltyPointsRequestToJSON)(requestParameters.adjustLoyaltyPointsRequest),
|
|
244
|
+
}, initOverrides)];
|
|
245
|
+
case 3:
|
|
246
|
+
response = _c.sent();
|
|
247
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.AdjustLoyaltyPointsResponseFromJSON)(jsonValue); })];
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
254
|
+
* Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
255
|
+
*/
|
|
256
|
+
CustomerApi.prototype.adjustLoyaltyPoints = function (requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
258
|
+
var response;
|
|
259
|
+
return __generator(this, function (_a) {
|
|
260
|
+
switch (_a.label) {
|
|
261
|
+
case 0: return [4 /*yield*/, this.adjustLoyaltyPointsRaw(requestParameters, initOverrides)];
|
|
262
|
+
case 1:
|
|
263
|
+
response = _a.sent();
|
|
264
|
+
return [4 /*yield*/, response.value()];
|
|
265
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
};
|
|
206
270
|
/**
|
|
207
271
|
* Delete a customer on the UltraCart account.
|
|
208
272
|
* Delete a customer
|
|
@@ -556,6 +620,65 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
556
620
|
});
|
|
557
621
|
});
|
|
558
622
|
};
|
|
623
|
+
/**
|
|
624
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
625
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer
|
|
626
|
+
*/
|
|
627
|
+
CustomerApi.prototype.getCustomerLoyaltyRaw = function (requestParameters, initOverrides) {
|
|
628
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
629
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
630
|
+
return __generator(this, function (_c) {
|
|
631
|
+
switch (_c.label) {
|
|
632
|
+
case 0:
|
|
633
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
634
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling getCustomerLoyalty.');
|
|
635
|
+
}
|
|
636
|
+
queryParameters = {};
|
|
637
|
+
headerParameters = {};
|
|
638
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
639
|
+
// oauth required
|
|
640
|
+
_a = headerParameters;
|
|
641
|
+
_b = "Authorization";
|
|
642
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_read"])];
|
|
643
|
+
case 1:
|
|
644
|
+
// oauth required
|
|
645
|
+
_a[_b] = _c.sent();
|
|
646
|
+
_c.label = 2;
|
|
647
|
+
case 2:
|
|
648
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
649
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
650
|
+
}
|
|
651
|
+
return [4 /*yield*/, this.request({
|
|
652
|
+
path: "/customer/customers/{customer_profile_oid}/loyalty".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))),
|
|
653
|
+
method: 'GET',
|
|
654
|
+
headers: headerParameters,
|
|
655
|
+
query: queryParameters,
|
|
656
|
+
}, initOverrides)];
|
|
657
|
+
case 3:
|
|
658
|
+
response = _c.sent();
|
|
659
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerLoyaltyResponseFromJSON)(jsonValue); })];
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
});
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
666
|
+
* Retrieve the loyalty points, ledger and redemptions for a customer
|
|
667
|
+
*/
|
|
668
|
+
CustomerApi.prototype.getCustomerLoyalty = function (requestParameters, initOverrides) {
|
|
669
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
670
|
+
var response;
|
|
671
|
+
return __generator(this, function (_a) {
|
|
672
|
+
switch (_a.label) {
|
|
673
|
+
case 0: return [4 /*yield*/, this.getCustomerLoyaltyRaw(requestParameters, initOverrides)];
|
|
674
|
+
case 1:
|
|
675
|
+
response = _a.sent();
|
|
676
|
+
return [4 /*yield*/, response.value()];
|
|
677
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
});
|
|
681
|
+
};
|
|
559
682
|
/**
|
|
560
683
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
561
684
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
@@ -0,0 +1,49 @@
|
|
|
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 AdjustLoyaltyPointsRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AdjustLoyaltyPointsRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Description of this adjustment, 200 characters max
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AdjustLoyaltyPointsRequest
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The number of loyalty points to add to the ledger. Use a negative number to debit points. Required and may not be zero.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof AdjustLoyaltyPointsRequest
|
|
28
|
+
*/
|
|
29
|
+
loyalty_points?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional order id if this adjustment is related to a particular order
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AdjustLoyaltyPointsRequest
|
|
34
|
+
*/
|
|
35
|
+
order_id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional days required for this adjustment to vest. Leave null to use the merchant configured default. Use zero for immediate vesting.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof AdjustLoyaltyPointsRequest
|
|
40
|
+
*/
|
|
41
|
+
vesting_days?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the AdjustLoyaltyPointsRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfAdjustLoyaltyPointsRequest(value: object): boolean;
|
|
47
|
+
export declare function AdjustLoyaltyPointsRequestFromJSON(json: any): AdjustLoyaltyPointsRequest;
|
|
48
|
+
export declare function AdjustLoyaltyPointsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdjustLoyaltyPointsRequest;
|
|
49
|
+
export declare function AdjustLoyaltyPointsRequestToJSON(value?: AdjustLoyaltyPointsRequest | null): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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.AdjustLoyaltyPointsRequestToJSON = exports.AdjustLoyaltyPointsRequestFromJSONTyped = exports.AdjustLoyaltyPointsRequestFromJSON = exports.instanceOfAdjustLoyaltyPointsRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the AdjustLoyaltyPointsRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfAdjustLoyaltyPointsRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfAdjustLoyaltyPointsRequest = instanceOfAdjustLoyaltyPointsRequest;
|
|
26
|
+
function AdjustLoyaltyPointsRequestFromJSON(json) {
|
|
27
|
+
return AdjustLoyaltyPointsRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.AdjustLoyaltyPointsRequestFromJSON = AdjustLoyaltyPointsRequestFromJSON;
|
|
30
|
+
function AdjustLoyaltyPointsRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
36
|
+
'loyalty_points': !(0, runtime_1.exists)(json, 'loyalty_points') ? undefined : json['loyalty_points'],
|
|
37
|
+
'order_id': !(0, runtime_1.exists)(json, 'order_id') ? undefined : json['order_id'],
|
|
38
|
+
'vesting_days': !(0, runtime_1.exists)(json, 'vesting_days') ? undefined : json['vesting_days'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.AdjustLoyaltyPointsRequestFromJSONTyped = AdjustLoyaltyPointsRequestFromJSONTyped;
|
|
42
|
+
function AdjustLoyaltyPointsRequestToJSON(value) {
|
|
43
|
+
if (value === undefined) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
if (value === null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'description': value.description,
|
|
51
|
+
'loyalty_points': value.loyalty_points,
|
|
52
|
+
'order_id': value.order_id,
|
|
53
|
+
'vesting_days': value.vesting_days,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.AdjustLoyaltyPointsRequestToJSON = AdjustLoyaltyPointsRequestToJSON;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { ModelError } from './ModelError';
|
|
13
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
14
|
+
import { Warning } from './Warning';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface AdjustLoyaltyPointsResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface AdjustLoyaltyPointsResponse {
|
|
21
|
+
/**
|
|
22
|
+
* The current (vested) points balance after the adjustment was made
|
|
23
|
+
* @type {number}
|
|
24
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
25
|
+
*/
|
|
26
|
+
current_points?: number;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {ModelError}
|
|
30
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
31
|
+
*/
|
|
32
|
+
error?: ModelError;
|
|
33
|
+
/**
|
|
34
|
+
* The loyalty points adjustment that was written to the ledger
|
|
35
|
+
* @type {number}
|
|
36
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
37
|
+
*/
|
|
38
|
+
loyalty_points?: number;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {ResponseMetadata}
|
|
42
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
43
|
+
*/
|
|
44
|
+
metadata?: ResponseMetadata;
|
|
45
|
+
/**
|
|
46
|
+
* The pending (unvested) points balance after the adjustment was made
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
49
|
+
*/
|
|
50
|
+
pending_points?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Indicates if API call was successful
|
|
53
|
+
* @type {boolean}
|
|
54
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
55
|
+
*/
|
|
56
|
+
success?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {Warning}
|
|
60
|
+
* @memberof AdjustLoyaltyPointsResponse
|
|
61
|
+
*/
|
|
62
|
+
warning?: Warning;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the AdjustLoyaltyPointsResponse interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfAdjustLoyaltyPointsResponse(value: object): boolean;
|
|
68
|
+
export declare function AdjustLoyaltyPointsResponseFromJSON(json: any): AdjustLoyaltyPointsResponse;
|
|
69
|
+
export declare function AdjustLoyaltyPointsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdjustLoyaltyPointsResponse;
|
|
70
|
+
export declare function AdjustLoyaltyPointsResponseToJSON(value?: AdjustLoyaltyPointsResponse | null): any;
|
|
@@ -0,0 +1,65 @@
|
|
|
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.AdjustLoyaltyPointsResponseToJSON = exports.AdjustLoyaltyPointsResponseFromJSONTyped = exports.AdjustLoyaltyPointsResponseFromJSON = exports.instanceOfAdjustLoyaltyPointsResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var ModelError_1 = require("./ModelError");
|
|
19
|
+
var ResponseMetadata_1 = require("./ResponseMetadata");
|
|
20
|
+
var Warning_1 = require("./Warning");
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AdjustLoyaltyPointsResponse interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAdjustLoyaltyPointsResponse(value) {
|
|
25
|
+
var isInstance = true;
|
|
26
|
+
return isInstance;
|
|
27
|
+
}
|
|
28
|
+
exports.instanceOfAdjustLoyaltyPointsResponse = instanceOfAdjustLoyaltyPointsResponse;
|
|
29
|
+
function AdjustLoyaltyPointsResponseFromJSON(json) {
|
|
30
|
+
return AdjustLoyaltyPointsResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
exports.AdjustLoyaltyPointsResponseFromJSON = AdjustLoyaltyPointsResponseFromJSON;
|
|
33
|
+
function AdjustLoyaltyPointsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if ((json === undefined) || (json === null)) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'current_points': !(0, runtime_1.exists)(json, 'current_points') ? undefined : json['current_points'],
|
|
39
|
+
'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
|
|
40
|
+
'loyalty_points': !(0, runtime_1.exists)(json, 'loyalty_points') ? undefined : json['loyalty_points'],
|
|
41
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
|
|
42
|
+
'pending_points': !(0, runtime_1.exists)(json, 'pending_points') ? undefined : json['pending_points'],
|
|
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.AdjustLoyaltyPointsResponseFromJSONTyped = AdjustLoyaltyPointsResponseFromJSONTyped;
|
|
48
|
+
function AdjustLoyaltyPointsResponseToJSON(value) {
|
|
49
|
+
if (value === undefined) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (value === null) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'current_points': value.current_points,
|
|
57
|
+
'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
|
|
58
|
+
'loyalty_points': value.loyalty_points,
|
|
59
|
+
'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
|
|
60
|
+
'pending_points': value.pending_points,
|
|
61
|
+
'success': value.success,
|
|
62
|
+
'warning': (0, Warning_1.WarningToJSON)(value.warning),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
exports.AdjustLoyaltyPointsResponseToJSON = AdjustLoyaltyPointsResponseToJSON;
|
|
@@ -33,6 +33,12 @@ export interface ConversationPbxMenuMapping {
|
|
|
33
33
|
* @memberof ConversationPbxMenuMapping
|
|
34
34
|
*/
|
|
35
35
|
digits?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Optional phone number to send the text message from. Must be a phone number configured on this merchant account and SMS enabled. Defaults to the number the caller dialed. Only used when the action is 'send text'.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationPbxMenuMapping
|
|
40
|
+
*/
|
|
41
|
+
sms_from_number?: string;
|
|
36
42
|
/**
|
|
37
43
|
* Speech
|
|
38
44
|
* @type {string}
|
|
@@ -46,6 +46,7 @@ function ConversationPbxMenuMappingFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'action': !(0, runtime_1.exists)(json, 'action') ? undefined : json['action'],
|
|
47
47
|
'action_target': !(0, runtime_1.exists)(json, 'action_target') ? undefined : json['action_target'],
|
|
48
48
|
'digits': !(0, runtime_1.exists)(json, 'digits') ? undefined : json['digits'],
|
|
49
|
+
'sms_from_number': !(0, runtime_1.exists)(json, 'sms_from_number') ? undefined : json['sms_from_number'],
|
|
49
50
|
'speech': !(0, runtime_1.exists)(json, 'speech') ? undefined : json['speech'],
|
|
50
51
|
'text_message': !(0, runtime_1.exists)(json, 'text_message') ? undefined : json['text_message'],
|
|
51
52
|
};
|
|
@@ -62,6 +63,7 @@ function ConversationPbxMenuMappingToJSON(value) {
|
|
|
62
63
|
'action': value.action,
|
|
63
64
|
'action_target': value.action_target,
|
|
64
65
|
'digits': value.digits,
|
|
66
|
+
'sms_from_number': value.sms_from_number,
|
|
65
67
|
'speech': value.speech,
|
|
66
68
|
'text_message': value.text_message,
|
|
67
69
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { CustomerLoyalty } from './CustomerLoyalty';
|
|
13
|
+
import { ModelError } from './ModelError';
|
|
14
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
15
|
+
import { Warning } from './Warning';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CustomerLoyaltyResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomerLoyaltyResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {CustomerLoyalty}
|
|
25
|
+
* @memberof CustomerLoyaltyResponse
|
|
26
|
+
*/
|
|
27
|
+
customer_loyalty?: CustomerLoyalty;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {ModelError}
|
|
31
|
+
* @memberof CustomerLoyaltyResponse
|
|
32
|
+
*/
|
|
33
|
+
error?: ModelError;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {ResponseMetadata}
|
|
37
|
+
* @memberof CustomerLoyaltyResponse
|
|
38
|
+
*/
|
|
39
|
+
metadata?: ResponseMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if API call was successful
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof CustomerLoyaltyResponse
|
|
44
|
+
*/
|
|
45
|
+
success?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Warning}
|
|
49
|
+
* @memberof CustomerLoyaltyResponse
|
|
50
|
+
*/
|
|
51
|
+
warning?: Warning;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CustomerLoyaltyResponse interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfCustomerLoyaltyResponse(value: object): boolean;
|
|
57
|
+
export declare function CustomerLoyaltyResponseFromJSON(json: any): CustomerLoyaltyResponse;
|
|
58
|
+
export declare function CustomerLoyaltyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerLoyaltyResponse;
|
|
59
|
+
export declare function CustomerLoyaltyResponseToJSON(value?: CustomerLoyaltyResponse | null): any;
|