@epilot/pricing-client 3.29.0 → 3.31.0

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/dist/openapi.d.ts CHANGED
@@ -80,6 +80,26 @@ declare namespace Components {
80
80
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
81
81
  */
82
82
  amount_total_decimal?: string;
83
+ /**
84
+ * The discount amount.
85
+ */
86
+ discount_amount?: number;
87
+ /**
88
+ * The discount amount as a string with all the decimal places.
89
+ */
90
+ discount_amount_decimal?: string;
91
+ /**
92
+ * The discount percentage, if the applied coupon had a percentage type.
93
+ */
94
+ discount_percentage?: number;
95
+ /**
96
+ * Total amount before discount is applied.
97
+ */
98
+ before_discount_amount_total?: number;
99
+ /**
100
+ * Total amount before discount is applied as a string with all the decimal places.
101
+ */
102
+ before_discount_amount_total_decimal?: string;
83
103
  }
84
104
  /**
85
105
  * Availability check request payload
@@ -199,6 +219,26 @@ declare namespace Components {
199
219
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
200
220
  */
201
221
  amount_total_decimal?: string;
222
+ /**
223
+ * The discount amount.
224
+ */
225
+ discount_amount?: number;
226
+ /**
227
+ * The discount amount as a string with all the decimal places.
228
+ */
229
+ discount_amount_decimal?: string;
230
+ /**
231
+ * The discount percentage, if the applied coupon had a percentage type.
232
+ */
233
+ discount_percentage?: number;
234
+ /**
235
+ * Total amount before discount is applied.
236
+ */
237
+ before_discount_amount_total?: number;
238
+ /**
239
+ * Total amount before discount is applied as a string with all the decimal places.
240
+ */
241
+ before_discount_amount_total_decimal?: string;
202
242
  /**
203
243
  * price item id
204
244
  */
@@ -481,6 +521,40 @@ declare namespace Components {
481
521
  */
482
522
  _updated_at?: string;
483
523
  };
524
+ /**
525
+ * The coupons applicable to the price item
526
+ */
527
+ coupons?: (/**
528
+ * The coupon configuration
529
+ * example:
530
+ * {
531
+ * "_id": "123e4567-e89b-12d3-a456-426614174000",
532
+ * "_schema": "coupon",
533
+ * "_org": "org_12345",
534
+ * "_created_at": "2024-01-15T10:00:00.000Z",
535
+ * "_updated_at": "2024-01-20T12:00:00.000Z",
536
+ * "_title": "Sample Coupon",
537
+ * "name": "Sample Coupon",
538
+ * "type": "fixed",
539
+ * "fixed_value": 555,
540
+ * "fixed_value_currency": "USD",
541
+ * "fixed_value_decimal": "5.55",
542
+ * "active": true,
543
+ * "prices": {
544
+ * "$relation": [
545
+ * {
546
+ * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
547
+ * "_tags": [
548
+ * "discount",
549
+ * "special"
550
+ * ],
551
+ * "_schema": "price"
552
+ * }
553
+ * ]
554
+ * }
555
+ * }
556
+ */
557
+ Coupon)[];
484
558
  /**
485
559
  * Specifies whether the price is considered `inclusive` of taxes or not.
486
560
  */
@@ -524,6 +598,26 @@ declare namespace Components {
524
598
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
525
599
  */
526
600
  amount_total_decimal?: string;
601
+ /**
602
+ * The discount amount.
603
+ */
604
+ discount_amount?: number;
605
+ /**
606
+ * The discount amount as a string with all the decimal places.
607
+ */
608
+ discount_amount_decimal?: string;
609
+ /**
610
+ * The discount percentage, if the applied coupon had a percentage type.
611
+ */
612
+ discount_percentage?: number;
613
+ /**
614
+ * Total amount before discount is applied.
615
+ */
616
+ before_discount_amount_total?: number;
617
+ /**
618
+ * Total amount before discount is applied as a string with all the decimal places.
619
+ */
620
+ before_discount_amount_total_decimal?: string;
527
621
  /**
528
622
  * The cart identifier
529
623
  */
@@ -820,6 +914,26 @@ declare namespace Components {
820
914
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
821
915
  */
822
916
  amount_total_decimal?: string;
917
+ /**
918
+ * The discount amount.
919
+ */
920
+ discount_amount?: number;
921
+ /**
922
+ * The discount amount as a string with all the decimal places.
923
+ */
924
+ discount_amount_decimal?: string;
925
+ /**
926
+ * The discount percentage, if the applied coupon had a percentage type.
927
+ */
928
+ discount_percentage?: number;
929
+ /**
930
+ * Total amount before discount is applied.
931
+ */
932
+ before_discount_amount_total?: number;
933
+ /**
934
+ * Total amount before discount is applied as a string with all the decimal places.
935
+ */
936
+ before_discount_amount_total_decimal?: string;
823
937
  /**
824
938
  * price item id
825
939
  */
@@ -1105,6 +1219,40 @@ declare namespace Components {
1105
1219
  */
1106
1220
  _updated_at?: string;
1107
1221
  };
1222
+ /**
1223
+ * The coupons applicable to the price item
1224
+ */
1225
+ coupons?: (/**
1226
+ * The coupon configuration
1227
+ * example:
1228
+ * {
1229
+ * "_id": "123e4567-e89b-12d3-a456-426614174000",
1230
+ * "_schema": "coupon",
1231
+ * "_org": "org_12345",
1232
+ * "_created_at": "2024-01-15T10:00:00.000Z",
1233
+ * "_updated_at": "2024-01-20T12:00:00.000Z",
1234
+ * "_title": "Sample Coupon",
1235
+ * "name": "Sample Coupon",
1236
+ * "type": "fixed",
1237
+ * "fixed_value": 555,
1238
+ * "fixed_value_currency": "USD",
1239
+ * "fixed_value_decimal": "5.55",
1240
+ * "active": true,
1241
+ * "prices": {
1242
+ * "$relation": [
1243
+ * {
1244
+ * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
1245
+ * "_tags": [
1246
+ * "discount",
1247
+ * "special"
1248
+ * ],
1249
+ * "_schema": "price"
1250
+ * }
1251
+ * ]
1252
+ * }
1253
+ * }
1254
+ */
1255
+ Coupon)[];
1108
1256
  /**
1109
1257
  * Specifies whether the price is considered `inclusive` of taxes or not.
1110
1258
  */
@@ -1380,7 +1528,7 @@ declare namespace Components {
1380
1528
  /**
1381
1529
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
1382
1530
  */
1383
- percentage_value?: number;
1531
+ percentage_value?: string;
1384
1532
  /**
1385
1533
  * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
1386
1534
  */
@@ -2349,6 +2497,26 @@ declare namespace Components {
2349
2497
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
2350
2498
  */
2351
2499
  amount_total_decimal?: string;
2500
+ /**
2501
+ * The discount amount.
2502
+ */
2503
+ discount_amount?: number;
2504
+ /**
2505
+ * The discount amount as a string with all the decimal places.
2506
+ */
2507
+ discount_amount_decimal?: string;
2508
+ /**
2509
+ * The discount percentage, if the applied coupon had a percentage type.
2510
+ */
2511
+ discount_percentage?: number;
2512
+ /**
2513
+ * Total amount before discount is applied.
2514
+ */
2515
+ before_discount_amount_total?: number;
2516
+ /**
2517
+ * Total amount before discount is applied as a string with all the decimal places.
2518
+ */
2519
+ before_discount_amount_total_decimal?: string;
2352
2520
  /**
2353
2521
  * price item id
2354
2522
  */
@@ -2642,6 +2810,40 @@ declare namespace Components {
2642
2810
  */
2643
2811
  _updated_at?: string;
2644
2812
  };
2813
+ /**
2814
+ * The coupons applicable to the price item
2815
+ */
2816
+ coupons?: (/**
2817
+ * The coupon configuration
2818
+ * example:
2819
+ * {
2820
+ * "_id": "123e4567-e89b-12d3-a456-426614174000",
2821
+ * "_schema": "coupon",
2822
+ * "_org": "org_12345",
2823
+ * "_created_at": "2024-01-15T10:00:00.000Z",
2824
+ * "_updated_at": "2024-01-20T12:00:00.000Z",
2825
+ * "_title": "Sample Coupon",
2826
+ * "name": "Sample Coupon",
2827
+ * "type": "fixed",
2828
+ * "fixed_value": 555,
2829
+ * "fixed_value_currency": "USD",
2830
+ * "fixed_value_decimal": "5.55",
2831
+ * "active": true,
2832
+ * "prices": {
2833
+ * "$relation": [
2834
+ * {
2835
+ * "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
2836
+ * "_tags": [
2837
+ * "discount",
2838
+ * "special"
2839
+ * ],
2840
+ * "_schema": "price"
2841
+ * }
2842
+ * ]
2843
+ * }
2844
+ * }
2845
+ */
2846
+ Coupon)[];
2645
2847
  /**
2646
2848
  * Specifies whether the price is considered `inclusive` of taxes or not.
2647
2849
  */
@@ -3139,6 +3341,26 @@ declare namespace Components {
3139
3341
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
3140
3342
  */
3141
3343
  amount_total_decimal: string;
3344
+ /**
3345
+ * The discount amount.
3346
+ */
3347
+ discount_amount?: number;
3348
+ /**
3349
+ * The discount amount as a string with all the decimal places.
3350
+ */
3351
+ discount_amount_decimal?: string;
3352
+ /**
3353
+ * The discount percentage, if the applied coupon had a percentage type.
3354
+ */
3355
+ discount_percentage?: number;
3356
+ /**
3357
+ * Total amount before discount is applied.
3358
+ */
3359
+ before_discount_amount_total?: number;
3360
+ /**
3361
+ * Total amount before discount is applied as a string with all the decimal places.
3362
+ */
3363
+ before_discount_amount_total_decimal?: string;
3142
3364
  /**
3143
3365
  * The price type.
3144
3366
  */
@@ -3188,6 +3410,26 @@ declare namespace Components {
3188
3410
  * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
3189
3411
  */
3190
3412
  amount_total_decimal: string;
3413
+ /**
3414
+ * The discount amount.
3415
+ */
3416
+ discount_amount?: number;
3417
+ /**
3418
+ * The discount amount as a string with all the decimal places.
3419
+ */
3420
+ discount_amount_decimal?: string;
3421
+ /**
3422
+ * The discount percentage, if the applied coupon had a percentage type.
3423
+ */
3424
+ discount_percentage?: number;
3425
+ /**
3426
+ * Total amount before discount is applied.
3427
+ */
3428
+ before_discount_amount_total?: number;
3429
+ /**
3430
+ * Total amount before discount is applied as a string with all the decimal places.
3431
+ */
3432
+ before_discount_amount_total_decimal?: string;
3191
3433
  /**
3192
3434
  * The price type.
3193
3435
  */
package/dist/openapi.json CHANGED
@@ -3402,6 +3402,18 @@
3402
3402
  }
3403
3403
  ]
3404
3404
  },
3405
+ "coupons": {
3406
+ "type": "array",
3407
+ "description": "The coupons applicable to the price item",
3408
+ "readOnly": true,
3409
+ "items": {
3410
+ "oneOf": [
3411
+ {
3412
+ "$ref": "#/components/schemas/Coupon"
3413
+ }
3414
+ ]
3415
+ }
3416
+ },
3405
3417
  "is_tax_inclusive": {
3406
3418
  "type": "boolean",
3407
3419
  "description": "Specifies whether the price is considered `inclusive` of taxes or not."
@@ -3922,6 +3934,31 @@
3922
3934
  "amount_total_decimal": {
3923
3935
  "type": "string",
3924
3936
  "description": "Total of all items after (discounts and) taxes are applied, as a string with all the decimal places."
3937
+ },
3938
+ "discount_amount": {
3939
+ "type": "integer",
3940
+ "description": "The discount amount.",
3941
+ "readOnly": true
3942
+ },
3943
+ "discount_amount_decimal": {
3944
+ "type": "string",
3945
+ "description": "The discount amount as a string with all the decimal places.",
3946
+ "readOnly": true
3947
+ },
3948
+ "discount_percentage": {
3949
+ "type": "integer",
3950
+ "description": "The discount percentage, if the applied coupon had a percentage type.",
3951
+ "readOnly": true
3952
+ },
3953
+ "before_discount_amount_total": {
3954
+ "type": "integer",
3955
+ "description": "Total amount before discount is applied.",
3956
+ "readOnly": true
3957
+ },
3958
+ "before_discount_amount_total_decimal": {
3959
+ "type": "string",
3960
+ "description": "Total amount before discount is applied as a string with all the decimal places.",
3961
+ "readOnly": true
3925
3962
  }
3926
3963
  }
3927
3964
  },
@@ -4770,7 +4807,7 @@
4770
4807
  ]
4771
4808
  },
4772
4809
  "percentage_value": {
4773
- "type": "number",
4810
+ "type": "string",
4774
4811
  "description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer."
4775
4812
  },
4776
4813
  "fixed_value": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.29.0",
3
+ "version": "3.31.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",