@epilot/pricing-client 3.17.7 → 3.17.9
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/definition.js +1 -1
- package/dist/openapi-runtime.json +22 -15
- package/dist/openapi.d.ts +118 -20
- package/dist/openapi.json +214 -31
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -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/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/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","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}]}},"/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":{}}}}},"/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":{}}}}},"/v1/integration/{integrationId}/
|
|
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/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}}}},"/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","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}]}},"/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":{}}}}},"/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":{}}}}},"/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":{}}}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}]}},"/v1/public/opportunity":{"post":{"deprecated":true,"operationId":"$createOpportunity","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}}},"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})})();
|
|
@@ -156,6 +156,28 @@
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
+
"/v1/public/integration/{integrationId}/compute-price": {
|
|
160
|
+
"post": {
|
|
161
|
+
"operationId": "$computePrice",
|
|
162
|
+
"parameters": [
|
|
163
|
+
{
|
|
164
|
+
"in": "header",
|
|
165
|
+
"name": "X-Epilot-Org-ID",
|
|
166
|
+
"required": true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"in": "path",
|
|
170
|
+
"name": "integrationId",
|
|
171
|
+
"required": true
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"requestBody": {
|
|
175
|
+
"content": {
|
|
176
|
+
"application/json": {}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
159
181
|
"/v1/integration/{integrationId}/credentials": {
|
|
160
182
|
"get": {
|
|
161
183
|
"operationId": "$getCredentials",
|
|
@@ -164,11 +186,6 @@
|
|
|
164
186
|
"in": "path",
|
|
165
187
|
"name": "integrationId",
|
|
166
188
|
"required": true
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"in": "header",
|
|
170
|
-
"name": "X-Epilot-Org-ID",
|
|
171
|
-
"required": true
|
|
172
189
|
}
|
|
173
190
|
]
|
|
174
191
|
}
|
|
@@ -181,11 +198,6 @@
|
|
|
181
198
|
"in": "path",
|
|
182
199
|
"name": "integrationId",
|
|
183
200
|
"required": true
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"in": "header",
|
|
187
|
-
"name": "X-Epilot-Org-ID",
|
|
188
|
-
"required": true
|
|
189
201
|
}
|
|
190
202
|
],
|
|
191
203
|
"requestBody": {
|
|
@@ -203,11 +215,6 @@
|
|
|
203
215
|
"in": "path",
|
|
204
216
|
"name": "integrationId",
|
|
205
217
|
"required": true
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"in": "header",
|
|
209
|
-
"name": "X-Epilot-Org-ID",
|
|
210
|
-
"required": true
|
|
211
218
|
}
|
|
212
219
|
]
|
|
213
220
|
}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -1039,6 +1039,76 @@ declare namespace Components {
|
|
|
1039
1039
|
*/
|
|
1040
1040
|
CompositePrice;
|
|
1041
1041
|
}
|
|
1042
|
+
/**
|
|
1043
|
+
* The compute price payload
|
|
1044
|
+
*/
|
|
1045
|
+
export interface ComputePriceParams {
|
|
1046
|
+
/**
|
|
1047
|
+
* The postal code to search for providers
|
|
1048
|
+
*/
|
|
1049
|
+
postal_code: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* The monthly consumption to compute the price in kWh
|
|
1052
|
+
*/
|
|
1053
|
+
consumption: number;
|
|
1054
|
+
/**
|
|
1055
|
+
* The association id
|
|
1056
|
+
*/
|
|
1057
|
+
association_id?: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* The product type
|
|
1060
|
+
*/
|
|
1061
|
+
type: "power" | "gas";
|
|
1062
|
+
/**
|
|
1063
|
+
* The billing period (defaults to monthly)
|
|
1064
|
+
*/
|
|
1065
|
+
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
1066
|
+
}
|
|
1067
|
+
export interface ComputePriceResult {
|
|
1068
|
+
/**
|
|
1069
|
+
* The computed total price
|
|
1070
|
+
*/
|
|
1071
|
+
amount_total: number;
|
|
1072
|
+
/**
|
|
1073
|
+
* The computed total price as decimal
|
|
1074
|
+
*/
|
|
1075
|
+
amount_total_decimal: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* The currency of the computed price (three-letter ISO currency code)
|
|
1078
|
+
*/
|
|
1079
|
+
currency: /* The currency of the computed price (three-letter ISO currency code) */ /**
|
|
1080
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
1081
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
1082
|
+
*
|
|
1083
|
+
* example:
|
|
1084
|
+
* EUR
|
|
1085
|
+
*/
|
|
1086
|
+
Currency;
|
|
1087
|
+
/**
|
|
1088
|
+
* The billing period
|
|
1089
|
+
*/
|
|
1090
|
+
billing_period: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
1091
|
+
breakdown: /* Price breakdown */ ComputedPriceBreakdown;
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* The computed price
|
|
1095
|
+
*/
|
|
1096
|
+
export interface ComputedBasePrice {
|
|
1097
|
+
/**
|
|
1098
|
+
* The computed price
|
|
1099
|
+
*/
|
|
1100
|
+
amount: number;
|
|
1101
|
+
/**
|
|
1102
|
+
* The computed price as decimal
|
|
1103
|
+
*/
|
|
1104
|
+
amount_decimal: string;
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Price breakdown
|
|
1108
|
+
*/
|
|
1109
|
+
export interface ComputedPriceBreakdown {
|
|
1110
|
+
[name: string]: /* The computed price */ ComputedBasePrice;
|
|
1111
|
+
}
|
|
1042
1112
|
/**
|
|
1043
1113
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
1044
1114
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -2916,6 +2986,24 @@ declare namespace Paths {
|
|
|
2916
2986
|
export type $400 = Components.Schemas.Error;
|
|
2917
2987
|
}
|
|
2918
2988
|
}
|
|
2989
|
+
namespace $ComputePrice {
|
|
2990
|
+
export interface HeaderParameters {
|
|
2991
|
+
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2992
|
+
}
|
|
2993
|
+
namespace Parameters {
|
|
2994
|
+
export type IntegrationId = Components.Schemas.IntegrationId;
|
|
2995
|
+
export type XEpilotOrgID = string;
|
|
2996
|
+
}
|
|
2997
|
+
export interface PathParameters {
|
|
2998
|
+
integrationId: Parameters.IntegrationId;
|
|
2999
|
+
}
|
|
3000
|
+
export type RequestBody = /* The compute price payload */ Components.Schemas.ComputePriceParams;
|
|
3001
|
+
namespace Responses {
|
|
3002
|
+
export type $200 = Components.Schemas.ComputePriceResult;
|
|
3003
|
+
export type $400 = Components.Schemas.Error;
|
|
3004
|
+
export type $403 = Components.Schemas.Error;
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
2919
3007
|
namespace $CreateOpportunity {
|
|
2920
3008
|
export interface HeaderParameters {
|
|
2921
3009
|
"X-Ivy-Org-ID": Parameters.XIvyOrgID;
|
|
@@ -2944,12 +3032,8 @@ declare namespace Paths {
|
|
|
2944
3032
|
}
|
|
2945
3033
|
}
|
|
2946
3034
|
namespace $DeleteCredentials {
|
|
2947
|
-
export interface HeaderParameters {
|
|
2948
|
-
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2949
|
-
}
|
|
2950
3035
|
namespace Parameters {
|
|
2951
3036
|
export type IntegrationId = Components.Schemas.IntegrationId;
|
|
2952
|
-
export type XEpilotOrgID = string;
|
|
2953
3037
|
}
|
|
2954
3038
|
export interface PathParameters {
|
|
2955
3039
|
integrationId: Parameters.IntegrationId;
|
|
@@ -2961,12 +3045,8 @@ declare namespace Paths {
|
|
|
2961
3045
|
}
|
|
2962
3046
|
}
|
|
2963
3047
|
namespace $GetCredentials {
|
|
2964
|
-
export interface HeaderParameters {
|
|
2965
|
-
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2966
|
-
}
|
|
2967
3048
|
namespace Parameters {
|
|
2968
3049
|
export type IntegrationId = Components.Schemas.IntegrationId;
|
|
2969
|
-
export type XEpilotOrgID = string;
|
|
2970
3050
|
}
|
|
2971
3051
|
export interface PathParameters {
|
|
2972
3052
|
integrationId: Parameters.IntegrationId;
|
|
@@ -2978,12 +3058,8 @@ declare namespace Paths {
|
|
|
2978
3058
|
}
|
|
2979
3059
|
}
|
|
2980
3060
|
namespace $SaveCredentials {
|
|
2981
|
-
export interface HeaderParameters {
|
|
2982
|
-
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2983
|
-
}
|
|
2984
3061
|
namespace Parameters {
|
|
2985
3062
|
export type IntegrationId = Components.Schemas.IntegrationId;
|
|
2986
|
-
export type XEpilotOrgID = string;
|
|
2987
3063
|
}
|
|
2988
3064
|
export interface PathParameters {
|
|
2989
3065
|
integrationId: Parameters.IntegrationId;
|
|
@@ -3231,20 +3307,30 @@ export interface OperationMethods {
|
|
|
3231
3307
|
/**
|
|
3232
3308
|
* $searchStreets - searchStreets
|
|
3233
3309
|
*
|
|
3234
|
-
* Returns the list of streets available for a given
|
|
3310
|
+
* Returns the list of streets available for a given postal code and city
|
|
3235
3311
|
*/
|
|
3236
3312
|
'$searchStreets'(
|
|
3237
3313
|
parameters?: Parameters<Paths.$SearchStreets.PathParameters & Paths.$SearchStreets.HeaderParameters> | null,
|
|
3238
3314
|
data?: Paths.$SearchStreets.RequestBody,
|
|
3239
3315
|
config?: AxiosRequestConfig
|
|
3240
3316
|
): OperationResponse<Paths.$SearchStreets.Responses.$200>
|
|
3317
|
+
/**
|
|
3318
|
+
* $computePrice - computePrice
|
|
3319
|
+
*
|
|
3320
|
+
* Returns the price for a given product type based on location and consumption
|
|
3321
|
+
*/
|
|
3322
|
+
'$computePrice'(
|
|
3323
|
+
parameters?: Parameters<Paths.$ComputePrice.PathParameters & Paths.$ComputePrice.HeaderParameters> | null,
|
|
3324
|
+
data?: Paths.$ComputePrice.RequestBody,
|
|
3325
|
+
config?: AxiosRequestConfig
|
|
3326
|
+
): OperationResponse<Paths.$ComputePrice.Responses.$200>
|
|
3241
3327
|
/**
|
|
3242
3328
|
* $getCredentials - getCredentials
|
|
3243
3329
|
*
|
|
3244
3330
|
* Gets the credentials for a given integration / organization
|
|
3245
3331
|
*/
|
|
3246
3332
|
'$getCredentials'(
|
|
3247
|
-
parameters?: Parameters<Paths.$GetCredentials.PathParameters
|
|
3333
|
+
parameters?: Parameters<Paths.$GetCredentials.PathParameters> | null,
|
|
3248
3334
|
data?: any,
|
|
3249
3335
|
config?: AxiosRequestConfig
|
|
3250
3336
|
): OperationResponse<Paths.$GetCredentials.Responses.$200>
|
|
@@ -3254,7 +3340,7 @@ export interface OperationMethods {
|
|
|
3254
3340
|
* Saves the credentials for a given integration / organization
|
|
3255
3341
|
*/
|
|
3256
3342
|
'$saveCredentials'(
|
|
3257
|
-
parameters?: Parameters<Paths.$SaveCredentials.PathParameters
|
|
3343
|
+
parameters?: Parameters<Paths.$SaveCredentials.PathParameters> | null,
|
|
3258
3344
|
data?: Paths.$SaveCredentials.RequestBody,
|
|
3259
3345
|
config?: AxiosRequestConfig
|
|
3260
3346
|
): OperationResponse<Paths.$SaveCredentials.Responses.$204>
|
|
@@ -3264,7 +3350,7 @@ export interface OperationMethods {
|
|
|
3264
3350
|
* Delete the credentials for a given integration / organization
|
|
3265
3351
|
*/
|
|
3266
3352
|
'$deleteCredentials'(
|
|
3267
|
-
parameters?: Parameters<Paths.$DeleteCredentials.PathParameters
|
|
3353
|
+
parameters?: Parameters<Paths.$DeleteCredentials.PathParameters> | null,
|
|
3268
3354
|
data?: any,
|
|
3269
3355
|
config?: AxiosRequestConfig
|
|
3270
3356
|
): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
|
|
@@ -3384,7 +3470,7 @@ export interface PathsDictionary {
|
|
|
3384
3470
|
/**
|
|
3385
3471
|
* $searchStreets - searchStreets
|
|
3386
3472
|
*
|
|
3387
|
-
* Returns the list of streets available for a given
|
|
3473
|
+
* Returns the list of streets available for a given postal code and city
|
|
3388
3474
|
*/
|
|
3389
3475
|
'post'(
|
|
3390
3476
|
parameters?: Parameters<Paths.$SearchStreets.PathParameters & Paths.$SearchStreets.HeaderParameters> | null,
|
|
@@ -3392,6 +3478,18 @@ export interface PathsDictionary {
|
|
|
3392
3478
|
config?: AxiosRequestConfig
|
|
3393
3479
|
): OperationResponse<Paths.$SearchStreets.Responses.$200>
|
|
3394
3480
|
}
|
|
3481
|
+
['/v1/public/integration/{integrationId}/compute-price']: {
|
|
3482
|
+
/**
|
|
3483
|
+
* $computePrice - computePrice
|
|
3484
|
+
*
|
|
3485
|
+
* Returns the price for a given product type based on location and consumption
|
|
3486
|
+
*/
|
|
3487
|
+
'post'(
|
|
3488
|
+
parameters?: Parameters<Paths.$ComputePrice.PathParameters & Paths.$ComputePrice.HeaderParameters> | null,
|
|
3489
|
+
data?: Paths.$ComputePrice.RequestBody,
|
|
3490
|
+
config?: AxiosRequestConfig
|
|
3491
|
+
): OperationResponse<Paths.$ComputePrice.Responses.$200>
|
|
3492
|
+
}
|
|
3395
3493
|
['/v1/integration/{integrationId}/credentials']: {
|
|
3396
3494
|
/**
|
|
3397
3495
|
* $getCredentials - getCredentials
|
|
@@ -3399,7 +3497,7 @@ export interface PathsDictionary {
|
|
|
3399
3497
|
* Gets the credentials for a given integration / organization
|
|
3400
3498
|
*/
|
|
3401
3499
|
'get'(
|
|
3402
|
-
parameters?: Parameters<Paths.$GetCredentials.PathParameters
|
|
3500
|
+
parameters?: Parameters<Paths.$GetCredentials.PathParameters> | null,
|
|
3403
3501
|
data?: any,
|
|
3404
3502
|
config?: AxiosRequestConfig
|
|
3405
3503
|
): OperationResponse<Paths.$GetCredentials.Responses.$200>
|
|
@@ -3411,7 +3509,7 @@ export interface PathsDictionary {
|
|
|
3411
3509
|
* Saves the credentials for a given integration / organization
|
|
3412
3510
|
*/
|
|
3413
3511
|
'put'(
|
|
3414
|
-
parameters?: Parameters<Paths.$SaveCredentials.PathParameters
|
|
3512
|
+
parameters?: Parameters<Paths.$SaveCredentials.PathParameters> | null,
|
|
3415
3513
|
data?: Paths.$SaveCredentials.RequestBody,
|
|
3416
3514
|
config?: AxiosRequestConfig
|
|
3417
3515
|
): OperationResponse<Paths.$SaveCredentials.Responses.$204>
|
|
@@ -3423,7 +3521,7 @@ export interface PathsDictionary {
|
|
|
3423
3521
|
* Delete the credentials for a given integration / organization
|
|
3424
3522
|
*/
|
|
3425
3523
|
'delete'(
|
|
3426
|
-
parameters?: Parameters<Paths.$DeleteCredentials.PathParameters
|
|
3524
|
+
parameters?: Parameters<Paths.$DeleteCredentials.PathParameters> | null,
|
|
3427
3525
|
data?: any,
|
|
3428
3526
|
config?: AxiosRequestConfig
|
|
3429
3527
|
): OperationResponse<Paths.$DeleteCredentials.Responses.$204>
|
package/dist/openapi.json
CHANGED
|
@@ -918,7 +918,7 @@
|
|
|
918
918
|
},
|
|
919
919
|
"/v1/public/integration/{integrationId}/streets:search": {
|
|
920
920
|
"post": {
|
|
921
|
-
"description": "Returns the list of streets available for a given
|
|
921
|
+
"description": "Returns the list of streets available for a given postal code and city",
|
|
922
922
|
"operationId": "$searchStreets",
|
|
923
923
|
"security": [],
|
|
924
924
|
"parameters": [
|
|
@@ -1011,6 +1011,107 @@
|
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
},
|
|
1014
|
+
"/v1/public/integration/{integrationId}/compute-price": {
|
|
1015
|
+
"post": {
|
|
1016
|
+
"description": "Returns the price for a given product type based on location and consumption",
|
|
1017
|
+
"operationId": "$computePrice",
|
|
1018
|
+
"security": [],
|
|
1019
|
+
"parameters": [
|
|
1020
|
+
{
|
|
1021
|
+
"in": "header",
|
|
1022
|
+
"name": "X-Epilot-Org-ID",
|
|
1023
|
+
"description": "The target Organization Id represented by the caller",
|
|
1024
|
+
"schema": {
|
|
1025
|
+
"type": "string"
|
|
1026
|
+
},
|
|
1027
|
+
"required": true,
|
|
1028
|
+
"example": 739224
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"in": "path",
|
|
1032
|
+
"name": "integrationId",
|
|
1033
|
+
"description": "The integration identifier",
|
|
1034
|
+
"schema": {
|
|
1035
|
+
"$ref": "#/components/schemas/IntegrationId"
|
|
1036
|
+
},
|
|
1037
|
+
"required": true,
|
|
1038
|
+
"example": "getag"
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
1041
|
+
"summary": "computePrice",
|
|
1042
|
+
"tags": [
|
|
1043
|
+
"External Integrations API"
|
|
1044
|
+
],
|
|
1045
|
+
"requestBody": {
|
|
1046
|
+
"content": {
|
|
1047
|
+
"application/json": {
|
|
1048
|
+
"schema": {
|
|
1049
|
+
"$ref": "#/components/schemas/ComputePriceParams"
|
|
1050
|
+
},
|
|
1051
|
+
"examples": {
|
|
1052
|
+
"Compute price": {
|
|
1053
|
+
"value": {
|
|
1054
|
+
"type": "power",
|
|
1055
|
+
"billing_period": "monthly",
|
|
1056
|
+
"postal_code": "04109",
|
|
1057
|
+
"consumption": 3500,
|
|
1058
|
+
"association_id": "123456789"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"responses": {
|
|
1066
|
+
"200": {
|
|
1067
|
+
"description": "The compute price response payload",
|
|
1068
|
+
"content": {
|
|
1069
|
+
"application/json": {
|
|
1070
|
+
"schema": {
|
|
1071
|
+
"$ref": "#/components/schemas/ComputePriceResult"
|
|
1072
|
+
},
|
|
1073
|
+
"examples": {
|
|
1074
|
+
"Response of computed price": {
|
|
1075
|
+
"value": {
|
|
1076
|
+
"amount_total": 100,
|
|
1077
|
+
"amount_total_decimal": "100.00",
|
|
1078
|
+
"currency": "EUR",
|
|
1079
|
+
"billing_period": "monthly",
|
|
1080
|
+
"breakdown": {
|
|
1081
|
+
"maintenance_fee": {
|
|
1082
|
+
"amount": 10,
|
|
1083
|
+
"amount_decimal": "10.00"
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
"400": {
|
|
1093
|
+
"description": "Invalid payload",
|
|
1094
|
+
"content": {
|
|
1095
|
+
"application/json": {
|
|
1096
|
+
"schema": {
|
|
1097
|
+
"$ref": "#/components/schemas/Error"
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
"403": {
|
|
1103
|
+
"description": "Forbidden, no credentials found for the given integration / organization",
|
|
1104
|
+
"content": {
|
|
1105
|
+
"application/json": {
|
|
1106
|
+
"schema": {
|
|
1107
|
+
"$ref": "#/components/schemas/Error"
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1014
1115
|
"/v1/integration/{integrationId}/credentials": {
|
|
1015
1116
|
"get": {
|
|
1016
1117
|
"description": "Gets the credentials for a given integration / organization",
|
|
@@ -1029,16 +1130,6 @@
|
|
|
1029
1130
|
},
|
|
1030
1131
|
"required": true,
|
|
1031
1132
|
"example": "getag"
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
"in": "header",
|
|
1035
|
-
"name": "X-Epilot-Org-ID",
|
|
1036
|
-
"description": "The target Organization Id represented by the caller",
|
|
1037
|
-
"schema": {
|
|
1038
|
-
"type": "string"
|
|
1039
|
-
},
|
|
1040
|
-
"required": true,
|
|
1041
|
-
"example": 739224
|
|
1042
1133
|
}
|
|
1043
1134
|
],
|
|
1044
1135
|
"responses": {
|
|
@@ -1101,16 +1192,6 @@
|
|
|
1101
1192
|
},
|
|
1102
1193
|
"required": true,
|
|
1103
1194
|
"example": "getag"
|
|
1104
|
-
},
|
|
1105
|
-
{
|
|
1106
|
-
"in": "header",
|
|
1107
|
-
"name": "X-Epilot-Org-ID",
|
|
1108
|
-
"description": "The target Organization Id represented by the caller",
|
|
1109
|
-
"schema": {
|
|
1110
|
-
"type": "string"
|
|
1111
|
-
},
|
|
1112
|
-
"required": true,
|
|
1113
|
-
"example": 739224
|
|
1114
1195
|
}
|
|
1115
1196
|
],
|
|
1116
1197
|
"requestBody": {
|
|
@@ -1165,16 +1246,6 @@
|
|
|
1165
1246
|
},
|
|
1166
1247
|
"required": true,
|
|
1167
1248
|
"example": "getag"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
"in": "header",
|
|
1171
|
-
"name": "X-Epilot-Org-ID",
|
|
1172
|
-
"description": "The target Organization Id represented by the caller",
|
|
1173
|
-
"schema": {
|
|
1174
|
-
"type": "string"
|
|
1175
|
-
},
|
|
1176
|
-
"required": true,
|
|
1177
|
-
"example": 739224
|
|
1178
1249
|
}
|
|
1179
1250
|
],
|
|
1180
1251
|
"responses": {
|
|
@@ -2519,6 +2590,118 @@
|
|
|
2519
2590
|
"SaveIntegrationCredentialsParams": {
|
|
2520
2591
|
"$ref": "#/components/schemas/BasicAuthCredentials"
|
|
2521
2592
|
},
|
|
2593
|
+
"ComputePriceParams": {
|
|
2594
|
+
"description": "The compute price payload",
|
|
2595
|
+
"type": "object",
|
|
2596
|
+
"properties": {
|
|
2597
|
+
"postal_code": {
|
|
2598
|
+
"description": "The postal code to search for providers",
|
|
2599
|
+
"type": "string"
|
|
2600
|
+
},
|
|
2601
|
+
"consumption": {
|
|
2602
|
+
"description": "The monthly consumption to compute the price in kWh",
|
|
2603
|
+
"type": "number"
|
|
2604
|
+
},
|
|
2605
|
+
"association_id": {
|
|
2606
|
+
"description": "The association id",
|
|
2607
|
+
"type": "string"
|
|
2608
|
+
},
|
|
2609
|
+
"type": {
|
|
2610
|
+
"description": "The product type",
|
|
2611
|
+
"type": "string",
|
|
2612
|
+
"enum": [
|
|
2613
|
+
"power",
|
|
2614
|
+
"gas"
|
|
2615
|
+
]
|
|
2616
|
+
},
|
|
2617
|
+
"billing_period": {
|
|
2618
|
+
"description": "The billing period (defaults to monthly)",
|
|
2619
|
+
"type": "string",
|
|
2620
|
+
"enum": [
|
|
2621
|
+
"weekly",
|
|
2622
|
+
"monthly",
|
|
2623
|
+
"every_quarter",
|
|
2624
|
+
"every_6_months",
|
|
2625
|
+
"yearly",
|
|
2626
|
+
"one_time"
|
|
2627
|
+
],
|
|
2628
|
+
"default": "monthly"
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
"required": [
|
|
2632
|
+
"type",
|
|
2633
|
+
"postal_code",
|
|
2634
|
+
"consumption"
|
|
2635
|
+
]
|
|
2636
|
+
},
|
|
2637
|
+
"ComputedBasePrice": {
|
|
2638
|
+
"type": "object",
|
|
2639
|
+
"description": "The computed price",
|
|
2640
|
+
"properties": {
|
|
2641
|
+
"amount": {
|
|
2642
|
+
"description": "The computed price",
|
|
2643
|
+
"type": "number"
|
|
2644
|
+
},
|
|
2645
|
+
"amount_decimal": {
|
|
2646
|
+
"description": "The computed price as decimal",
|
|
2647
|
+
"type": "string"
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
"required": [
|
|
2651
|
+
"amount",
|
|
2652
|
+
"amount_decimal"
|
|
2653
|
+
]
|
|
2654
|
+
},
|
|
2655
|
+
"ComputedPriceBreakdown": {
|
|
2656
|
+
"type": "object",
|
|
2657
|
+
"description": "Price breakdown",
|
|
2658
|
+
"additionalProperties": {
|
|
2659
|
+
"$ref": "#/components/schemas/ComputedBasePrice"
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
"ComputePriceResult": {
|
|
2663
|
+
"type": "object",
|
|
2664
|
+
"properties": {
|
|
2665
|
+
"amount_total": {
|
|
2666
|
+
"description": "The computed total price",
|
|
2667
|
+
"type": "number"
|
|
2668
|
+
},
|
|
2669
|
+
"amount_total_decimal": {
|
|
2670
|
+
"description": "The computed total price as decimal",
|
|
2671
|
+
"type": "string"
|
|
2672
|
+
},
|
|
2673
|
+
"currency": {
|
|
2674
|
+
"description": "The currency of the computed price (three-letter ISO currency code)",
|
|
2675
|
+
"oneOf": [
|
|
2676
|
+
{
|
|
2677
|
+
"$ref": "#/components/schemas/Currency"
|
|
2678
|
+
}
|
|
2679
|
+
]
|
|
2680
|
+
},
|
|
2681
|
+
"billing_period": {
|
|
2682
|
+
"description": "The billing period",
|
|
2683
|
+
"type": "string",
|
|
2684
|
+
"enum": [
|
|
2685
|
+
"weekly",
|
|
2686
|
+
"monthly",
|
|
2687
|
+
"every_quarter",
|
|
2688
|
+
"every_6_months",
|
|
2689
|
+
"yearly",
|
|
2690
|
+
"one_time"
|
|
2691
|
+
]
|
|
2692
|
+
},
|
|
2693
|
+
"breakdown": {
|
|
2694
|
+
"$ref": "#/components/schemas/ComputedPriceBreakdown"
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
"required": [
|
|
2698
|
+
"amount_total",
|
|
2699
|
+
"amount_total_decimal",
|
|
2700
|
+
"currency",
|
|
2701
|
+
"billing_period",
|
|
2702
|
+
"breakdown"
|
|
2703
|
+
]
|
|
2704
|
+
},
|
|
2522
2705
|
"BasicAuthCredentials": {
|
|
2523
2706
|
"description": "The basic auth credentials",
|
|
2524
2707
|
"type": "object",
|