@epilot/pricing-client 3.15.0 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.json CHANGED
@@ -105,6 +105,9 @@
105
105
  {
106
106
  "url": "https://pricing-api.sls.epilot.io"
107
107
  },
108
+ {
109
+ "url": "https://pricing-api.sls.epilot.io"
110
+ },
108
111
  {
109
112
  "url": "https://pricing-api.sls.epilot.io"
110
113
  }
@@ -191,147 +194,6 @@
191
194
  }
192
195
  ]
193
196
  }
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
- }
335
197
  }
336
198
  },
337
199
  "schema": {
@@ -733,77 +595,6 @@
733
595
  }
734
596
  }
735
597
  },
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
- },
807
598
  "/v1/public/opportunity": {
808
599
  "post": {
809
600
  "deprecated": true,
@@ -933,10 +724,6 @@
933
724
  "$ref": "#/components/examples/product"
934
725
  },
935
726
  "properties": {
936
- "description": {
937
- "type": "string",
938
- "description": "The description for the product"
939
- },
940
727
  "code": {
941
728
  "type": "string",
942
729
  "description": "The product code"
@@ -1481,31 +1268,17 @@
1481
1268
  "description": "The flag for prices that contain price components.",
1482
1269
  "type": "boolean"
1483
1270
  },
1484
- "pricing_model": {
1271
+ "billing_scheme": {
1485
1272
  "type": "string",
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",
1273
+ "description": "Describes how to compute the price per period. Either `per_unit` or `tiered`.\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` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.\n\n⚠️ Tiered pricing is **not supported** yet.\n",
1487
1274
  "enum": [
1488
- "per_unit",
1489
- "tiered_graduated",
1490
- "tiered_volume",
1491
- "tiered_flatfee"
1275
+ "per_unit"
1492
1276
  ]
1493
1277
  },
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
- },
1501
1278
  "description": {
1502
1279
  "type": "string",
1503
1280
  "description": "A brief description of the price."
1504
1281
  },
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
- },
1509
1282
  "sales_tax": {
1510
1283
  "deprecated": true,
1511
1284
  "description": "The default tax rate applicable to the product.\nThis field is deprecated, use the new `tax` attribute.\n",
@@ -1537,9 +1310,20 @@
1537
1310
  }
1538
1311
  ]
1539
1312
  },
1540
- "is_tax_inclusive": {
1541
- "type": "boolean",
1542
- "description": "Specifies whether the price is considered `inclusive` of taxes or not."
1313
+ "tax_behavior": {
1314
+ "type": "string",
1315
+ "description": "Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.\nOne of `inclusive`, `exclusive`, or `unspecified`.\n",
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
+ ]
1543
1327
  },
1544
1328
  "type": {
1545
1329
  "type": "string",
@@ -1649,15 +1433,7 @@
1649
1433
  "kwh",
1650
1434
  "m",
1651
1435
  "m2",
1652
- "l",
1653
- "cubic-meter",
1654
- "cubic-meter-h",
1655
- "ls",
1656
- "a",
1657
- "kva",
1658
- "w",
1659
- "wp",
1660
- "kwp"
1436
+ "l"
1661
1437
  ]
1662
1438
  },
1663
1439
  {
@@ -1693,10 +1469,7 @@
1693
1469
  "type": "string"
1694
1470
  }
1695
1471
  }
1696
- },
1697
- "required": [
1698
- "pricing_model"
1699
- ]
1472
+ }
1700
1473
  },
1701
1474
  "CompositePrice": {
1702
1475
  "type": "object",
@@ -1820,65 +1593,6 @@
1820
1593
  ]
1821
1594
  }
1822
1595
  },
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
- },
1882
1596
  "CatalogSearch": {
1883
1597
  "description": "A catalog search payload",
1884
1598
  "type": "object",
@@ -2039,65 +1753,6 @@
2039
1753
  ]
2040
1754
  }
2041
1755
  },
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
- "data": {
2055
- "description": "Data related to the error",
2056
- "type": "string"
2057
- }
2058
- },
2059
- "required": [
2060
- "msg"
2061
- ]
2062
- },
2063
- "ValidateAvailabilityFileResult": {
2064
- "description": "The availability map file result payload",
2065
- "type": "object",
2066
- "properties": {
2067
- "status": {
2068
- "description": "The status of the validation",
2069
- "type": "string",
2070
- "enum": [
2071
- "success",
2072
- "error"
2073
- ]
2074
- },
2075
- "rules_parsed_count": {
2076
- "description": "The number of rules successfully parsed",
2077
- "type": "number"
2078
- },
2079
- "errors": {
2080
- "description": "The errors found on the file",
2081
- "type": "array",
2082
- "items": {
2083
- "$ref": "#/components/schemas/ValidateAvailabilityFileError"
2084
- }
2085
- }
2086
- },
2087
- "required": [
2088
- "status",
2089
- "rules_parsed_count",
2090
- "errors"
2091
- ],
2092
- "example": {
2093
- "rules_parsed_count": 8,
2094
- "errors": [
2095
- "File must be UTF-8 encoded",
2096
- "Error on line 3 - street_number must be of type number",
2097
- "Error on line 6 - start_date cant be greater than end_date"
2098
- ]
2099
- }
2100
- },
2101
1756
  "CartDto": {
2102
1757
  "description": "A valid cart payload from a client.",
2103
1758
  "properties": {
@@ -2221,12 +1876,9 @@
2221
1876
  "description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
2222
1877
  "type": "array",
2223
1878
  "items": {
2224
- "anyOf": [
1879
+ "oneOf": [
2225
1880
  {
2226
1881
  "$ref": "#/components/schemas/PriceItemDto"
2227
- },
2228
- {
2229
- "$ref": "#/components/schemas/CompositePriceItemDto"
2230
1882
  }
2231
1883
  ]
2232
1884
  }
@@ -2242,10 +1894,6 @@
2242
1894
  "type": "integer",
2243
1895
  "description": "The quantity of products being purchased."
2244
1896
  },
2245
- "price_mappings": {
2246
- "description": "Price mapping information required to compute totals",
2247
- "$ref": "#/components/schemas/PriceInputMappings"
2248
- },
2249
1897
  "description": {
2250
1898
  "type": "string",
2251
1899
  "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
@@ -2317,27 +1965,10 @@
2317
1965
  "type": "integer",
2318
1966
  "description": "The unit amount value"
2319
1967
  },
2320
- "unit_amount_gross": {
2321
- "type": "integer",
2322
- "description": "The unit gross amount value."
2323
- },
2324
- "unit_amount_currency": {
2325
- "$ref": "#/components/schemas/Currency"
2326
- },
2327
1968
  "unit_amount_decimal": {
2328
1969
  "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2329
1970
  "type": "string"
2330
1971
  },
2331
- "pricing_model": {
2332
- "type": "string",
2333
- "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",
2334
- "enum": [
2335
- "per_unit",
2336
- "tiered_graduated",
2337
- "tiered_volume",
2338
- "tiered_flatfee"
2339
- ]
2340
- },
2341
1972
  "_price": {
2342
1973
  "description": "The snapshot of the price linked to the price item.",
2343
1974
  "allOf": [
@@ -2346,10 +1977,7 @@
2346
1977
  }
2347
1978
  ]
2348
1979
  }
2349
- },
2350
- "required": [
2351
- "pricing_model"
2352
- ]
1980
+ }
2353
1981
  },
2354
1982
  "CompositePriceItemDto": {
2355
1983
  "allOf": [
@@ -2428,14 +2056,7 @@
2428
2056
  },
2429
2057
  "billing_period": {
2430
2058
  "type": "string",
2431
- "description": "The price billing period.",
2432
- "enum": [
2433
- "weekly",
2434
- "monthly",
2435
- "every_quarter",
2436
- "every_6_months",
2437
- "yearly"
2438
- ]
2059
+ "description": "The price billing period."
2439
2060
  },
2440
2061
  "amount_subtotal": {
2441
2062
  "type": "integer",
@@ -2445,10 +2066,6 @@
2445
2066
  "type": "integer",
2446
2067
  "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2447
2068
  },
2448
- "unit_amount_gross": {
2449
- "type": "integer",
2450
- "description": "The unit gross amount value."
2451
- },
2452
2069
  "amount_tax": {
2453
2070
  "type": "integer",
2454
2071
  "description": "Total of all items taxes, with same recurrence."
@@ -2552,7 +2169,7 @@
2552
2169
  "$ref": "#/components/schemas/OrderStatus"
2553
2170
  },
2554
2171
  "line_items": {
2555
- "$ref": "#/components/schemas/PriceItemsDto"
2172
+ "$ref": "#/components/schemas/PriceItems"
2556
2173
  },
2557
2174
  "source_type": {
2558
2175
  "type": "string",
@@ -2640,9 +2257,6 @@
2640
2257
  "items": {
2641
2258
  "$ref": "#/components/schemas/PriceItem"
2642
2259
  }
2643
- },
2644
- "total_details": {
2645
- "$ref": "#/components/schemas/TotalDetails"
2646
2260
  }
2647
2261
  }
2648
2262
  },
@@ -2653,7 +2267,7 @@
2653
2267
  "$ref": "#/components/examples/price-item"
2654
2268
  },
2655
2269
  "properties": {
2656
- "_id": {
2270
+ "id": {
2657
2271
  "type": "string",
2658
2272
  "description": "price item id",
2659
2273
  "readOnly": true
@@ -2666,20 +2280,11 @@
2666
2280
  "description": "The unit amount value",
2667
2281
  "readOnly": true
2668
2282
  },
2669
- "unit_amount_gross": {
2670
- "type": "integer",
2671
- "description": "The unit gross amount value.",
2672
- "readOnly": true
2673
- },
2674
2283
  "amount_subtotal": {
2675
2284
  "type": "integer",
2676
2285
  "description": "Total before any (discounts or) taxes are applied.",
2677
2286
  "readOnly": true
2678
2287
  },
2679
- "amount_tax": {
2680
- "type": "integer",
2681
- "description": "Total tax amount for this line item."
2682
- },
2683
2288
  "unit_amount_net": {
2684
2289
  "type": "integer",
2685
2290
  "description": "Net unit amount without taxes or discounts.",
@@ -2754,14 +2359,6 @@
2754
2359
  }
2755
2360
  ]
2756
2361
  }
2757
- },
2758
- "price_mappings": {
2759
- "description": "Price mapping information required to compute totals",
2760
- "$ref": "#/components/schemas/PriceInputMappings"
2761
- },
2762
- "on_request_approved": {
2763
- "type": "boolean",
2764
- "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'."
2765
2362
  }
2766
2363
  }
2767
2364
  },
@@ -2785,20 +2382,11 @@
2785
2382
  "recurring"
2786
2383
  ]
2787
2384
  },
2788
- "pricing_model": {
2789
- "type": "string",
2790
- "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",
2791
- "enum": [
2792
- "per_unit",
2793
- "tiered_graduated",
2794
- "tiered_volume",
2795
- "tiered_flatfee"
2796
- ]
2385
+ "on_request_approved": {
2386
+ "type": "boolean",
2387
+ "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'."
2797
2388
  }
2798
- },
2799
- "required": [
2800
- "pricing_model"
2801
- ]
2389
+ }
2802
2390
  },
2803
2391
  "TaxAmount": {
2804
2392
  "type": "object",
@@ -2865,14 +2453,7 @@
2865
2453
  },
2866
2454
  "billing_period": {
2867
2455
  "type": "string",
2868
- "description": "The price billing period.",
2869
- "enum": [
2870
- "weekly",
2871
- "monthly",
2872
- "every_quarter",
2873
- "every_6_months",
2874
- "yearly"
2875
- ]
2456
+ "description": "The price billing period."
2876
2457
  },
2877
2458
  "amount_subtotal": {
2878
2459
  "type": "integer",
@@ -2882,17 +2463,9 @@
2882
2463
  "type": "integer",
2883
2464
  "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2884
2465
  },
2885
- "unit_amount_gross": {
2886
- "type": "integer",
2887
- "description": "The unit gross amount value."
2888
- },
2889
2466
  "amount_tax": {
2890
2467
  "type": "integer",
2891
2468
  "description": "Total of all items taxes, with same recurrence."
2892
- },
2893
- "currency": {
2894
- "$ref": "#/components/schemas/Currency",
2895
- "description": "Currency"
2896
2469
  }
2897
2470
  },
2898
2471
  "required": [
@@ -2953,9 +2526,6 @@
2953
2526
  "oneOf": [
2954
2527
  {
2955
2528
  "$ref": "#/components/schemas/PriceItem"
2956
- },
2957
- {
2958
- "$ref": "#/components/schemas/CompositePriceItem"
2959
2529
  }
2960
2530
  ]
2961
2531
  }
@@ -2968,19 +2538,8 @@
2968
2538
  "type": "integer",
2969
2539
  "description": "Total of all items after (discounts and) taxes are applied."
2970
2540
  },
2971
- "unit_amount_gross": {
2972
- "type": "integer",
2973
- "description": "The unit gross amount value."
2974
- },
2975
- "amount_tax": {
2976
- "type": "integer",
2977
- "description": "This is the sum of all the price item tax amounts."
2978
- },
2979
2541
  "total_details": {
2980
2542
  "$ref": "#/components/schemas/TotalDetails"
2981
- },
2982
- "currency": {
2983
- "$ref": "#/components/schemas/Currency"
2984
2543
  }
2985
2544
  }
2986
2545
  },
@@ -2991,7 +2550,8 @@
2991
2550
  "monthly",
2992
2551
  "every_quarter",
2993
2552
  "every_6_months",
2994
- "yearly"
2553
+ "yearly",
2554
+ "one_time"
2995
2555
  ]
2996
2556
  },
2997
2557
  "SalesTax": {
@@ -3321,6 +2881,7 @@
3321
2881
  "required": [
3322
2882
  "type",
3323
2883
  "rate",
2884
+ "behavior",
3324
2885
  "_id",
3325
2886
  "_title",
3326
2887
  "_org",
@@ -3371,6 +2932,15 @@
3371
2932
  "rate": {
3372
2933
  "type": "number"
3373
2934
  },
2935
+ "behavior": {
2936
+ "type": "string",
2937
+ "enum": [
2938
+ "Exclusive",
2939
+ "Inclusive",
2940
+ "exclusive",
2941
+ "inclusive"
2942
+ ]
2943
+ },
3374
2944
  "active": {
3375
2945
  "type": "boolean"
3376
2946
  },
@@ -3385,6 +2955,7 @@
3385
2955
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3386
2956
  "type": "VAT",
3387
2957
  "description": "Tax description",
2958
+ "behavior": "Exclusive",
3388
2959
  "active": "true",
3389
2960
  "region": "DE",
3390
2961
  "region_label": "Germany",
@@ -3416,37 +2987,6 @@
3416
2987
  "type": "string"
3417
2988
  }
3418
2989
  }
3419
- },
3420
- "PriceTier": {
3421
- "type": "object",
3422
- "properties": {
3423
- "up_to": {
3424
- "type": "number",
3425
- "nullable": true
3426
- },
3427
- "flat_fee_amount": {
3428
- "type": "number"
3429
- },
3430
- "flat_fee_amount_decimal": {
3431
- "type": "string"
3432
- },
3433
- "unit_amount": {
3434
- "type": "number"
3435
- },
3436
- "unit_amount_decimal": {
3437
- "type": "string"
3438
- },
3439
- "display_mode": {
3440
- "$ref": "#/components/schemas/PriceTierDisplayMode"
3441
- }
3442
- }
3443
- },
3444
- "PriceTierDisplayMode": {
3445
- "type": "string",
3446
- "enum": [
3447
- "hidden",
3448
- "on_request"
3449
- ]
3450
2990
  }
3451
2991
  },
3452
2992
  "examples": {
@@ -3550,9 +3090,10 @@
3550
3090
  "type": "one_time",
3551
3091
  "active": true,
3552
3092
  "sales_tax": "standard",
3553
- "is_tax_inclusive": true,
3093
+ "tax_behavior": "inclusive",
3554
3094
  "description": "Winter Sale",
3555
3095
  "billing_scheme": "per_unit",
3096
+ "tiers_mode": "Standard",
3556
3097
  "_created_at": "2021-11-10T18:02:58.318Z",
3557
3098
  "_updated_at": "2021-11-10T18:02:58.318Z",
3558
3099
  "_title": "Winter Sale"
@@ -3585,9 +3126,10 @@
3585
3126
  "type": "one_time",
3586
3127
  "active": true,
3587
3128
  "sales_tax": "standard",
3588
- "is_tax_inclusive": true,
3129
+ "tax_behavior": "inclusive",
3589
3130
  "description": "Winter Sale",
3590
3131
  "billing_scheme": "per_unit",
3132
+ "tiers_mode": "Standard",
3591
3133
  "_created_at": "2021-11-10T18:02:58.318Z",
3592
3134
  "_updated_at": "2021-11-10T18:02:58.318Z",
3593
3135
  "_title": "Winter Sale"
@@ -3636,6 +3178,7 @@
3636
3178
  "tax": {
3637
3179
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3638
3180
  "rate": "19",
3181
+ "behavior": "Inclusive",
3639
3182
  "_schema": "tax",
3640
3183
  "_org": "728",
3641
3184
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3655,7 +3198,7 @@
3655
3198
  "unit_amount_currency": "EUR",
3656
3199
  "unit_amount_decimal": "1000",
3657
3200
  "sales_tax": "standard",
3658
- "is_tax_inclusive": true,
3201
+ "tax_behavior": "inclusive",
3659
3202
  "price_display_in_journeys": "show_price",
3660
3203
  "type": "one_time",
3661
3204
  "billing_period": "weekly",
@@ -3767,6 +3310,7 @@
3767
3310
  "tax": {
3768
3311
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3769
3312
  "rate": "19",
3313
+ "behavior": "Inclusive",
3770
3314
  "_schema": "tax",
3771
3315
  "_org": "728",
3772
3316
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3786,7 +3330,7 @@
3786
3330
  "unit_amount_currency": "EUR",
3787
3331
  "unit_amount_decimal": "500",
3788
3332
  "sales_tax": "standard",
3789
- "is_tax_inclusive": true,
3333
+ "tax_behavior": "inclusive",
3790
3334
  "price_display_in_journeys": "show_price",
3791
3335
  "type": "one_time",
3792
3336
  "billing_period": "weekly",
@@ -3908,9 +3452,10 @@
3908
3452
  "renewal_duration_unit": "years",
3909
3453
  "active": true,
3910
3454
  "sales_tax": "reduced",
3911
- "is_tax_inclusive": true,
3455
+ "tax_behavior": "inclusive",
3912
3456
  "description": "Monthly",
3913
3457
  "billing_scheme": "per_unit",
3458
+ "tiers_mode": "Standard",
3914
3459
  "_schema": "price",
3915
3460
  "_org": "728",
3916
3461
  "_created_at": "2021-11-10T14:40:27.695Z",
@@ -4005,7 +3550,7 @@
4005
3550
  "unit_amount_currency": "EUR",
4006
3551
  "unit_amount_decimal": "99",
4007
3552
  "sales_tax": "standard",
4008
- "is_tax_inclusive": true,
3553
+ "tax_behavior": "inclusive",
4009
3554
  "price_display_in_journeys": "show_price",
4010
3555
  "type": "recurring",
4011
3556
  "billing_period": "yearly",
@@ -4066,6 +3611,7 @@
4066
3611
  "tax": {
4067
3612
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
4068
3613
  "rate": "19",
3614
+ "behavior": "Inclusive",
4069
3615
  "_schema": "tax",
4070
3616
  "_org": "728",
4071
3617
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -4296,6 +3842,7 @@
4296
3842
  "tax": {
4297
3843
  "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4298
3844
  "type": "VAT",
3845
+ "behavior": "Exclusive",
4299
3846
  "active": true,
4300
3847
  "region": "DE",
4301
3848
  "_schema": "tax",
@@ -4324,6 +3871,7 @@
4324
3871
  "tax": {
4325
3872
  "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4326
3873
  "type": "VAT",
3874
+ "behavior": "Exclusive",
4327
3875
  "active": true,
4328
3876
  "region": "DE",
4329
3877
  "_schema": "tax",
@@ -4361,6 +3909,7 @@
4361
3909
  "unit_amount_currency": "EUR",
4362
3910
  "unit_amount_decimal": "100.00",
4363
3911
  "sales_tax": "standard",
3912
+ "tax_behavior": "exclusive",
4364
3913
  "price_display_in_journeys": "show_price",
4365
3914
  "type": "one_time",
4366
3915
  "_schema": "price",
@@ -4395,7 +3944,7 @@
4395
3944
  "unit_amount_currency": "EUR",
4396
3945
  "unit_amount_decimal": "100.00",
4397
3946
  "sales_tax": "standard",
4398
- "is_tax_inclusive": false,
3947
+ "tax_behavior": "exclusive",
4399
3948
  "price_display_in_journeys": "show_price",
4400
3949
  "type": "one_time",
4401
3950
  "_schema": "price",
@@ -4448,7 +3997,7 @@
4448
3997
  "unit_amount_currency": "EUR",
4449
3998
  "unit_amount_decimal": "555666.77",
4450
3999
  "sales_tax": "standard",
4451
- "is_tax_inclusive": true,
4000
+ "tax_behavior": "inclusive",
4452
4001
  "price_display_in_journeys": "show_as_starting_price",
4453
4002
  "type": "one_time",
4454
4003
  "_schema": "price",
@@ -4553,6 +4102,7 @@
4553
4102
  "tax": {
4554
4103
  "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4555
4104
  "type": "VAT",
4105
+ "behavior": "Exclusive",
4556
4106
  "active": true,
4557
4107
  "region": "DE",
4558
4108
  "_schema": "tax",
@@ -4778,7 +4328,7 @@
4778
4328
  "unit_amount_currency": "EUR",
4779
4329
  "unit_amount_decimal": "1000",
4780
4330
  "sales_tax": "standard",
4781
- "is_tax_inclusive": true,
4331
+ "tax_behavior": "inclusive",
4782
4332
  "price_display_in_journeys": "show_price",
4783
4333
  "type": "one_time",
4784
4334
  "billing_period": "weekly",
@@ -4800,8 +4350,7 @@
4800
4350
  "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
4801
4351
  "_org": "728",
4802
4352
  "_created_at": "2022-06-03T16:04:10.369Z",
4803
- "_updated_at": "2022-06-03T16:04:10.369Z",
4804
- "pricing_model": "per_unit"
4353
+ "_updated_at": "2022-06-03T16:04:10.369Z"
4805
4354
  }
4806
4355
  },
4807
4356
  "composite-price": {
@@ -4827,7 +4376,7 @@
4827
4376
  "unit_amount_currency": "EUR",
4828
4377
  "unit_amount_decimal": "100.00",
4829
4378
  "sales_tax": "standard",
4830
- "is_tax_inclusive": false,
4379
+ "tax_behavior": "exclusive",
4831
4380
  "price_display_in_journeys": "show_price",
4832
4381
  "type": "one_time",
4833
4382
  "_schema": "price",
@@ -4862,7 +4411,7 @@
4862
4411
  "unit_amount_currency": "EUR",
4863
4412
  "unit_amount_decimal": "100.00",
4864
4413
  "sales_tax": "standard",
4865
- "is_tax_inclusive": false,
4414
+ "tax_behavior": "exclusive",
4866
4415
  "price_display_in_journeys": "show_price",
4867
4416
  "type": "one_time",
4868
4417
  "_schema": "price",
@@ -4903,6 +4452,7 @@
4903
4452
  "amount": 600,
4904
4453
  "tax": {
4905
4454
  "active": true,
4455
+ "behavior": "Exclusive",
4906
4456
  "description": "Without Behaviour",
4907
4457
  "rate": 6,
4908
4458
  "region": "DE",
@@ -4923,7 +4473,7 @@
4923
4473
  "unit_amount_currency": "EUR",
4924
4474
  "unit_amount_decimal": "100.00",
4925
4475
  "sales_tax": "standard",
4926
- "is_tax_inclusive": false,
4476
+ "tax_behavior": "exclusive",
4927
4477
  "price_display_in_journeys": "show_price",
4928
4478
  "type": "one_time",
4929
4479
  "billing_period": "weekly",
@@ -4945,8 +4495,7 @@
4945
4495
  "_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
4946
4496
  "_org": "728",
4947
4497
  "_created_at": "2022-06-03T16:04:10.369Z",
4948
- "_updated_at": "2022-06-03T16:04:10.369Z",
4949
- "pricing_model": "per_unit"
4498
+ "_updated_at": "2022-06-03T16:04:10.369Z"
4950
4499
  },
4951
4500
  "_product": {
4952
4501
  "name": "Cool box",