@epilot/pricing-client 3.36.7 → 3.38.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(240));r.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/external-catalog":{"post":{"operationId":"$searchExternalCatalog","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}}},"components":{}}')}},r={},t=function t(i){var a=r[i];if(void 0!==a)return a.exports;var n=r[i]={exports:{}};return e[i].call(n.exports,n,n.exports,t),n.exports}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(240));r.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/external-catalog":{"post":{"operationId":"$searchExternalCatalog","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}}},"components":{}}')}},r={},t=function t(i){var a=r[i];if(void 0!==a)return a.exports;var n=r[i]={exports:{}};return e[i].call(n.exports,n,n.exports,t),n.exports}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -49,7 +49,8 @@
49
49
  "content": {
50
50
  "application/json": {}
51
51
  }
52
- }
52
+ },
53
+ "responses": {}
53
54
  }
54
55
  },
55
56
  "/v1/public/cart:checkout": {
@@ -67,7 +68,8 @@
67
68
  "content": {
68
69
  "application/json": {}
69
70
  }
70
- }
71
+ },
72
+ "responses": {}
71
73
  }
72
74
  },
73
75
  "/v1/public/catalog": {
package/dist/openapi.d.ts CHANGED
@@ -2212,6 +2212,20 @@ declare namespace Components {
2212
2212
  */
2213
2213
  cashback_period?: "0" | "12";
2214
2214
  active?: boolean;
2215
+ /**
2216
+ * Whether the coupon requires a promo code to be applied
2217
+ */
2218
+ requires_promo_code?: boolean;
2219
+ /**
2220
+ * The promo codes associated with the coupon
2221
+ */
2222
+ promo_codes?: PromoCode[];
2223
+ /**
2224
+ * Map of ids of promo codes with their usage count
2225
+ */
2226
+ promo_code_usage?: {
2227
+ [name: string]: number;
2228
+ };
2215
2229
  /**
2216
2230
  * The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.
2217
2231
  */
@@ -2245,6 +2259,14 @@ declare namespace Components {
2245
2259
  email?: string;
2246
2260
  phone?: string;
2247
2261
  }
2262
+ /**
2263
+ * The interval of the tariff if a spot market price is used as base.
2264
+ */
2265
+ export type DynamicTariffInterval = "hourly" | "monthly_average";
2266
+ /**
2267
+ * The mode of the dynamic tariff. `day_ahead_market` uses the Day-Ahead spot market price as base.
2268
+ */
2269
+ export type DynamicTariffMode = "day_ahead_market" | "manual";
2248
2270
  export type EntityId = string; // uuid
2249
2271
  /**
2250
2272
  * example:
@@ -2973,10 +2995,11 @@ declare namespace Components {
2973
2995
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
2974
2996
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
2975
2997
  * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
2998
+ * - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.
2976
2999
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
2977
3000
  *
2978
3001
  */
2979
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
3002
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag";
2980
3003
  /**
2981
3004
  * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
2982
3005
  *
@@ -3103,6 +3126,7 @@ declare namespace Components {
3103
3126
  */
3104
3127
  unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
3105
3128
  get_ag?: PriceGetAg;
3129
+ dynamic_tariff?: PriceDynamicTariff;
3106
3130
  /**
3107
3131
  * The price creation date
3108
3132
  */
@@ -3144,6 +3168,14 @@ declare namespace Components {
3144
3168
  */
3145
3169
  _tags?: string[];
3146
3170
  }
3171
+ export interface PriceDynamicTariff {
3172
+ mode: /* The mode of the dynamic tariff. `day_ahead_market` uses the Day-Ahead spot market price as base. */ DynamicTariffMode;
3173
+ interval?: /* The interval of the tariff if a spot market price is used as base. */ DynamicTariffInterval;
3174
+ average_price: number;
3175
+ average_price_decimal: string;
3176
+ markup: number;
3177
+ markup_decimal: string;
3178
+ }
3147
3179
  export interface PriceGetAg {
3148
3180
  category: ProductCategory;
3149
3181
  markup_pricing_model?: /**
@@ -3607,12 +3639,14 @@ declare namespace Components {
3607
3639
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
3608
3640
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
3609
3641
  * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
3642
+ * - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.
3610
3643
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
3611
3644
  *
3612
3645
  */
3613
3646
  PricingModel;
3614
3647
  tiers_details?: TierDetails[];
3615
3648
  get_ag?: PriceGetAg;
3649
+ dynamic_tariff?: PriceDynamicTariff;
3616
3650
  }
3617
3651
  /**
3618
3652
  * Represents a price input to the pricing library.
@@ -3849,10 +3883,11 @@ declare namespace Components {
3849
3883
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
3850
3884
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
3851
3885
  * - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
3886
+ * - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.
3852
3887
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
3853
3888
  *
3854
3889
  */
3855
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
3890
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag";
3856
3891
  /**
3857
3892
  * The snapshot of the price linked to the price item.
3858
3893
  * example:
@@ -3876,10 +3911,11 @@ declare namespace Components {
3876
3911
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
3877
3912
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
3878
3913
  * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
3914
+ * - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.
3879
3915
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
3880
3916
  *
3881
3917
  */
3882
- pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
3918
+ pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag";
3883
3919
  /**
3884
3920
  * Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
3885
3921
  *
@@ -4006,6 +4042,7 @@ declare namespace Components {
4006
4042
  */
4007
4043
  unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
4008
4044
  get_ag?: PriceGetAg;
4045
+ dynamic_tariff?: PriceDynamicTariff;
4009
4046
  /**
4010
4047
  * The price creation date
4011
4048
  */
@@ -4179,10 +4216,11 @@ declare namespace Components {
4179
4216
  * - `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
4180
4217
  * - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
4181
4218
  * - `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.
4219
+ * - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.
4182
4220
  * - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
4183
4221
  *
4184
4222
  */
4185
- export type PricingModel = "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "external_getag";
4223
+ export type PricingModel = "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag";
4186
4224
  /**
4187
4225
  * The product entity
4188
4226
  * example:
@@ -4280,6 +4318,24 @@ declare namespace Components {
4280
4318
  _updated_at?: string;
4281
4319
  }
4282
4320
  export type ProductCategory = "power" | "gas";
4321
+ export interface PromoCode {
4322
+ /**
4323
+ * The id of the promo code
4324
+ */
4325
+ id: string;
4326
+ /**
4327
+ * The code of the promo code
4328
+ */
4329
+ code: string;
4330
+ /**
4331
+ * Whether the promo code has a usage limit
4332
+ */
4333
+ has_usage_limit?: boolean;
4334
+ /**
4335
+ * The usage limit of the promo code
4336
+ */
4337
+ usage_limit?: number | null;
4338
+ }
4283
4339
  /**
4284
4340
  * The provider entity
4285
4341
  */
@@ -5503,6 +5559,8 @@ export type ConsumptionTypeGetAg = Components.Schemas.ConsumptionTypeGetAg;
5503
5559
  export type Coupon = Components.Schemas.Coupon;
5504
5560
  export type Currency = Components.Schemas.Currency;
5505
5561
  export type Customer = Components.Schemas.Customer;
5562
+ export type DynamicTariffInterval = Components.Schemas.DynamicTariffInterval;
5563
+ export type DynamicTariffMode = Components.Schemas.DynamicTariffMode;
5506
5564
  export type EntityId = Components.Schemas.EntityId;
5507
5565
  export type EntityItem = Components.Schemas.EntityItem;
5508
5566
  export type EntityRelation = Components.Schemas.EntityRelation;
@@ -5529,6 +5587,7 @@ export type PaymentMethod = Components.Schemas.PaymentMethod;
5529
5587
  export type PowerMeterType = Components.Schemas.PowerMeterType;
5530
5588
  export type Price = Components.Schemas.Price;
5531
5589
  export type PriceComponentRelation = Components.Schemas.PriceComponentRelation;
5590
+ export type PriceDynamicTariff = Components.Schemas.PriceDynamicTariff;
5532
5591
  export type PriceGetAg = Components.Schemas.PriceGetAg;
5533
5592
  export type PriceInputMapping = Components.Schemas.PriceInputMapping;
5534
5593
  export type PriceInputMappings = Components.Schemas.PriceInputMappings;
@@ -5544,6 +5603,7 @@ export type PricingDetailsResponse = Components.Schemas.PricingDetailsResponse;
5544
5603
  export type PricingModel = Components.Schemas.PricingModel;
5545
5604
  export type Product = Components.Schemas.Product;
5546
5605
  export type ProductCategory = Components.Schemas.ProductCategory;
5606
+ export type PromoCode = Components.Schemas.PromoCode;
5547
5607
  export type Provider = Components.Schemas.Provider;
5548
5608
  export type RecurrenceAmount = Components.Schemas.RecurrenceAmount;
5549
5609
  export type RecurrenceAmountDto = Components.Schemas.RecurrenceAmountDto;
package/dist/openapi.json CHANGED
@@ -2248,12 +2248,13 @@
2248
2248
  },
2249
2249
  "pricing_model": {
2250
2250
  "type": "string",
2251
- "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
2251
+ "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n - `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
2252
2252
  "enum": [
2253
2253
  "per_unit",
2254
2254
  "tiered_graduated",
2255
2255
  "tiered_volume",
2256
2256
  "tiered_flatfee",
2257
+ "dynamic_tariff",
2257
2258
  "external_getag"
2258
2259
  ]
2259
2260
  },
@@ -2436,6 +2437,9 @@
2436
2437
  "get_ag": {
2437
2438
  "$ref": "#/components/schemas/PriceGetAg"
2438
2439
  },
2440
+ "dynamic_tariff": {
2441
+ "$ref": "#/components/schemas/PriceDynamicTariff"
2442
+ },
2439
2443
  "_created_at": {
2440
2444
  "description": "The price creation date",
2441
2445
  "type": "string"
@@ -3114,6 +3118,22 @@
3114
3118
  "digital"
3115
3119
  ]
3116
3120
  },
3121
+ "DynamicTariffMode": {
3122
+ "description": "The mode of the dynamic tariff. `day_ahead_market` uses the Day-Ahead spot market price as base.",
3123
+ "type": "string",
3124
+ "enum": [
3125
+ "day_ahead_market",
3126
+ "manual"
3127
+ ]
3128
+ },
3129
+ "DynamicTariffInterval": {
3130
+ "description": "The interval of the tariff if a spot market price is used as base.",
3131
+ "type": "string",
3132
+ "enum": [
3133
+ "hourly",
3134
+ "monthly_average"
3135
+ ]
3136
+ },
3117
3137
  "ComputedPriceBreakdown": {
3118
3138
  "type": "object",
3119
3139
  "description": "Price breakdown",
@@ -3619,12 +3639,13 @@
3619
3639
  },
3620
3640
  "pricing_model": {
3621
3641
  "type": "string",
3622
- "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
3642
+ "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
3623
3643
  "enum": [
3624
3644
  "per_unit",
3625
3645
  "tiered_graduated",
3626
3646
  "tiered_volume",
3627
3647
  "tiered_flatfee",
3648
+ "dynamic_tariff",
3628
3649
  "external_getag"
3629
3650
  ]
3630
3651
  },
@@ -4260,6 +4281,9 @@
4260
4281
  },
4261
4282
  "get_ag": {
4262
4283
  "$ref": "#/components/schemas/PriceGetAg"
4284
+ },
4285
+ "dynamic_tariff": {
4286
+ "$ref": "#/components/schemas/PriceDynamicTariff"
4263
4287
  }
4264
4288
  },
4265
4289
  "required": [
@@ -5132,6 +5156,24 @@
5132
5156
  "active": {
5133
5157
  "type": "boolean"
5134
5158
  },
5159
+ "requires_promo_code": {
5160
+ "type": "boolean",
5161
+ "description": "Whether the coupon requires a promo code to be applied"
5162
+ },
5163
+ "promo_codes": {
5164
+ "type": "array",
5165
+ "description": "The promo codes associated with the coupon",
5166
+ "items": {
5167
+ "$ref": "#/components/schemas/PromoCode"
5168
+ }
5169
+ },
5170
+ "promo_code_usage": {
5171
+ "type": "object",
5172
+ "additionalProperties": {
5173
+ "type": "number"
5174
+ },
5175
+ "description": "Map of ids of promo codes with their usage count"
5176
+ },
5135
5177
  "prices": {
5136
5178
  "description": "The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.",
5137
5179
  "oneOf": [
@@ -5182,6 +5224,32 @@
5182
5224
  }
5183
5225
  }
5184
5226
  },
5227
+ "PromoCode": {
5228
+ "type": "object",
5229
+ "required": [
5230
+ "id",
5231
+ "code"
5232
+ ],
5233
+ "properties": {
5234
+ "id": {
5235
+ "type": "string",
5236
+ "description": "The id of the promo code"
5237
+ },
5238
+ "code": {
5239
+ "type": "string",
5240
+ "description": "The code of the promo code"
5241
+ },
5242
+ "has_usage_limit": {
5243
+ "type": "boolean",
5244
+ "description": "Whether the promo code has a usage limit"
5245
+ },
5246
+ "usage_limit": {
5247
+ "type": "number",
5248
+ "nullable": true,
5249
+ "description": "The usage limit of the promo code"
5250
+ }
5251
+ }
5252
+ },
5185
5253
  "PriceTier": {
5186
5254
  "type": "object",
5187
5255
  "properties": {
@@ -5237,12 +5305,13 @@
5237
5305
  },
5238
5306
  "PricingModel": {
5239
5307
  "type": "string",
5240
- "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
5308
+ "description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
5241
5309
  "enum": [
5242
5310
  "per_unit",
5243
5311
  "tiered_graduated",
5244
5312
  "tiered_volume",
5245
5313
  "tiered_flatfee",
5314
+ "dynamic_tariff",
5246
5315
  "external_getag"
5247
5316
  ]
5248
5317
  },
@@ -5357,6 +5426,36 @@
5357
5426
  "unit_amount_net"
5358
5427
  ]
5359
5428
  },
5429
+ "PriceDynamicTariff": {
5430
+ "type": "object",
5431
+ "properties": {
5432
+ "mode": {
5433
+ "$ref": "#/components/schemas/DynamicTariffMode"
5434
+ },
5435
+ "interval": {
5436
+ "$ref": "#/components/schemas/DynamicTariffInterval"
5437
+ },
5438
+ "average_price": {
5439
+ "type": "number"
5440
+ },
5441
+ "average_price_decimal": {
5442
+ "type": "string"
5443
+ },
5444
+ "markup": {
5445
+ "type": "number"
5446
+ },
5447
+ "markup_decimal": {
5448
+ "type": "string"
5449
+ }
5450
+ },
5451
+ "required": [
5452
+ "mode",
5453
+ "markup",
5454
+ "markup_decimal",
5455
+ "average_price",
5456
+ "average_price_decimal"
5457
+ ]
5458
+ },
5360
5459
  "TierDetails": {
5361
5460
  "type": "object",
5362
5461
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.36.7",
3
+ "version": "3.38.0",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",