@epilot/pricing-client 3.7.1 → 3.8.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/client.d.ts +0 -0
- package/dist/client.js +0 -0
- package/dist/definition.d.ts +0 -0
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/openapi-runtime.json +17 -0
- package/dist/openapi.d.ts +333 -40
- package/dist/openapi.json +460 -66
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -105,9 +105,6 @@
|
|
|
105
105
|
{
|
|
106
106
|
"url": "https://pricing-api.sls.epilot.io"
|
|
107
107
|
},
|
|
108
|
-
{
|
|
109
|
-
"url": "https://pricing-api.sls.epilot.io"
|
|
110
|
-
},
|
|
111
108
|
{
|
|
112
109
|
"url": "https://pricing-api.sls.epilot.io"
|
|
113
110
|
}
|
|
@@ -194,6 +191,147 @@
|
|
|
194
191
|
}
|
|
195
192
|
]
|
|
196
193
|
}
|
|
194
|
+
},
|
|
195
|
+
"Order with Simple Prices and Dynamic Pricing": {
|
|
196
|
+
"value": {
|
|
197
|
+
"status": "quote",
|
|
198
|
+
"source_type": "manual",
|
|
199
|
+
"expires_at": "2022-06-30T16:17:00.000Z",
|
|
200
|
+
"line_items": [
|
|
201
|
+
{
|
|
202
|
+
"price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0",
|
|
203
|
+
"product_id": "3d1c9987-a7ae-4c1c-a7ef-e12caccab4e0",
|
|
204
|
+
"price_mappings": [
|
|
205
|
+
{
|
|
206
|
+
"price_id": "632b18b5-3f50-4231-b8d5-f8c33a392ed0",
|
|
207
|
+
"frequency_unit": "yearly",
|
|
208
|
+
"value": 12000,
|
|
209
|
+
"name": "Estimated consumption",
|
|
210
|
+
"metadata": {
|
|
211
|
+
"journey_title": "P&G",
|
|
212
|
+
"step_name": "Number Inputs"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"quantity": 16
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"currency": "EUR",
|
|
220
|
+
"payment_method": [
|
|
221
|
+
{
|
|
222
|
+
"type": "IBAN",
|
|
223
|
+
"details": {}
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"billing_contact": {
|
|
227
|
+
"$relation": [
|
|
228
|
+
{
|
|
229
|
+
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
|
|
230
|
+
"_tags": []
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"billing_first_name": "Joao",
|
|
235
|
+
"billing_last_name": "Pinho",
|
|
236
|
+
"billing_email": "j.pinho@epilot.cloud",
|
|
237
|
+
"billing_company_name": "epilot cloud",
|
|
238
|
+
"billing_address": [
|
|
239
|
+
{
|
|
240
|
+
"_tags": [],
|
|
241
|
+
"street": "Im Media Park",
|
|
242
|
+
"street_number": "8a",
|
|
243
|
+
"postal_code": "52000",
|
|
244
|
+
"city": "Cologne",
|
|
245
|
+
"country": "DE",
|
|
246
|
+
"additional_info": ""
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"delivery_address": [],
|
|
250
|
+
"dates": [
|
|
251
|
+
{
|
|
252
|
+
"_tags": [
|
|
253
|
+
"Instalation Date"
|
|
254
|
+
],
|
|
255
|
+
"dates": "",
|
|
256
|
+
"value": "2022-06-30T16:29:00.000Z"
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"Order with Composite Prices and Dynamic Pricing": {
|
|
262
|
+
"value": {
|
|
263
|
+
"status": "quote",
|
|
264
|
+
"source_type": "manual",
|
|
265
|
+
"expires_at": "2022-06-30T16:17:00.000Z",
|
|
266
|
+
"line_items": [
|
|
267
|
+
{
|
|
268
|
+
"price_id": "b3900bf3-020c-4c58-8af9-32f2682929e3",
|
|
269
|
+
"product_id": "924f6881-7ae3-4e2e-a1dd-2d81b8fa2e32",
|
|
270
|
+
"price_mappings": [
|
|
271
|
+
{
|
|
272
|
+
"price_id": "6dc88d6f-ba33-45ee-b5d0-62641344a0d9",
|
|
273
|
+
"frequency_unit": "yearly",
|
|
274
|
+
"value": 12000,
|
|
275
|
+
"name": "Estimated consumption",
|
|
276
|
+
"metadata": {
|
|
277
|
+
"journey_title": "P&G",
|
|
278
|
+
"step_name": "Number Inputs"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"price_id": "60eb12cd-703d-4d41-9265-577ff657bfc9",
|
|
283
|
+
"value": 10,
|
|
284
|
+
"name": "Distance to power meter",
|
|
285
|
+
"metadata": {
|
|
286
|
+
"journey_title": "P&G",
|
|
287
|
+
"step_name": "Number Inputs"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"quantity": 1
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"currency": "EUR",
|
|
295
|
+
"payment_method": [
|
|
296
|
+
{
|
|
297
|
+
"type": "IBAN",
|
|
298
|
+
"details": {}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"billing_contact": {
|
|
302
|
+
"$relation": [
|
|
303
|
+
{
|
|
304
|
+
"entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
|
|
305
|
+
"_tags": []
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"billing_first_name": "Joao",
|
|
310
|
+
"billing_last_name": "Pinho",
|
|
311
|
+
"billing_email": "j.pinho@epilot.cloud",
|
|
312
|
+
"billing_company_name": "epilot cloud",
|
|
313
|
+
"billing_address": [
|
|
314
|
+
{
|
|
315
|
+
"_tags": [],
|
|
316
|
+
"street": "Im Media Park",
|
|
317
|
+
"street_number": "8a",
|
|
318
|
+
"postal_code": "52000",
|
|
319
|
+
"city": "Cologne",
|
|
320
|
+
"country": "DE",
|
|
321
|
+
"additional_info": ""
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"delivery_address": [],
|
|
325
|
+
"dates": [
|
|
326
|
+
{
|
|
327
|
+
"_tags": [
|
|
328
|
+
"Instalation Date"
|
|
329
|
+
],
|
|
330
|
+
"dates": "",
|
|
331
|
+
"value": "2022-06-30T16:29:00.000Z"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
}
|
|
197
335
|
}
|
|
198
336
|
},
|
|
199
337
|
"schema": {
|
|
@@ -595,6 +733,77 @@
|
|
|
595
733
|
}
|
|
596
734
|
}
|
|
597
735
|
},
|
|
736
|
+
"/v1/validate-availability/{id}": {
|
|
737
|
+
"get": {
|
|
738
|
+
"description": "Validates an availability file, it returns an array of errors if the file is invalid",
|
|
739
|
+
"operationId": "$validateAvailabilityFile",
|
|
740
|
+
"summary": "validateAvailabilityFile",
|
|
741
|
+
"tags": [
|
|
742
|
+
"Availability API"
|
|
743
|
+
],
|
|
744
|
+
"parameters": [
|
|
745
|
+
{
|
|
746
|
+
"in": "path",
|
|
747
|
+
"name": "id",
|
|
748
|
+
"description": "Product ID that the Availability File is attached to",
|
|
749
|
+
"schema": {
|
|
750
|
+
"type": "string"
|
|
751
|
+
},
|
|
752
|
+
"required": true,
|
|
753
|
+
"example": "72c803b2-2e5d-4bd6-bffc-fad998bbbe36"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"in": "header",
|
|
757
|
+
"name": "X-Epilot-Org-ID",
|
|
758
|
+
"description": "The target Organization Id represented by the caller",
|
|
759
|
+
"schema": {
|
|
760
|
+
"type": "string"
|
|
761
|
+
},
|
|
762
|
+
"required": true,
|
|
763
|
+
"example": 739224
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"responses": {
|
|
767
|
+
"200": {
|
|
768
|
+
"description": "The availability get result",
|
|
769
|
+
"content": {
|
|
770
|
+
"application/json": {
|
|
771
|
+
"schema": {
|
|
772
|
+
"$ref": "#/components/schemas/ValidateAvailabilityFileResult"
|
|
773
|
+
},
|
|
774
|
+
"examples": {
|
|
775
|
+
"Response when file has no errors": {
|
|
776
|
+
"value": {
|
|
777
|
+
"number_of_rules_parsed": 10,
|
|
778
|
+
"errors": []
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"Response when file has errors": {
|
|
782
|
+
"value": {
|
|
783
|
+
"number_of_rules_parsed": 8,
|
|
784
|
+
"errors": [
|
|
785
|
+
"File must be UTF-8 encoded",
|
|
786
|
+
"Line 3 - Postal code is missing or invalid"
|
|
787
|
+
]
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
"400": {
|
|
795
|
+
"description": "Invalid payload",
|
|
796
|
+
"content": {
|
|
797
|
+
"application/json": {
|
|
798
|
+
"schema": {
|
|
799
|
+
"$ref": "#/components/schemas/Error"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
},
|
|
598
807
|
"/v1/public/opportunity": {
|
|
599
808
|
"post": {
|
|
600
809
|
"deprecated": true,
|
|
@@ -1268,17 +1477,31 @@
|
|
|
1268
1477
|
"description": "The flag for prices that contain price components.",
|
|
1269
1478
|
"type": "boolean"
|
|
1270
1479
|
},
|
|
1271
|
-
"
|
|
1480
|
+
"pricing_model": {
|
|
1272
1481
|
"type": "string",
|
|
1273
|
-
"description": "Describes how to compute the price per period. Either `per_unit` or `
|
|
1482
|
+
"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",
|
|
1274
1483
|
"enum": [
|
|
1275
|
-
"per_unit"
|
|
1484
|
+
"per_unit",
|
|
1485
|
+
"tiered_graduated",
|
|
1486
|
+
"tiered_volume",
|
|
1487
|
+
"tiered_flatfee"
|
|
1276
1488
|
]
|
|
1277
1489
|
},
|
|
1490
|
+
"tiers": {
|
|
1491
|
+
"description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n",
|
|
1492
|
+
"type": "array",
|
|
1493
|
+
"items": {
|
|
1494
|
+
"$ref": "#/components/schemas/PriceTier"
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1278
1497
|
"description": {
|
|
1279
1498
|
"type": "string",
|
|
1280
1499
|
"description": "A brief description of the price."
|
|
1281
1500
|
},
|
|
1501
|
+
"long_description": {
|
|
1502
|
+
"type": "string",
|
|
1503
|
+
"description": "A detailed description of the price. This is shown on the order document and order table."
|
|
1504
|
+
},
|
|
1282
1505
|
"sales_tax": {
|
|
1283
1506
|
"deprecated": true,
|
|
1284
1507
|
"description": "The default tax rate applicable to the product.\nThis field is deprecated, use the new `tax` attribute.\n",
|
|
@@ -1310,20 +1533,9 @@
|
|
|
1310
1533
|
}
|
|
1311
1534
|
]
|
|
1312
1535
|
},
|
|
1313
|
-
"
|
|
1314
|
-
"type": "
|
|
1315
|
-
"description": "Specifies whether the price is considered `inclusive` of taxes or
|
|
1316
|
-
"enum": [
|
|
1317
|
-
"inclusive",
|
|
1318
|
-
"exclusive"
|
|
1319
|
-
]
|
|
1320
|
-
},
|
|
1321
|
-
"tiers_mode": {
|
|
1322
|
-
"description": "Defines the tiered pricing type of the price.",
|
|
1323
|
-
"type": "string",
|
|
1324
|
-
"enum": [
|
|
1325
|
-
"standard"
|
|
1326
|
-
]
|
|
1536
|
+
"is_tax_inclusive": {
|
|
1537
|
+
"type": "boolean",
|
|
1538
|
+
"description": "Specifies whether the price is considered `inclusive` of taxes or not."
|
|
1327
1539
|
},
|
|
1328
1540
|
"type": {
|
|
1329
1541
|
"type": "string",
|
|
@@ -1433,7 +1645,15 @@
|
|
|
1433
1645
|
"kwh",
|
|
1434
1646
|
"m",
|
|
1435
1647
|
"m2",
|
|
1436
|
-
"l"
|
|
1648
|
+
"l",
|
|
1649
|
+
"cubic-meter",
|
|
1650
|
+
"cubic-meter-h",
|
|
1651
|
+
"ls",
|
|
1652
|
+
"a",
|
|
1653
|
+
"kva",
|
|
1654
|
+
"w",
|
|
1655
|
+
"wp",
|
|
1656
|
+
"kwp"
|
|
1437
1657
|
]
|
|
1438
1658
|
},
|
|
1439
1659
|
{
|
|
@@ -1469,7 +1689,10 @@
|
|
|
1469
1689
|
"type": "string"
|
|
1470
1690
|
}
|
|
1471
1691
|
}
|
|
1472
|
-
}
|
|
1692
|
+
},
|
|
1693
|
+
"required": [
|
|
1694
|
+
"pricing_model"
|
|
1695
|
+
]
|
|
1473
1696
|
},
|
|
1474
1697
|
"CompositePrice": {
|
|
1475
1698
|
"type": "object",
|
|
@@ -1593,6 +1816,65 @@
|
|
|
1593
1816
|
]
|
|
1594
1817
|
}
|
|
1595
1818
|
},
|
|
1819
|
+
"PriceInputMappings": {
|
|
1820
|
+
"type": "array",
|
|
1821
|
+
"items": {
|
|
1822
|
+
"$ref": "#/components/schemas/PriceInputMapping"
|
|
1823
|
+
},
|
|
1824
|
+
"example": [
|
|
1825
|
+
{
|
|
1826
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1827
|
+
"frequency_unit": "weekly",
|
|
1828
|
+
"value": 1000.245,
|
|
1829
|
+
"name": "avg consumption",
|
|
1830
|
+
"metadata": {
|
|
1831
|
+
"journey_title": "energy journey",
|
|
1832
|
+
"step_name": "avg consumption picker"
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
]
|
|
1836
|
+
},
|
|
1837
|
+
"PriceInputMapping": {
|
|
1838
|
+
"type": "object",
|
|
1839
|
+
"properties": {
|
|
1840
|
+
"price_id": {
|
|
1841
|
+
"type": "string"
|
|
1842
|
+
},
|
|
1843
|
+
"frequency_unit": {
|
|
1844
|
+
"type": "string",
|
|
1845
|
+
"enum": [
|
|
1846
|
+
"weekly",
|
|
1847
|
+
"monthly",
|
|
1848
|
+
"every_quarter",
|
|
1849
|
+
"every_6_months",
|
|
1850
|
+
"yearly",
|
|
1851
|
+
"one_time"
|
|
1852
|
+
]
|
|
1853
|
+
},
|
|
1854
|
+
"name": {
|
|
1855
|
+
"type": "string"
|
|
1856
|
+
},
|
|
1857
|
+
"value": {
|
|
1858
|
+
"type": "number"
|
|
1859
|
+
},
|
|
1860
|
+
"metadata": {
|
|
1861
|
+
"type": "object",
|
|
1862
|
+
"additionalProperties": {
|
|
1863
|
+
"type": "string"
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
},
|
|
1867
|
+
"example": {
|
|
1868
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1869
|
+
"frequency_unit": "weekly",
|
|
1870
|
+
"value": 1000.245,
|
|
1871
|
+
"name": "avg consumption",
|
|
1872
|
+
"metadata": {
|
|
1873
|
+
"journey_title": "energy journey",
|
|
1874
|
+
"step_name": "avg consumption picker"
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1596
1878
|
"CatalogSearch": {
|
|
1597
1879
|
"description": "A catalog search payload",
|
|
1598
1880
|
"type": "object",
|
|
@@ -1753,6 +2035,61 @@
|
|
|
1753
2035
|
]
|
|
1754
2036
|
}
|
|
1755
2037
|
},
|
|
2038
|
+
"ValidateAvailabilityFileError": {
|
|
2039
|
+
"description": "The availability rule error",
|
|
2040
|
+
"type": "object",
|
|
2041
|
+
"properties": {
|
|
2042
|
+
"line": {
|
|
2043
|
+
"description": "The line number where the error was found",
|
|
2044
|
+
"type": "number"
|
|
2045
|
+
},
|
|
2046
|
+
"msg": {
|
|
2047
|
+
"description": "The error message",
|
|
2048
|
+
"type": "string"
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
"required": [
|
|
2052
|
+
"msg"
|
|
2053
|
+
]
|
|
2054
|
+
},
|
|
2055
|
+
"ValidateAvailabilityFileResult": {
|
|
2056
|
+
"description": "The availability map file result payload",
|
|
2057
|
+
"type": "object",
|
|
2058
|
+
"properties": {
|
|
2059
|
+
"status": {
|
|
2060
|
+
"description": "The status of the validation",
|
|
2061
|
+
"type": "string",
|
|
2062
|
+
"enum": [
|
|
2063
|
+
"success",
|
|
2064
|
+
"error"
|
|
2065
|
+
]
|
|
2066
|
+
},
|
|
2067
|
+
"rules_parsed_count": {
|
|
2068
|
+
"description": "The number of rules successfully parsed",
|
|
2069
|
+
"type": "number"
|
|
2070
|
+
},
|
|
2071
|
+
"errors": {
|
|
2072
|
+
"description": "The errors found on the file",
|
|
2073
|
+
"type": "array",
|
|
2074
|
+
"items": {
|
|
2075
|
+
"$ref": "#/components/schemas/ValidateAvailabilityFileError"
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
"required": [
|
|
2080
|
+
"status",
|
|
2081
|
+
"rules_parsed_count",
|
|
2082
|
+
"errors"
|
|
2083
|
+
],
|
|
2084
|
+
"example": {
|
|
2085
|
+
"rules_parsed_count": 8,
|
|
2086
|
+
"errors": [
|
|
2087
|
+
"File must be UTF-8 encoded",
|
|
2088
|
+
"Error on line 3 - street_number must be of type number",
|
|
2089
|
+
"Error on line 6 - start_date cant be greater than end_date"
|
|
2090
|
+
]
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
1756
2093
|
"CartDto": {
|
|
1757
2094
|
"description": "A valid cart payload from a client.",
|
|
1758
2095
|
"properties": {
|
|
@@ -1876,9 +2213,12 @@
|
|
|
1876
2213
|
"description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
|
|
1877
2214
|
"type": "array",
|
|
1878
2215
|
"items": {
|
|
1879
|
-
"
|
|
2216
|
+
"anyOf": [
|
|
1880
2217
|
{
|
|
1881
2218
|
"$ref": "#/components/schemas/PriceItemDto"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"$ref": "#/components/schemas/CompositePriceItemDto"
|
|
1882
2222
|
}
|
|
1883
2223
|
]
|
|
1884
2224
|
}
|
|
@@ -1894,6 +2234,10 @@
|
|
|
1894
2234
|
"type": "integer",
|
|
1895
2235
|
"description": "The quantity of products being purchased."
|
|
1896
2236
|
},
|
|
2237
|
+
"price_mappings": {
|
|
2238
|
+
"description": "Price mapping information required to compute totals",
|
|
2239
|
+
"$ref": "#/components/schemas/PriceInputMappings"
|
|
2240
|
+
},
|
|
1897
2241
|
"description": {
|
|
1898
2242
|
"type": "string",
|
|
1899
2243
|
"description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
|
|
@@ -1965,10 +2309,23 @@
|
|
|
1965
2309
|
"type": "integer",
|
|
1966
2310
|
"description": "The unit amount value"
|
|
1967
2311
|
},
|
|
2312
|
+
"unit_amount_currency": {
|
|
2313
|
+
"$ref": "#/components/schemas/Currency"
|
|
2314
|
+
},
|
|
1968
2315
|
"unit_amount_decimal": {
|
|
1969
2316
|
"description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
|
|
1970
2317
|
"type": "string"
|
|
1971
2318
|
},
|
|
2319
|
+
"pricing_model": {
|
|
2320
|
+
"type": "string",
|
|
2321
|
+
"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",
|
|
2322
|
+
"enum": [
|
|
2323
|
+
"per_unit",
|
|
2324
|
+
"tiered_graduated",
|
|
2325
|
+
"tiered_volume",
|
|
2326
|
+
"tiered_flatfee"
|
|
2327
|
+
]
|
|
2328
|
+
},
|
|
1972
2329
|
"_price": {
|
|
1973
2330
|
"description": "The snapshot of the price linked to the price item.",
|
|
1974
2331
|
"allOf": [
|
|
@@ -1977,7 +2334,10 @@
|
|
|
1977
2334
|
}
|
|
1978
2335
|
]
|
|
1979
2336
|
}
|
|
1980
|
-
}
|
|
2337
|
+
},
|
|
2338
|
+
"required": [
|
|
2339
|
+
"pricing_model"
|
|
2340
|
+
]
|
|
1981
2341
|
},
|
|
1982
2342
|
"CompositePriceItemDto": {
|
|
1983
2343
|
"allOf": [
|
|
@@ -2169,7 +2529,7 @@
|
|
|
2169
2529
|
"$ref": "#/components/schemas/OrderStatus"
|
|
2170
2530
|
},
|
|
2171
2531
|
"line_items": {
|
|
2172
|
-
"$ref": "#/components/schemas/
|
|
2532
|
+
"$ref": "#/components/schemas/PriceItemsDto"
|
|
2173
2533
|
},
|
|
2174
2534
|
"source_type": {
|
|
2175
2535
|
"type": "string",
|
|
@@ -2257,6 +2617,9 @@
|
|
|
2257
2617
|
"items": {
|
|
2258
2618
|
"$ref": "#/components/schemas/PriceItem"
|
|
2259
2619
|
}
|
|
2620
|
+
},
|
|
2621
|
+
"total_details": {
|
|
2622
|
+
"$ref": "#/components/schemas/TotalDetails"
|
|
2260
2623
|
}
|
|
2261
2624
|
}
|
|
2262
2625
|
},
|
|
@@ -2267,7 +2630,7 @@
|
|
|
2267
2630
|
"$ref": "#/components/examples/price-item"
|
|
2268
2631
|
},
|
|
2269
2632
|
"properties": {
|
|
2270
|
-
"
|
|
2633
|
+
"_id": {
|
|
2271
2634
|
"type": "string",
|
|
2272
2635
|
"description": "price item id",
|
|
2273
2636
|
"readOnly": true
|
|
@@ -2359,6 +2722,14 @@
|
|
|
2359
2722
|
}
|
|
2360
2723
|
]
|
|
2361
2724
|
}
|
|
2725
|
+
},
|
|
2726
|
+
"price_mappings": {
|
|
2727
|
+
"description": "Price mapping information required to compute totals",
|
|
2728
|
+
"$ref": "#/components/schemas/PriceInputMappings"
|
|
2729
|
+
},
|
|
2730
|
+
"on_request_approved": {
|
|
2731
|
+
"type": "boolean",
|
|
2732
|
+
"description": "When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'."
|
|
2362
2733
|
}
|
|
2363
2734
|
}
|
|
2364
2735
|
},
|
|
@@ -2382,11 +2753,20 @@
|
|
|
2382
2753
|
"recurring"
|
|
2383
2754
|
]
|
|
2384
2755
|
},
|
|
2385
|
-
"
|
|
2386
|
-
"type": "
|
|
2387
|
-
"description": "
|
|
2756
|
+
"pricing_model": {
|
|
2757
|
+
"type": "string",
|
|
2758
|
+
"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",
|
|
2759
|
+
"enum": [
|
|
2760
|
+
"per_unit",
|
|
2761
|
+
"tiered_graduated",
|
|
2762
|
+
"tiered_volume",
|
|
2763
|
+
"tiered_flatfee"
|
|
2764
|
+
]
|
|
2388
2765
|
}
|
|
2389
|
-
}
|
|
2766
|
+
},
|
|
2767
|
+
"required": [
|
|
2768
|
+
"pricing_model"
|
|
2769
|
+
]
|
|
2390
2770
|
},
|
|
2391
2771
|
"TaxAmount": {
|
|
2392
2772
|
"type": "object",
|
|
@@ -2526,6 +2906,9 @@
|
|
|
2526
2906
|
"oneOf": [
|
|
2527
2907
|
{
|
|
2528
2908
|
"$ref": "#/components/schemas/PriceItem"
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
"$ref": "#/components/schemas/CompositePriceItem"
|
|
2529
2912
|
}
|
|
2530
2913
|
]
|
|
2531
2914
|
}
|
|
@@ -2881,7 +3264,6 @@
|
|
|
2881
3264
|
"required": [
|
|
2882
3265
|
"type",
|
|
2883
3266
|
"rate",
|
|
2884
|
-
"behavior",
|
|
2885
3267
|
"_id",
|
|
2886
3268
|
"_title",
|
|
2887
3269
|
"_org",
|
|
@@ -2932,15 +3314,6 @@
|
|
|
2932
3314
|
"rate": {
|
|
2933
3315
|
"type": "number"
|
|
2934
3316
|
},
|
|
2935
|
-
"behavior": {
|
|
2936
|
-
"type": "string",
|
|
2937
|
-
"enum": [
|
|
2938
|
-
"Exclusive",
|
|
2939
|
-
"Inclusive",
|
|
2940
|
-
"exclusive",
|
|
2941
|
-
"inclusive"
|
|
2942
|
-
]
|
|
2943
|
-
},
|
|
2944
3317
|
"active": {
|
|
2945
3318
|
"type": "boolean"
|
|
2946
3319
|
},
|
|
@@ -2955,7 +3328,6 @@
|
|
|
2955
3328
|
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2956
3329
|
"type": "VAT",
|
|
2957
3330
|
"description": "Tax description",
|
|
2958
|
-
"behavior": "Exclusive",
|
|
2959
3331
|
"active": "true",
|
|
2960
3332
|
"region": "DE",
|
|
2961
3333
|
"region_label": "Germany",
|
|
@@ -2987,6 +3359,37 @@
|
|
|
2987
3359
|
"type": "string"
|
|
2988
3360
|
}
|
|
2989
3361
|
}
|
|
3362
|
+
},
|
|
3363
|
+
"PriceTier": {
|
|
3364
|
+
"type": "object",
|
|
3365
|
+
"properties": {
|
|
3366
|
+
"up_to": {
|
|
3367
|
+
"type": "number",
|
|
3368
|
+
"nullable": true
|
|
3369
|
+
},
|
|
3370
|
+
"flat_fee_amount": {
|
|
3371
|
+
"type": "number"
|
|
3372
|
+
},
|
|
3373
|
+
"flat_fee_amount_decimal": {
|
|
3374
|
+
"type": "string"
|
|
3375
|
+
},
|
|
3376
|
+
"unit_amount": {
|
|
3377
|
+
"type": "number"
|
|
3378
|
+
},
|
|
3379
|
+
"unit_amount_decimal": {
|
|
3380
|
+
"type": "string"
|
|
3381
|
+
},
|
|
3382
|
+
"display_mode": {
|
|
3383
|
+
"$ref": "#/components/schemas/PriceTierDisplayMode"
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
},
|
|
3387
|
+
"PriceTierDisplayMode": {
|
|
3388
|
+
"type": "string",
|
|
3389
|
+
"enum": [
|
|
3390
|
+
"hidden",
|
|
3391
|
+
"on_request"
|
|
3392
|
+
]
|
|
2990
3393
|
}
|
|
2991
3394
|
},
|
|
2992
3395
|
"examples": {
|
|
@@ -3090,10 +3493,9 @@
|
|
|
3090
3493
|
"type": "one_time",
|
|
3091
3494
|
"active": true,
|
|
3092
3495
|
"sales_tax": "standard",
|
|
3093
|
-
"
|
|
3496
|
+
"is_tax_inclusive": true,
|
|
3094
3497
|
"description": "Winter Sale",
|
|
3095
3498
|
"billing_scheme": "per_unit",
|
|
3096
|
-
"tiers_mode": "Standard",
|
|
3097
3499
|
"_created_at": "2021-11-10T18:02:58.318Z",
|
|
3098
3500
|
"_updated_at": "2021-11-10T18:02:58.318Z",
|
|
3099
3501
|
"_title": "Winter Sale"
|
|
@@ -3126,10 +3528,9 @@
|
|
|
3126
3528
|
"type": "one_time",
|
|
3127
3529
|
"active": true,
|
|
3128
3530
|
"sales_tax": "standard",
|
|
3129
|
-
"
|
|
3531
|
+
"is_tax_inclusive": true,
|
|
3130
3532
|
"description": "Winter Sale",
|
|
3131
3533
|
"billing_scheme": "per_unit",
|
|
3132
|
-
"tiers_mode": "Standard",
|
|
3133
3534
|
"_created_at": "2021-11-10T18:02:58.318Z",
|
|
3134
3535
|
"_updated_at": "2021-11-10T18:02:58.318Z",
|
|
3135
3536
|
"_title": "Winter Sale"
|
|
@@ -3178,7 +3579,6 @@
|
|
|
3178
3579
|
"tax": {
|
|
3179
3580
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3180
3581
|
"rate": "19",
|
|
3181
|
-
"behavior": "Inclusive",
|
|
3182
3582
|
"_schema": "tax",
|
|
3183
3583
|
"_org": "728",
|
|
3184
3584
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3198,7 +3598,7 @@
|
|
|
3198
3598
|
"unit_amount_currency": "EUR",
|
|
3199
3599
|
"unit_amount_decimal": "1000",
|
|
3200
3600
|
"sales_tax": "standard",
|
|
3201
|
-
"
|
|
3601
|
+
"is_tax_inclusive": true,
|
|
3202
3602
|
"price_display_in_journeys": "show_price",
|
|
3203
3603
|
"type": "one_time",
|
|
3204
3604
|
"billing_period": "weekly",
|
|
@@ -3310,7 +3710,6 @@
|
|
|
3310
3710
|
"tax": {
|
|
3311
3711
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3312
3712
|
"rate": "19",
|
|
3313
|
-
"behavior": "Inclusive",
|
|
3314
3713
|
"_schema": "tax",
|
|
3315
3714
|
"_org": "728",
|
|
3316
3715
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3330,7 +3729,7 @@
|
|
|
3330
3729
|
"unit_amount_currency": "EUR",
|
|
3331
3730
|
"unit_amount_decimal": "500",
|
|
3332
3731
|
"sales_tax": "standard",
|
|
3333
|
-
"
|
|
3732
|
+
"is_tax_inclusive": true,
|
|
3334
3733
|
"price_display_in_journeys": "show_price",
|
|
3335
3734
|
"type": "one_time",
|
|
3336
3735
|
"billing_period": "weekly",
|
|
@@ -3452,10 +3851,9 @@
|
|
|
3452
3851
|
"renewal_duration_unit": "years",
|
|
3453
3852
|
"active": true,
|
|
3454
3853
|
"sales_tax": "reduced",
|
|
3455
|
-
"
|
|
3854
|
+
"is_tax_inclusive": true,
|
|
3456
3855
|
"description": "Monthly",
|
|
3457
3856
|
"billing_scheme": "per_unit",
|
|
3458
|
-
"tiers_mode": "Standard",
|
|
3459
3857
|
"_schema": "price",
|
|
3460
3858
|
"_org": "728",
|
|
3461
3859
|
"_created_at": "2021-11-10T14:40:27.695Z",
|
|
@@ -3550,7 +3948,7 @@
|
|
|
3550
3948
|
"unit_amount_currency": "EUR",
|
|
3551
3949
|
"unit_amount_decimal": "99",
|
|
3552
3950
|
"sales_tax": "standard",
|
|
3553
|
-
"
|
|
3951
|
+
"is_tax_inclusive": true,
|
|
3554
3952
|
"price_display_in_journeys": "show_price",
|
|
3555
3953
|
"type": "recurring",
|
|
3556
3954
|
"billing_period": "yearly",
|
|
@@ -3611,7 +4009,6 @@
|
|
|
3611
4009
|
"tax": {
|
|
3612
4010
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3613
4011
|
"rate": "19",
|
|
3614
|
-
"behavior": "Inclusive",
|
|
3615
4012
|
"_schema": "tax",
|
|
3616
4013
|
"_org": "728",
|
|
3617
4014
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3842,7 +4239,6 @@
|
|
|
3842
4239
|
"tax": {
|
|
3843
4240
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
3844
4241
|
"type": "VAT",
|
|
3845
|
-
"behavior": "Exclusive",
|
|
3846
4242
|
"active": true,
|
|
3847
4243
|
"region": "DE",
|
|
3848
4244
|
"_schema": "tax",
|
|
@@ -3871,7 +4267,6 @@
|
|
|
3871
4267
|
"tax": {
|
|
3872
4268
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
3873
4269
|
"type": "VAT",
|
|
3874
|
-
"behavior": "Exclusive",
|
|
3875
4270
|
"active": true,
|
|
3876
4271
|
"region": "DE",
|
|
3877
4272
|
"_schema": "tax",
|
|
@@ -3909,7 +4304,6 @@
|
|
|
3909
4304
|
"unit_amount_currency": "EUR",
|
|
3910
4305
|
"unit_amount_decimal": "100.00",
|
|
3911
4306
|
"sales_tax": "standard",
|
|
3912
|
-
"tax_behavior": "exclusive",
|
|
3913
4307
|
"price_display_in_journeys": "show_price",
|
|
3914
4308
|
"type": "one_time",
|
|
3915
4309
|
"_schema": "price",
|
|
@@ -3944,7 +4338,7 @@
|
|
|
3944
4338
|
"unit_amount_currency": "EUR",
|
|
3945
4339
|
"unit_amount_decimal": "100.00",
|
|
3946
4340
|
"sales_tax": "standard",
|
|
3947
|
-
"
|
|
4341
|
+
"is_tax_inclusive": false,
|
|
3948
4342
|
"price_display_in_journeys": "show_price",
|
|
3949
4343
|
"type": "one_time",
|
|
3950
4344
|
"_schema": "price",
|
|
@@ -3997,7 +4391,7 @@
|
|
|
3997
4391
|
"unit_amount_currency": "EUR",
|
|
3998
4392
|
"unit_amount_decimal": "555666.77",
|
|
3999
4393
|
"sales_tax": "standard",
|
|
4000
|
-
"
|
|
4394
|
+
"is_tax_inclusive": true,
|
|
4001
4395
|
"price_display_in_journeys": "show_as_starting_price",
|
|
4002
4396
|
"type": "one_time",
|
|
4003
4397
|
"_schema": "price",
|
|
@@ -4102,7 +4496,6 @@
|
|
|
4102
4496
|
"tax": {
|
|
4103
4497
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
4104
4498
|
"type": "VAT",
|
|
4105
|
-
"behavior": "Exclusive",
|
|
4106
4499
|
"active": true,
|
|
4107
4500
|
"region": "DE",
|
|
4108
4501
|
"_schema": "tax",
|
|
@@ -4328,7 +4721,7 @@
|
|
|
4328
4721
|
"unit_amount_currency": "EUR",
|
|
4329
4722
|
"unit_amount_decimal": "1000",
|
|
4330
4723
|
"sales_tax": "standard",
|
|
4331
|
-
"
|
|
4724
|
+
"is_tax_inclusive": true,
|
|
4332
4725
|
"price_display_in_journeys": "show_price",
|
|
4333
4726
|
"type": "one_time",
|
|
4334
4727
|
"billing_period": "weekly",
|
|
@@ -4350,7 +4743,8 @@
|
|
|
4350
4743
|
"_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
|
|
4351
4744
|
"_org": "728",
|
|
4352
4745
|
"_created_at": "2022-06-03T16:04:10.369Z",
|
|
4353
|
-
"_updated_at": "2022-06-03T16:04:10.369Z"
|
|
4746
|
+
"_updated_at": "2022-06-03T16:04:10.369Z",
|
|
4747
|
+
"pricing_model": "per_unit"
|
|
4354
4748
|
}
|
|
4355
4749
|
},
|
|
4356
4750
|
"composite-price": {
|
|
@@ -4376,7 +4770,7 @@
|
|
|
4376
4770
|
"unit_amount_currency": "EUR",
|
|
4377
4771
|
"unit_amount_decimal": "100.00",
|
|
4378
4772
|
"sales_tax": "standard",
|
|
4379
|
-
"
|
|
4773
|
+
"is_tax_inclusive": false,
|
|
4380
4774
|
"price_display_in_journeys": "show_price",
|
|
4381
4775
|
"type": "one_time",
|
|
4382
4776
|
"_schema": "price",
|
|
@@ -4411,7 +4805,7 @@
|
|
|
4411
4805
|
"unit_amount_currency": "EUR",
|
|
4412
4806
|
"unit_amount_decimal": "100.00",
|
|
4413
4807
|
"sales_tax": "standard",
|
|
4414
|
-
"
|
|
4808
|
+
"is_tax_inclusive": false,
|
|
4415
4809
|
"price_display_in_journeys": "show_price",
|
|
4416
4810
|
"type": "one_time",
|
|
4417
4811
|
"_schema": "price",
|
|
@@ -4452,7 +4846,6 @@
|
|
|
4452
4846
|
"amount": 600,
|
|
4453
4847
|
"tax": {
|
|
4454
4848
|
"active": true,
|
|
4455
|
-
"behavior": "Exclusive",
|
|
4456
4849
|
"description": "Without Behaviour",
|
|
4457
4850
|
"rate": 6,
|
|
4458
4851
|
"region": "DE",
|
|
@@ -4473,7 +4866,7 @@
|
|
|
4473
4866
|
"unit_amount_currency": "EUR",
|
|
4474
4867
|
"unit_amount_decimal": "100.00",
|
|
4475
4868
|
"sales_tax": "standard",
|
|
4476
|
-
"
|
|
4869
|
+
"is_tax_inclusive": false,
|
|
4477
4870
|
"price_display_in_journeys": "show_price",
|
|
4478
4871
|
"type": "one_time",
|
|
4479
4872
|
"billing_period": "weekly",
|
|
@@ -4495,7 +4888,8 @@
|
|
|
4495
4888
|
"_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
|
|
4496
4889
|
"_org": "728",
|
|
4497
4890
|
"_created_at": "2022-06-03T16:04:10.369Z",
|
|
4498
|
-
"_updated_at": "2022-06-03T16:04:10.369Z"
|
|
4891
|
+
"_updated_at": "2022-06-03T16:04:10.369Z",
|
|
4892
|
+
"pricing_model": "per_unit"
|
|
4499
4893
|
},
|
|
4500
4894
|
"_product": {
|
|
4501
4895
|
"name": "Cool box",
|