ultracart_rest_api_v2_typescript 4.1.97 → 4.1.98
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 +1 -0
- package/README.md +3 -2
- package/dist/models/Coupon.d.ts +7 -0
- package/dist/models/Coupon.js +3 -0
- package/dist/models/CouponAmountOffItemsAndFreeShipping.d.ts +61 -0
- package/dist/models/CouponAmountOffItemsAndFreeShipping.js +60 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/models/Coupon.ts +14 -0
- package/src/models/CouponAmountOffItemsAndFreeShipping.ts +107 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -338,6 +338,7 @@ src/models/CountriesResponse.ts
|
|
|
338
338
|
src/models/Country.ts
|
|
339
339
|
src/models/Coupon.ts
|
|
340
340
|
src/models/CouponAmountOffItems.ts
|
|
341
|
+
src/models/CouponAmountOffItemsAndFreeShipping.ts
|
|
341
342
|
src/models/CouponAmountOffShipping.ts
|
|
342
343
|
src/models/CouponAmountOffShippingWithItemsPurchase.ts
|
|
343
344
|
src/models/CouponAmountOffSubtotal.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.98
|
|
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.98 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -85,6 +85,7 @@ Not every change is committed to every SDK.
|
|
|
85
85
|
|
|
86
86
|
| Version | Date | Comments |
|
|
87
87
|
| --: | :-: | --- |
|
|
88
|
+
| 4.1.98 | 06/04/2026 | coupon - new coupon type for amount off items with free shipping |
|
|
88
89
|
| 4.1.97 | 06/03/2026 | fraud api alpha version |
|
|
89
90
|
| 4.1.96 | 06/03/2026 | fraud api alpha build |
|
|
90
91
|
| 4.1.95 | 06/02/2026 | fraud api alpha version |
|
package/dist/models/Coupon.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { CouponAmountOffItems } from './CouponAmountOffItems';
|
|
13
|
+
import { CouponAmountOffItemsAndFreeShipping } from './CouponAmountOffItemsAndFreeShipping';
|
|
13
14
|
import { CouponAmountOffShipping } from './CouponAmountOffShipping';
|
|
14
15
|
import { CouponAmountOffShippingWithItemsPurchase } from './CouponAmountOffShippingWithItemsPurchase';
|
|
15
16
|
import { CouponAmountOffSubtotal } from './CouponAmountOffSubtotal';
|
|
@@ -83,6 +84,12 @@ export interface Coupon {
|
|
|
83
84
|
* @memberof Coupon
|
|
84
85
|
*/
|
|
85
86
|
amount_off_items?: CouponAmountOffItems;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {CouponAmountOffItemsAndFreeShipping}
|
|
90
|
+
* @memberof Coupon
|
|
91
|
+
*/
|
|
92
|
+
amount_off_items_and_free_shipping?: CouponAmountOffItemsAndFreeShipping;
|
|
86
93
|
/**
|
|
87
94
|
*
|
|
88
95
|
* @type {CouponAmountOffShipping}
|
package/dist/models/Coupon.js
CHANGED
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.CouponToJSON = exports.CouponFromJSONTyped = exports.CouponFromJSON = exports.instanceOfCoupon = exports.CouponUsableByEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
18
|
var CouponAmountOffItems_1 = require("./CouponAmountOffItems");
|
|
19
|
+
var CouponAmountOffItemsAndFreeShipping_1 = require("./CouponAmountOffItemsAndFreeShipping");
|
|
19
20
|
var CouponAmountOffShipping_1 = require("./CouponAmountOffShipping");
|
|
20
21
|
var CouponAmountOffShippingWithItemsPurchase_1 = require("./CouponAmountOffShippingWithItemsPurchase");
|
|
21
22
|
var CouponAmountOffSubtotal_1 = require("./CouponAmountOffSubtotal");
|
|
@@ -95,6 +96,7 @@ function CouponFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
95
96
|
'affiliate_oid': !(0, runtime_1.exists)(json, 'affiliate_oid') ? undefined : json['affiliate_oid'],
|
|
96
97
|
'allow_multiple_one_time_codes': !(0, runtime_1.exists)(json, 'allow_multiple_one_time_codes') ? undefined : json['allow_multiple_one_time_codes'],
|
|
97
98
|
'amount_off_items': !(0, runtime_1.exists)(json, 'amount_off_items') ? undefined : (0, CouponAmountOffItems_1.CouponAmountOffItemsFromJSON)(json['amount_off_items']),
|
|
99
|
+
'amount_off_items_and_free_shipping': !(0, runtime_1.exists)(json, 'amount_off_items_and_free_shipping') ? undefined : (0, CouponAmountOffItemsAndFreeShipping_1.CouponAmountOffItemsAndFreeShippingFromJSON)(json['amount_off_items_and_free_shipping']),
|
|
98
100
|
'amount_off_shipping': !(0, runtime_1.exists)(json, 'amount_off_shipping') ? undefined : (0, CouponAmountOffShipping_1.CouponAmountOffShippingFromJSON)(json['amount_off_shipping']),
|
|
99
101
|
'amount_off_shipping_with_items_purchase': !(0, runtime_1.exists)(json, 'amount_off_shipping_with_items_purchase') ? undefined : (0, CouponAmountOffShippingWithItemsPurchase_1.CouponAmountOffShippingWithItemsPurchaseFromJSON)(json['amount_off_shipping_with_items_purchase']),
|
|
100
102
|
'amount_off_subtotal': !(0, runtime_1.exists)(json, 'amount_off_subtotal') ? undefined : (0, CouponAmountOffSubtotal_1.CouponAmountOffSubtotalFromJSON)(json['amount_off_subtotal']),
|
|
@@ -174,6 +176,7 @@ function CouponToJSON(value) {
|
|
|
174
176
|
'affiliate_oid': value.affiliate_oid,
|
|
175
177
|
'allow_multiple_one_time_codes': value.allow_multiple_one_time_codes,
|
|
176
178
|
'amount_off_items': (0, CouponAmountOffItems_1.CouponAmountOffItemsToJSON)(value.amount_off_items),
|
|
179
|
+
'amount_off_items_and_free_shipping': (0, CouponAmountOffItemsAndFreeShipping_1.CouponAmountOffItemsAndFreeShippingToJSON)(value.amount_off_items_and_free_shipping),
|
|
177
180
|
'amount_off_shipping': (0, CouponAmountOffShipping_1.CouponAmountOffShippingToJSON)(value.amount_off_shipping),
|
|
178
181
|
'amount_off_shipping_with_items_purchase': (0, CouponAmountOffShippingWithItemsPurchase_1.CouponAmountOffShippingWithItemsPurchaseToJSON)(value.amount_off_shipping_with_items_purchase),
|
|
179
182
|
'amount_off_subtotal': (0, CouponAmountOffSubtotal_1.CouponAmountOffSubtotalToJSON)(value.amount_off_subtotal),
|
|
@@ -0,0 +1,61 @@
|
|
|
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 CouponAmountOffItemsAndFreeShipping
|
|
16
|
+
*/
|
|
17
|
+
export interface CouponAmountOffItemsAndFreeShipping {
|
|
18
|
+
/**
|
|
19
|
+
* The ISO-4217 three letter currency code the customer is viewing prices in
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
22
|
+
*/
|
|
23
|
+
currency_code?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The amount of discount
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
28
|
+
*/
|
|
29
|
+
discount_amount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* An optional list of item tags which will receive a discount.
|
|
32
|
+
* @type {Array<string>}
|
|
33
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
34
|
+
*/
|
|
35
|
+
item_tags?: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
* A list of items which are eligible for the discount amount.
|
|
38
|
+
* @type {Array<string>}
|
|
39
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
40
|
+
*/
|
|
41
|
+
items?: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
* The limit of items which are eligible for the discount amount.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
46
|
+
*/
|
|
47
|
+
limit?: number;
|
|
48
|
+
/**
|
|
49
|
+
* One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
|
|
50
|
+
* @type {Array<string>}
|
|
51
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
52
|
+
*/
|
|
53
|
+
shipping_methods?: Array<string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the CouponAmountOffItemsAndFreeShipping interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfCouponAmountOffItemsAndFreeShipping(value: object): boolean;
|
|
59
|
+
export declare function CouponAmountOffItemsAndFreeShippingFromJSON(json: any): CouponAmountOffItemsAndFreeShipping;
|
|
60
|
+
export declare function CouponAmountOffItemsAndFreeShippingFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponAmountOffItemsAndFreeShipping;
|
|
61
|
+
export declare function CouponAmountOffItemsAndFreeShippingToJSON(value?: CouponAmountOffItemsAndFreeShipping | null): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.CouponAmountOffItemsAndFreeShippingToJSON = exports.CouponAmountOffItemsAndFreeShippingFromJSONTyped = exports.CouponAmountOffItemsAndFreeShippingFromJSON = exports.instanceOfCouponAmountOffItemsAndFreeShipping = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the CouponAmountOffItemsAndFreeShipping interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfCouponAmountOffItemsAndFreeShipping(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfCouponAmountOffItemsAndFreeShipping = instanceOfCouponAmountOffItemsAndFreeShipping;
|
|
26
|
+
function CouponAmountOffItemsAndFreeShippingFromJSON(json) {
|
|
27
|
+
return CouponAmountOffItemsAndFreeShippingFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.CouponAmountOffItemsAndFreeShippingFromJSON = CouponAmountOffItemsAndFreeShippingFromJSON;
|
|
30
|
+
function CouponAmountOffItemsAndFreeShippingFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'currency_code': !(0, runtime_1.exists)(json, 'currency_code') ? undefined : json['currency_code'],
|
|
36
|
+
'discount_amount': !(0, runtime_1.exists)(json, 'discount_amount') ? undefined : json['discount_amount'],
|
|
37
|
+
'item_tags': !(0, runtime_1.exists)(json, 'item_tags') ? undefined : json['item_tags'],
|
|
38
|
+
'items': !(0, runtime_1.exists)(json, 'items') ? undefined : json['items'],
|
|
39
|
+
'limit': !(0, runtime_1.exists)(json, 'limit') ? undefined : json['limit'],
|
|
40
|
+
'shipping_methods': !(0, runtime_1.exists)(json, 'shipping_methods') ? undefined : json['shipping_methods'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.CouponAmountOffItemsAndFreeShippingFromJSONTyped = CouponAmountOffItemsAndFreeShippingFromJSONTyped;
|
|
44
|
+
function CouponAmountOffItemsAndFreeShippingToJSON(value) {
|
|
45
|
+
if (value === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
if (value === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'currency_code': value.currency_code,
|
|
53
|
+
'discount_amount': value.discount_amount,
|
|
54
|
+
'item_tags': value.item_tags,
|
|
55
|
+
'items': value.items,
|
|
56
|
+
'limit': value.limit,
|
|
57
|
+
'shipping_methods': value.shipping_methods,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
exports.CouponAmountOffItemsAndFreeShippingToJSON = CouponAmountOffItemsAndFreeShippingToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -310,6 +310,7 @@ export * from './CountriesResponse';
|
|
|
310
310
|
export * from './Country';
|
|
311
311
|
export * from './Coupon';
|
|
312
312
|
export * from './CouponAmountOffItems';
|
|
313
|
+
export * from './CouponAmountOffItemsAndFreeShipping';
|
|
313
314
|
export * from './CouponAmountOffShipping';
|
|
314
315
|
export * from './CouponAmountOffShippingWithItemsPurchase';
|
|
315
316
|
export * from './CouponAmountOffSubtotal';
|
package/dist/models/index.js
CHANGED
|
@@ -328,6 +328,7 @@ __exportStar(require("./CountriesResponse"), exports);
|
|
|
328
328
|
__exportStar(require("./Country"), exports);
|
|
329
329
|
__exportStar(require("./Coupon"), exports);
|
|
330
330
|
__exportStar(require("./CouponAmountOffItems"), exports);
|
|
331
|
+
__exportStar(require("./CouponAmountOffItemsAndFreeShipping"), exports);
|
|
331
332
|
__exportStar(require("./CouponAmountOffShipping"), exports);
|
|
332
333
|
__exportStar(require("./CouponAmountOffShippingWithItemsPurchase"), exports);
|
|
333
334
|
__exportStar(require("./CouponAmountOffSubtotal"), exports);
|
package/package.json
CHANGED
package/src/models/Coupon.ts
CHANGED
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
CouponAmountOffItemsFromJSONTyped,
|
|
20
20
|
CouponAmountOffItemsToJSON,
|
|
21
21
|
} from './CouponAmountOffItems';
|
|
22
|
+
import {
|
|
23
|
+
CouponAmountOffItemsAndFreeShipping,
|
|
24
|
+
CouponAmountOffItemsAndFreeShippingFromJSON,
|
|
25
|
+
CouponAmountOffItemsAndFreeShippingFromJSONTyped,
|
|
26
|
+
CouponAmountOffItemsAndFreeShippingToJSON,
|
|
27
|
+
} from './CouponAmountOffItemsAndFreeShipping';
|
|
22
28
|
import {
|
|
23
29
|
CouponAmountOffShipping,
|
|
24
30
|
CouponAmountOffShippingFromJSON,
|
|
@@ -338,6 +344,12 @@ export interface Coupon {
|
|
|
338
344
|
* @memberof Coupon
|
|
339
345
|
*/
|
|
340
346
|
amount_off_items?: CouponAmountOffItems;
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* @type {CouponAmountOffItemsAndFreeShipping}
|
|
350
|
+
* @memberof Coupon
|
|
351
|
+
*/
|
|
352
|
+
amount_off_items_and_free_shipping?: CouponAmountOffItemsAndFreeShipping;
|
|
341
353
|
/**
|
|
342
354
|
*
|
|
343
355
|
* @type {CouponAmountOffShipping}
|
|
@@ -767,6 +779,7 @@ export function CouponFromJSONTyped(json: any, ignoreDiscriminator: boolean): Co
|
|
|
767
779
|
'affiliate_oid': !exists(json, 'affiliate_oid') ? undefined : json['affiliate_oid'],
|
|
768
780
|
'allow_multiple_one_time_codes': !exists(json, 'allow_multiple_one_time_codes') ? undefined : json['allow_multiple_one_time_codes'],
|
|
769
781
|
'amount_off_items': !exists(json, 'amount_off_items') ? undefined : CouponAmountOffItemsFromJSON(json['amount_off_items']),
|
|
782
|
+
'amount_off_items_and_free_shipping': !exists(json, 'amount_off_items_and_free_shipping') ? undefined : CouponAmountOffItemsAndFreeShippingFromJSON(json['amount_off_items_and_free_shipping']),
|
|
770
783
|
'amount_off_shipping': !exists(json, 'amount_off_shipping') ? undefined : CouponAmountOffShippingFromJSON(json['amount_off_shipping']),
|
|
771
784
|
'amount_off_shipping_with_items_purchase': !exists(json, 'amount_off_shipping_with_items_purchase') ? undefined : CouponAmountOffShippingWithItemsPurchaseFromJSON(json['amount_off_shipping_with_items_purchase']),
|
|
772
785
|
'amount_off_subtotal': !exists(json, 'amount_off_subtotal') ? undefined : CouponAmountOffSubtotalFromJSON(json['amount_off_subtotal']),
|
|
@@ -847,6 +860,7 @@ export function CouponToJSON(value?: Coupon | null): any {
|
|
|
847
860
|
'affiliate_oid': value.affiliate_oid,
|
|
848
861
|
'allow_multiple_one_time_codes': value.allow_multiple_one_time_codes,
|
|
849
862
|
'amount_off_items': CouponAmountOffItemsToJSON(value.amount_off_items),
|
|
863
|
+
'amount_off_items_and_free_shipping': CouponAmountOffItemsAndFreeShippingToJSON(value.amount_off_items_and_free_shipping),
|
|
850
864
|
'amount_off_shipping': CouponAmountOffShippingToJSON(value.amount_off_shipping),
|
|
851
865
|
'amount_off_shipping_with_items_purchase': CouponAmountOffShippingWithItemsPurchaseToJSON(value.amount_off_shipping_with_items_purchase),
|
|
852
866
|
'amount_off_subtotal': CouponAmountOffSubtotalToJSON(value.amount_off_subtotal),
|
|
@@ -0,0 +1,107 @@
|
|
|
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 CouponAmountOffItemsAndFreeShipping
|
|
20
|
+
*/
|
|
21
|
+
export interface CouponAmountOffItemsAndFreeShipping {
|
|
22
|
+
/**
|
|
23
|
+
* The ISO-4217 three letter currency code the customer is viewing prices in
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
26
|
+
*/
|
|
27
|
+
currency_code?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The amount of discount
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
32
|
+
*/
|
|
33
|
+
discount_amount?: number;
|
|
34
|
+
/**
|
|
35
|
+
* An optional list of item tags which will receive a discount.
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
38
|
+
*/
|
|
39
|
+
item_tags?: Array<string>;
|
|
40
|
+
/**
|
|
41
|
+
* A list of items which are eligible for the discount amount.
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
44
|
+
*/
|
|
45
|
+
items?: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
* The limit of items which are eligible for the discount amount.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
50
|
+
*/
|
|
51
|
+
limit?: number;
|
|
52
|
+
/**
|
|
53
|
+
* One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
|
|
54
|
+
* @type {Array<string>}
|
|
55
|
+
* @memberof CouponAmountOffItemsAndFreeShipping
|
|
56
|
+
*/
|
|
57
|
+
shipping_methods?: Array<string>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the CouponAmountOffItemsAndFreeShipping interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfCouponAmountOffItemsAndFreeShipping(value: object): boolean {
|
|
66
|
+
let isInstance = true;
|
|
67
|
+
|
|
68
|
+
return isInstance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function CouponAmountOffItemsAndFreeShippingFromJSON(json: any): CouponAmountOffItemsAndFreeShipping {
|
|
72
|
+
return CouponAmountOffItemsAndFreeShippingFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function CouponAmountOffItemsAndFreeShippingFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponAmountOffItemsAndFreeShipping {
|
|
76
|
+
if ((json === undefined) || (json === null)) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'currency_code': !exists(json, 'currency_code') ? undefined : json['currency_code'],
|
|
82
|
+
'discount_amount': !exists(json, 'discount_amount') ? undefined : json['discount_amount'],
|
|
83
|
+
'item_tags': !exists(json, 'item_tags') ? undefined : json['item_tags'],
|
|
84
|
+
'items': !exists(json, 'items') ? undefined : json['items'],
|
|
85
|
+
'limit': !exists(json, 'limit') ? undefined : json['limit'],
|
|
86
|
+
'shipping_methods': !exists(json, 'shipping_methods') ? undefined : json['shipping_methods'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function CouponAmountOffItemsAndFreeShippingToJSON(value?: CouponAmountOffItemsAndFreeShipping | null): any {
|
|
91
|
+
if (value === undefined) {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
if (value === null) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'currency_code': value.currency_code,
|
|
100
|
+
'discount_amount': value.discount_amount,
|
|
101
|
+
'item_tags': value.item_tags,
|
|
102
|
+
'items': value.items,
|
|
103
|
+
'limit': value.limit,
|
|
104
|
+
'shipping_methods': value.shipping_methods,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -312,6 +312,7 @@ export * from './CountriesResponse';
|
|
|
312
312
|
export * from './Country';
|
|
313
313
|
export * from './Coupon';
|
|
314
314
|
export * from './CouponAmountOffItems';
|
|
315
|
+
export * from './CouponAmountOffItemsAndFreeShipping';
|
|
315
316
|
export * from './CouponAmountOffShipping';
|
|
316
317
|
export * from './CouponAmountOffShippingWithItemsPurchase';
|
|
317
318
|
export * from './CouponAmountOffSubtotal';
|