@epilot/pricing-client 3.17.1 → 3.17.2

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,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
- "billing_scheme": {
1484
+ "pricing_model": {
1272
1485
  "type": "string",
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",
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
- "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
- ]
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,65 @@
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
+ "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
+ },
1756
2101
  "CartDto": {
1757
2102
  "description": "A valid cart payload from a client.",
1758
2103
  "properties": {
@@ -1876,9 +2221,12 @@
1876
2221
  "description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
1877
2222
  "type": "array",
1878
2223
  "items": {
1879
- "oneOf": [
2224
+ "anyOf": [
1880
2225
  {
1881
2226
  "$ref": "#/components/schemas/PriceItemDto"
2227
+ },
2228
+ {
2229
+ "$ref": "#/components/schemas/CompositePriceItemDto"
1882
2230
  }
1883
2231
  ]
1884
2232
  }
@@ -1894,6 +2242,10 @@
1894
2242
  "type": "integer",
1895
2243
  "description": "The quantity of products being purchased."
1896
2244
  },
2245
+ "price_mappings": {
2246
+ "description": "Price mapping information required to compute totals",
2247
+ "$ref": "#/components/schemas/PriceInputMappings"
2248
+ },
1897
2249
  "description": {
1898
2250
  "type": "string",
1899
2251
  "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
@@ -1965,9 +2317,26 @@
1965
2317
  "type": "integer",
1966
2318
  "description": "The unit amount value"
1967
2319
  },
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"
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
+ ]
1971
2340
  },
1972
2341
  "_price": {
1973
2342
  "description": "The snapshot of the price linked to the price item.",
@@ -1977,6 +2346,30 @@
1977
2346
  }
1978
2347
  ]
1979
2348
  }
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
+ }
1980
2373
  }
1981
2374
  },
1982
2375
  "TaxAmountDto": {
@@ -2028,6 +2421,11 @@
2028
2421
  "RecurrenceAmountDto": {
2029
2422
  "type": "object",
2030
2423
  "description": "An amount associated with a specific recurrence.",
2424
+ "allOf": [
2425
+ {
2426
+ "$ref": "#/components/schemas/Amounts"
2427
+ }
2428
+ ],
2031
2429
  "properties": {
2032
2430
  "type": {
2033
2431
  "type": "string",
@@ -2035,15 +2433,18 @@
2035
2433
  },
2036
2434
  "billing_period": {
2037
2435
  "type": "string",
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."
2436
+ "description": "The price billing period.",
2437
+ "enum": [
2438
+ "weekly",
2439
+ "monthly",
2440
+ "every_quarter",
2441
+ "every_6_months",
2442
+ "yearly"
2443
+ ]
2043
2444
  },
2044
- "amount_total": {
2445
+ "unit_amount_gross": {
2045
2446
  "type": "integer",
2046
- "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2447
+ "description": "The unit gross amount value."
2047
2448
  },
2048
2449
  "amount_tax": {
2049
2450
  "type": "integer",
@@ -2052,9 +2453,68 @@
2052
2453
  },
2053
2454
  "required": [
2054
2455
  "amount_subtotal",
2055
- "amount_total"
2456
+ "amount_total",
2457
+ "amount_subtotal_decimal",
2458
+ "amount_total_decimal"
2056
2459
  ]
2057
2460
  },
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
+ },
2058
2518
  "Currency": {
2059
2519
  "type": "string",
2060
2520
  "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",
@@ -2086,7 +2546,7 @@
2086
2546
  "$ref": "#/components/schemas/OrderStatus"
2087
2547
  },
2088
2548
  "line_items": {
2089
- "$ref": "#/components/schemas/PriceItems"
2549
+ "$ref": "#/components/schemas/PriceItemsDto"
2090
2550
  },
2091
2551
  "source_type": {
2092
2552
  "type": "string",
@@ -2174,6 +2634,9 @@
2174
2634
  "items": {
2175
2635
  "$ref": "#/components/schemas/PriceItem"
2176
2636
  }
2637
+ },
2638
+ "total_details": {
2639
+ "$ref": "#/components/schemas/TotalDetails"
2177
2640
  }
2178
2641
  }
2179
2642
  },
@@ -2183,8 +2646,13 @@
2183
2646
  "example": {
2184
2647
  "$ref": "#/components/examples/price-item"
2185
2648
  },
2649
+ "allOf": [
2650
+ {
2651
+ "$ref": "#/components/schemas/Amounts"
2652
+ }
2653
+ ],
2186
2654
  "properties": {
2187
- "id": {
2655
+ "_id": {
2188
2656
  "type": "string",
2189
2657
  "description": "price item id",
2190
2658
  "readOnly": true
@@ -2197,11 +2665,15 @@
2197
2665
  "description": "The unit amount value",
2198
2666
  "readOnly": true
2199
2667
  },
2200
- "amount_subtotal": {
2668
+ "unit_amount_gross": {
2201
2669
  "type": "integer",
2202
- "description": "Total before any (discounts or) taxes are applied.",
2670
+ "description": "The unit gross amount value.",
2203
2671
  "readOnly": true
2204
2672
  },
2673
+ "amount_tax": {
2674
+ "type": "integer",
2675
+ "description": "Total tax amount for this line item."
2676
+ },
2205
2677
  "unit_amount_net": {
2206
2678
  "type": "integer",
2207
2679
  "description": "Net unit amount without taxes or discounts.",
@@ -2211,11 +2683,6 @@
2211
2683
  "description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
2212
2684
  "type": "string"
2213
2685
  },
2214
- "amount_total": {
2215
- "type": "integer",
2216
- "description": "Total after (discounts and) taxes.",
2217
- "readOnly": true
2218
- },
2219
2686
  "currency": {
2220
2687
  "$ref": "#/components/schemas/Currency"
2221
2688
  },
@@ -2276,6 +2743,35 @@
2276
2743
  }
2277
2744
  ]
2278
2745
  }
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."
2279
2775
  }
2280
2776
  }
2281
2777
  },
@@ -2299,11 +2795,20 @@
2299
2795
  "recurring"
2300
2796
  ]
2301
2797
  },
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'."
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
+ ]
2305
2807
  }
2306
- }
2808
+ },
2809
+ "required": [
2810
+ "pricing_model"
2811
+ ]
2307
2812
  },
2308
2813
  "TaxAmount": {
2309
2814
  "type": "object",
@@ -2363,6 +2868,11 @@
2363
2868
  "type": "object",
2364
2869
  "description": "An amount associated with a specific recurrence.",
2365
2870
  "readOnly": true,
2871
+ "allOf": [
2872
+ {
2873
+ "$ref": "#/components/schemas/Amounts"
2874
+ }
2875
+ ],
2366
2876
  "properties": {
2367
2877
  "type": {
2368
2878
  "type": "string",
@@ -2370,24 +2880,82 @@
2370
2880
  },
2371
2881
  "billing_period": {
2372
2882
  "type": "string",
2373
- "description": "The price billing period."
2883
+ "description": "The price billing period.",
2884
+ "enum": [
2885
+ "weekly",
2886
+ "monthly",
2887
+ "every_quarter",
2888
+ "every_6_months",
2889
+ "yearly"
2890
+ ]
2374
2891
  },
2375
- "amount_subtotal": {
2892
+ "unit_amount_gross": {
2376
2893
  "type": "integer",
2377
- "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
2894
+ "description": "The unit gross amount value."
2378
2895
  },
2379
- "amount_total": {
2896
+ "amount_tax": {
2380
2897
  "type": "integer",
2381
- "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2898
+ "description": "Total of all items taxes, with same recurrence."
2899
+ },
2900
+ "currency": {
2901
+ "$ref": "#/components/schemas/Currency",
2902
+ "description": "Currency"
2903
+ }
2904
+ },
2905
+ "required": [
2906
+ "amount_subtotal",
2907
+ "amount_total",
2908
+ "amount_subtotal_decimal",
2909
+ "amount_total_decimal"
2910
+ ]
2911
+ },
2912
+ "RecurrenceAmountWithTax": {
2913
+ "type": "object",
2914
+ "description": "An amount associated with a specific recurrence and tax.",
2915
+ "readOnly": true,
2916
+ "allOf": [
2917
+ {
2918
+ "$ref": "#/components/schemas/Amounts"
2919
+ }
2920
+ ],
2921
+ "properties": {
2922
+ "type": {
2923
+ "type": "string",
2924
+ "description": "The price type."
2925
+ },
2926
+ "billing_period": {
2927
+ "type": "string",
2928
+ "description": "The price billing period.",
2929
+ "enum": [
2930
+ "weekly",
2931
+ "monthly",
2932
+ "every_quarter",
2933
+ "every_6_months",
2934
+ "yearly"
2935
+ ]
2936
+ },
2937
+ "unit_amount_gross": {
2938
+ "type": "integer",
2939
+ "description": "The unit gross amount value."
2382
2940
  },
2383
2941
  "amount_tax": {
2384
2942
  "type": "integer",
2385
2943
  "description": "Total of all items taxes, with same recurrence."
2944
+ },
2945
+ "currency": {
2946
+ "$ref": "#/components/schemas/Currency",
2947
+ "description": "Currency"
2948
+ },
2949
+ "tax": {
2950
+ "$ref": "#/components/schemas/TaxAmountBreakdown",
2951
+ "description": "Tax"
2386
2952
  }
2387
2953
  },
2388
2954
  "required": [
2389
2955
  "amount_subtotal",
2390
- "amount_total"
2956
+ "amount_total",
2957
+ "amount_subtotal_decimal",
2958
+ "amount_total_decimal"
2391
2959
  ]
2392
2960
  },
2393
2961
  "TotalDetails": {
@@ -2420,7 +2988,7 @@
2420
2988
  },
2421
2989
  "recurrences": {
2422
2990
  "type": "array",
2423
- "description": "The aggregated price items tax amount per rate.",
2991
+ "description": "The aggregated price items recurrences.",
2424
2992
  "items": {
2425
2993
  "oneOf": [
2426
2994
  {
@@ -2428,11 +2996,63 @@
2428
2996
  }
2429
2997
  ]
2430
2998
  }
2999
+ },
3000
+ "recurrencesByTax": {
3001
+ "type": "array",
3002
+ "description": "The aggregated price items recurrences by tax rate.",
3003
+ "items": {
3004
+ "oneOf": [
3005
+ {
3006
+ "$ref": "#/components/schemas/RecurrenceAmountWithTax"
3007
+ }
3008
+ ]
3009
+ }
2431
3010
  }
2432
3011
  }
2433
3012
  }
2434
3013
  }
2435
3014
  },
3015
+ "PricingDetails": {
3016
+ "type": "object",
3017
+ "description": "The result from the calculation of a set of price items.",
3018
+ "properties": {
3019
+ "items": {
3020
+ "type": "array",
3021
+ "items": {
3022
+ "oneOf": [
3023
+ {
3024
+ "$ref": "#/components/schemas/PriceItem"
3025
+ },
3026
+ {
3027
+ "$ref": "#/components/schemas/CompositePriceItem"
3028
+ }
3029
+ ]
3030
+ }
3031
+ },
3032
+ "amount_subtotal": {
3033
+ "type": "integer",
3034
+ "description": "Total of all items before (discounts or) taxes are applied."
3035
+ },
3036
+ "amount_total": {
3037
+ "type": "integer",
3038
+ "description": "Total of all items after (discounts and) taxes are applied."
3039
+ },
3040
+ "unit_amount_gross": {
3041
+ "type": "integer",
3042
+ "description": "The unit gross amount value."
3043
+ },
3044
+ "amount_tax": {
3045
+ "type": "integer",
3046
+ "description": "This is the sum of all the price item tax amounts."
3047
+ },
3048
+ "total_details": {
3049
+ "$ref": "#/components/schemas/TotalDetails"
3050
+ },
3051
+ "currency": {
3052
+ "$ref": "#/components/schemas/Currency"
3053
+ }
3054
+ }
3055
+ },
2436
3056
  "BillingPeriod": {
2437
3057
  "type": "string",
2438
3058
  "enum": [
@@ -2440,8 +3060,7 @@
2440
3060
  "monthly",
2441
3061
  "every_quarter",
2442
3062
  "every_6_months",
2443
- "yearly",
2444
- "one_time"
3063
+ "yearly"
2445
3064
  ]
2446
3065
  },
2447
3066
  "SalesTax": {
@@ -2477,6 +3096,23 @@
2477
3096
  }
2478
3097
  }
2479
3098
  },
3099
+ "AvailabilityDate": {
3100
+ "type": "object",
3101
+ "properties": {
3102
+ "available_start_date": {
3103
+ "type": "string",
3104
+ "format": "date",
3105
+ "description": "The availability interval start date",
3106
+ "example": "2017-07-21"
3107
+ },
3108
+ "available_end_date": {
3109
+ "type": "string",
3110
+ "format": "date",
3111
+ "description": "The availability interval end date",
3112
+ "example": "2017-07-21"
3113
+ }
3114
+ }
3115
+ },
2480
3116
  "AvailabilityFilters": {
2481
3117
  "description": "Availability filters dimensions",
2482
3118
  "type": "object",
@@ -2680,6 +3316,58 @@
2680
3316
  "type": "string",
2681
3317
  "format": "uuid"
2682
3318
  },
3319
+ "EntityItem": {
3320
+ "type": "object",
3321
+ "properties": {
3322
+ "_id": {
3323
+ "$ref": "#/components/schemas/EntityId"
3324
+ },
3325
+ "_title": {
3326
+ "type": "string",
3327
+ "description": "Title of entity"
3328
+ },
3329
+ "_org": {
3330
+ "type": "string",
3331
+ "description": "Organization Id the entity belongs to"
3332
+ },
3333
+ "_schema": {
3334
+ "type": "string"
3335
+ },
3336
+ "_tags": {
3337
+ "type": "array",
3338
+ "items": {
3339
+ "type": "string"
3340
+ }
3341
+ },
3342
+ "_created_at": {
3343
+ "type": "string",
3344
+ "format": "date-time"
3345
+ },
3346
+ "_updated_at": {
3347
+ "type": "string",
3348
+ "format": "date-time"
3349
+ }
3350
+ },
3351
+ "required": [
3352
+ "_id",
3353
+ "_title",
3354
+ "_org",
3355
+ "_schema",
3356
+ "_created_at",
3357
+ "_updated_at"
3358
+ ],
3359
+ "example": {
3360
+ "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3361
+ "_org": "123",
3362
+ "_schema": "contact",
3363
+ "_tags": [
3364
+ "example",
3365
+ "mock"
3366
+ ],
3367
+ "_created_at": "2021-02-09T12:41:43.662Z",
3368
+ "_updated_at": "2021-02-09T12:41:43.662Z"
3369
+ }
3370
+ },
2683
3371
  "EntityRelation": {
2684
3372
  "type": "object",
2685
3373
  "additionalProperties": true,
@@ -2702,7 +3390,6 @@
2702
3390
  "required": [
2703
3391
  "type",
2704
3392
  "rate",
2705
- "behavior",
2706
3393
  "_id",
2707
3394
  "_title",
2708
3395
  "_org",
@@ -2753,15 +3440,6 @@
2753
3440
  "rate": {
2754
3441
  "type": "number"
2755
3442
  },
2756
- "behavior": {
2757
- "type": "string",
2758
- "enum": [
2759
- "Exclusive",
2760
- "Inclusive",
2761
- "exclusive",
2762
- "inclusive"
2763
- ]
2764
- },
2765
3443
  "active": {
2766
3444
  "type": "boolean"
2767
3445
  },
@@ -2776,7 +3454,6 @@
2776
3454
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2777
3455
  "type": "VAT",
2778
3456
  "description": "Tax description",
2779
- "behavior": "Exclusive",
2780
3457
  "active": "true",
2781
3458
  "region": "DE",
2782
3459
  "region_label": "Germany",
@@ -2796,21 +3473,58 @@
2796
3473
  "rate": {
2797
3474
  "type": "number"
2798
3475
  },
2799
- "type": {
2800
- "type": "string",
2801
- "enum": [
2802
- "VAT",
2803
- "GST",
2804
- "Custom"
2805
- ]
2806
- },
2807
- "_id": {
3476
+ "type": {
3477
+ "type": "string",
3478
+ "enum": [
3479
+ "VAT",
3480
+ "GST",
3481
+ "Custom"
3482
+ ]
3483
+ },
3484
+ "_id": {
3485
+ "type": "string"
3486
+ }
3487
+ }
3488
+ },
3489
+ "PriceTier": {
3490
+ "type": "object",
3491
+ "properties": {
3492
+ "up_to": {
3493
+ "type": "number",
3494
+ "nullable": true
3495
+ },
3496
+ "flat_fee_amount": {
3497
+ "type": "number"
3498
+ },
3499
+ "flat_fee_amount_decimal": {
3500
+ "type": "string"
3501
+ },
3502
+ "unit_amount": {
3503
+ "type": "number"
3504
+ },
3505
+ "unit_amount_decimal": {
2808
3506
  "type": "string"
3507
+ },
3508
+ "display_mode": {
3509
+ "$ref": "#/components/schemas/PriceTierDisplayMode"
2809
3510
  }
2810
3511
  }
3512
+ },
3513
+ "PriceTierDisplayMode": {
3514
+ "type": "string",
3515
+ "enum": [
3516
+ "hidden",
3517
+ "on_request"
3518
+ ]
2811
3519
  }
2812
3520
  },
2813
3521
  "examples": {
3522
+ "checkout-with-cart-id": {
3523
+ "value": {
3524
+ "mode": "create_order",
3525
+ "cart": "pZ324jnndf"
3526
+ }
3527
+ },
2814
3528
  "checkout-with-transient-cart": {
2815
3529
  "value": {
2816
3530
  "mode": "create_order",
@@ -2905,10 +3619,9 @@
2905
3619
  "type": "one_time",
2906
3620
  "active": true,
2907
3621
  "sales_tax": "standard",
2908
- "tax_behavior": "inclusive",
3622
+ "is_tax_inclusive": true,
2909
3623
  "description": "Winter Sale",
2910
3624
  "billing_scheme": "per_unit",
2911
- "tiers_mode": "Standard",
2912
3625
  "_created_at": "2021-11-10T18:02:58.318Z",
2913
3626
  "_updated_at": "2021-11-10T18:02:58.318Z",
2914
3627
  "_title": "Winter Sale"
@@ -2941,10 +3654,9 @@
2941
3654
  "type": "one_time",
2942
3655
  "active": true,
2943
3656
  "sales_tax": "standard",
2944
- "tax_behavior": "inclusive",
3657
+ "is_tax_inclusive": true,
2945
3658
  "description": "Winter Sale",
2946
3659
  "billing_scheme": "per_unit",
2947
- "tiers_mode": "Standard",
2948
3660
  "_created_at": "2021-11-10T18:02:58.318Z",
2949
3661
  "_updated_at": "2021-11-10T18:02:58.318Z",
2950
3662
  "_title": "Winter Sale"
@@ -2993,7 +3705,6 @@
2993
3705
  "tax": {
2994
3706
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
2995
3707
  "rate": "19",
2996
- "behavior": "Inclusive",
2997
3708
  "_schema": "tax",
2998
3709
  "_org": "728",
2999
3710
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3013,7 +3724,7 @@
3013
3724
  "unit_amount_currency": "EUR",
3014
3725
  "unit_amount_decimal": "1000",
3015
3726
  "sales_tax": "standard",
3016
- "tax_behavior": "inclusive",
3727
+ "is_tax_inclusive": true,
3017
3728
  "price_display_in_journeys": "show_price",
3018
3729
  "type": "one_time",
3019
3730
  "billing_period": "weekly",
@@ -3125,7 +3836,6 @@
3125
3836
  "tax": {
3126
3837
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3127
3838
  "rate": "19",
3128
- "behavior": "Inclusive",
3129
3839
  "_schema": "tax",
3130
3840
  "_org": "728",
3131
3841
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3145,7 +3855,7 @@
3145
3855
  "unit_amount_currency": "EUR",
3146
3856
  "unit_amount_decimal": "500",
3147
3857
  "sales_tax": "standard",
3148
- "tax_behavior": "inclusive",
3858
+ "is_tax_inclusive": true,
3149
3859
  "price_display_in_journeys": "show_price",
3150
3860
  "type": "one_time",
3151
3861
  "billing_period": "weekly",
@@ -3267,10 +3977,9 @@
3267
3977
  "renewal_duration_unit": "years",
3268
3978
  "active": true,
3269
3979
  "sales_tax": "reduced",
3270
- "tax_behavior": "inclusive",
3980
+ "is_tax_inclusive": true,
3271
3981
  "description": "Monthly",
3272
3982
  "billing_scheme": "per_unit",
3273
- "tiers_mode": "Standard",
3274
3983
  "_schema": "price",
3275
3984
  "_org": "728",
3276
3985
  "_created_at": "2021-11-10T14:40:27.695Z",
@@ -3365,7 +4074,7 @@
3365
4074
  "unit_amount_currency": "EUR",
3366
4075
  "unit_amount_decimal": "99",
3367
4076
  "sales_tax": "standard",
3368
- "tax_behavior": "inclusive",
4077
+ "is_tax_inclusive": true,
3369
4078
  "price_display_in_journeys": "show_price",
3370
4079
  "type": "recurring",
3371
4080
  "billing_period": "yearly",
@@ -3426,7 +4135,6 @@
3426
4135
  "tax": {
3427
4136
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3428
4137
  "rate": "19",
3429
- "behavior": "Inclusive",
3430
4138
  "_schema": "tax",
3431
4139
  "_org": "728",
3432
4140
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3510,6 +4218,448 @@
3510
4218
  "_updated_at": "2022-06-03T16:29:46.303Z"
3511
4219
  }
3512
4220
  },
4221
+ "order-with-simple-prices-request": {
4222
+ "value": {
4223
+ "order_number": "OR 2022/742701",
4224
+ "status": "quote",
4225
+ "source": {
4226
+ "title": "manual",
4227
+ "href": null
4228
+ },
4229
+ "source_type": "manual",
4230
+ "_schema": "order",
4231
+ "_title": "OR 2022/742701",
4232
+ "expires_at": "2022-06-30T16:17:00.000Z",
4233
+ "line_items": [
4234
+ {
4235
+ "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
4236
+ "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4237
+ "quantity": 16
4238
+ },
4239
+ {
4240
+ "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741",
4241
+ "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4242
+ "quantity": 4
4243
+ },
4244
+ {
4245
+ "price_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf",
4246
+ "product_id": "065d6618-cc59-45f4-8e3a-700edf6813c3",
4247
+ "quantity": 1
4248
+ },
4249
+ {
4250
+ "price_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88",
4251
+ "product_id": "5b9f05b7-f0f8-49c2-8a8d-0f8f923d6382",
4252
+ "quantity": 1
4253
+ }
4254
+ ],
4255
+ "currency": "EUR",
4256
+ "payment_method": [
4257
+ {
4258
+ "type": "IBAN",
4259
+ "details": {}
4260
+ }
4261
+ ],
4262
+ "billing_contact": {
4263
+ "$relation": [
4264
+ {
4265
+ "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
4266
+ "_tags": []
4267
+ }
4268
+ ]
4269
+ },
4270
+ "billing_first_name": "Joao",
4271
+ "billing_last_name": "Pinho",
4272
+ "billing_email": "j.pinho@epilot.cloud",
4273
+ "billing_company_name": "epilot cloud",
4274
+ "billing_address": [
4275
+ {
4276
+ "_tags": [],
4277
+ "street": "Im Media Park",
4278
+ "street_number": "8a",
4279
+ "postal_code": "52000",
4280
+ "city": "Cologne",
4281
+ "country": "DE",
4282
+ "additional_info": ""
4283
+ }
4284
+ ],
4285
+ "delivery_address": [],
4286
+ "dates": [
4287
+ {
4288
+ "_tags": [
4289
+ "Instalation Date"
4290
+ ],
4291
+ "dates": "",
4292
+ "value": "2022-06-30T16:29:00.000Z"
4293
+ }
4294
+ ],
4295
+ "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
4296
+ "_org": "728",
4297
+ "_created_at": "2022-06-03T16:29:46.303Z",
4298
+ "_updated_at": "2022-06-03T16:29:46.303Z"
4299
+ }
4300
+ },
4301
+ "order-with-composite-prices": {
4302
+ "value": {
4303
+ "metadata": [
4304
+ {
4305
+ "key": "_origin",
4306
+ "value": "journey checkout"
4307
+ }
4308
+ ],
4309
+ "_tags": [
4310
+ "journey",
4311
+ "automation"
4312
+ ],
4313
+ "status": "quote",
4314
+ "order_number": "OREabZxnO",
4315
+ "billing_first_name": "Paulo",
4316
+ "billing_last_name": "Henriques",
4317
+ "billing_email": "ph@ph1.pt",
4318
+ "billing_address": [
4319
+ {
4320
+ "street": "Bernauer Str.",
4321
+ "street_number": "1",
4322
+ "city": "Berlin",
4323
+ "postal_code": "10115",
4324
+ "country": "DE",
4325
+ "additional_info": "1"
4326
+ }
4327
+ ],
4328
+ "delivery_address": [
4329
+ {
4330
+ "street": "Bernauer Str.",
4331
+ "street_number": "1",
4332
+ "city": "Berlin",
4333
+ "postal_code": "10115",
4334
+ "country": "DE",
4335
+ "additional_info": "1"
4336
+ }
4337
+ ],
4338
+ "payment_method": [
4339
+ {
4340
+ "type": "BankTransfer",
4341
+ "details": {
4342
+ "label": "Überweisung"
4343
+ }
4344
+ }
4345
+ ],
4346
+ "currency": "EUR",
4347
+ "line_items": [
4348
+ {
4349
+ "product_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4350
+ "price_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4351
+ "quantity": 3,
4352
+ "currency": "EUR",
4353
+ "item_components": [
4354
+ {
4355
+ "price_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4356
+ "product_id": "target-price-product-id",
4357
+ "quantity": 3,
4358
+ "unit_amount": 15000,
4359
+ "unit_amount_currency": "EUR",
4360
+ "unit_amount_decimal": "150.00",
4361
+ "amount_subtotal": 45000,
4362
+ "amount_total": 47700,
4363
+ "taxes": [
4364
+ {
4365
+ "tax": {
4366
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4367
+ "type": "VAT",
4368
+ "active": true,
4369
+ "region": "DE",
4370
+ "_schema": "tax",
4371
+ "_title": "Tax Without Behaviour",
4372
+ "description": "Without Behaviour",
4373
+ "rate": "6",
4374
+ "_org": "739224",
4375
+ "_created_at": "2022-02-07T14:49:08.831Z",
4376
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4377
+ },
4378
+ "amount": 2700
4379
+ }
4380
+ ]
4381
+ },
4382
+ {
4383
+ "price_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4384
+ "product_id": "target-price-product-id",
4385
+ "quantity": 3,
4386
+ "unit_amount": 15000,
4387
+ "unit_amount_currency": "EUR",
4388
+ "unit_amount_decimal": "150.00",
4389
+ "amount_subtotal": 45000,
4390
+ "amount_total": 47700,
4391
+ "taxes": [
4392
+ {
4393
+ "tax": {
4394
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4395
+ "type": "VAT",
4396
+ "active": true,
4397
+ "region": "DE",
4398
+ "_schema": "tax",
4399
+ "_title": "Tax Without Behaviour",
4400
+ "description": "Without Behaviour",
4401
+ "rate": 6,
4402
+ "_org": "739224",
4403
+ "_created_at": "2022-02-07T14:49:08.831Z",
4404
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4405
+ },
4406
+ "amount": 2700
4407
+ }
4408
+ ]
4409
+ }
4410
+ ],
4411
+ "_price": {
4412
+ "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4413
+ "_schema": "price",
4414
+ "_title": "Test 1",
4415
+ "description": "Test 1",
4416
+ "_org": "739224",
4417
+ "_created_at": "2022-02-18T10:10:26.439Z",
4418
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4419
+ "active": true,
4420
+ "price_components": {
4421
+ "$relation": [
4422
+ {
4423
+ "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4424
+ "_schema": "price",
4425
+ "_product_id": "target-price-product-id",
4426
+ "quantity": 1,
4427
+ "item": {
4428
+ "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4429
+ "unit_amount": 10000,
4430
+ "unit_amount_currency": "EUR",
4431
+ "unit_amount_decimal": "100.00",
4432
+ "sales_tax": "standard",
4433
+ "price_display_in_journeys": "show_price",
4434
+ "type": "one_time",
4435
+ "_schema": "price",
4436
+ "_title": "Test 1",
4437
+ "description": "Test 1",
4438
+ "tax": {
4439
+ "$relation": [
4440
+ {
4441
+ "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4442
+ }
4443
+ ]
4444
+ },
4445
+ "_org": "739224",
4446
+ "_created_at": "2022-02-18T10:10:26.439Z",
4447
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4448
+ "active": true,
4449
+ "billing_period": "weekly",
4450
+ "billing_duration_unit": "months",
4451
+ "notice_time_unit": "months",
4452
+ "termination_time_unit": "months",
4453
+ "renewal_duration_unit": "months"
4454
+ }
4455
+ },
4456
+ {
4457
+ "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4458
+ "_schema": "price",
4459
+ "_product_id": "target-price-product-id",
4460
+ "quantity": 2,
4461
+ "item": {
4462
+ "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4463
+ "unit_amount": 10000,
4464
+ "unit_amount_currency": "EUR",
4465
+ "unit_amount_decimal": "100.00",
4466
+ "sales_tax": "standard",
4467
+ "is_tax_inclusive": false,
4468
+ "price_display_in_journeys": "show_price",
4469
+ "type": "one_time",
4470
+ "_schema": "price",
4471
+ "_title": "Test 1",
4472
+ "description": "Test 1",
4473
+ "tax": {
4474
+ "$relation": [
4475
+ {
4476
+ "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4477
+ }
4478
+ ]
4479
+ },
4480
+ "_org": "739224",
4481
+ "_created_at": "2022-02-18T10:10:26.439Z",
4482
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4483
+ "active": true,
4484
+ "billing_period": "weekly",
4485
+ "billing_duration_unit": "months",
4486
+ "notice_time_unit": "months",
4487
+ "termination_time_unit": "months",
4488
+ "renewal_duration_unit": "months"
4489
+ }
4490
+ }
4491
+ ]
4492
+ }
4493
+ },
4494
+ "_product": {
4495
+ "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4496
+ "type": "product",
4497
+ "name": "Cool box",
4498
+ "_title": "Cool box"
4499
+ },
4500
+ "description": "Price Component",
4501
+ "unit_amount": 90000,
4502
+ "amount_subtotal": 270000,
4503
+ "amount_total": 286200
4504
+ },
4505
+ {
4506
+ "price_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4507
+ "product_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4508
+ "taxes": [
4509
+ {
4510
+ "tax": null,
4511
+ "amount": 0
4512
+ }
4513
+ ],
4514
+ "_price": {
4515
+ "_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4516
+ "unit_amount": 55566677,
4517
+ "unit_amount_currency": "EUR",
4518
+ "unit_amount_decimal": "555666.77",
4519
+ "sales_tax": "standard",
4520
+ "is_tax_inclusive": true,
4521
+ "price_display_in_journeys": "show_as_starting_price",
4522
+ "type": "one_time",
4523
+ "_schema": "price",
4524
+ "_title": "As Starting Price One Time No Tax",
4525
+ "description": "As Starting Price One Time No Tax",
4526
+ "tax": null,
4527
+ "active": true,
4528
+ "_org": "739224",
4529
+ "_created_at": "2022-04-14T16:12:34.456Z",
4530
+ "_updated_at": "2022-04-14T16:13:47.261Z",
4531
+ "billing_period": "weekly",
4532
+ "billing_duration_unit": "months",
4533
+ "notice_time_unit": "months",
4534
+ "termination_time_unit": "months",
4535
+ "renewal_duration_unit": "months"
4536
+ },
4537
+ "_product": {
4538
+ "_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4539
+ "type": "product",
4540
+ "_schema": "product",
4541
+ "_title": "Product With A Lot Of Prices - Do Not Change 🙏",
4542
+ "name": "Product With A Lot Of Prices - Do Not Change 🙏",
4543
+ "_org": "739224",
4544
+ "_created_at": "2022-04-14T16:08:08.595Z",
4545
+ "_updated_at": "2022-04-18T16:26:33.089Z",
4546
+ "price_options": {
4547
+ "$relation": [
4548
+ {
4549
+ "entity_id": "f850ebff-082e-4924-8631-965cc9c0ab2b",
4550
+ "_tags": []
4551
+ },
4552
+ {
4553
+ "entity_id": "d6ecc576-b5d6-44b4-8c95-496ab2ac14d3",
4554
+ "_tags": []
4555
+ },
4556
+ {
4557
+ "entity_id": "3c0e47ad-6ca3-4cd8-b6b4-b2a48dab7f16",
4558
+ "_tags": []
4559
+ },
4560
+ {
4561
+ "entity_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4562
+ "_tags": []
4563
+ },
4564
+ {
4565
+ "entity_id": "3e97f809-1d4b-47e1-9faf-46386b2b0d21",
4566
+ "_tags": []
4567
+ },
4568
+ {
4569
+ "entity_id": "d4061656-71dc-45ec-bf6c-1d90d2419d87",
4570
+ "_tags": []
4571
+ },
4572
+ {
4573
+ "entity_id": "4ae4221b-4fd0-4bcc-98a2-f20cda954903",
4574
+ "_tags": []
4575
+ },
4576
+ {
4577
+ "entity_id": "b326df19-9d0f-433a-a4d2-a0a65034b5f7",
4578
+ "_tags": []
4579
+ },
4580
+ {
4581
+ "entity_id": "0d071551-47be-4a5b-90d7-d425a59607e6",
4582
+ "_tags": []
4583
+ }
4584
+ ]
4585
+ },
4586
+ "_files": {
4587
+ "$relation": [
4588
+ {
4589
+ "entity_id": "27cc0710-651d-48dc-9624-9d1d3057d025",
4590
+ "_tags": []
4591
+ },
4592
+ {
4593
+ "entity_id": "8530678c-d4cb-4e27-b314-16a79d6c0abc",
4594
+ "_tags": []
4595
+ },
4596
+ {
4597
+ "entity_id": "714d6253-213f-4e30-8caf-00b0d11032e4",
4598
+ "_tags": []
4599
+ },
4600
+ {
4601
+ "entity_id": "2218a8f8-c6e2-4a98-a2fe-030ed78ebfa7",
4602
+ "_tags": []
4603
+ }
4604
+ ]
4605
+ }
4606
+ },
4607
+ "quantity": 7,
4608
+ "currency": "EUR",
4609
+ "description": "As Starting Price One Time No Tax",
4610
+ "unit_amount": 55566677,
4611
+ "amount_subtotal": 388966739,
4612
+ "amount_total": 388966739
4613
+ }
4614
+ ],
4615
+ "amount_subtotal": 389236739,
4616
+ "amount_total": 389252939,
4617
+ "total_details": {
4618
+ "amount_tax": 5400,
4619
+ "breakdown": {
4620
+ "taxes": [
4621
+ {
4622
+ "tax": {
4623
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4624
+ "type": "VAT",
4625
+ "active": true,
4626
+ "region": "DE",
4627
+ "_schema": "tax",
4628
+ "_title": "Tax Without Behaviour",
4629
+ "description": "Without Behaviour",
4630
+ "rate": 6,
4631
+ "_org": "739224",
4632
+ "_created_at": "2022-02-07T14:49:08.831Z",
4633
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4634
+ },
4635
+ "amount": 5400
4636
+ }
4637
+ ],
4638
+ "recurrences": [
4639
+ {
4640
+ "type": "one_time",
4641
+ "amount_subtotal": 389236739,
4642
+ "amount_total": 389252939,
4643
+ "amount_tax": 5400
4644
+ }
4645
+ ]
4646
+ }
4647
+ },
4648
+ "_schema": "order",
4649
+ "_id": "78ac88ae-d7df-4a1e-a26b-acaf089abfb2",
4650
+ "_org": "739224",
4651
+ "_created_at": "2022-04-19T08:19:29.816Z",
4652
+ "_updated_at": "2022-04-20T16:15:48.759Z",
4653
+ "_title": "OREabZxnO",
4654
+ "customer": {
4655
+ "$relation": [
4656
+ {
4657
+ "entity_id": "bb986d50-f403-477c-9d9c-726f8fd6d155"
4658
+ }
4659
+ ]
4660
+ }
4661
+ }
4662
+ },
3513
4663
  "opportunity": {
3514
4664
  "value": {
3515
4665
  "opportunity_number": "OP 2022/335790",
@@ -3697,7 +4847,7 @@
3697
4847
  "unit_amount_currency": "EUR",
3698
4848
  "unit_amount_decimal": "1000",
3699
4849
  "sales_tax": "standard",
3700
- "tax_behavior": "inclusive",
4850
+ "is_tax_inclusive": true,
3701
4851
  "price_display_in_journeys": "show_price",
3702
4852
  "type": "one_time",
3703
4853
  "billing_period": "weekly",
@@ -3719,7 +4869,8 @@
3719
4869
  "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
3720
4870
  "_org": "728",
3721
4871
  "_created_at": "2022-06-03T16:04:10.369Z",
3722
- "_updated_at": "2022-06-03T16:04:10.369Z"
4872
+ "_updated_at": "2022-06-03T16:04:10.369Z",
4873
+ "pricing_model": "per_unit"
3723
4874
  }
3724
4875
  },
3725
4876
  "composite-price": {
@@ -3745,7 +4896,7 @@
3745
4896
  "unit_amount_currency": "EUR",
3746
4897
  "unit_amount_decimal": "100.00",
3747
4898
  "sales_tax": "standard",
3748
- "tax_behavior": "exclusive",
4899
+ "is_tax_inclusive": false,
3749
4900
  "price_display_in_journeys": "show_price",
3750
4901
  "type": "one_time",
3751
4902
  "_schema": "price",
@@ -3780,7 +4931,7 @@
3780
4931
  "unit_amount_currency": "EUR",
3781
4932
  "unit_amount_decimal": "100.00",
3782
4933
  "sales_tax": "standard",
3783
- "tax_behavior": "exclusive",
4934
+ "is_tax_inclusive": false,
3784
4935
  "price_display_in_journeys": "show_price",
3785
4936
  "type": "one_time",
3786
4937
  "_schema": "price",
@@ -3821,7 +4972,6 @@
3821
4972
  "amount": 600,
3822
4973
  "tax": {
3823
4974
  "active": true,
3824
- "behavior": "Exclusive",
3825
4975
  "description": "Without Behaviour",
3826
4976
  "rate": 6,
3827
4977
  "region": "DE",
@@ -3842,7 +4992,7 @@
3842
4992
  "unit_amount_currency": "EUR",
3843
4993
  "unit_amount_decimal": "100.00",
3844
4994
  "sales_tax": "standard",
3845
- "tax_behavior": "exclusive",
4995
+ "is_tax_inclusive": false,
3846
4996
  "price_display_in_journeys": "show_price",
3847
4997
  "type": "one_time",
3848
4998
  "billing_period": "weekly",
@@ -3864,7 +5014,8 @@
3864
5014
  "_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
3865
5015
  "_org": "728",
3866
5016
  "_created_at": "2022-06-03T16:04:10.369Z",
3867
- "_updated_at": "2022-06-03T16:04:10.369Z"
5017
+ "_updated_at": "2022-06-03T16:04:10.369Z",
5018
+ "pricing_model": "per_unit"
3868
5019
  },
3869
5020
  "_product": {
3870
5021
  "name": "Cool box",