@epilot/pricing-client 3.43.0 → 3.45.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
@@ -270,33 +270,33 @@ declare namespace Components {
270
270
  * The date the coupon was last updated
271
271
  */
272
272
  _updated_at: string; // date-time
273
- name: string;
274
- description?: string;
273
+ name: string | null;
274
+ description?: string | null;
275
275
  type?: "fixed" | "percentage";
276
276
  category?: "discount" | "cashback";
277
277
  /**
278
278
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
279
279
  */
280
- percentage_value?: string;
280
+ percentage_value?: string | null;
281
281
  /**
282
282
  * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
283
283
  */
284
- fixed_value?: number;
284
+ fixed_value?: number | null;
285
285
  /**
286
286
  * Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
287
287
  */
288
- fixed_value_decimal?: string;
288
+ fixed_value_decimal?: string | null;
289
289
  /**
290
290
  * Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
291
291
  */
292
- fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
292
+ fixed_value_currency?: null & (/* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
293
293
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
294
294
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
295
295
  *
296
296
  * example:
297
297
  * EUR
298
298
  */
299
- Currency;
299
+ Currency);
300
300
  /**
301
301
  * The cashback period, for now it's limited to either 0 months or 12 months
302
302
  */
@@ -1317,6 +1317,7 @@ declare namespace Components {
1317
1317
  */
1318
1318
  export interface CheckoutCart {
1319
1319
  cart?: string | /* A valid cart payload from a client. */ CartDto;
1320
+ redeemed_promos?: RedeemedPromo[];
1320
1321
  mode?: /* The checkout mode for the cart checkout. */ CheckoutMode;
1321
1322
  }
1322
1323
  /**
@@ -2292,33 +2293,33 @@ declare namespace Components {
2292
2293
  * The date the coupon was last updated
2293
2294
  */
2294
2295
  _updated_at: string; // date-time
2295
- name: string;
2296
- description?: string;
2296
+ name: string | null;
2297
+ description?: string | null;
2297
2298
  type?: "fixed" | "percentage";
2298
2299
  category?: "discount" | "cashback";
2299
2300
  /**
2300
2301
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
2301
2302
  */
2302
- percentage_value?: string;
2303
+ percentage_value?: string | null;
2303
2304
  /**
2304
2305
  * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
2305
2306
  */
2306
- fixed_value?: number;
2307
+ fixed_value?: number | null;
2307
2308
  /**
2308
2309
  * Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
2309
2310
  */
2310
- fixed_value_decimal?: string;
2311
+ fixed_value_decimal?: string | null;
2311
2312
  /**
2312
2313
  * Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
2313
2314
  */
2314
- fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
2315
+ fixed_value_currency?: null & (/* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
2315
2316
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2316
2317
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2317
2318
  *
2318
2319
  * example:
2319
2320
  * EUR
2320
2321
  */
2321
- Currency;
2322
+ Currency);
2322
2323
  /**
2323
2324
  * The cashback period, for now it's limited to either 0 months or 12 months
2324
2325
  */
@@ -2412,33 +2413,33 @@ declare namespace Components {
2412
2413
  * The date the coupon was last updated
2413
2414
  */
2414
2415
  _updated_at: string; // date-time
2415
- name: string;
2416
- description?: string;
2416
+ name: string | null;
2417
+ description?: string | null;
2417
2418
  type?: "fixed" | "percentage";
2418
2419
  category?: "discount" | "cashback";
2419
2420
  /**
2420
2421
  * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
2421
2422
  */
2422
- percentage_value?: string;
2423
+ percentage_value?: string | null;
2423
2424
  /**
2424
2425
  * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
2425
2426
  */
2426
- fixed_value?: number;
2427
+ fixed_value?: number | null;
2427
2428
  /**
2428
2429
  * Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
2429
2430
  */
2430
- fixed_value_decimal?: string;
2431
+ fixed_value_decimal?: string | null;
2431
2432
  /**
2432
2433
  * Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
2433
2434
  */
2434
- fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
2435
+ fixed_value_currency?: null & (/* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
2435
2436
  * Three-letter ISO currency code, in lowercase. Must be a supported currency.
2436
2437
  * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
2437
2438
  *
2438
2439
  * example:
2439
2440
  * EUR
2440
2441
  */
2441
- Currency;
2442
+ Currency);
2442
2443
  /**
2443
2444
  * The cashback period, for now it's limited to either 0 months or 12 months
2444
2445
  */
@@ -3396,8 +3397,46 @@ declare namespace Components {
3396
3397
  interval?: /* The interval of the tariff if a spot market price is used as base. */ DynamicTariffInterval;
3397
3398
  average_price: number;
3398
3399
  average_price_decimal: string;
3399
- markup: number;
3400
- markup_decimal: string;
3400
+ /**
3401
+ * The markup amount, configured in Epilot, in cents.
3402
+ */
3403
+ markup_amount?: number;
3404
+ /**
3405
+ * The markup amount, configured in Epilot, as a string with full precision.
3406
+ */
3407
+ markup_amount_decimal?: string;
3408
+ /**
3409
+ * The markup amount net, configured in Epilot, in cents.
3410
+ */
3411
+ markup_amount_net?: number;
3412
+ /**
3413
+ * The markup amount net, configured in Epilot, as a string with full precision.
3414
+ */
3415
+ markup_amount_net_decimal?: string;
3416
+ /**
3417
+ * The markup amount gross, configured in Epilot, in cents.
3418
+ */
3419
+ markup_amount_gross?: number;
3420
+ /**
3421
+ * The markup amount gross, configured in Epilot, as a string with full precision.
3422
+ */
3423
+ markup_amount_gross_decimal?: string;
3424
+ /**
3425
+ * The unit amount net for the energy price in cents, it's provided by an external provider.
3426
+ */
3427
+ unit_amount_net?: number;
3428
+ /**
3429
+ * The unit amount net for the energy price as a string with full precision, it's provided by an external provider.
3430
+ */
3431
+ unit_amount_net_decimal?: string;
3432
+ /**
3433
+ * The unit amount gross for the energy price in cents, it's provided by an external provider.
3434
+ */
3435
+ unit_amount_gross?: number;
3436
+ /**
3437
+ * The unit amount gross for the energy price as a string with full precision, it's provided by an external provider.
3438
+ */
3439
+ unit_amount_gross_decimal?: string;
3401
3440
  }
3402
3441
  export interface PriceGetAg {
3403
3442
  category: ProductCategory;
@@ -4383,6 +4422,7 @@ declare namespace Components {
4383
4422
  * EUR
4384
4423
  */
4385
4424
  Currency;
4425
+ redeemed_promos?: RedeemedPromo[];
4386
4426
  }
4387
4427
  /**
4388
4428
  * The result from the calculation of a set of price items.
@@ -4432,6 +4472,7 @@ declare namespace Components {
4432
4472
  * EUR
4433
4473
  */
4434
4474
  Currency;
4475
+ redeemed_promos?: RedeemedPromo[];
4435
4476
  }
4436
4477
  /**
4437
4478
  * Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
@@ -4822,11 +4863,11 @@ declare namespace Components {
4822
4863
  /**
4823
4864
  * The promocode inserted by the customer to redeem the promotion
4824
4865
  */
4825
- code?: string;
4866
+ code: string;
4826
4867
  /**
4827
4868
  * The coupons that got redeemed with received the code
4828
4869
  */
4829
- coupons?: /**
4870
+ coupons: /**
4830
4871
  * The coupon configuration
4831
4872
  * example:
4832
4873
  * {
@@ -5240,6 +5281,7 @@ declare namespace Paths {
5240
5281
  namespace $CalculatePricingDetails {
5241
5282
  export interface RequestBody {
5242
5283
  line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ Components.Schemas.PriceItemsDto;
5284
+ redeemed_promos?: Components.Schemas.RedeemedPromo[];
5243
5285
  }
5244
5286
  namespace Responses {
5245
5287
  export type $200 = /* The result from the calculation of a set of price items. */ Components.Schemas.PricingDetailsResponse;
package/dist/openapi.json CHANGED
@@ -141,6 +141,12 @@
141
141
  "properties": {
142
142
  "line_items": {
143
143
  "$ref": "#/components/schemas/PriceItemsDto"
144
+ },
145
+ "redeemed_promos": {
146
+ "type": "array",
147
+ "items": {
148
+ "$ref": "#/components/schemas/RedeemedPromo"
149
+ }
144
150
  }
145
151
  }
146
152
  },
@@ -3798,6 +3804,12 @@
3798
3804
  }
3799
3805
  ]
3800
3806
  },
3807
+ "redeemed_promos": {
3808
+ "type": "array",
3809
+ "items": {
3810
+ "$ref": "#/components/schemas/RedeemedPromo"
3811
+ }
3812
+ },
3801
3813
  "mode": {
3802
3814
  "$ref": "#/components/schemas/CheckoutMode"
3803
3815
  }
@@ -4581,7 +4593,8 @@
4581
4593
  "enum": [
4582
4594
  "0",
4583
4595
  "12"
4584
- ]
4596
+ ],
4597
+ "nullable": true
4585
4598
  },
4586
4599
  "after_cashback_amount_total": {
4587
4600
  "type": "integer",
@@ -4774,7 +4787,8 @@
4774
4787
  "enum": [
4775
4788
  "0",
4776
4789
  "12"
4777
- ]
4790
+ ],
4791
+ "nullable": true
4778
4792
  },
4779
4793
  "amount_total": {
4780
4794
  "type": "integer",
@@ -4941,6 +4955,12 @@
4941
4955
  },
4942
4956
  "currency": {
4943
4957
  "$ref": "#/components/schemas/Currency"
4958
+ },
4959
+ "redeemed_promos": {
4960
+ "type": "array",
4961
+ "items": {
4962
+ "$ref": "#/components/schemas/RedeemedPromo"
4963
+ }
4944
4964
  }
4945
4965
  }
4946
4966
  },
@@ -4959,47 +4979,11 @@
4959
4979
  "PricingDetailsResponse": {
4960
4980
  "type": "object",
4961
4981
  "description": "The result from the calculation of a set of price items.",
4962
- "properties": {
4963
- "items": {
4964
- "type": "array",
4965
- "items": {
4966
- "oneOf": [
4967
- {
4968
- "$ref": "#/components/schemas/PriceItem"
4969
- },
4970
- {
4971
- "$ref": "#/components/schemas/CompositePriceItem"
4972
- }
4973
- ]
4974
- }
4975
- },
4976
- "amount_subtotal": {
4977
- "type": "integer",
4978
- "description": "Total of all items before (discounts or) taxes are applied."
4979
- },
4980
- "amount_total": {
4981
- "type": "integer",
4982
- "description": "Total of all items after (discounts and) taxes are applied."
4983
- },
4984
- "unit_amount_gross": {
4985
- "type": "integer",
4986
- "description": "The unit gross amount value."
4987
- },
4988
- "unit_amount_net": {
4989
- "type": "integer",
4990
- "description": "The unit net amount value."
4991
- },
4992
- "amount_tax": {
4993
- "type": "integer",
4994
- "description": "This is the sum of all the price item tax amounts."
4995
- },
4996
- "total_details": {
4997
- "$ref": "#/components/schemas/TotalDetails"
4998
- },
4999
- "currency": {
5000
- "$ref": "#/components/schemas/Currency"
4982
+ "allOf": [
4983
+ {
4984
+ "$ref": "#/components/schemas/PricingDetails"
5001
4985
  }
5002
- }
4986
+ ]
5003
4987
  },
5004
4988
  "BillingPeriod": {
5005
4989
  "type": "string",
@@ -5489,10 +5473,12 @@
5489
5473
  "description": "The date the coupon was last updated"
5490
5474
  },
5491
5475
  "name": {
5492
- "type": "string"
5476
+ "type": "string",
5477
+ "nullable": true
5493
5478
  },
5494
5479
  "description": {
5495
- "type": "string"
5480
+ "type": "string",
5481
+ "nullable": true
5496
5482
  },
5497
5483
  "type": {
5498
5484
  "type": "string",
@@ -5510,15 +5496,18 @@
5510
5496
  },
5511
5497
  "percentage_value": {
5512
5498
  "type": "string",
5513
- "description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer."
5499
+ "description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.",
5500
+ "nullable": true
5514
5501
  },
5515
5502
  "fixed_value": {
5516
5503
  "description": "Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.",
5517
- "type": "number"
5504
+ "type": "number",
5505
+ "nullable": true
5518
5506
  },
5519
5507
  "fixed_value_decimal": {
5520
5508
  "description": "Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.",
5521
- "type": "string"
5509
+ "type": "string",
5510
+ "nullable": true
5522
5511
  },
5523
5512
  "fixed_value_currency": {
5524
5513
  "description": "Use if type is set to fixed. Three-letter ISO currency code, in lowercase.",
@@ -5526,7 +5515,8 @@
5526
5515
  {
5527
5516
  "$ref": "#/components/schemas/Currency"
5528
5517
  }
5529
- ]
5518
+ ],
5519
+ "nullable": true
5530
5520
  },
5531
5521
  "cashback_period": {
5532
5522
  "type": "string",
@@ -5534,7 +5524,8 @@
5534
5524
  "enum": [
5535
5525
  "0",
5536
5526
  "12"
5537
- ]
5527
+ ],
5528
+ "nullable": true
5538
5529
  },
5539
5530
  "active": {
5540
5531
  "type": "boolean"
@@ -5657,6 +5648,10 @@
5657
5648
  },
5658
5649
  "RedeemedPromo": {
5659
5650
  "type": "object",
5651
+ "required": [
5652
+ "code",
5653
+ "coupons"
5654
+ ],
5660
5655
  "properties": {
5661
5656
  "code": {
5662
5657
  "description": "The promocode inserted by the customer to redeem the promotion",
@@ -5862,11 +5857,45 @@
5862
5857
  "average_price_decimal": {
5863
5858
  "type": "string"
5864
5859
  },
5865
- "markup": {
5866
- "type": "number"
5860
+ "markup_amount": {
5861
+ "type": "number",
5862
+ "description": "The markup amount, configured in Epilot, in cents."
5867
5863
  },
5868
- "markup_decimal": {
5869
- "type": "string"
5864
+ "markup_amount_decimal": {
5865
+ "type": "string",
5866
+ "description": "The markup amount, configured in Epilot, as a string with full precision."
5867
+ },
5868
+ "markup_amount_net": {
5869
+ "type": "number",
5870
+ "description": "The markup amount net, configured in Epilot, in cents."
5871
+ },
5872
+ "markup_amount_net_decimal": {
5873
+ "type": "string",
5874
+ "description": "The markup amount net, configured in Epilot, as a string with full precision."
5875
+ },
5876
+ "markup_amount_gross": {
5877
+ "type": "number",
5878
+ "description": "The markup amount gross, configured in Epilot, in cents."
5879
+ },
5880
+ "markup_amount_gross_decimal": {
5881
+ "type": "string",
5882
+ "description": "The markup amount gross, configured in Epilot, as a string with full precision."
5883
+ },
5884
+ "unit_amount_net": {
5885
+ "type": "number",
5886
+ "description": "The unit amount net for the energy price in cents, it's provided by an external provider."
5887
+ },
5888
+ "unit_amount_net_decimal": {
5889
+ "type": "string",
5890
+ "description": "The unit amount net for the energy price as a string with full precision, it's provided by an external provider."
5891
+ },
5892
+ "unit_amount_gross": {
5893
+ "type": "number",
5894
+ "description": "The unit amount gross for the energy price in cents, it's provided by an external provider."
5895
+ },
5896
+ "unit_amount_gross_decimal": {
5897
+ "type": "string",
5898
+ "description": "The unit amount gross for the energy price as a string with full precision, it's provided by an external provider."
5870
5899
  }
5871
5900
  },
5872
5901
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.43.0",
3
+ "version": "3.45.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",