@epilot/pricing-client 3.17.1 → 3.17.3

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,23 +2880,69 @@
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": {
2893
+ "type": "integer",
2894
+ "description": "The unit gross amount value."
2895
+ },
2896
+ "amount_tax": {
2376
2897
  "type": "integer",
2377
- "description": "Total of all items, with same recurrence, before (discounts or) 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
+ "properties": {
2917
+ "type": {
2918
+ "type": "string",
2919
+ "description": "The price type."
2920
+ },
2921
+ "billing_period": {
2922
+ "type": "string",
2923
+ "description": "The price billing period.",
2924
+ "enum": [
2925
+ "weekly",
2926
+ "monthly",
2927
+ "every_quarter",
2928
+ "every_6_months",
2929
+ "yearly"
2930
+ ]
2378
2931
  },
2379
2932
  "amount_total": {
2380
2933
  "type": "integer",
2381
- "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
2934
+ "description": "Total of all items after (discounts and) taxes are applied."
2382
2935
  },
2383
2936
  "amount_tax": {
2384
2937
  "type": "integer",
2385
2938
  "description": "Total of all items taxes, with same recurrence."
2939
+ },
2940
+ "tax": {
2941
+ "$ref": "#/components/schemas/TaxAmountBreakdown",
2942
+ "description": "Tax"
2386
2943
  }
2387
2944
  },
2388
2945
  "required": [
2389
- "amount_subtotal",
2390
2946
  "amount_total"
2391
2947
  ]
2392
2948
  },
@@ -2420,7 +2976,7 @@
2420
2976
  },
2421
2977
  "recurrences": {
2422
2978
  "type": "array",
2423
- "description": "The aggregated price items tax amount per rate.",
2979
+ "description": "The aggregated price items recurrences.",
2424
2980
  "items": {
2425
2981
  "oneOf": [
2426
2982
  {
@@ -2428,11 +2984,63 @@
2428
2984
  }
2429
2985
  ]
2430
2986
  }
2987
+ },
2988
+ "recurrencesByTax": {
2989
+ "type": "array",
2990
+ "description": "The aggregated price items recurrences by tax rate.",
2991
+ "items": {
2992
+ "oneOf": [
2993
+ {
2994
+ "$ref": "#/components/schemas/RecurrenceAmountWithTax"
2995
+ }
2996
+ ]
2997
+ }
2431
2998
  }
2432
2999
  }
2433
3000
  }
2434
3001
  }
2435
3002
  },
3003
+ "PricingDetails": {
3004
+ "type": "object",
3005
+ "description": "The result from the calculation of a set of price items.",
3006
+ "properties": {
3007
+ "items": {
3008
+ "type": "array",
3009
+ "items": {
3010
+ "oneOf": [
3011
+ {
3012
+ "$ref": "#/components/schemas/PriceItem"
3013
+ },
3014
+ {
3015
+ "$ref": "#/components/schemas/CompositePriceItem"
3016
+ }
3017
+ ]
3018
+ }
3019
+ },
3020
+ "amount_subtotal": {
3021
+ "type": "integer",
3022
+ "description": "Total of all items before (discounts or) taxes are applied."
3023
+ },
3024
+ "amount_total": {
3025
+ "type": "integer",
3026
+ "description": "Total of all items after (discounts and) taxes are applied."
3027
+ },
3028
+ "unit_amount_gross": {
3029
+ "type": "integer",
3030
+ "description": "The unit gross amount value."
3031
+ },
3032
+ "amount_tax": {
3033
+ "type": "integer",
3034
+ "description": "This is the sum of all the price item tax amounts."
3035
+ },
3036
+ "total_details": {
3037
+ "$ref": "#/components/schemas/TotalDetails"
3038
+ },
3039
+ "currency": {
3040
+ "$ref": "#/components/schemas/Currency"
3041
+ }
3042
+ }
3043
+ },
2436
3044
  "BillingPeriod": {
2437
3045
  "type": "string",
2438
3046
  "enum": [
@@ -2440,8 +3048,7 @@
2440
3048
  "monthly",
2441
3049
  "every_quarter",
2442
3050
  "every_6_months",
2443
- "yearly",
2444
- "one_time"
3051
+ "yearly"
2445
3052
  ]
2446
3053
  },
2447
3054
  "SalesTax": {
@@ -2477,6 +3084,23 @@
2477
3084
  }
2478
3085
  }
2479
3086
  },
3087
+ "AvailabilityDate": {
3088
+ "type": "object",
3089
+ "properties": {
3090
+ "available_start_date": {
3091
+ "type": "string",
3092
+ "format": "date",
3093
+ "description": "The availability interval start date",
3094
+ "example": "2017-07-21"
3095
+ },
3096
+ "available_end_date": {
3097
+ "type": "string",
3098
+ "format": "date",
3099
+ "description": "The availability interval end date",
3100
+ "example": "2017-07-21"
3101
+ }
3102
+ }
3103
+ },
2480
3104
  "AvailabilityFilters": {
2481
3105
  "description": "Availability filters dimensions",
2482
3106
  "type": "object",
@@ -2680,36 +3304,8 @@
2680
3304
  "type": "string",
2681
3305
  "format": "uuid"
2682
3306
  },
2683
- "EntityRelation": {
2684
- "type": "object",
2685
- "additionalProperties": true,
2686
- "properties": {
2687
- "entity_id": {
2688
- "type": "string"
2689
- },
2690
- "_tags": {
2691
- "type": "array",
2692
- "items": {
2693
- "type": "string"
2694
- }
2695
- }
2696
- }
2697
- },
2698
- "Tax": {
3307
+ "EntityItem": {
2699
3308
  "type": "object",
2700
- "description": "the tax configuration",
2701
- "additionalProperties": true,
2702
- "required": [
2703
- "type",
2704
- "rate",
2705
- "behavior",
2706
- "_id",
2707
- "_title",
2708
- "_org",
2709
- "_schema",
2710
- "_created_at",
2711
- "_updated_at"
2712
- ],
2713
3309
  "properties": {
2714
3310
  "_id": {
2715
3311
  "$ref": "#/components/schemas/EntityId"
@@ -2738,8 +3334,87 @@
2738
3334
  "_updated_at": {
2739
3335
  "type": "string",
2740
3336
  "format": "date-time"
2741
- },
2742
- "type": {
3337
+ }
3338
+ },
3339
+ "required": [
3340
+ "_id",
3341
+ "_title",
3342
+ "_org",
3343
+ "_schema",
3344
+ "_created_at",
3345
+ "_updated_at"
3346
+ ],
3347
+ "example": {
3348
+ "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3349
+ "_org": "123",
3350
+ "_schema": "contact",
3351
+ "_tags": [
3352
+ "example",
3353
+ "mock"
3354
+ ],
3355
+ "_created_at": "2021-02-09T12:41:43.662Z",
3356
+ "_updated_at": "2021-02-09T12:41:43.662Z"
3357
+ }
3358
+ },
3359
+ "EntityRelation": {
3360
+ "type": "object",
3361
+ "additionalProperties": true,
3362
+ "properties": {
3363
+ "entity_id": {
3364
+ "type": "string"
3365
+ },
3366
+ "_tags": {
3367
+ "type": "array",
3368
+ "items": {
3369
+ "type": "string"
3370
+ }
3371
+ }
3372
+ }
3373
+ },
3374
+ "Tax": {
3375
+ "type": "object",
3376
+ "description": "the tax configuration",
3377
+ "additionalProperties": true,
3378
+ "required": [
3379
+ "type",
3380
+ "rate",
3381
+ "_id",
3382
+ "_title",
3383
+ "_org",
3384
+ "_schema",
3385
+ "_created_at",
3386
+ "_updated_at"
3387
+ ],
3388
+ "properties": {
3389
+ "_id": {
3390
+ "$ref": "#/components/schemas/EntityId"
3391
+ },
3392
+ "_title": {
3393
+ "type": "string",
3394
+ "description": "Title of entity"
3395
+ },
3396
+ "_org": {
3397
+ "type": "string",
3398
+ "description": "Organization Id the entity belongs to"
3399
+ },
3400
+ "_schema": {
3401
+ "type": "string"
3402
+ },
3403
+ "_tags": {
3404
+ "type": "array",
3405
+ "items": {
3406
+ "type": "string"
3407
+ }
3408
+ },
3409
+ "_created_at": {
3410
+ "type": "string",
3411
+ "format": "date-time"
3412
+ },
3413
+ "_updated_at": {
3414
+ "type": "string",
3415
+ "format": "date-time"
3416
+ },
3417
+ "type": {
2743
3418
  "type": "string",
2744
3419
  "enum": [
2745
3420
  "VAT",
@@ -2753,15 +3428,6 @@
2753
3428
  "rate": {
2754
3429
  "type": "number"
2755
3430
  },
2756
- "behavior": {
2757
- "type": "string",
2758
- "enum": [
2759
- "Exclusive",
2760
- "Inclusive",
2761
- "exclusive",
2762
- "inclusive"
2763
- ]
2764
- },
2765
3431
  "active": {
2766
3432
  "type": "boolean"
2767
3433
  },
@@ -2776,7 +3442,6 @@
2776
3442
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2777
3443
  "type": "VAT",
2778
3444
  "description": "Tax description",
2779
- "behavior": "Exclusive",
2780
3445
  "active": "true",
2781
3446
  "region": "DE",
2782
3447
  "region_label": "Germany",
@@ -2808,9 +3473,46 @@
2808
3473
  "type": "string"
2809
3474
  }
2810
3475
  }
3476
+ },
3477
+ "PriceTier": {
3478
+ "type": "object",
3479
+ "properties": {
3480
+ "up_to": {
3481
+ "type": "number",
3482
+ "nullable": true
3483
+ },
3484
+ "flat_fee_amount": {
3485
+ "type": "number"
3486
+ },
3487
+ "flat_fee_amount_decimal": {
3488
+ "type": "string"
3489
+ },
3490
+ "unit_amount": {
3491
+ "type": "number"
3492
+ },
3493
+ "unit_amount_decimal": {
3494
+ "type": "string"
3495
+ },
3496
+ "display_mode": {
3497
+ "$ref": "#/components/schemas/PriceTierDisplayMode"
3498
+ }
3499
+ }
3500
+ },
3501
+ "PriceTierDisplayMode": {
3502
+ "type": "string",
3503
+ "enum": [
3504
+ "hidden",
3505
+ "on_request"
3506
+ ]
2811
3507
  }
2812
3508
  },
2813
3509
  "examples": {
3510
+ "checkout-with-cart-id": {
3511
+ "value": {
3512
+ "mode": "create_order",
3513
+ "cart": "pZ324jnndf"
3514
+ }
3515
+ },
2814
3516
  "checkout-with-transient-cart": {
2815
3517
  "value": {
2816
3518
  "mode": "create_order",
@@ -2905,10 +3607,9 @@
2905
3607
  "type": "one_time",
2906
3608
  "active": true,
2907
3609
  "sales_tax": "standard",
2908
- "tax_behavior": "inclusive",
3610
+ "is_tax_inclusive": true,
2909
3611
  "description": "Winter Sale",
2910
3612
  "billing_scheme": "per_unit",
2911
- "tiers_mode": "Standard",
2912
3613
  "_created_at": "2021-11-10T18:02:58.318Z",
2913
3614
  "_updated_at": "2021-11-10T18:02:58.318Z",
2914
3615
  "_title": "Winter Sale"
@@ -2941,10 +3642,9 @@
2941
3642
  "type": "one_time",
2942
3643
  "active": true,
2943
3644
  "sales_tax": "standard",
2944
- "tax_behavior": "inclusive",
3645
+ "is_tax_inclusive": true,
2945
3646
  "description": "Winter Sale",
2946
3647
  "billing_scheme": "per_unit",
2947
- "tiers_mode": "Standard",
2948
3648
  "_created_at": "2021-11-10T18:02:58.318Z",
2949
3649
  "_updated_at": "2021-11-10T18:02:58.318Z",
2950
3650
  "_title": "Winter Sale"
@@ -2993,7 +3693,6 @@
2993
3693
  "tax": {
2994
3694
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
2995
3695
  "rate": "19",
2996
- "behavior": "Inclusive",
2997
3696
  "_schema": "tax",
2998
3697
  "_org": "728",
2999
3698
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3013,7 +3712,7 @@
3013
3712
  "unit_amount_currency": "EUR",
3014
3713
  "unit_amount_decimal": "1000",
3015
3714
  "sales_tax": "standard",
3016
- "tax_behavior": "inclusive",
3715
+ "is_tax_inclusive": true,
3017
3716
  "price_display_in_journeys": "show_price",
3018
3717
  "type": "one_time",
3019
3718
  "billing_period": "weekly",
@@ -3125,7 +3824,6 @@
3125
3824
  "tax": {
3126
3825
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3127
3826
  "rate": "19",
3128
- "behavior": "Inclusive",
3129
3827
  "_schema": "tax",
3130
3828
  "_org": "728",
3131
3829
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3145,7 +3843,7 @@
3145
3843
  "unit_amount_currency": "EUR",
3146
3844
  "unit_amount_decimal": "500",
3147
3845
  "sales_tax": "standard",
3148
- "tax_behavior": "inclusive",
3846
+ "is_tax_inclusive": true,
3149
3847
  "price_display_in_journeys": "show_price",
3150
3848
  "type": "one_time",
3151
3849
  "billing_period": "weekly",
@@ -3267,10 +3965,9 @@
3267
3965
  "renewal_duration_unit": "years",
3268
3966
  "active": true,
3269
3967
  "sales_tax": "reduced",
3270
- "tax_behavior": "inclusive",
3968
+ "is_tax_inclusive": true,
3271
3969
  "description": "Monthly",
3272
3970
  "billing_scheme": "per_unit",
3273
- "tiers_mode": "Standard",
3274
3971
  "_schema": "price",
3275
3972
  "_org": "728",
3276
3973
  "_created_at": "2021-11-10T14:40:27.695Z",
@@ -3365,7 +4062,7 @@
3365
4062
  "unit_amount_currency": "EUR",
3366
4063
  "unit_amount_decimal": "99",
3367
4064
  "sales_tax": "standard",
3368
- "tax_behavior": "inclusive",
4065
+ "is_tax_inclusive": true,
3369
4066
  "price_display_in_journeys": "show_price",
3370
4067
  "type": "recurring",
3371
4068
  "billing_period": "yearly",
@@ -3426,7 +4123,6 @@
3426
4123
  "tax": {
3427
4124
  "_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc",
3428
4125
  "rate": "19",
3429
- "behavior": "Inclusive",
3430
4126
  "_schema": "tax",
3431
4127
  "_org": "728",
3432
4128
  "_created_at": "2021-09-24T15:06:13.859Z",
@@ -3510,6 +4206,448 @@
3510
4206
  "_updated_at": "2022-06-03T16:29:46.303Z"
3511
4207
  }
3512
4208
  },
4209
+ "order-with-simple-prices-request": {
4210
+ "value": {
4211
+ "order_number": "OR 2022/742701",
4212
+ "status": "quote",
4213
+ "source": {
4214
+ "title": "manual",
4215
+ "href": null
4216
+ },
4217
+ "source_type": "manual",
4218
+ "_schema": "order",
4219
+ "_title": "OR 2022/742701",
4220
+ "expires_at": "2022-06-30T16:17:00.000Z",
4221
+ "line_items": [
4222
+ {
4223
+ "price_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
4224
+ "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4225
+ "quantity": 16
4226
+ },
4227
+ {
4228
+ "price_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741",
4229
+ "product_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5",
4230
+ "quantity": 4
4231
+ },
4232
+ {
4233
+ "price_id": "d88a8763-3e3d-4fc7-a7a5-2bc9117148bf",
4234
+ "product_id": "065d6618-cc59-45f4-8e3a-700edf6813c3",
4235
+ "quantity": 1
4236
+ },
4237
+ {
4238
+ "price_id": "e1ddf75a-d0d1-40b4-a07e-56e292867c88",
4239
+ "product_id": "5b9f05b7-f0f8-49c2-8a8d-0f8f923d6382",
4240
+ "quantity": 1
4241
+ }
4242
+ ],
4243
+ "currency": "EUR",
4244
+ "payment_method": [
4245
+ {
4246
+ "type": "IBAN",
4247
+ "details": {}
4248
+ }
4249
+ ],
4250
+ "billing_contact": {
4251
+ "$relation": [
4252
+ {
4253
+ "entity_id": "1834a54e-b68f-4f7f-a98a-fe16f11bc2a5",
4254
+ "_tags": []
4255
+ }
4256
+ ]
4257
+ },
4258
+ "billing_first_name": "Joao",
4259
+ "billing_last_name": "Pinho",
4260
+ "billing_email": "j.pinho@epilot.cloud",
4261
+ "billing_company_name": "epilot cloud",
4262
+ "billing_address": [
4263
+ {
4264
+ "_tags": [],
4265
+ "street": "Im Media Park",
4266
+ "street_number": "8a",
4267
+ "postal_code": "52000",
4268
+ "city": "Cologne",
4269
+ "country": "DE",
4270
+ "additional_info": ""
4271
+ }
4272
+ ],
4273
+ "delivery_address": [],
4274
+ "dates": [
4275
+ {
4276
+ "_tags": [
4277
+ "Instalation Date"
4278
+ ],
4279
+ "dates": "",
4280
+ "value": "2022-06-30T16:29:00.000Z"
4281
+ }
4282
+ ],
4283
+ "_id": "4c7c9562-f8f0-4af0-a3a6-6aebc5571a6e",
4284
+ "_org": "728",
4285
+ "_created_at": "2022-06-03T16:29:46.303Z",
4286
+ "_updated_at": "2022-06-03T16:29:46.303Z"
4287
+ }
4288
+ },
4289
+ "order-with-composite-prices": {
4290
+ "value": {
4291
+ "metadata": [
4292
+ {
4293
+ "key": "_origin",
4294
+ "value": "journey checkout"
4295
+ }
4296
+ ],
4297
+ "_tags": [
4298
+ "journey",
4299
+ "automation"
4300
+ ],
4301
+ "status": "quote",
4302
+ "order_number": "OREabZxnO",
4303
+ "billing_first_name": "Paulo",
4304
+ "billing_last_name": "Henriques",
4305
+ "billing_email": "ph@ph1.pt",
4306
+ "billing_address": [
4307
+ {
4308
+ "street": "Bernauer Str.",
4309
+ "street_number": "1",
4310
+ "city": "Berlin",
4311
+ "postal_code": "10115",
4312
+ "country": "DE",
4313
+ "additional_info": "1"
4314
+ }
4315
+ ],
4316
+ "delivery_address": [
4317
+ {
4318
+ "street": "Bernauer Str.",
4319
+ "street_number": "1",
4320
+ "city": "Berlin",
4321
+ "postal_code": "10115",
4322
+ "country": "DE",
4323
+ "additional_info": "1"
4324
+ }
4325
+ ],
4326
+ "payment_method": [
4327
+ {
4328
+ "type": "BankTransfer",
4329
+ "details": {
4330
+ "label": "Überweisung"
4331
+ }
4332
+ }
4333
+ ],
4334
+ "currency": "EUR",
4335
+ "line_items": [
4336
+ {
4337
+ "product_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4338
+ "price_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4339
+ "quantity": 3,
4340
+ "currency": "EUR",
4341
+ "item_components": [
4342
+ {
4343
+ "price_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4344
+ "product_id": "target-price-product-id",
4345
+ "quantity": 3,
4346
+ "unit_amount": 15000,
4347
+ "unit_amount_currency": "EUR",
4348
+ "unit_amount_decimal": "150.00",
4349
+ "amount_subtotal": 45000,
4350
+ "amount_total": 47700,
4351
+ "taxes": [
4352
+ {
4353
+ "tax": {
4354
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4355
+ "type": "VAT",
4356
+ "active": true,
4357
+ "region": "DE",
4358
+ "_schema": "tax",
4359
+ "_title": "Tax Without Behaviour",
4360
+ "description": "Without Behaviour",
4361
+ "rate": "6",
4362
+ "_org": "739224",
4363
+ "_created_at": "2022-02-07T14:49:08.831Z",
4364
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4365
+ },
4366
+ "amount": 2700
4367
+ }
4368
+ ]
4369
+ },
4370
+ {
4371
+ "price_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4372
+ "product_id": "target-price-product-id",
4373
+ "quantity": 3,
4374
+ "unit_amount": 15000,
4375
+ "unit_amount_currency": "EUR",
4376
+ "unit_amount_decimal": "150.00",
4377
+ "amount_subtotal": 45000,
4378
+ "amount_total": 47700,
4379
+ "taxes": [
4380
+ {
4381
+ "tax": {
4382
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4383
+ "type": "VAT",
4384
+ "active": true,
4385
+ "region": "DE",
4386
+ "_schema": "tax",
4387
+ "_title": "Tax Without Behaviour",
4388
+ "description": "Without Behaviour",
4389
+ "rate": 6,
4390
+ "_org": "739224",
4391
+ "_created_at": "2022-02-07T14:49:08.831Z",
4392
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4393
+ },
4394
+ "amount": 2700
4395
+ }
4396
+ ]
4397
+ }
4398
+ ],
4399
+ "_price": {
4400
+ "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4401
+ "_schema": "price",
4402
+ "_title": "Test 1",
4403
+ "description": "Test 1",
4404
+ "_org": "739224",
4405
+ "_created_at": "2022-02-18T10:10:26.439Z",
4406
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4407
+ "active": true,
4408
+ "price_components": {
4409
+ "$relation": [
4410
+ {
4411
+ "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4412
+ "_schema": "price",
4413
+ "_product_id": "target-price-product-id",
4414
+ "quantity": 1,
4415
+ "item": {
4416
+ "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4417
+ "unit_amount": 10000,
4418
+ "unit_amount_currency": "EUR",
4419
+ "unit_amount_decimal": "100.00",
4420
+ "sales_tax": "standard",
4421
+ "price_display_in_journeys": "show_price",
4422
+ "type": "one_time",
4423
+ "_schema": "price",
4424
+ "_title": "Test 1",
4425
+ "description": "Test 1",
4426
+ "tax": {
4427
+ "$relation": [
4428
+ {
4429
+ "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4430
+ }
4431
+ ]
4432
+ },
4433
+ "_org": "739224",
4434
+ "_created_at": "2022-02-18T10:10:26.439Z",
4435
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4436
+ "active": true,
4437
+ "billing_period": "weekly",
4438
+ "billing_duration_unit": "months",
4439
+ "notice_time_unit": "months",
4440
+ "termination_time_unit": "months",
4441
+ "renewal_duration_unit": "months"
4442
+ }
4443
+ },
4444
+ {
4445
+ "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4446
+ "_schema": "price",
4447
+ "_product_id": "target-price-product-id",
4448
+ "quantity": 2,
4449
+ "item": {
4450
+ "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f",
4451
+ "unit_amount": 10000,
4452
+ "unit_amount_currency": "EUR",
4453
+ "unit_amount_decimal": "100.00",
4454
+ "sales_tax": "standard",
4455
+ "is_tax_inclusive": false,
4456
+ "price_display_in_journeys": "show_price",
4457
+ "type": "one_time",
4458
+ "_schema": "price",
4459
+ "_title": "Test 1",
4460
+ "description": "Test 1",
4461
+ "tax": {
4462
+ "$relation": [
4463
+ {
4464
+ "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4"
4465
+ }
4466
+ ]
4467
+ },
4468
+ "_org": "739224",
4469
+ "_created_at": "2022-02-18T10:10:26.439Z",
4470
+ "_updated_at": "2022-02-18T11:53:04.191Z",
4471
+ "active": true,
4472
+ "billing_period": "weekly",
4473
+ "billing_duration_unit": "months",
4474
+ "notice_time_unit": "months",
4475
+ "termination_time_unit": "months",
4476
+ "renewal_duration_unit": "months"
4477
+ }
4478
+ }
4479
+ ]
4480
+ }
4481
+ },
4482
+ "_product": {
4483
+ "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6",
4484
+ "type": "product",
4485
+ "name": "Cool box",
4486
+ "_title": "Cool box"
4487
+ },
4488
+ "description": "Price Component",
4489
+ "unit_amount": 90000,
4490
+ "amount_subtotal": 270000,
4491
+ "amount_total": 286200
4492
+ },
4493
+ {
4494
+ "price_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4495
+ "product_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4496
+ "taxes": [
4497
+ {
4498
+ "tax": null,
4499
+ "amount": 0
4500
+ }
4501
+ ],
4502
+ "_price": {
4503
+ "_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4504
+ "unit_amount": 55566677,
4505
+ "unit_amount_currency": "EUR",
4506
+ "unit_amount_decimal": "555666.77",
4507
+ "sales_tax": "standard",
4508
+ "is_tax_inclusive": true,
4509
+ "price_display_in_journeys": "show_as_starting_price",
4510
+ "type": "one_time",
4511
+ "_schema": "price",
4512
+ "_title": "As Starting Price One Time No Tax",
4513
+ "description": "As Starting Price One Time No Tax",
4514
+ "tax": null,
4515
+ "active": true,
4516
+ "_org": "739224",
4517
+ "_created_at": "2022-04-14T16:12:34.456Z",
4518
+ "_updated_at": "2022-04-14T16:13:47.261Z",
4519
+ "billing_period": "weekly",
4520
+ "billing_duration_unit": "months",
4521
+ "notice_time_unit": "months",
4522
+ "termination_time_unit": "months",
4523
+ "renewal_duration_unit": "months"
4524
+ },
4525
+ "_product": {
4526
+ "_id": "11bd46e5-4c02-425c-bcce-5f5e022a2b45",
4527
+ "type": "product",
4528
+ "_schema": "product",
4529
+ "_title": "Product With A Lot Of Prices - Do Not Change 🙏",
4530
+ "name": "Product With A Lot Of Prices - Do Not Change 🙏",
4531
+ "_org": "739224",
4532
+ "_created_at": "2022-04-14T16:08:08.595Z",
4533
+ "_updated_at": "2022-04-18T16:26:33.089Z",
4534
+ "price_options": {
4535
+ "$relation": [
4536
+ {
4537
+ "entity_id": "f850ebff-082e-4924-8631-965cc9c0ab2b",
4538
+ "_tags": []
4539
+ },
4540
+ {
4541
+ "entity_id": "d6ecc576-b5d6-44b4-8c95-496ab2ac14d3",
4542
+ "_tags": []
4543
+ },
4544
+ {
4545
+ "entity_id": "3c0e47ad-6ca3-4cd8-b6b4-b2a48dab7f16",
4546
+ "_tags": []
4547
+ },
4548
+ {
4549
+ "entity_id": "adbd8cee-0db2-41dd-b93b-2d0ed57c77da",
4550
+ "_tags": []
4551
+ },
4552
+ {
4553
+ "entity_id": "3e97f809-1d4b-47e1-9faf-46386b2b0d21",
4554
+ "_tags": []
4555
+ },
4556
+ {
4557
+ "entity_id": "d4061656-71dc-45ec-bf6c-1d90d2419d87",
4558
+ "_tags": []
4559
+ },
4560
+ {
4561
+ "entity_id": "4ae4221b-4fd0-4bcc-98a2-f20cda954903",
4562
+ "_tags": []
4563
+ },
4564
+ {
4565
+ "entity_id": "b326df19-9d0f-433a-a4d2-a0a65034b5f7",
4566
+ "_tags": []
4567
+ },
4568
+ {
4569
+ "entity_id": "0d071551-47be-4a5b-90d7-d425a59607e6",
4570
+ "_tags": []
4571
+ }
4572
+ ]
4573
+ },
4574
+ "_files": {
4575
+ "$relation": [
4576
+ {
4577
+ "entity_id": "27cc0710-651d-48dc-9624-9d1d3057d025",
4578
+ "_tags": []
4579
+ },
4580
+ {
4581
+ "entity_id": "8530678c-d4cb-4e27-b314-16a79d6c0abc",
4582
+ "_tags": []
4583
+ },
4584
+ {
4585
+ "entity_id": "714d6253-213f-4e30-8caf-00b0d11032e4",
4586
+ "_tags": []
4587
+ },
4588
+ {
4589
+ "entity_id": "2218a8f8-c6e2-4a98-a2fe-030ed78ebfa7",
4590
+ "_tags": []
4591
+ }
4592
+ ]
4593
+ }
4594
+ },
4595
+ "quantity": 7,
4596
+ "currency": "EUR",
4597
+ "description": "As Starting Price One Time No Tax",
4598
+ "unit_amount": 55566677,
4599
+ "amount_subtotal": 388966739,
4600
+ "amount_total": 388966739
4601
+ }
4602
+ ],
4603
+ "amount_subtotal": 389236739,
4604
+ "amount_total": 389252939,
4605
+ "total_details": {
4606
+ "amount_tax": 5400,
4607
+ "breakdown": {
4608
+ "taxes": [
4609
+ {
4610
+ "tax": {
4611
+ "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4",
4612
+ "type": "VAT",
4613
+ "active": true,
4614
+ "region": "DE",
4615
+ "_schema": "tax",
4616
+ "_title": "Tax Without Behaviour",
4617
+ "description": "Without Behaviour",
4618
+ "rate": 6,
4619
+ "_org": "739224",
4620
+ "_created_at": "2022-02-07T14:49:08.831Z",
4621
+ "_updated_at": "2022-02-07T14:49:08.831Z"
4622
+ },
4623
+ "amount": 5400
4624
+ }
4625
+ ],
4626
+ "recurrences": [
4627
+ {
4628
+ "type": "one_time",
4629
+ "amount_subtotal": 389236739,
4630
+ "amount_total": 389252939,
4631
+ "amount_tax": 5400
4632
+ }
4633
+ ]
4634
+ }
4635
+ },
4636
+ "_schema": "order",
4637
+ "_id": "78ac88ae-d7df-4a1e-a26b-acaf089abfb2",
4638
+ "_org": "739224",
4639
+ "_created_at": "2022-04-19T08:19:29.816Z",
4640
+ "_updated_at": "2022-04-20T16:15:48.759Z",
4641
+ "_title": "OREabZxnO",
4642
+ "customer": {
4643
+ "$relation": [
4644
+ {
4645
+ "entity_id": "bb986d50-f403-477c-9d9c-726f8fd6d155"
4646
+ }
4647
+ ]
4648
+ }
4649
+ }
4650
+ },
3513
4651
  "opportunity": {
3514
4652
  "value": {
3515
4653
  "opportunity_number": "OP 2022/335790",
@@ -3697,7 +4835,7 @@
3697
4835
  "unit_amount_currency": "EUR",
3698
4836
  "unit_amount_decimal": "1000",
3699
4837
  "sales_tax": "standard",
3700
- "tax_behavior": "inclusive",
4838
+ "is_tax_inclusive": true,
3701
4839
  "price_display_in_journeys": "show_price",
3702
4840
  "type": "one_time",
3703
4841
  "billing_period": "weekly",
@@ -3719,7 +4857,8 @@
3719
4857
  "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7",
3720
4858
  "_org": "728",
3721
4859
  "_created_at": "2022-06-03T16:04:10.369Z",
3722
- "_updated_at": "2022-06-03T16:04:10.369Z"
4860
+ "_updated_at": "2022-06-03T16:04:10.369Z",
4861
+ "pricing_model": "per_unit"
3723
4862
  }
3724
4863
  },
3725
4864
  "composite-price": {
@@ -3745,7 +4884,7 @@
3745
4884
  "unit_amount_currency": "EUR",
3746
4885
  "unit_amount_decimal": "100.00",
3747
4886
  "sales_tax": "standard",
3748
- "tax_behavior": "exclusive",
4887
+ "is_tax_inclusive": false,
3749
4888
  "price_display_in_journeys": "show_price",
3750
4889
  "type": "one_time",
3751
4890
  "_schema": "price",
@@ -3780,7 +4919,7 @@
3780
4919
  "unit_amount_currency": "EUR",
3781
4920
  "unit_amount_decimal": "100.00",
3782
4921
  "sales_tax": "standard",
3783
- "tax_behavior": "exclusive",
4922
+ "is_tax_inclusive": false,
3784
4923
  "price_display_in_journeys": "show_price",
3785
4924
  "type": "one_time",
3786
4925
  "_schema": "price",
@@ -3821,7 +4960,6 @@
3821
4960
  "amount": 600,
3822
4961
  "tax": {
3823
4962
  "active": true,
3824
- "behavior": "Exclusive",
3825
4963
  "description": "Without Behaviour",
3826
4964
  "rate": 6,
3827
4965
  "region": "DE",
@@ -3842,7 +4980,7 @@
3842
4980
  "unit_amount_currency": "EUR",
3843
4981
  "unit_amount_decimal": "100.00",
3844
4982
  "sales_tax": "standard",
3845
- "tax_behavior": "exclusive",
4983
+ "is_tax_inclusive": false,
3846
4984
  "price_display_in_journeys": "show_price",
3847
4985
  "type": "one_time",
3848
4986
  "billing_period": "weekly",
@@ -3864,7 +5002,8 @@
3864
5002
  "_id": "7e24ff5d-d580-4136-a32f-19191eed039a",
3865
5003
  "_org": "728",
3866
5004
  "_created_at": "2022-06-03T16:04:10.369Z",
3867
- "_updated_at": "2022-06-03T16:04:10.369Z"
5005
+ "_updated_at": "2022-06-03T16:04:10.369Z",
5006
+ "pricing_model": "per_unit"
3868
5007
  },
3869
5008
  "_product": {
3870
5009
  "name": "Cool box",