@epilot/pricing-client 3.7.1 → 3.9.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 +349 -40
- package/dist/openapi.json +464 -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,
|
|
@@ -724,6 +933,10 @@
|
|
|
724
933
|
"$ref": "#/components/examples/product"
|
|
725
934
|
},
|
|
726
935
|
"properties": {
|
|
936
|
+
"description": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"description": "The description for the product"
|
|
939
|
+
},
|
|
727
940
|
"code": {
|
|
728
941
|
"type": "string",
|
|
729
942
|
"description": "The product code"
|
|
@@ -1268,17 +1481,31 @@
|
|
|
1268
1481
|
"description": "The flag for prices that contain price components.",
|
|
1269
1482
|
"type": "boolean"
|
|
1270
1483
|
},
|
|
1271
|
-
"
|
|
1484
|
+
"pricing_model": {
|
|
1272
1485
|
"type": "string",
|
|
1273
|
-
"description": "Describes how to compute the price per period. Either `per_unit` or `
|
|
1486
|
+
"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
1487
|
"enum": [
|
|
1275
|
-
"per_unit"
|
|
1488
|
+
"per_unit",
|
|
1489
|
+
"tiered_graduated",
|
|
1490
|
+
"tiered_volume",
|
|
1491
|
+
"tiered_flatfee"
|
|
1276
1492
|
]
|
|
1277
1493
|
},
|
|
1494
|
+
"tiers": {
|
|
1495
|
+
"description": "Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.\n",
|
|
1496
|
+
"type": "array",
|
|
1497
|
+
"items": {
|
|
1498
|
+
"$ref": "#/components/schemas/PriceTier"
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1278
1501
|
"description": {
|
|
1279
1502
|
"type": "string",
|
|
1280
1503
|
"description": "A brief description of the price."
|
|
1281
1504
|
},
|
|
1505
|
+
"long_description": {
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"description": "A detailed description of the price. This is shown on the order document and order table."
|
|
1508
|
+
},
|
|
1282
1509
|
"sales_tax": {
|
|
1283
1510
|
"deprecated": true,
|
|
1284
1511
|
"description": "The default tax rate applicable to the product.\nThis field is deprecated, use the new `tax` attribute.\n",
|
|
@@ -1310,20 +1537,9 @@
|
|
|
1310
1537
|
}
|
|
1311
1538
|
]
|
|
1312
1539
|
},
|
|
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
|
-
]
|
|
1540
|
+
"is_tax_inclusive": {
|
|
1541
|
+
"type": "boolean",
|
|
1542
|
+
"description": "Specifies whether the price is considered `inclusive` of taxes or not."
|
|
1327
1543
|
},
|
|
1328
1544
|
"type": {
|
|
1329
1545
|
"type": "string",
|
|
@@ -1433,7 +1649,15 @@
|
|
|
1433
1649
|
"kwh",
|
|
1434
1650
|
"m",
|
|
1435
1651
|
"m2",
|
|
1436
|
-
"l"
|
|
1652
|
+
"l",
|
|
1653
|
+
"cubic-meter",
|
|
1654
|
+
"cubic-meter-h",
|
|
1655
|
+
"ls",
|
|
1656
|
+
"a",
|
|
1657
|
+
"kva",
|
|
1658
|
+
"w",
|
|
1659
|
+
"wp",
|
|
1660
|
+
"kwp"
|
|
1437
1661
|
]
|
|
1438
1662
|
},
|
|
1439
1663
|
{
|
|
@@ -1469,7 +1693,10 @@
|
|
|
1469
1693
|
"type": "string"
|
|
1470
1694
|
}
|
|
1471
1695
|
}
|
|
1472
|
-
}
|
|
1696
|
+
},
|
|
1697
|
+
"required": [
|
|
1698
|
+
"pricing_model"
|
|
1699
|
+
]
|
|
1473
1700
|
},
|
|
1474
1701
|
"CompositePrice": {
|
|
1475
1702
|
"type": "object",
|
|
@@ -1593,6 +1820,65 @@
|
|
|
1593
1820
|
]
|
|
1594
1821
|
}
|
|
1595
1822
|
},
|
|
1823
|
+
"PriceInputMappings": {
|
|
1824
|
+
"type": "array",
|
|
1825
|
+
"items": {
|
|
1826
|
+
"$ref": "#/components/schemas/PriceInputMapping"
|
|
1827
|
+
},
|
|
1828
|
+
"example": [
|
|
1829
|
+
{
|
|
1830
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1831
|
+
"frequency_unit": "weekly",
|
|
1832
|
+
"value": 1000.245,
|
|
1833
|
+
"name": "avg consumption",
|
|
1834
|
+
"metadata": {
|
|
1835
|
+
"journey_title": "energy journey",
|
|
1836
|
+
"step_name": "avg consumption picker"
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
]
|
|
1840
|
+
},
|
|
1841
|
+
"PriceInputMapping": {
|
|
1842
|
+
"type": "object",
|
|
1843
|
+
"properties": {
|
|
1844
|
+
"price_id": {
|
|
1845
|
+
"type": "string"
|
|
1846
|
+
},
|
|
1847
|
+
"frequency_unit": {
|
|
1848
|
+
"type": "string",
|
|
1849
|
+
"enum": [
|
|
1850
|
+
"weekly",
|
|
1851
|
+
"monthly",
|
|
1852
|
+
"every_quarter",
|
|
1853
|
+
"every_6_months",
|
|
1854
|
+
"yearly",
|
|
1855
|
+
"one_time"
|
|
1856
|
+
]
|
|
1857
|
+
},
|
|
1858
|
+
"name": {
|
|
1859
|
+
"type": "string"
|
|
1860
|
+
},
|
|
1861
|
+
"value": {
|
|
1862
|
+
"type": "number"
|
|
1863
|
+
},
|
|
1864
|
+
"metadata": {
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"additionalProperties": {
|
|
1867
|
+
"type": "string"
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
"example": {
|
|
1872
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1873
|
+
"frequency_unit": "weekly",
|
|
1874
|
+
"value": 1000.245,
|
|
1875
|
+
"name": "avg consumption",
|
|
1876
|
+
"metadata": {
|
|
1877
|
+
"journey_title": "energy journey",
|
|
1878
|
+
"step_name": "avg consumption picker"
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1596
1882
|
"CatalogSearch": {
|
|
1597
1883
|
"description": "A catalog search payload",
|
|
1598
1884
|
"type": "object",
|
|
@@ -1753,6 +2039,61 @@
|
|
|
1753
2039
|
]
|
|
1754
2040
|
}
|
|
1755
2041
|
},
|
|
2042
|
+
"ValidateAvailabilityFileError": {
|
|
2043
|
+
"description": "The availability rule error",
|
|
2044
|
+
"type": "object",
|
|
2045
|
+
"properties": {
|
|
2046
|
+
"line": {
|
|
2047
|
+
"description": "The line number where the error was found",
|
|
2048
|
+
"type": "number"
|
|
2049
|
+
},
|
|
2050
|
+
"msg": {
|
|
2051
|
+
"description": "The error message",
|
|
2052
|
+
"type": "string"
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
"required": [
|
|
2056
|
+
"msg"
|
|
2057
|
+
]
|
|
2058
|
+
},
|
|
2059
|
+
"ValidateAvailabilityFileResult": {
|
|
2060
|
+
"description": "The availability map file result payload",
|
|
2061
|
+
"type": "object",
|
|
2062
|
+
"properties": {
|
|
2063
|
+
"status": {
|
|
2064
|
+
"description": "The status of the validation",
|
|
2065
|
+
"type": "string",
|
|
2066
|
+
"enum": [
|
|
2067
|
+
"success",
|
|
2068
|
+
"error"
|
|
2069
|
+
]
|
|
2070
|
+
},
|
|
2071
|
+
"rules_parsed_count": {
|
|
2072
|
+
"description": "The number of rules successfully parsed",
|
|
2073
|
+
"type": "number"
|
|
2074
|
+
},
|
|
2075
|
+
"errors": {
|
|
2076
|
+
"description": "The errors found on the file",
|
|
2077
|
+
"type": "array",
|
|
2078
|
+
"items": {
|
|
2079
|
+
"$ref": "#/components/schemas/ValidateAvailabilityFileError"
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
},
|
|
2083
|
+
"required": [
|
|
2084
|
+
"status",
|
|
2085
|
+
"rules_parsed_count",
|
|
2086
|
+
"errors"
|
|
2087
|
+
],
|
|
2088
|
+
"example": {
|
|
2089
|
+
"rules_parsed_count": 8,
|
|
2090
|
+
"errors": [
|
|
2091
|
+
"File must be UTF-8 encoded",
|
|
2092
|
+
"Error on line 3 - street_number must be of type number",
|
|
2093
|
+
"Error on line 6 - start_date cant be greater than end_date"
|
|
2094
|
+
]
|
|
2095
|
+
}
|
|
2096
|
+
},
|
|
1756
2097
|
"CartDto": {
|
|
1757
2098
|
"description": "A valid cart payload from a client.",
|
|
1758
2099
|
"properties": {
|
|
@@ -1876,9 +2217,12 @@
|
|
|
1876
2217
|
"description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
|
|
1877
2218
|
"type": "array",
|
|
1878
2219
|
"items": {
|
|
1879
|
-
"
|
|
2220
|
+
"anyOf": [
|
|
1880
2221
|
{
|
|
1881
2222
|
"$ref": "#/components/schemas/PriceItemDto"
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
"$ref": "#/components/schemas/CompositePriceItemDto"
|
|
1882
2226
|
}
|
|
1883
2227
|
]
|
|
1884
2228
|
}
|
|
@@ -1894,6 +2238,10 @@
|
|
|
1894
2238
|
"type": "integer",
|
|
1895
2239
|
"description": "The quantity of products being purchased."
|
|
1896
2240
|
},
|
|
2241
|
+
"price_mappings": {
|
|
2242
|
+
"description": "Price mapping information required to compute totals",
|
|
2243
|
+
"$ref": "#/components/schemas/PriceInputMappings"
|
|
2244
|
+
},
|
|
1897
2245
|
"description": {
|
|
1898
2246
|
"type": "string",
|
|
1899
2247
|
"description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
|
|
@@ -1965,10 +2313,23 @@
|
|
|
1965
2313
|
"type": "integer",
|
|
1966
2314
|
"description": "The unit amount value"
|
|
1967
2315
|
},
|
|
2316
|
+
"unit_amount_currency": {
|
|
2317
|
+
"$ref": "#/components/schemas/Currency"
|
|
2318
|
+
},
|
|
1968
2319
|
"unit_amount_decimal": {
|
|
1969
2320
|
"description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
|
|
1970
2321
|
"type": "string"
|
|
1971
2322
|
},
|
|
2323
|
+
"pricing_model": {
|
|
2324
|
+
"type": "string",
|
|
2325
|
+
"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",
|
|
2326
|
+
"enum": [
|
|
2327
|
+
"per_unit",
|
|
2328
|
+
"tiered_graduated",
|
|
2329
|
+
"tiered_volume",
|
|
2330
|
+
"tiered_flatfee"
|
|
2331
|
+
]
|
|
2332
|
+
},
|
|
1972
2333
|
"_price": {
|
|
1973
2334
|
"description": "The snapshot of the price linked to the price item.",
|
|
1974
2335
|
"allOf": [
|
|
@@ -1977,7 +2338,10 @@
|
|
|
1977
2338
|
}
|
|
1978
2339
|
]
|
|
1979
2340
|
}
|
|
1980
|
-
}
|
|
2341
|
+
},
|
|
2342
|
+
"required": [
|
|
2343
|
+
"pricing_model"
|
|
2344
|
+
]
|
|
1981
2345
|
},
|
|
1982
2346
|
"CompositePriceItemDto": {
|
|
1983
2347
|
"allOf": [
|
|
@@ -2169,7 +2533,7 @@
|
|
|
2169
2533
|
"$ref": "#/components/schemas/OrderStatus"
|
|
2170
2534
|
},
|
|
2171
2535
|
"line_items": {
|
|
2172
|
-
"$ref": "#/components/schemas/
|
|
2536
|
+
"$ref": "#/components/schemas/PriceItemsDto"
|
|
2173
2537
|
},
|
|
2174
2538
|
"source_type": {
|
|
2175
2539
|
"type": "string",
|
|
@@ -2257,6 +2621,9 @@
|
|
|
2257
2621
|
"items": {
|
|
2258
2622
|
"$ref": "#/components/schemas/PriceItem"
|
|
2259
2623
|
}
|
|
2624
|
+
},
|
|
2625
|
+
"total_details": {
|
|
2626
|
+
"$ref": "#/components/schemas/TotalDetails"
|
|
2260
2627
|
}
|
|
2261
2628
|
}
|
|
2262
2629
|
},
|
|
@@ -2267,7 +2634,7 @@
|
|
|
2267
2634
|
"$ref": "#/components/examples/price-item"
|
|
2268
2635
|
},
|
|
2269
2636
|
"properties": {
|
|
2270
|
-
"
|
|
2637
|
+
"_id": {
|
|
2271
2638
|
"type": "string",
|
|
2272
2639
|
"description": "price item id",
|
|
2273
2640
|
"readOnly": true
|
|
@@ -2359,6 +2726,14 @@
|
|
|
2359
2726
|
}
|
|
2360
2727
|
]
|
|
2361
2728
|
}
|
|
2729
|
+
},
|
|
2730
|
+
"price_mappings": {
|
|
2731
|
+
"description": "Price mapping information required to compute totals",
|
|
2732
|
+
"$ref": "#/components/schemas/PriceInputMappings"
|
|
2733
|
+
},
|
|
2734
|
+
"on_request_approved": {
|
|
2735
|
+
"type": "boolean",
|
|
2736
|
+
"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
2737
|
}
|
|
2363
2738
|
}
|
|
2364
2739
|
},
|
|
@@ -2382,11 +2757,20 @@
|
|
|
2382
2757
|
"recurring"
|
|
2383
2758
|
]
|
|
2384
2759
|
},
|
|
2385
|
-
"
|
|
2386
|
-
"type": "
|
|
2387
|
-
"description": "
|
|
2760
|
+
"pricing_model": {
|
|
2761
|
+
"type": "string",
|
|
2762
|
+
"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",
|
|
2763
|
+
"enum": [
|
|
2764
|
+
"per_unit",
|
|
2765
|
+
"tiered_graduated",
|
|
2766
|
+
"tiered_volume",
|
|
2767
|
+
"tiered_flatfee"
|
|
2768
|
+
]
|
|
2388
2769
|
}
|
|
2389
|
-
}
|
|
2770
|
+
},
|
|
2771
|
+
"required": [
|
|
2772
|
+
"pricing_model"
|
|
2773
|
+
]
|
|
2390
2774
|
},
|
|
2391
2775
|
"TaxAmount": {
|
|
2392
2776
|
"type": "object",
|
|
@@ -2526,6 +2910,9 @@
|
|
|
2526
2910
|
"oneOf": [
|
|
2527
2911
|
{
|
|
2528
2912
|
"$ref": "#/components/schemas/PriceItem"
|
|
2913
|
+
},
|
|
2914
|
+
{
|
|
2915
|
+
"$ref": "#/components/schemas/CompositePriceItem"
|
|
2529
2916
|
}
|
|
2530
2917
|
]
|
|
2531
2918
|
}
|
|
@@ -2881,7 +3268,6 @@
|
|
|
2881
3268
|
"required": [
|
|
2882
3269
|
"type",
|
|
2883
3270
|
"rate",
|
|
2884
|
-
"behavior",
|
|
2885
3271
|
"_id",
|
|
2886
3272
|
"_title",
|
|
2887
3273
|
"_org",
|
|
@@ -2932,15 +3318,6 @@
|
|
|
2932
3318
|
"rate": {
|
|
2933
3319
|
"type": "number"
|
|
2934
3320
|
},
|
|
2935
|
-
"behavior": {
|
|
2936
|
-
"type": "string",
|
|
2937
|
-
"enum": [
|
|
2938
|
-
"Exclusive",
|
|
2939
|
-
"Inclusive",
|
|
2940
|
-
"exclusive",
|
|
2941
|
-
"inclusive"
|
|
2942
|
-
]
|
|
2943
|
-
},
|
|
2944
3321
|
"active": {
|
|
2945
3322
|
"type": "boolean"
|
|
2946
3323
|
},
|
|
@@ -2955,7 +3332,6 @@
|
|
|
2955
3332
|
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2956
3333
|
"type": "VAT",
|
|
2957
3334
|
"description": "Tax description",
|
|
2958
|
-
"behavior": "Exclusive",
|
|
2959
3335
|
"active": "true",
|
|
2960
3336
|
"region": "DE",
|
|
2961
3337
|
"region_label": "Germany",
|
|
@@ -2987,6 +3363,37 @@
|
|
|
2987
3363
|
"type": "string"
|
|
2988
3364
|
}
|
|
2989
3365
|
}
|
|
3366
|
+
},
|
|
3367
|
+
"PriceTier": {
|
|
3368
|
+
"type": "object",
|
|
3369
|
+
"properties": {
|
|
3370
|
+
"up_to": {
|
|
3371
|
+
"type": "number",
|
|
3372
|
+
"nullable": true
|
|
3373
|
+
},
|
|
3374
|
+
"flat_fee_amount": {
|
|
3375
|
+
"type": "number"
|
|
3376
|
+
},
|
|
3377
|
+
"flat_fee_amount_decimal": {
|
|
3378
|
+
"type": "string"
|
|
3379
|
+
},
|
|
3380
|
+
"unit_amount": {
|
|
3381
|
+
"type": "number"
|
|
3382
|
+
},
|
|
3383
|
+
"unit_amount_decimal": {
|
|
3384
|
+
"type": "string"
|
|
3385
|
+
},
|
|
3386
|
+
"display_mode": {
|
|
3387
|
+
"$ref": "#/components/schemas/PriceTierDisplayMode"
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
},
|
|
3391
|
+
"PriceTierDisplayMode": {
|
|
3392
|
+
"type": "string",
|
|
3393
|
+
"enum": [
|
|
3394
|
+
"hidden",
|
|
3395
|
+
"on_request"
|
|
3396
|
+
]
|
|
2990
3397
|
}
|
|
2991
3398
|
},
|
|
2992
3399
|
"examples": {
|
|
@@ -3090,10 +3497,9 @@
|
|
|
3090
3497
|
"type": "one_time",
|
|
3091
3498
|
"active": true,
|
|
3092
3499
|
"sales_tax": "standard",
|
|
3093
|
-
"
|
|
3500
|
+
"is_tax_inclusive": true,
|
|
3094
3501
|
"description": "Winter Sale",
|
|
3095
3502
|
"billing_scheme": "per_unit",
|
|
3096
|
-
"tiers_mode": "Standard",
|
|
3097
3503
|
"_created_at": "2021-11-10T18:02:58.318Z",
|
|
3098
3504
|
"_updated_at": "2021-11-10T18:02:58.318Z",
|
|
3099
3505
|
"_title": "Winter Sale"
|
|
@@ -3126,10 +3532,9 @@
|
|
|
3126
3532
|
"type": "one_time",
|
|
3127
3533
|
"active": true,
|
|
3128
3534
|
"sales_tax": "standard",
|
|
3129
|
-
"
|
|
3535
|
+
"is_tax_inclusive": true,
|
|
3130
3536
|
"description": "Winter Sale",
|
|
3131
3537
|
"billing_scheme": "per_unit",
|
|
3132
|
-
"tiers_mode": "Standard",
|
|
3133
3538
|
"_created_at": "2021-11-10T18:02:58.318Z",
|
|
3134
3539
|
"_updated_at": "2021-11-10T18:02:58.318Z",
|
|
3135
3540
|
"_title": "Winter Sale"
|
|
@@ -3178,7 +3583,6 @@
|
|
|
3178
3583
|
"tax": {
|
|
3179
3584
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3180
3585
|
"rate": "19",
|
|
3181
|
-
"behavior": "Inclusive",
|
|
3182
3586
|
"_schema": "tax",
|
|
3183
3587
|
"_org": "728",
|
|
3184
3588
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3198,7 +3602,7 @@
|
|
|
3198
3602
|
"unit_amount_currency": "EUR",
|
|
3199
3603
|
"unit_amount_decimal": "1000",
|
|
3200
3604
|
"sales_tax": "standard",
|
|
3201
|
-
"
|
|
3605
|
+
"is_tax_inclusive": true,
|
|
3202
3606
|
"price_display_in_journeys": "show_price",
|
|
3203
3607
|
"type": "one_time",
|
|
3204
3608
|
"billing_period": "weekly",
|
|
@@ -3310,7 +3714,6 @@
|
|
|
3310
3714
|
"tax": {
|
|
3311
3715
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3312
3716
|
"rate": "19",
|
|
3313
|
-
"behavior": "Inclusive",
|
|
3314
3717
|
"_schema": "tax",
|
|
3315
3718
|
"_org": "728",
|
|
3316
3719
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3330,7 +3733,7 @@
|
|
|
3330
3733
|
"unit_amount_currency": "EUR",
|
|
3331
3734
|
"unit_amount_decimal": "500",
|
|
3332
3735
|
"sales_tax": "standard",
|
|
3333
|
-
"
|
|
3736
|
+
"is_tax_inclusive": true,
|
|
3334
3737
|
"price_display_in_journeys": "show_price",
|
|
3335
3738
|
"type": "one_time",
|
|
3336
3739
|
"billing_period": "weekly",
|
|
@@ -3452,10 +3855,9 @@
|
|
|
3452
3855
|
"renewal_duration_unit": "years",
|
|
3453
3856
|
"active": true,
|
|
3454
3857
|
"sales_tax": "reduced",
|
|
3455
|
-
"
|
|
3858
|
+
"is_tax_inclusive": true,
|
|
3456
3859
|
"description": "Monthly",
|
|
3457
3860
|
"billing_scheme": "per_unit",
|
|
3458
|
-
"tiers_mode": "Standard",
|
|
3459
3861
|
"_schema": "price",
|
|
3460
3862
|
"_org": "728",
|
|
3461
3863
|
"_created_at": "2021-11-10T14:40:27.695Z",
|
|
@@ -3550,7 +3952,7 @@
|
|
|
3550
3952
|
"unit_amount_currency": "EUR",
|
|
3551
3953
|
"unit_amount_decimal": "99",
|
|
3552
3954
|
"sales_tax": "standard",
|
|
3553
|
-
"
|
|
3955
|
+
"is_tax_inclusive": true,
|
|
3554
3956
|
"price_display_in_journeys": "show_price",
|
|
3555
3957
|
"type": "recurring",
|
|
3556
3958
|
"billing_period": "yearly",
|
|
@@ -3611,7 +4013,6 @@
|
|
|
3611
4013
|
"tax": {
|
|
3612
4014
|
"_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
|
|
3613
4015
|
"rate": "19",
|
|
3614
|
-
"behavior": "Inclusive",
|
|
3615
4016
|
"_schema": "tax",
|
|
3616
4017
|
"_org": "728",
|
|
3617
4018
|
"_created_at": "2021-09-24T15:06:13.859Z",
|
|
@@ -3842,7 +4243,6 @@
|
|
|
3842
4243
|
"tax": {
|
|
3843
4244
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
3844
4245
|
"type": "VAT",
|
|
3845
|
-
"behavior": "Exclusive",
|
|
3846
4246
|
"active": true,
|
|
3847
4247
|
"region": "DE",
|
|
3848
4248
|
"_schema": "tax",
|
|
@@ -3871,7 +4271,6 @@
|
|
|
3871
4271
|
"tax": {
|
|
3872
4272
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
3873
4273
|
"type": "VAT",
|
|
3874
|
-
"behavior": "Exclusive",
|
|
3875
4274
|
"active": true,
|
|
3876
4275
|
"region": "DE",
|
|
3877
4276
|
"_schema": "tax",
|
|
@@ -3909,7 +4308,6 @@
|
|
|
3909
4308
|
"unit_amount_currency": "EUR",
|
|
3910
4309
|
"unit_amount_decimal": "100.00",
|
|
3911
4310
|
"sales_tax": "standard",
|
|
3912
|
-
"tax_behavior": "exclusive",
|
|
3913
4311
|
"price_display_in_journeys": "show_price",
|
|
3914
4312
|
"type": "one_time",
|
|
3915
4313
|
"_schema": "price",
|
|
@@ -3944,7 +4342,7 @@
|
|
|
3944
4342
|
"unit_amount_currency": "EUR",
|
|
3945
4343
|
"unit_amount_decimal": "100.00",
|
|
3946
4344
|
"sales_tax": "standard",
|
|
3947
|
-
"
|
|
4345
|
+
"is_tax_inclusive": false,
|
|
3948
4346
|
"price_display_in_journeys": "show_price",
|
|
3949
4347
|
"type": "one_time",
|
|
3950
4348
|
"_schema": "price",
|
|
@@ -3997,7 +4395,7 @@
|
|
|
3997
4395
|
"unit_amount_currency": "EUR",
|
|
3998
4396
|
"unit_amount_decimal": "555666.77",
|
|
3999
4397
|
"sales_tax": "standard",
|
|
4000
|
-
"
|
|
4398
|
+
"is_tax_inclusive": true,
|
|
4001
4399
|
"price_display_in_journeys": "show_as_starting_price",
|
|
4002
4400
|
"type": "one_time",
|
|
4003
4401
|
"_schema": "price",
|
|
@@ -4102,7 +4500,6 @@
|
|
|
4102
4500
|
"tax": {
|
|
4103
4501
|
"_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
|
|
4104
4502
|
"type": "VAT",
|
|
4105
|
-
"behavior": "Exclusive",
|
|
4106
4503
|
"active": true,
|
|
4107
4504
|
"region": "DE",
|
|
4108
4505
|
"_schema": "tax",
|
|
@@ -4328,7 +4725,7 @@
|
|
|
4328
4725
|
"unit_amount_currency": "EUR",
|
|
4329
4726
|
"unit_amount_decimal": "1000",
|
|
4330
4727
|
"sales_tax": "standard",
|
|
4331
|
-
"
|
|
4728
|
+
"is_tax_inclusive": true,
|
|
4332
4729
|
"price_display_in_journeys": "show_price",
|
|
4333
4730
|
"type": "one_time",
|
|
4334
4731
|
"billing_period": "weekly",
|
|
@@ -4350,7 +4747,8 @@
|
|
|
4350
4747
|
"_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
|
|
4351
4748
|
"_org": "728",
|
|
4352
4749
|
"_created_at": "2022-06-03T16:04:10.369Z",
|
|
4353
|
-
"_updated_at": "2022-06-03T16:04:10.369Z"
|
|
4750
|
+
"_updated_at": "2022-06-03T16:04:10.369Z",
|
|
4751
|
+
"pricing_model": "per_unit"
|
|
4354
4752
|
}
|
|
4355
4753
|
},
|
|
4356
4754
|
"composite-price": {
|
|
@@ -4376,7 +4774,7 @@
|
|
|
4376
4774
|
"unit_amount_currency": "EUR",
|
|
4377
4775
|
"unit_amount_decimal": "100.00",
|
|
4378
4776
|
"sales_tax": "standard",
|
|
4379
|
-
"
|
|
4777
|
+
"is_tax_inclusive": false,
|
|
4380
4778
|
"price_display_in_journeys": "show_price",
|
|
4381
4779
|
"type": "one_time",
|
|
4382
4780
|
"_schema": "price",
|
|
@@ -4411,7 +4809,7 @@
|
|
|
4411
4809
|
"unit_amount_currency": "EUR",
|
|
4412
4810
|
"unit_amount_decimal": "100.00",
|
|
4413
4811
|
"sales_tax": "standard",
|
|
4414
|
-
"
|
|
4812
|
+
"is_tax_inclusive": false,
|
|
4415
4813
|
"price_display_in_journeys": "show_price",
|
|
4416
4814
|
"type": "one_time",
|
|
4417
4815
|
"_schema": "price",
|
|
@@ -4452,7 +4850,6 @@
|
|
|
4452
4850
|
"amount": 600,
|
|
4453
4851
|
"tax": {
|
|
4454
4852
|
"active": true,
|
|
4455
|
-
"behavior": "Exclusive",
|
|
4456
4853
|
"description": "Without Behaviour",
|
|
4457
4854
|
"rate": 6,
|
|
4458
4855
|
"region": "DE",
|
|
@@ -4473,7 +4870,7 @@
|
|
|
4473
4870
|
"unit_amount_currency": "EUR",
|
|
4474
4871
|
"unit_amount_decimal": "100.00",
|
|
4475
4872
|
"sales_tax": "standard",
|
|
4476
|
-
"
|
|
4873
|
+
"is_tax_inclusive": false,
|
|
4477
4874
|
"price_display_in_journeys": "show_price",
|
|
4478
4875
|
"type": "one_time",
|
|
4479
4876
|
"billing_period": "weekly",
|
|
@@ -4495,7 +4892,8 @@
|
|
|
4495
4892
|
"_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
|
|
4496
4893
|
"_org": "728",
|
|
4497
4894
|
"_created_at": "2022-06-03T16:04:10.369Z",
|
|
4498
|
-
"_updated_at": "2022-06-03T16:04:10.369Z"
|
|
4895
|
+
"_updated_at": "2022-06-03T16:04:10.369Z",
|
|
4896
|
+
"pricing_model": "per_unit"
|
|
4499
4897
|
},
|
|
4500
4898
|
"_product": {
|
|
4501
4899
|
"name": "Cool box",
|