@epilot/pricing-client 3.16.2 → 3.17.1

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,26 +1965,9 @@
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
- "unit_amount_decimal": {
2328
- "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2329
- "type": "string"
2330
- },
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
- ]
1968
+ "unit_amount_decimal": {
1969
+ "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
1970
+ "type": "string"
2340
1971
  },
2341
1972
  "_price": {
2342
1973
  "description": "The snapshot of the price linked to the price item.",
@@ -2346,30 +1977,6 @@
2346
1977
  }
2347
1978
  ]
2348
1979
  }
2349
- },
2350
- "required": [
2351
- "pricing_model"
2352
- ]
2353
- },
2354
- "CompositePriceItemDto": {
2355
- "allOf": [
2356
- {
2357
- "$ref": "#/components/schemas/BasePriceItemDto"
2358
- }
2359
- ],
2360
- "description": "Represents a composite price input to the pricing library.",
2361
- "type": "object",
2362
- "properties": {
2363
- "item_components": {
2364
- "type": "array",
2365
- "description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).",
2366
- "items": {
2367
- "$ref": "#/components/schemas/PriceItemDto"
2368
- }
2369
- },
2370
- "_price": {
2371
- "$ref": "#/components/schemas/CompositePrice"
2372
- }
2373
1980
  }
2374
1981
  },
2375
1982
  "TaxAmountDto": {
@@ -2421,11 +2028,6 @@
2421
2028
  "RecurrenceAmountDto": {
2422
2029
  "type": "object",
2423
2030
  "description": "An amount associated with a specific recurrence.",
2424
- "allOf": [
2425
- {
2426
- "$ref": "#/components/schemas/Amounts"
2427
- }
2428
- ],
2429
2031
  "properties": {
2430
2032
  "type": {
2431
2033
  "type": "string",
@@ -2433,18 +2035,15 @@
2433
2035
  },
2434
2036
  "billing_period": {
2435
2037
  "type": "string",
2436
- "description": "The price billing period.",
2437
- "enum": [
2438
- "weekly",
2439
- "monthly",
2440
- "every_quarter",
2441
- "every_6_months",
2442
- "yearly"
2443
- ]
2038
+ "description": "The price billing period."
2039
+ },
2040
+ "amount_subtotal": {
2041
+ "type": "integer",
2042
+ "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
2444
2043
  },
2445
- "unit_amount_gross": {
2044
+ "amount_total": {
2446
2045
  "type": "integer",
2447
- "description": "The unit gross amount value."
2046
+ "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2448
2047
  },
2449
2048
  "amount_tax": {
2450
2049
  "type": "integer",
@@ -2453,68 +2052,9 @@
2453
2052
  },
2454
2053
  "required": [
2455
2054
  "amount_subtotal",
2456
- "amount_total",
2457
- "amount_subtotal_decimal",
2458
- "amount_total_decimal"
2055
+ "amount_total"
2459
2056
  ]
2460
2057
  },
2461
- "Cart": {
2462
- "description": "Supports shopping for products and services until ready for checkout.",
2463
- "allOf": [
2464
- {
2465
- "$ref": "#/components/schemas/Amounts"
2466
- }
2467
- ],
2468
- "properties": {
2469
- "id": {
2470
- "type": "string",
2471
- "description": "The cart identifier"
2472
- },
2473
- "org_id": {
2474
- "type": "string",
2475
- "description": "The user's Organization Id the cart belongs to",
2476
- "readOnly": true
2477
- },
2478
- "status": {
2479
- "enum": [
2480
- "open",
2481
- "complete",
2482
- "expired"
2483
- ],
2484
- "type": "string",
2485
- "readOnly": true,
2486
- "description": "The status of the Cart:\n- open - the cart checkout is still in progress. Payment processing has not started\n- complete - the cart checkout is complete. Payment processing may still be in progress\n- expired - the cart checkout has expired. No further processing will occur\n"
2487
- },
2488
- "customer": {
2489
- "$ref": "#/components/schemas/Customer"
2490
- },
2491
- "billing_address": {
2492
- "$ref": "#/components/schemas/Address"
2493
- },
2494
- "delivery_address": {
2495
- "$ref": "#/components/schemas/Address"
2496
- },
2497
- "metadata": {
2498
- "$ref": "#/components/schemas/MetaData"
2499
- },
2500
- "line_items": {
2501
- "$ref": "#/components/schemas/PriceItems"
2502
- },
2503
- "total_details": {
2504
- "$ref": "#/components/schemas/TotalDetails"
2505
- },
2506
- "created_at": {
2507
- "readOnly": true,
2508
- "type": "string",
2509
- "format": "date-time"
2510
- },
2511
- "updated_at": {
2512
- "readOnly": true,
2513
- "type": "string",
2514
- "format": "date-time"
2515
- }
2516
- }
2517
- },
2518
2058
  "Currency": {
2519
2059
  "type": "string",
2520
2060
  "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.\nISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html\n",
@@ -2546,7 +2086,7 @@
2546
2086
  "$ref": "#/components/schemas/OrderStatus"
2547
2087
  },
2548
2088
  "line_items": {
2549
- "$ref": "#/components/schemas/PriceItemsDto"
2089
+ "$ref": "#/components/schemas/PriceItems"
2550
2090
  },
2551
2091
  "source_type": {
2552
2092
  "type": "string",
@@ -2634,9 +2174,6 @@
2634
2174
  "items": {
2635
2175
  "$ref": "#/components/schemas/PriceItem"
2636
2176
  }
2637
- },
2638
- "total_details": {
2639
- "$ref": "#/components/schemas/TotalDetails"
2640
2177
  }
2641
2178
  }
2642
2179
  },
@@ -2646,13 +2183,8 @@
2646
2183
  "example": {
2647
2184
  "$ref": "#/components/examples/price-item"
2648
2185
  },
2649
- "allOf": [
2650
- {
2651
- "$ref": "#/components/schemas/Amounts"
2652
- }
2653
- ],
2654
2186
  "properties": {
2655
- "_id": {
2187
+ "id": {
2656
2188
  "type": "string",
2657
2189
  "description": "price item id",
2658
2190
  "readOnly": true
@@ -2665,15 +2197,11 @@
2665
2197
  "description": "The unit amount value",
2666
2198
  "readOnly": true
2667
2199
  },
2668
- "unit_amount_gross": {
2200
+ "amount_subtotal": {
2669
2201
  "type": "integer",
2670
- "description": "The unit gross amount value.",
2202
+ "description": "Total before any (discounts or) taxes are applied.",
2671
2203
  "readOnly": true
2672
2204
  },
2673
- "amount_tax": {
2674
- "type": "integer",
2675
- "description": "Total tax amount for this line item."
2676
- },
2677
2205
  "unit_amount_net": {
2678
2206
  "type": "integer",
2679
2207
  "description": "Net unit amount without taxes or discounts.",
@@ -2683,6 +2211,11 @@
2683
2211
  "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2684
2212
  "type": "string"
2685
2213
  },
2214
+ "amount_total": {
2215
+ "type": "integer",
2216
+ "description": "Total after (discounts and) taxes.",
2217
+ "readOnly": true
2218
+ },
2686
2219
  "currency": {
2687
2220
  "$ref": "#/components/schemas/Currency"
2688
2221
  },
@@ -2743,35 +2276,6 @@
2743
2276
  }
2744
2277
  ]
2745
2278
  }
2746
- },
2747
- "price_mappings": {
2748
- "description": "Price mapping information required to compute totals",
2749
- "$ref": "#/components/schemas/PriceInputMappings"
2750
- },
2751
- "on_request_approved": {
2752
- "type": "boolean",
2753
- "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'."
2754
- }
2755
- }
2756
- },
2757
- "Amounts": {
2758
- "type": "object",
2759
- "properties": {
2760
- "amount_subtotal": {
2761
- "type": "integer",
2762
- "description": "Total of all items before (discounts or) taxes are applied."
2763
- },
2764
- "amount_subtotal_decimal": {
2765
- "type": "string",
2766
- "description": "Total of all items before (discounts or) taxes are applied, as a string with all the decimal places."
2767
- },
2768
- "amount_total": {
2769
- "type": "integer",
2770
- "description": "Total of all items after (discounts and) taxes are applied."
2771
- },
2772
- "amount_total_decimal": {
2773
- "type": "string",
2774
- "description": "Total of all items after (discounts and) taxes are applied, as a string with all the decimal places."
2775
2279
  }
2776
2280
  }
2777
2281
  },
@@ -2795,20 +2299,11 @@
2795
2299
  "recurring"
2796
2300
  ]
2797
2301
  },
2798
- "pricing_model": {
2799
- "type": "string",
2800
- "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",
2801
- "enum": [
2802
- "per_unit",
2803
- "tiered_graduated",
2804
- "tiered_volume",
2805
- "tiered_flatfee"
2806
- ]
2302
+ "on_request_approved": {
2303
+ "type": "boolean",
2304
+ "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'."
2807
2305
  }
2808
- },
2809
- "required": [
2810
- "pricing_model"
2811
- ]
2306
+ }
2812
2307
  },
2813
2308
  "TaxAmount": {
2814
2309
  "type": "object",
@@ -2868,11 +2363,6 @@
2868
2363
  "type": "object",
2869
2364
  "description": "An amount associated with a specific recurrence.",
2870
2365
  "readOnly": true,
2871
- "allOf": [
2872
- {
2873
- "$ref": "#/components/schemas/Amounts"
2874
- }
2875
- ],
2876
2366
  "properties": {
2877
2367
  "type": {
2878
2368
  "type": "string",
@@ -2880,33 +2370,24 @@
2880
2370
  },
2881
2371
  "billing_period": {
2882
2372
  "type": "string",
2883
- "description": "The price billing period.",
2884
- "enum": [
2885
- "weekly",
2886
- "monthly",
2887
- "every_quarter",
2888
- "every_6_months",
2889
- "yearly"
2890
- ]
2373
+ "description": "The price billing period."
2374
+ },
2375
+ "amount_subtotal": {
2376
+ "type": "integer",
2377
+ "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
2891
2378
  },
2892
- "unit_amount_gross": {
2379
+ "amount_total": {
2893
2380
  "type": "integer",
2894
- "description": "The unit gross amount value."
2381
+ "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2895
2382
  },
2896
2383
  "amount_tax": {
2897
2384
  "type": "integer",
2898
2385
  "description": "Total of all items taxes, with same recurrence."
2899
- },
2900
- "currency": {
2901
- "$ref": "#/components/schemas/Currency",
2902
- "description": "Currency"
2903
2386
  }
2904
2387
  },
2905
2388
  "required": [
2906
2389
  "amount_subtotal",
2907
- "amount_total",
2908
- "amount_subtotal_decimal",
2909
- "amount_total_decimal"
2390
+ "amount_total"
2910
2391
  ]
2911
2392
  },
2912
2393
  "TotalDetails": {
@@ -2952,47 +2433,6 @@
2952
2433
  }
2953
2434
  }
2954
2435
  },
2955
- "PricingDetails": {
2956
- "type": "object",
2957
- "description": "The result from the calculation of a set of price items.",
2958
- "properties": {
2959
- "items": {
2960
- "type": "array",
2961
- "items": {
2962
- "oneOf": [
2963
- {
2964
- "$ref": "#/components/schemas/PriceItem"
2965
- },
2966
- {
2967
- "$ref": "#/components/schemas/CompositePriceItem"
2968
- }
2969
- ]
2970
- }
2971
- },
2972
- "amount_subtotal": {
2973
- "type": "integer",
2974
- "description": "Total of all items before (discounts or) taxes are applied."
2975
- },
2976
- "amount_total": {
2977
- "type": "integer",
2978
- "description": "Total of all items after (discounts and) taxes are applied."
2979
- },
2980
- "unit_amount_gross": {
2981
- "type": "integer",
2982
- "description": "The unit gross amount value."
2983
- },
2984
- "amount_tax": {
2985
- "type": "integer",
2986
- "description": "This is the sum of all the price item tax amounts."
2987
- },
2988
- "total_details": {
2989
- "$ref": "#/components/schemas/TotalDetails"
2990
- },
2991
- "currency": {
2992
- "$ref": "#/components/schemas/Currency"
2993
- }
2994
- }
2995
- },
2996
2436
  "BillingPeriod": {
2997
2437
  "type": "string",
2998
2438
  "enum": [
@@ -3000,7 +2440,8 @@
3000
2440
  "monthly",
3001
2441
  "every_quarter",
3002
2442
  "every_6_months",
3003
- "yearly"
2443
+ "yearly",
2444
+ "one_time"
3004
2445
  ]
3005
2446
  },
3006
2447
  "SalesTax": {
@@ -3036,23 +2477,6 @@
3036
2477
  }
3037
2478
  }
3038
2479
  },
3039
- "AvailabilityDate": {
3040
- "type": "object",
3041
- "properties": {
3042
- "available_start_date": {
3043
- "type": "string",
3044
- "format": "date",
3045
- "description": "The availability interval start date",
3046
- "example": "2017-07-21"
3047
- },
3048
- "available_end_date": {
3049
- "type": "string",
3050
- "format": "date",
3051
- "description": "The availability interval end date",
3052
- "example": "2017-07-21"
3053
- }
3054
- }
3055
- },
3056
2480
  "AvailabilityFilters": {
3057
2481
  "description": "Availability filters dimensions",
3058
2482
  "type": "object",
@@ -3256,58 +2680,6 @@
3256
2680
  "type": "string",
3257
2681
  "format": "uuid"
3258
2682
  },
3259
- "EntityItem": {
3260
- "type": "object",
3261
- "properties": {
3262
- "_id": {
3263
- "$ref": "#/components/schemas/EntityId"
3264
- },
3265
- "_title": {
3266
- "type": "string",
3267
- "description": "Title of entity"
3268
- },
3269
- "_org": {
3270
- "type": "string",
3271
- "description": "Organization Id the entity belongs to"
3272
- },
3273
- "_schema": {
3274
- "type": "string"
3275
- },
3276
- "_tags": {
3277
- "type": "array",
3278
- "items": {
3279
- "type": "string"
3280
- }
3281
- },
3282
- "_created_at": {
3283
- "type": "string",
3284
- "format": "date-time"
3285
- },
3286
- "_updated_at": {
3287
- "type": "string",
3288
- "format": "date-time"
3289
- }
3290
- },
3291
- "required": [
3292
- "_id",
3293
- "_title",
3294
- "_org",
3295
- "_schema",
3296
- "_created_at",
3297
- "_updated_at"
3298
- ],
3299
- "example": {
3300
- "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3301
- "_org": "123",
3302
- "_schema": "contact",
3303
- "_tags": [
3304
- "example",
3305
- "mock"
3306
- ],
3307
- "_created_at": "2021-02-09T12:41:43.662Z",
3308
- "_updated_at": "2021-02-09T12:41:43.662Z"
3309
- }
3310
- },
3311
2683
  "EntityRelation": {
3312
2684
  "type": "object",
3313
2685
  "additionalProperties": true,
@@ -3330,6 +2702,7 @@
3330
2702
  "required": [
3331
2703
  "type",
3332
2704
  "rate",
2705
+ "behavior",
3333
2706
  "_id",
3334
2707
  "_title",
3335
2708
  "_org",
@@ -3380,6 +2753,15 @@
3380
2753
  "rate": {
3381
2754
  "type": "number"
3382
2755
  },
2756
+ "behavior": {
2757
+ "type": "string",
2758
+ "enum": [
2759
+ "Exclusive",
2760
+ "Inclusive",
2761
+ "exclusive",
2762
+ "inclusive"
2763
+ ]
2764
+ },
3383
2765
  "active": {
3384
2766
  "type": "boolean"
3385
2767
  },
@@ -3394,6 +2776,7 @@
3394
2776
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3395
2777
  "type": "VAT",
3396
2778
  "description": "Tax description",
2779
+ "behavior": "Exclusive",
3397
2780
  "active": "true",
3398
2781
  "region": "DE",
3399
2782
  "region_label": "Germany",
@@ -3425,46 +2808,9 @@
3425
2808
  "type": "string"
3426
2809
  }
3427
2810
  }
3428
- },
3429
- "PriceTier": {
3430
- "type": "object",
3431
- "properties": {
3432
- "up_to": {
3433
- "type": "number",
3434
- "nullable": true
3435
- },
3436
- "flat_fee_amount": {
3437
- "type": "number"
3438
- },
3439
- "flat_fee_amount_decimal": {
3440
- "type": "string"
3441
- },
3442
- "unit_amount": {
3443
- "type": "number"
3444
- },
3445
- "unit_amount_decimal": {
3446
- "type": "string"
3447
- },
3448
- "display_mode": {
3449
- "$ref": "#/components/schemas/PriceTierDisplayMode"
3450
- }
3451
- }
3452
- },
3453
- "PriceTierDisplayMode": {
3454
- "type": "string",
3455
- "enum": [
3456
- "hidden",
3457
- "on_request"
3458
- ]
3459
2811
  }
3460
2812
  },
3461
2813
  "examples": {
3462
- "checkout-with-cart-id": {
3463
- "value": {
3464
- "mode": "create_order",
3465
- "cart": "pZ324jnndf"
3466
- }
3467
- },
3468
2814
  "checkout-with-transient-cart": {
3469
2815
  "value": {
3470
2816
  "mode": "create_order",
@@ -3559,9 +2905,10 @@
3559
2905
  "type": "one_time",
3560
2906
  "active": true,
3561
2907
  "sales_tax": "standard",
3562
- "is_tax_inclusive": true,
2908
+ "tax_behavior": "inclusive",
3563
2909
  "description": "Winter Sale",
3564
2910
  "billing_scheme": "per_unit",
2911
+ "tiers_mode": "Standard",
3565
2912
  "_created_at": "2021-11-10T18:02:58.318Z",
3566
2913
  "_updated_at": "2021-11-10T18:02:58.318Z",
3567
2914
  "_title": "Winter Sale"
@@ -3594,9 +2941,10 @@
3594
2941
  "type": "one_time",
3595
2942
  "active": true,
3596
2943
  "sales_tax": "standard",
3597
- "is_tax_inclusive": true,
2944
+ "tax_behavior": "inclusive",
3598
2945
  "description": "Winter Sale",
3599
2946
  "billing_scheme": "per_unit",
2947
+ "tiers_mode": "Standard",
3600
2948
  "_created_at": "2021-11-10T18:02:58.318Z",
3601
2949
  "_updated_at": "2021-11-10T18:02:58.318Z",
3602
2950
  "_title": "Winter Sale"
@@ -3645,6 +2993,7 @@
3645
2993
  "tax": {
3646
2994
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3647
2995
  "rate": "19",
2996
+ "behavior": "Inclusive",
3648
2997
  "_schema": "tax",
3649
2998
  "_org": "728",
3650
2999
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3664,7 +3013,7 @@
3664
3013
  "unit_amount_currency": "EUR",
3665
3014
  "unit_amount_decimal": "1000",
3666
3015
  "sales_tax": "standard",
3667
- "is_tax_inclusive": true,
3016
+ "tax_behavior": "inclusive",
3668
3017
  "price_display_in_journeys": "show_price",
3669
3018
  "type": "one_time",
3670
3019
  "billing_period": "weekly",
@@ -3776,6 +3125,7 @@
3776
3125
  "tax": {
3777
3126
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3778
3127
  "rate": "19",
3128
+ "behavior": "Inclusive",
3779
3129
  "_schema": "tax",
3780
3130
  "_org": "728",
3781
3131
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3795,7 +3145,7 @@
3795
3145
  "unit_amount_currency": "EUR",
3796
3146
  "unit_amount_decimal": "500",
3797
3147
  "sales_tax": "standard",
3798
- "is_tax_inclusive": true,
3148
+ "tax_behavior": "inclusive",
3799
3149
  "price_display_in_journeys": "show_price",
3800
3150
  "type": "one_time",
3801
3151
  "billing_period": "weekly",
@@ -3917,9 +3267,10 @@
3917
3267
  "renewal_duration_unit": "years",
3918
3268
  "active": true,
3919
3269
  "sales_tax": "reduced",
3920
- "is_tax_inclusive": true,
3270
+ "tax_behavior": "inclusive",
3921
3271
  "description": "Monthly",
3922
3272
  "billing_scheme": "per_unit",
3273
+ "tiers_mode": "Standard",
3923
3274
  "_schema": "price",
3924
3275
  "_org": "728",
3925
3276
  "_created_at": "2021-11-10T14:40:27.695Z",
@@ -4014,7 +3365,7 @@
4014
3365
  "unit_amount_currency": "EUR",
4015
3366
  "unit_amount_decimal": "99",
4016
3367
  "sales_tax": "standard",
4017
- "is_tax_inclusive": true,
3368
+ "tax_behavior": "inclusive",
4018
3369
  "price_display_in_journeys": "show_price",
4019
3370
  "type": "recurring",
4020
3371
  "billing_period": "yearly",
@@ -4075,6 +3426,7 @@
4075
3426
  "tax": {
4076
3427
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
4077
3428
  "rate": "19",
3429
+ "behavior": "Inclusive",
4078
3430
  "_schema": "tax",
4079
3431
  "_org": "728",
4080
3432
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -4158,448 +3510,6 @@
4158
3510
  "_updated_at": "2022-06-03T16:29:46.303Z"
4159
3511
  }
4160
3512
  },
4161
- "order-with-simple-prices-request": {
4162
- "value": {
4163
- "order_number": "OR 2022/742701",
4164
- "status": "quote",
4165
- "source": {
4166
- "title": "manual",
4167
- "href": null
4168
- },
4169
- "source_type": "manual",
4170
- "_schema": "order",
4171
- "_title": "OR 2022/742701",
4172
- "expires_at": "2022-06-30T16:17:00.000Z",
4173
- "line_items": [
4174
- {
4175
- "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
4176
- "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4177
- "quantity": 16
4178
- },
4179
- {
4180
- "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741",
4181
- "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4182
- "quantity": 4
4183
- },
4184
- {
4185
- "price_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf",
4186
- "product_id": "065d6618-cc59-45f4-8e3a-700edf6813c3",
4187
- "quantity": 1
4188
- },
4189
- {
4190
- "price_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88",
4191
- "product_id": "5b9f05b7-f0f8-49c2-8a8d-0f8f923d6382",
4192
- "quantity": 1
4193
- }
4194
- ],
4195
- "currency": "EUR",
4196
- "payment_method": [
4197
- {
4198
- "type": "IBAN",
4199
- "details": {}
4200
- }
4201
- ],
4202
- "billing_contact": {
4203
- "$relation": [
4204
- {
4205
- "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
4206
- "_tags": []
4207
- }
4208
- ]
4209
- },
4210
- "billing_first_name": "Joao",
4211
- "billing_last_name": "Pinho",
4212
- "billing_email": "j.pinho@epilot.cloud",
4213
- "billing_company_name": "epilot cloud",
4214
- "billing_address": [
4215
- {
4216
- "_tags": [],
4217
- "street": "Im Media Park",
4218
- "street_number": "8a",
4219
- "postal_code": "52000",
4220
- "city": "Cologne",
4221
- "country": "DE",
4222
- "additional_info": ""
4223
- }
4224
- ],
4225
- "delivery_address": [],
4226
- "dates": [
4227
- {
4228
- "_tags": [
4229
- "Instalation Date"
4230
- ],
4231
- "dates": "",
4232
- "value": "2022-06-30T16:29:00.000Z"
4233
- }
4234
- ],
4235
- "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
4236
- "_org": "728",
4237
- "_created_at": "2022-06-03T16:29:46.303Z",
4238
- "_updated_at": "2022-06-03T16:29:46.303Z"
4239
- }
4240
- },
4241
- "order-with-composite-prices": {
4242
- "value": {
4243
- "metadata": [
4244
- {
4245
- "key": "_origin",
4246
- "value": "journey checkout"
4247
- }
4248
- ],
4249
- "_tags": [
4250
- "journey",
4251
- "automation"
4252
- ],
4253
- "status": "quote",
4254
- "order_number": "OREabZxnO",
4255
- "billing_first_name": "Paulo",
4256
- "billing_last_name": "Henriques",
4257
- "billing_email": "ph@ph1.pt",
4258
- "billing_address": [
4259
- {
4260
- "street": "Bernauer Str.",
4261
- "street_number": "1",
4262
- "city": "Berlin",
4263
- "postal_code": "10115",
4264
- "country": "DE",
4265
- "additional_info": "1"
4266
- }
4267
- ],
4268
- "delivery_address": [
4269
- {
4270
- "street": "Bernauer Str.",
4271
- "street_number": "1",
4272
- "city": "Berlin",
4273
- "postal_code": "10115",
4274
- "country": "DE",
4275
- "additional_info": "1"
4276
- }
4277
- ],
4278
- "payment_method": [
4279
- {
4280
- "type": "BankTransfer",
4281
- "details": {
4282
- "label": "Überweisung"
4283
- }
4284
- }
4285
- ],
4286
- "currency": "EUR",
4287
- "line_items": [
4288
- {
4289
- "product_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4290
- "price_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4291
- "quantity": 3,
4292
- "currency": "EUR",
4293
- "item_components": [
4294
- {
4295
- "price_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4296
- "product_id": "target-price-product-id",
4297
- "quantity": 3,
4298
- "unit_amount": 15000,
4299
- "unit_amount_currency": "EUR",
4300
- "unit_amount_decimal": "150.00",
4301
- "amount_subtotal": 45000,
4302
- "amount_total": 47700,
4303
- "taxes": [
4304
- {
4305
- "tax": {
4306
- "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4307
- "type": "VAT",
4308
- "active": true,
4309
- "region": "DE",
4310
- "_schema": "tax",
4311
- "_title": "Tax Without Behaviour",
4312
- "description": "Without Behaviour",
4313
- "rate": "6",
4314
- "_org": "739224",
4315
- "_created_at": "2022-02-07T14:49:08.831Z",
4316
- "_updated_at": "2022-02-07T14:49:08.831Z"
4317
- },
4318
- "amount": 2700
4319
- }
4320
- ]
4321
- },
4322
- {
4323
- "price_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4324
- "product_id": "target-price-product-id",
4325
- "quantity": 3,
4326
- "unit_amount": 15000,
4327
- "unit_amount_currency": "EUR",
4328
- "unit_amount_decimal": "150.00",
4329
- "amount_subtotal": 45000,
4330
- "amount_total": 47700,
4331
- "taxes": [
4332
- {
4333
- "tax": {
4334
- "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4335
- "type": "VAT",
4336
- "active": true,
4337
- "region": "DE",
4338
- "_schema": "tax",
4339
- "_title": "Tax Without Behaviour",
4340
- "description": "Without Behaviour",
4341
- "rate": 6,
4342
- "_org": "739224",
4343
- "_created_at": "2022-02-07T14:49:08.831Z",
4344
- "_updated_at": "2022-02-07T14:49:08.831Z"
4345
- },
4346
- "amount": 2700
4347
- }
4348
- ]
4349
- }
4350
- ],
4351
- "_price": {
4352
- "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4353
- "_schema": "price",
4354
- "_title": "Test 1",
4355
- "description": "Test 1",
4356
- "_org": "739224",
4357
- "_created_at": "2022-02-18T10:10:26.439Z",
4358
- "_updated_at": "2022-02-18T11:53:04.191Z",
4359
- "active": true,
4360
- "price_components": {
4361
- "$relation": [
4362
- {
4363
- "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4364
- "_schema": "price",
4365
- "_product_id": "target-price-product-id",
4366
- "quantity": 1,
4367
- "item": {
4368
- "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4369
- "unit_amount": 10000,
4370
- "unit_amount_currency": "EUR",
4371
- "unit_amount_decimal": "100.00",
4372
- "sales_tax": "standard",
4373
- "price_display_in_journeys": "show_price",
4374
- "type": "one_time",
4375
- "_schema": "price",
4376
- "_title": "Test 1",
4377
- "description": "Test 1",
4378
- "tax": {
4379
- "$relation": [
4380
- {
4381
- "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4382
- }
4383
- ]
4384
- },
4385
- "_org": "739224",
4386
- "_created_at": "2022-02-18T10:10:26.439Z",
4387
- "_updated_at": "2022-02-18T11:53:04.191Z",
4388
- "active": true,
4389
- "billing_period": "weekly",
4390
- "billing_duration_unit": "months",
4391
- "notice_time_unit": "months",
4392
- "termination_time_unit": "months",
4393
- "renewal_duration_unit": "months"
4394
- }
4395
- },
4396
- {
4397
- "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4398
- "_schema": "price",
4399
- "_product_id": "target-price-product-id",
4400
- "quantity": 2,
4401
- "item": {
4402
- "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4403
- "unit_amount": 10000,
4404
- "unit_amount_currency": "EUR",
4405
- "unit_amount_decimal": "100.00",
4406
- "sales_tax": "standard",
4407
- "is_tax_inclusive": false,
4408
- "price_display_in_journeys": "show_price",
4409
- "type": "one_time",
4410
- "_schema": "price",
4411
- "_title": "Test 1",
4412
- "description": "Test 1",
4413
- "tax": {
4414
- "$relation": [
4415
- {
4416
- "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4417
- }
4418
- ]
4419
- },
4420
- "_org": "739224",
4421
- "_created_at": "2022-02-18T10:10:26.439Z",
4422
- "_updated_at": "2022-02-18T11:53:04.191Z",
4423
- "active": true,
4424
- "billing_period": "weekly",
4425
- "billing_duration_unit": "months",
4426
- "notice_time_unit": "months",
4427
- "termination_time_unit": "months",
4428
- "renewal_duration_unit": "months"
4429
- }
4430
- }
4431
- ]
4432
- }
4433
- },
4434
- "_product": {
4435
- "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4436
- "type": "product",
4437
- "name": "Cool box",
4438
- "_title": "Cool box"
4439
- },
4440
- "description": "Price Component",
4441
- "unit_amount": 90000,
4442
- "amount_subtotal": 270000,
4443
- "amount_total": 286200
4444
- },
4445
- {
4446
- "price_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4447
- "product_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4448
- "taxes": [
4449
- {
4450
- "tax": null,
4451
- "amount": 0
4452
- }
4453
- ],
4454
- "_price": {
4455
- "_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4456
- "unit_amount": 55566677,
4457
- "unit_amount_currency": "EUR",
4458
- "unit_amount_decimal": "555666.77",
4459
- "sales_tax": "standard",
4460
- "is_tax_inclusive": true,
4461
- "price_display_in_journeys": "show_as_starting_price",
4462
- "type": "one_time",
4463
- "_schema": "price",
4464
- "_title": "As Starting Price One Time No Tax",
4465
- "description": "As Starting Price One Time No Tax",
4466
- "tax": null,
4467
- "active": true,
4468
- "_org": "739224",
4469
- "_created_at": "2022-04-14T16:12:34.456Z",
4470
- "_updated_at": "2022-04-14T16:13:47.261Z",
4471
- "billing_period": "weekly",
4472
- "billing_duration_unit": "months",
4473
- "notice_time_unit": "months",
4474
- "termination_time_unit": "months",
4475
- "renewal_duration_unit": "months"
4476
- },
4477
- "_product": {
4478
- "_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4479
- "type": "product",
4480
- "_schema": "product",
4481
- "_title": "Product With A Lot Of Prices - Do Not Change 🙏",
4482
- "name": "Product With A Lot Of Prices - Do Not Change 🙏",
4483
- "_org": "739224",
4484
- "_created_at": "2022-04-14T16:08:08.595Z",
4485
- "_updated_at": "2022-04-18T16:26:33.089Z",
4486
- "price_options": {
4487
- "$relation": [
4488
- {
4489
- "entity_id": "f850ebff-082e-4924-8631-965cc9c0ab2b",
4490
- "_tags": []
4491
- },
4492
- {
4493
- "entity_id": "d6ecc576-b5d6-44b4-8c95-496ab2ac14d3",
4494
- "_tags": []
4495
- },
4496
- {
4497
- "entity_id": "3c0e47ad-6ca3-4cd8-b6b4-b2a48dab7f16",
4498
- "_tags": []
4499
- },
4500
- {
4501
- "entity_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4502
- "_tags": []
4503
- },
4504
- {
4505
- "entity_id": "3e97f809-1d4b-47e1-9faf-46386b2b0d21",
4506
- "_tags": []
4507
- },
4508
- {
4509
- "entity_id": "d4061656-71dc-45ec-bf6c-1d90d2419d87",
4510
- "_tags": []
4511
- },
4512
- {
4513
- "entity_id": "4ae4221b-4fd0-4bcc-98a2-f20cda954903",
4514
- "_tags": []
4515
- },
4516
- {
4517
- "entity_id": "b326df19-9d0f-433a-a4d2-a0a65034b5f7",
4518
- "_tags": []
4519
- },
4520
- {
4521
- "entity_id": "0d071551-47be-4a5b-90d7-d425a59607e6",
4522
- "_tags": []
4523
- }
4524
- ]
4525
- },
4526
- "_files": {
4527
- "$relation": [
4528
- {
4529
- "entity_id": "27cc0710-651d-48dc-9624-9d1d3057d025",
4530
- "_tags": []
4531
- },
4532
- {
4533
- "entity_id": "8530678c-d4cb-4e27-b314-16a79d6c0abc",
4534
- "_tags": []
4535
- },
4536
- {
4537
- "entity_id": "714d6253-213f-4e30-8caf-00b0d11032e4",
4538
- "_tags": []
4539
- },
4540
- {
4541
- "entity_id": "2218a8f8-c6e2-4a98-a2fe-030ed78ebfa7",
4542
- "_tags": []
4543
- }
4544
- ]
4545
- }
4546
- },
4547
- "quantity": 7,
4548
- "currency": "EUR",
4549
- "description": "As Starting Price One Time No Tax",
4550
- "unit_amount": 55566677,
4551
- "amount_subtotal": 388966739,
4552
- "amount_total": 388966739
4553
- }
4554
- ],
4555
- "amount_subtotal": 389236739,
4556
- "amount_total": 389252939,
4557
- "total_details": {
4558
- "amount_tax": 5400,
4559
- "breakdown": {
4560
- "taxes": [
4561
- {
4562
- "tax": {
4563
- "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4564
- "type": "VAT",
4565
- "active": true,
4566
- "region": "DE",
4567
- "_schema": "tax",
4568
- "_title": "Tax Without Behaviour",
4569
- "description": "Without Behaviour",
4570
- "rate": 6,
4571
- "_org": "739224",
4572
- "_created_at": "2022-02-07T14:49:08.831Z",
4573
- "_updated_at": "2022-02-07T14:49:08.831Z"
4574
- },
4575
- "amount": 5400
4576
- }
4577
- ],
4578
- "recurrences": [
4579
- {
4580
- "type": "one_time",
4581
- "amount_subtotal": 389236739,
4582
- "amount_total": 389252939,
4583
- "amount_tax": 5400
4584
- }
4585
- ]
4586
- }
4587
- },
4588
- "_schema": "order",
4589
- "_id": "78ac88ae-d7df-4a1e-a26b-acaf089abfb2",
4590
- "_org": "739224",
4591
- "_created_at": "2022-04-19T08:19:29.816Z",
4592
- "_updated_at": "2022-04-20T16:15:48.759Z",
4593
- "_title": "OREabZxnO",
4594
- "customer": {
4595
- "$relation": [
4596
- {
4597
- "entity_id": "bb986d50-f403-477c-9d9c-726f8fd6d155"
4598
- }
4599
- ]
4600
- }
4601
- }
4602
- },
4603
3513
  "opportunity": {
4604
3514
  "value": {
4605
3515
  "opportunity_number": "OP 2022/335790",
@@ -4787,7 +3697,7 @@
4787
3697
  "unit_amount_currency": "EUR",
4788
3698
  "unit_amount_decimal": "1000",
4789
3699
  "sales_tax": "standard",
4790
- "is_tax_inclusive": true,
3700
+ "tax_behavior": "inclusive",
4791
3701
  "price_display_in_journeys": "show_price",
4792
3702
  "type": "one_time",
4793
3703
  "billing_period": "weekly",
@@ -4809,8 +3719,7 @@
4809
3719
  "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
4810
3720
  "_org": "728",
4811
3721
  "_created_at": "2022-06-03T16:04:10.369Z",
4812
- "_updated_at": "2022-06-03T16:04:10.369Z",
4813
- "pricing_model": "per_unit"
3722
+ "_updated_at": "2022-06-03T16:04:10.369Z"
4814
3723
  }
4815
3724
  },
4816
3725
  "composite-price": {
@@ -4836,7 +3745,7 @@
4836
3745
  "unit_amount_currency": "EUR",
4837
3746
  "unit_amount_decimal": "100.00",
4838
3747
  "sales_tax": "standard",
4839
- "is_tax_inclusive": false,
3748
+ "tax_behavior": "exclusive",
4840
3749
  "price_display_in_journeys": "show_price",
4841
3750
  "type": "one_time",
4842
3751
  "_schema": "price",
@@ -4871,7 +3780,7 @@
4871
3780
  "unit_amount_currency": "EUR",
4872
3781
  "unit_amount_decimal": "100.00",
4873
3782
  "sales_tax": "standard",
4874
- "is_tax_inclusive": false,
3783
+ "tax_behavior": "exclusive",
4875
3784
  "price_display_in_journeys": "show_price",
4876
3785
  "type": "one_time",
4877
3786
  "_schema": "price",
@@ -4912,6 +3821,7 @@
4912
3821
  "amount": 600,
4913
3822
  "tax": {
4914
3823
  "active": true,
3824
+ "behavior": "Exclusive",
4915
3825
  "description": "Without Behaviour",
4916
3826
  "rate": 6,
4917
3827
  "region": "DE",
@@ -4932,7 +3842,7 @@
4932
3842
  "unit_amount_currency": "EUR",
4933
3843
  "unit_amount_decimal": "100.00",
4934
3844
  "sales_tax": "standard",
4935
- "is_tax_inclusive": false,
3845
+ "tax_behavior": "exclusive",
4936
3846
  "price_display_in_journeys": "show_price",
4937
3847
  "type": "one_time",
4938
3848
  "billing_period": "weekly",
@@ -4954,8 +3864,7 @@
4954
3864
  "_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
4955
3865
  "_org": "728",
4956
3866
  "_created_at": "2022-06-03T16:04:10.369Z",
4957
- "_updated_at": "2022-06-03T16:04:10.369Z",
4958
- "pricing_model": "per_unit"
3867
+ "_updated_at": "2022-06-03T16:04:10.369Z"
4959
3868
  },
4960
3869
  "_product": {
4961
3870
  "name": "Cool box",