ultracart_rest_api_v2_typescript 4.0.119-RC → 4.0.121-RC

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.
@@ -622,6 +622,7 @@ src/models/OrderTaxes.ts
622
622
  src/models/OrderTokenResponse.ts
623
623
  src/models/OrderTrackingNumberDetail.ts
624
624
  src/models/OrderTrackingNumberDetails.ts
625
+ src/models/OrderTransactionalMerchantNote.ts
625
626
  src/models/OrdersResponse.ts
626
627
  src/models/Permission.ts
627
628
  src/models/PointOfSaleLocation.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.119-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.121-RC
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@4.0.119-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.121-RC --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 4.0.121-RC | 01/23/2023 | conversation - method to fetch single engagement record |
58
+ | 4.0.120-RC | 01/19/2023 | added skip_on_rebill field to coupon object |
57
59
  | 4.0.119-RC | 01/19/2023 | convo - getConversationPermissions added |
58
60
  | 4.0.118-RC | 01/18/2023 | conversation get dept member list method added |
59
61
  | 4.0.117-RC | 01/18/2023 | conversation dept members |
@@ -27,6 +27,9 @@ export interface GetConversationRequest {
27
27
  export interface GetConversationContextRequest {
28
28
  conversationUuid: string;
29
29
  }
30
+ export interface GetConversationEngagementRequest {
31
+ conversationEngagementOid: number;
32
+ }
30
33
  export interface GetConversationMessagesRequest {
31
34
  conversationUuid: string;
32
35
  since: number;
@@ -231,6 +234,20 @@ export interface ConversationApiInterface {
231
234
  * Retrieve a list of departments ordered by name
232
235
  */
233
236
  getConversationDepartments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationDepartmentsResponse>;
237
+ /**
238
+ * Retrieve an engagement
239
+ * @summary Retrieve an engagement
240
+ * @param {number} conversationEngagementOid
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ * @memberof ConversationApiInterface
244
+ */
245
+ getConversationEngagementRaw(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationEngagementResponse>>;
246
+ /**
247
+ * Retrieve an engagement
248
+ * Retrieve an engagement
249
+ */
250
+ getConversationEngagement(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationEngagementResponse>;
234
251
  /**
235
252
  * Retrieve a list of engagements ordered by name
236
253
  * @summary Retrieve a list of engagements ordered by name
@@ -623,6 +640,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
623
640
  * Retrieve a list of departments ordered by name
624
641
  */
625
642
  getConversationDepartments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationDepartmentsResponse>;
643
+ /**
644
+ * Retrieve an engagement
645
+ * Retrieve an engagement
646
+ */
647
+ getConversationEngagementRaw(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationEngagementResponse>>;
648
+ /**
649
+ * Retrieve an engagement
650
+ * Retrieve an engagement
651
+ */
652
+ getConversationEngagement(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationEngagementResponse>;
626
653
  /**
627
654
  * Retrieve a list of engagements ordered by name
628
655
  * Retrieve a list of engagements ordered by name
@@ -645,6 +645,65 @@ var ConversationApi = /** @class */ (function (_super) {
645
645
  });
646
646
  });
647
647
  };
648
+ /**
649
+ * Retrieve an engagement
650
+ * Retrieve an engagement
651
+ */
652
+ ConversationApi.prototype.getConversationEngagementRaw = function (requestParameters, initOverrides) {
653
+ return __awaiter(this, void 0, void 0, function () {
654
+ var queryParameters, headerParameters, _a, _b, response;
655
+ return __generator(this, function (_c) {
656
+ switch (_c.label) {
657
+ case 0:
658
+ if (requestParameters.conversationEngagementOid === null || requestParameters.conversationEngagementOid === undefined) {
659
+ throw new runtime.RequiredError('conversationEngagementOid', 'Required parameter requestParameters.conversationEngagementOid was null or undefined when calling getConversationEngagement.');
660
+ }
661
+ queryParameters = {};
662
+ headerParameters = {};
663
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
664
+ // oauth required
665
+ _a = headerParameters;
666
+ _b = "Authorization";
667
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
668
+ case 1:
669
+ // oauth required
670
+ _a[_b] = _c.sent();
671
+ _c.label = 2;
672
+ case 2:
673
+ if (this.configuration && this.configuration.apiKey) {
674
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
675
+ }
676
+ return [4 /*yield*/, this.request({
677
+ path: "/conversation/engagements/{conversation_engagement_oid}".replace("{".concat("conversation_engagement_oid", "}"), encodeURIComponent(String(requestParameters.conversationEngagementOid))),
678
+ method: 'GET',
679
+ headers: headerParameters,
680
+ query: queryParameters,
681
+ }, initOverrides)];
682
+ case 3:
683
+ response = _c.sent();
684
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationEngagementResponseFromJSON)(jsonValue); })];
685
+ }
686
+ });
687
+ });
688
+ };
689
+ /**
690
+ * Retrieve an engagement
691
+ * Retrieve an engagement
692
+ */
693
+ ConversationApi.prototype.getConversationEngagement = function (requestParameters, initOverrides) {
694
+ return __awaiter(this, void 0, void 0, function () {
695
+ var response;
696
+ return __generator(this, function (_a) {
697
+ switch (_a.label) {
698
+ case 0: return [4 /*yield*/, this.getConversationEngagementRaw(requestParameters, initOverrides)];
699
+ case 1:
700
+ response = _a.sent();
701
+ return [4 /*yield*/, response.value()];
702
+ case 2: return [2 /*return*/, _a.sent()];
703
+ }
704
+ });
705
+ });
706
+ };
648
707
  /**
649
708
  * Retrieve a list of engagements ordered by name
650
709
  * Retrieve a list of engagements ordered by name
@@ -399,6 +399,12 @@ export interface Coupon {
399
399
  * @memberof Coupon
400
400
  */
401
401
  restrict_by_storefronts?: Array<CouponRestriction>;
402
+ /**
403
+ * Skip this coupon when it is on a rebill of an auto order.
404
+ * @type {boolean}
405
+ * @memberof Coupon
406
+ */
407
+ skip_on_rebill?: boolean;
402
408
  /**
403
409
  * Date/time when coupon is valid
404
410
  * @type {string}
@@ -128,6 +128,7 @@ function CouponFromJSONTyped(json, ignoreDiscriminator) {
128
128
  'restrict_by_postal_codes': !(0, runtime_1.exists)(json, 'restrict_by_postal_codes') ? undefined : json['restrict_by_postal_codes'],
129
129
  'restrict_by_screen_branding_theme_codes': !(0, runtime_1.exists)(json, 'restrict_by_screen_branding_theme_codes') ? undefined : (json['restrict_by_screen_branding_theme_codes'].map(CouponRestriction_1.CouponRestrictionFromJSON)),
130
130
  'restrict_by_storefronts': !(0, runtime_1.exists)(json, 'restrict_by_storefronts') ? undefined : (json['restrict_by_storefronts'].map(CouponRestriction_1.CouponRestrictionFromJSON)),
131
+ 'skip_on_rebill': !(0, runtime_1.exists)(json, 'skip_on_rebill') ? undefined : json['skip_on_rebill'],
131
132
  'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
132
133
  'super_coupon': !(0, runtime_1.exists)(json, 'super_coupon') ? undefined : json['super_coupon'],
133
134
  'tiered_amount_off_items': !(0, runtime_1.exists)(json, 'tiered_amount_off_items') ? undefined : (0, CouponTieredAmountOffItems_1.CouponTieredAmountOffItemsFromJSON)(json['tiered_amount_off_items']),
@@ -204,6 +205,7 @@ function CouponToJSON(value) {
204
205
  'restrict_by_postal_codes': value.restrict_by_postal_codes,
205
206
  'restrict_by_screen_branding_theme_codes': value.restrict_by_screen_branding_theme_codes === undefined ? undefined : (value.restrict_by_screen_branding_theme_codes.map(CouponRestriction_1.CouponRestrictionToJSON)),
206
207
  'restrict_by_storefronts': value.restrict_by_storefronts === undefined ? undefined : (value.restrict_by_storefronts.map(CouponRestriction_1.CouponRestrictionToJSON)),
208
+ 'skip_on_rebill': value.skip_on_rebill,
207
209
  'start_dts': value.start_dts,
208
210
  'super_coupon': value.super_coupon,
209
211
  'tiered_amount_off_items': (0, CouponTieredAmountOffItems_1.CouponTieredAmountOffItemsToJSON)(value.tiered_amount_off_items),
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { OrderTransactionalMerchantNote } from './OrderTransactionalMerchantNote';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -22,7 +23,7 @@ export interface OrderInternal {
22
23
  */
23
24
  exported_to_accounting?: boolean;
24
25
  /**
25
- * Merchant notes
26
+ * Merchant notes. Full notes in non-transactional mode. Just used to write a new merchant note when transaction merchant notes enabled.
26
27
  * @type {string}
27
28
  * @memberof OrderInternal
28
29
  */
@@ -45,6 +46,12 @@ export interface OrderInternal {
45
46
  * @memberof OrderInternal
46
47
  */
47
48
  sales_rep_code?: string;
49
+ /**
50
+ * Transactional merchant notes
51
+ * @type {Array<OrderTransactionalMerchantNote>}
52
+ * @memberof OrderInternal
53
+ */
54
+ transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
48
55
  }
49
56
  export declare function OrderInternalFromJSON(json: any): OrderInternal;
50
57
  export declare function OrderInternalFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderInternal;
@@ -15,6 +15,7 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderInternalToJSON = exports.OrderInternalFromJSONTyped = exports.OrderInternalFromJSON = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ var OrderTransactionalMerchantNote_1 = require("./OrderTransactionalMerchantNote");
18
19
  function OrderInternalFromJSON(json) {
19
20
  return OrderInternalFromJSONTyped(json, false);
20
21
  }
@@ -29,6 +30,7 @@ function OrderInternalFromJSONTyped(json, ignoreDiscriminator) {
29
30
  'placed_by_user': !(0, runtime_1.exists)(json, 'placed_by_user') ? undefined : json['placed_by_user'],
30
31
  'refund_by_user': !(0, runtime_1.exists)(json, 'refund_by_user') ? undefined : json['refund_by_user'],
31
32
  'sales_rep_code': !(0, runtime_1.exists)(json, 'sales_rep_code') ? undefined : json['sales_rep_code'],
33
+ 'transactional_merchant_notes': !(0, runtime_1.exists)(json, 'transactional_merchant_notes') ? undefined : (json['transactional_merchant_notes'].map(OrderTransactionalMerchantNote_1.OrderTransactionalMerchantNoteFromJSON)),
32
34
  };
33
35
  }
34
36
  exports.OrderInternalFromJSONTyped = OrderInternalFromJSONTyped;
@@ -45,6 +47,7 @@ function OrderInternalToJSON(value) {
45
47
  'placed_by_user': value.placed_by_user,
46
48
  'refund_by_user': value.refund_by_user,
47
49
  'sales_rep_code': value.sales_rep_code,
50
+ 'transactional_merchant_notes': value.transactional_merchant_notes === undefined ? undefined : (value.transactional_merchant_notes.map(OrderTransactionalMerchantNote_1.OrderTransactionalMerchantNoteToJSON)),
48
51
  };
49
52
  }
50
53
  exports.OrderInternalToJSON = OrderInternalToJSON;
@@ -0,0 +1,45 @@
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 OrderTransactionalMerchantNote
16
+ */
17
+ export interface OrderTransactionalMerchantNote {
18
+ /**
19
+ * IP Address
20
+ * @type {string}
21
+ * @memberof OrderTransactionalMerchantNote
22
+ */
23
+ ip_address?: string;
24
+ /**
25
+ * note
26
+ * @type {string}
27
+ * @memberof OrderTransactionalMerchantNote
28
+ */
29
+ note?: string;
30
+ /**
31
+ * Timestamp when the note was added
32
+ * @type {string}
33
+ * @memberof OrderTransactionalMerchantNote
34
+ */
35
+ note_dts?: string;
36
+ /**
37
+ * User that wrote the merchant note
38
+ * @type {string}
39
+ * @memberof OrderTransactionalMerchantNote
40
+ */
41
+ user?: string;
42
+ }
43
+ export declare function OrderTransactionalMerchantNoteFromJSON(json: any): OrderTransactionalMerchantNote;
44
+ export declare function OrderTransactionalMerchantNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderTransactionalMerchantNote;
45
+ export declare function OrderTransactionalMerchantNoteToJSON(value?: OrderTransactionalMerchantNote | null): any;
@@ -0,0 +1,48 @@
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.OrderTransactionalMerchantNoteToJSON = exports.OrderTransactionalMerchantNoteFromJSONTyped = exports.OrderTransactionalMerchantNoteFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function OrderTransactionalMerchantNoteFromJSON(json) {
19
+ return OrderTransactionalMerchantNoteFromJSONTyped(json, false);
20
+ }
21
+ exports.OrderTransactionalMerchantNoteFromJSON = OrderTransactionalMerchantNoteFromJSON;
22
+ function OrderTransactionalMerchantNoteFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'ip_address': !(0, runtime_1.exists)(json, 'ip_address') ? undefined : json['ip_address'],
28
+ 'note': !(0, runtime_1.exists)(json, 'note') ? undefined : json['note'],
29
+ 'note_dts': !(0, runtime_1.exists)(json, 'note_dts') ? undefined : json['note_dts'],
30
+ 'user': !(0, runtime_1.exists)(json, 'user') ? undefined : json['user'],
31
+ };
32
+ }
33
+ exports.OrderTransactionalMerchantNoteFromJSONTyped = OrderTransactionalMerchantNoteFromJSONTyped;
34
+ function OrderTransactionalMerchantNoteToJSON(value) {
35
+ if (value === undefined) {
36
+ return undefined;
37
+ }
38
+ if (value === null) {
39
+ return null;
40
+ }
41
+ return {
42
+ 'ip_address': value.ip_address,
43
+ 'note': value.note,
44
+ 'note_dts': value.note_dts,
45
+ 'user': value.user,
46
+ };
47
+ }
48
+ exports.OrderTransactionalMerchantNoteToJSON = OrderTransactionalMerchantNoteToJSON;
@@ -597,6 +597,7 @@ export * from './OrderTaxes';
597
597
  export * from './OrderTokenResponse';
598
598
  export * from './OrderTrackingNumberDetail';
599
599
  export * from './OrderTrackingNumberDetails';
600
+ export * from './OrderTransactionalMerchantNote';
600
601
  export * from './OrdersResponse';
601
602
  export * from './Permission';
602
603
  export * from './PointOfSaleLocation';
@@ -615,6 +615,7 @@ __exportStar(require("./OrderTaxes"), exports);
615
615
  __exportStar(require("./OrderTokenResponse"), exports);
616
616
  __exportStar(require("./OrderTrackingNumberDetail"), exports);
617
617
  __exportStar(require("./OrderTrackingNumberDetails"), exports);
618
+ __exportStar(require("./OrderTransactionalMerchantNote"), exports);
618
619
  __exportStar(require("./OrdersResponse"), exports);
619
620
  __exportStar(require("./Permission"), exports);
620
621
  __exportStar(require("./PointOfSaleLocation"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.119-RC",
3
+ "version": "4.0.121-RC",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -122,6 +122,10 @@ export interface GetConversationContextRequest {
122
122
  conversationUuid: string;
123
123
  }
124
124
 
125
+ export interface GetConversationEngagementRequest {
126
+ conversationEngagementOid: number;
127
+ }
128
+
125
129
  export interface GetConversationMessagesRequest {
126
130
  conversationUuid: string;
127
131
  since: number;
@@ -363,6 +367,22 @@ export interface ConversationApiInterface {
363
367
  */
364
368
  getConversationDepartments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationDepartmentsResponse>;
365
369
 
370
+ /**
371
+ * Retrieve an engagement
372
+ * @summary Retrieve an engagement
373
+ * @param {number} conversationEngagementOid
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ * @memberof ConversationApiInterface
377
+ */
378
+ getConversationEngagementRaw(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationEngagementResponse>>;
379
+
380
+ /**
381
+ * Retrieve an engagement
382
+ * Retrieve an engagement
383
+ */
384
+ getConversationEngagement(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationEngagementResponse>;
385
+
366
386
  /**
367
387
  * Retrieve a list of engagements ordered by name
368
388
  * @summary Retrieve a list of engagements ordered by name
@@ -1087,6 +1107,47 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
1087
1107
  return await response.value();
1088
1108
  }
1089
1109
 
1110
+ /**
1111
+ * Retrieve an engagement
1112
+ * Retrieve an engagement
1113
+ */
1114
+ async getConversationEngagementRaw(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationEngagementResponse>> {
1115
+ if (requestParameters.conversationEngagementOid === null || requestParameters.conversationEngagementOid === undefined) {
1116
+ throw new runtime.RequiredError('conversationEngagementOid','Required parameter requestParameters.conversationEngagementOid was null or undefined when calling getConversationEngagement.');
1117
+ }
1118
+
1119
+ const queryParameters: any = {};
1120
+
1121
+ const headerParameters: runtime.HTTPHeaders = {};
1122
+
1123
+ if (this.configuration && this.configuration.accessToken) {
1124
+ // oauth required
1125
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_read"]);
1126
+ }
1127
+
1128
+ if (this.configuration && this.configuration.apiKey) {
1129
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1130
+ }
1131
+
1132
+ const response = await this.request({
1133
+ path: `/conversation/engagements/{conversation_engagement_oid}`.replace(`{${"conversation_engagement_oid"}}`, encodeURIComponent(String(requestParameters.conversationEngagementOid))),
1134
+ method: 'GET',
1135
+ headers: headerParameters,
1136
+ query: queryParameters,
1137
+ }, initOverrides);
1138
+
1139
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConversationEngagementResponseFromJSON(jsonValue));
1140
+ }
1141
+
1142
+ /**
1143
+ * Retrieve an engagement
1144
+ * Retrieve an engagement
1145
+ */
1146
+ async getConversationEngagement(requestParameters: GetConversationEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationEngagementResponse> {
1147
+ const response = await this.getConversationEngagementRaw(requestParameters, initOverrides);
1148
+ return await response.value();
1149
+ }
1150
+
1090
1151
  /**
1091
1152
  * Retrieve a list of engagements ordered by name
1092
1153
  * Retrieve a list of engagements ordered by name
@@ -644,6 +644,12 @@ export interface Coupon {
644
644
  * @memberof Coupon
645
645
  */
646
646
  restrict_by_storefronts?: Array<CouponRestriction>;
647
+ /**
648
+ * Skip this coupon when it is on a rebill of an auto order.
649
+ * @type {boolean}
650
+ * @memberof Coupon
651
+ */
652
+ skip_on_rebill?: boolean;
647
653
  /**
648
654
  * Date/time when coupon is valid
649
655
  * @type {string}
@@ -766,6 +772,7 @@ export function CouponFromJSONTyped(json: any, ignoreDiscriminator: boolean): Co
766
772
  'restrict_by_postal_codes': !exists(json, 'restrict_by_postal_codes') ? undefined : json['restrict_by_postal_codes'],
767
773
  'restrict_by_screen_branding_theme_codes': !exists(json, 'restrict_by_screen_branding_theme_codes') ? undefined : ((json['restrict_by_screen_branding_theme_codes'] as Array<any>).map(CouponRestrictionFromJSON)),
768
774
  'restrict_by_storefronts': !exists(json, 'restrict_by_storefronts') ? undefined : ((json['restrict_by_storefronts'] as Array<any>).map(CouponRestrictionFromJSON)),
775
+ 'skip_on_rebill': !exists(json, 'skip_on_rebill') ? undefined : json['skip_on_rebill'],
769
776
  'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
770
777
  'super_coupon': !exists(json, 'super_coupon') ? undefined : json['super_coupon'],
771
778
  'tiered_amount_off_items': !exists(json, 'tiered_amount_off_items') ? undefined : CouponTieredAmountOffItemsFromJSON(json['tiered_amount_off_items']),
@@ -843,6 +850,7 @@ export function CouponToJSON(value?: Coupon | null): any {
843
850
  'restrict_by_postal_codes': value.restrict_by_postal_codes,
844
851
  'restrict_by_screen_branding_theme_codes': value.restrict_by_screen_branding_theme_codes === undefined ? undefined : ((value.restrict_by_screen_branding_theme_codes as Array<any>).map(CouponRestrictionToJSON)),
845
852
  'restrict_by_storefronts': value.restrict_by_storefronts === undefined ? undefined : ((value.restrict_by_storefronts as Array<any>).map(CouponRestrictionToJSON)),
853
+ 'skip_on_rebill': value.skip_on_rebill,
846
854
  'start_dts': value.start_dts,
847
855
  'super_coupon': value.super_coupon,
848
856
  'tiered_amount_off_items': CouponTieredAmountOffItemsToJSON(value.tiered_amount_off_items),
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import {
17
+ OrderTransactionalMerchantNote,
18
+ OrderTransactionalMerchantNoteFromJSON,
19
+ OrderTransactionalMerchantNoteFromJSONTyped,
20
+ OrderTransactionalMerchantNoteToJSON,
21
+ } from './OrderTransactionalMerchantNote';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -26,7 +33,7 @@ export interface OrderInternal {
26
33
  */
27
34
  exported_to_accounting?: boolean;
28
35
  /**
29
- * Merchant notes
36
+ * Merchant notes. Full notes in non-transactional mode. Just used to write a new merchant note when transaction merchant notes enabled.
30
37
  * @type {string}
31
38
  * @memberof OrderInternal
32
39
  */
@@ -49,6 +56,12 @@ export interface OrderInternal {
49
56
  * @memberof OrderInternal
50
57
  */
51
58
  sales_rep_code?: string;
59
+ /**
60
+ * Transactional merchant notes
61
+ * @type {Array<OrderTransactionalMerchantNote>}
62
+ * @memberof OrderInternal
63
+ */
64
+ transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
52
65
  }
53
66
 
54
67
  export function OrderInternalFromJSON(json: any): OrderInternal {
@@ -66,6 +79,7 @@ export function OrderInternalFromJSONTyped(json: any, ignoreDiscriminator: boole
66
79
  'placed_by_user': !exists(json, 'placed_by_user') ? undefined : json['placed_by_user'],
67
80
  'refund_by_user': !exists(json, 'refund_by_user') ? undefined : json['refund_by_user'],
68
81
  'sales_rep_code': !exists(json, 'sales_rep_code') ? undefined : json['sales_rep_code'],
82
+ 'transactional_merchant_notes': !exists(json, 'transactional_merchant_notes') ? undefined : ((json['transactional_merchant_notes'] as Array<any>).map(OrderTransactionalMerchantNoteFromJSON)),
69
83
  };
70
84
  }
71
85
 
@@ -83,6 +97,7 @@ export function OrderInternalToJSON(value?: OrderInternal | null): any {
83
97
  'placed_by_user': value.placed_by_user,
84
98
  'refund_by_user': value.refund_by_user,
85
99
  'sales_rep_code': value.sales_rep_code,
100
+ 'transactional_merchant_notes': value.transactional_merchant_notes === undefined ? undefined : ((value.transactional_merchant_notes as Array<any>).map(OrderTransactionalMerchantNoteToJSON)),
86
101
  };
87
102
  }
88
103
 
@@ -0,0 +1,80 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface OrderTransactionalMerchantNote
20
+ */
21
+ export interface OrderTransactionalMerchantNote {
22
+ /**
23
+ * IP Address
24
+ * @type {string}
25
+ * @memberof OrderTransactionalMerchantNote
26
+ */
27
+ ip_address?: string;
28
+ /**
29
+ * note
30
+ * @type {string}
31
+ * @memberof OrderTransactionalMerchantNote
32
+ */
33
+ note?: string;
34
+ /**
35
+ * Timestamp when the note was added
36
+ * @type {string}
37
+ * @memberof OrderTransactionalMerchantNote
38
+ */
39
+ note_dts?: string;
40
+ /**
41
+ * User that wrote the merchant note
42
+ * @type {string}
43
+ * @memberof OrderTransactionalMerchantNote
44
+ */
45
+ user?: string;
46
+ }
47
+
48
+ export function OrderTransactionalMerchantNoteFromJSON(json: any): OrderTransactionalMerchantNote {
49
+ return OrderTransactionalMerchantNoteFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function OrderTransactionalMerchantNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderTransactionalMerchantNote {
53
+ if ((json === undefined) || (json === null)) {
54
+ return json;
55
+ }
56
+ return {
57
+
58
+ 'ip_address': !exists(json, 'ip_address') ? undefined : json['ip_address'],
59
+ 'note': !exists(json, 'note') ? undefined : json['note'],
60
+ 'note_dts': !exists(json, 'note_dts') ? undefined : json['note_dts'],
61
+ 'user': !exists(json, 'user') ? undefined : json['user'],
62
+ };
63
+ }
64
+
65
+ export function OrderTransactionalMerchantNoteToJSON(value?: OrderTransactionalMerchantNote | null): any {
66
+ if (value === undefined) {
67
+ return undefined;
68
+ }
69
+ if (value === null) {
70
+ return null;
71
+ }
72
+ return {
73
+
74
+ 'ip_address': value.ip_address,
75
+ 'note': value.note,
76
+ 'note_dts': value.note_dts,
77
+ 'user': value.user,
78
+ };
79
+ }
80
+
@@ -599,6 +599,7 @@ export * from './OrderTaxes';
599
599
  export * from './OrderTokenResponse';
600
600
  export * from './OrderTrackingNumberDetail';
601
601
  export * from './OrderTrackingNumberDetails';
602
+ export * from './OrderTransactionalMerchantNote';
602
603
  export * from './OrdersResponse';
603
604
  export * from './Permission';
604
605
  export * from './PointOfSaleLocation';