@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/definition.js +1 -1
- package/dist/openapi-runtime.json +17 -0
- package/dist/openapi.d.ts +774 -74
- package/dist/openapi.json +1254 -115
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -63,6 +63,24 @@ declare namespace Components {
|
|
|
63
63
|
*/
|
|
64
64
|
title?: string | null;
|
|
65
65
|
}
|
|
66
|
+
export interface Amounts {
|
|
67
|
+
/**
|
|
68
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
69
|
+
*/
|
|
70
|
+
amount_subtotal?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
73
|
+
*/
|
|
74
|
+
amount_subtotal_decimal?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
77
|
+
*/
|
|
78
|
+
amount_total?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
81
|
+
*/
|
|
82
|
+
amount_total_decimal?: string;
|
|
83
|
+
}
|
|
66
84
|
/**
|
|
67
85
|
* Availability check request payload
|
|
68
86
|
*/
|
|
@@ -73,6 +91,20 @@ declare namespace Components {
|
|
|
73
91
|
products: string[];
|
|
74
92
|
filters: /* Availability filters dimensions */ AvailabilityFilters;
|
|
75
93
|
}
|
|
94
|
+
export interface AvailabilityDate {
|
|
95
|
+
/**
|
|
96
|
+
* The availability interval start date
|
|
97
|
+
* example:
|
|
98
|
+
* 2017-07-21
|
|
99
|
+
*/
|
|
100
|
+
available_start_date?: string; // date
|
|
101
|
+
/**
|
|
102
|
+
* The availability interval end date
|
|
103
|
+
* example:
|
|
104
|
+
* 2017-07-21
|
|
105
|
+
*/
|
|
106
|
+
available_end_date?: string; // date
|
|
107
|
+
}
|
|
76
108
|
/**
|
|
77
109
|
* Availability filters dimensions
|
|
78
110
|
*/
|
|
@@ -151,19 +183,39 @@ declare namespace Components {
|
|
|
151
183
|
* }
|
|
152
184
|
*/
|
|
153
185
|
export interface BasePriceItem {
|
|
186
|
+
/**
|
|
187
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
188
|
+
*/
|
|
189
|
+
amount_subtotal?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
192
|
+
*/
|
|
193
|
+
amount_subtotal_decimal?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
196
|
+
*/
|
|
197
|
+
amount_total?: number;
|
|
198
|
+
/**
|
|
199
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
200
|
+
*/
|
|
201
|
+
amount_total_decimal?: string;
|
|
154
202
|
/**
|
|
155
203
|
* price item id
|
|
156
204
|
*/
|
|
157
|
-
|
|
205
|
+
_id?: string;
|
|
158
206
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
159
207
|
/**
|
|
160
208
|
* The unit amount value
|
|
161
209
|
*/
|
|
162
210
|
unit_amount?: number;
|
|
163
211
|
/**
|
|
164
|
-
*
|
|
212
|
+
* The unit gross amount value.
|
|
165
213
|
*/
|
|
166
|
-
|
|
214
|
+
unit_amount_gross?: number;
|
|
215
|
+
/**
|
|
216
|
+
* Total tax amount for this line item.
|
|
217
|
+
*/
|
|
218
|
+
amount_tax?: number;
|
|
167
219
|
/**
|
|
168
220
|
* Net unit amount without taxes or discounts.
|
|
169
221
|
*/
|
|
@@ -172,10 +224,6 @@ declare namespace Components {
|
|
|
172
224
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
173
225
|
*/
|
|
174
226
|
unit_amount_decimal?: string;
|
|
175
|
-
/**
|
|
176
|
-
* Total after (discounts and) taxes.
|
|
177
|
-
*/
|
|
178
|
-
amount_total?: number;
|
|
179
227
|
currency?: /**
|
|
180
228
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
181
229
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -238,6 +286,26 @@ declare namespace Components {
|
|
|
238
286
|
* The sum of amounts of the price items by recurrence.
|
|
239
287
|
*/
|
|
240
288
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
289
|
+
price_mappings?: /**
|
|
290
|
+
* example:
|
|
291
|
+
* [
|
|
292
|
+
* {
|
|
293
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
294
|
+
* "frequency_unit": "weekly",
|
|
295
|
+
* "value": 1000.245,
|
|
296
|
+
* "name": "avg consumption",
|
|
297
|
+
* "metadata": {
|
|
298
|
+
* "journey_title": "energy journey",
|
|
299
|
+
* "step_name": "avg consumption picker"
|
|
300
|
+
* }
|
|
301
|
+
* }
|
|
302
|
+
* ]
|
|
303
|
+
*/
|
|
304
|
+
PriceInputMappings;
|
|
305
|
+
/**
|
|
306
|
+
* 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'.
|
|
307
|
+
*/
|
|
308
|
+
on_request_approved?: boolean;
|
|
241
309
|
}
|
|
242
310
|
/**
|
|
243
311
|
* Represents a valid base price item from a client.
|
|
@@ -248,6 +316,25 @@ declare namespace Components {
|
|
|
248
316
|
* The quantity of products being purchased.
|
|
249
317
|
*/
|
|
250
318
|
quantity?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Price mapping information required to compute totals
|
|
321
|
+
*/
|
|
322
|
+
price_mappings?: /**
|
|
323
|
+
* example:
|
|
324
|
+
* [
|
|
325
|
+
* {
|
|
326
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
327
|
+
* "frequency_unit": "weekly",
|
|
328
|
+
* "value": 1000.245,
|
|
329
|
+
* "name": "avg consumption",
|
|
330
|
+
* "metadata": {
|
|
331
|
+
* "journey_title": "energy journey",
|
|
332
|
+
* "step_name": "avg consumption picker"
|
|
333
|
+
* }
|
|
334
|
+
* }
|
|
335
|
+
* ]
|
|
336
|
+
*/
|
|
337
|
+
PriceInputMappings;
|
|
251
338
|
/**
|
|
252
339
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
253
340
|
*/
|
|
@@ -281,6 +368,10 @@ declare namespace Components {
|
|
|
281
368
|
*/
|
|
282
369
|
_product?: {
|
|
283
370
|
[name: string]: any;
|
|
371
|
+
/**
|
|
372
|
+
* The description for the product
|
|
373
|
+
*/
|
|
374
|
+
description?: string;
|
|
284
375
|
/**
|
|
285
376
|
* The product code
|
|
286
377
|
*/
|
|
@@ -360,7 +451,52 @@ declare namespace Components {
|
|
|
360
451
|
_updated_at?: string;
|
|
361
452
|
};
|
|
362
453
|
}
|
|
363
|
-
export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly"
|
|
454
|
+
export type BillingPeriod = "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
|
|
455
|
+
/**
|
|
456
|
+
* Supports shopping for products and services until ready for checkout.
|
|
457
|
+
*/
|
|
458
|
+
export interface Cart {
|
|
459
|
+
/**
|
|
460
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
461
|
+
*/
|
|
462
|
+
amount_subtotal?: number;
|
|
463
|
+
/**
|
|
464
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
465
|
+
*/
|
|
466
|
+
amount_subtotal_decimal?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
469
|
+
*/
|
|
470
|
+
amount_total?: number;
|
|
471
|
+
/**
|
|
472
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
473
|
+
*/
|
|
474
|
+
amount_total_decimal?: string;
|
|
475
|
+
/**
|
|
476
|
+
* The cart identifier
|
|
477
|
+
*/
|
|
478
|
+
id?: string;
|
|
479
|
+
/**
|
|
480
|
+
* The user's Organization Id the cart belongs to
|
|
481
|
+
*/
|
|
482
|
+
org_id?: string;
|
|
483
|
+
/**
|
|
484
|
+
* The status of the Cart:
|
|
485
|
+
* - open - the cart checkout is still in progress. Payment processing has not started
|
|
486
|
+
* - complete - the cart checkout is complete. Payment processing may still be in progress
|
|
487
|
+
* - expired - the cart checkout has expired. No further processing will occur
|
|
488
|
+
*
|
|
489
|
+
*/
|
|
490
|
+
status?: "open" | "complete" | "expired";
|
|
491
|
+
customer?: Customer;
|
|
492
|
+
billing_address?: Address;
|
|
493
|
+
delivery_address?: Address;
|
|
494
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
495
|
+
line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
|
|
496
|
+
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
497
|
+
created_at?: string; // date-time
|
|
498
|
+
updated_at?: string; // date-time
|
|
499
|
+
}
|
|
364
500
|
/**
|
|
365
501
|
* A valid cart payload from a client.
|
|
366
502
|
*/
|
|
@@ -597,19 +733,39 @@ declare namespace Components {
|
|
|
597
733
|
* }
|
|
598
734
|
*/
|
|
599
735
|
export interface CompositePriceItem {
|
|
736
|
+
/**
|
|
737
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
738
|
+
*/
|
|
739
|
+
amount_subtotal?: number;
|
|
740
|
+
/**
|
|
741
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
742
|
+
*/
|
|
743
|
+
amount_subtotal_decimal?: string;
|
|
744
|
+
/**
|
|
745
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
746
|
+
*/
|
|
747
|
+
amount_total?: number;
|
|
748
|
+
/**
|
|
749
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
750
|
+
*/
|
|
751
|
+
amount_total_decimal?: string;
|
|
600
752
|
/**
|
|
601
753
|
* price item id
|
|
602
754
|
*/
|
|
603
|
-
|
|
755
|
+
_id?: string;
|
|
604
756
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
605
757
|
/**
|
|
606
758
|
* The unit amount value
|
|
607
759
|
*/
|
|
608
760
|
unit_amount?: number;
|
|
609
761
|
/**
|
|
610
|
-
*
|
|
762
|
+
* The unit gross amount value.
|
|
611
763
|
*/
|
|
612
|
-
|
|
764
|
+
unit_amount_gross?: number;
|
|
765
|
+
/**
|
|
766
|
+
* Total tax amount for this line item.
|
|
767
|
+
*/
|
|
768
|
+
amount_tax?: number;
|
|
613
769
|
/**
|
|
614
770
|
* Net unit amount without taxes or discounts.
|
|
615
771
|
*/
|
|
@@ -618,10 +774,6 @@ declare namespace Components {
|
|
|
618
774
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
619
775
|
*/
|
|
620
776
|
unit_amount_decimal?: string;
|
|
621
|
-
/**
|
|
622
|
-
* Total after (discounts and) taxes.
|
|
623
|
-
*/
|
|
624
|
-
amount_total?: number;
|
|
625
777
|
currency?: /**
|
|
626
778
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
627
779
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -684,6 +836,26 @@ declare namespace Components {
|
|
|
684
836
|
* The sum of amounts of the price items by recurrence.
|
|
685
837
|
*/
|
|
686
838
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
839
|
+
price_mappings?: /**
|
|
840
|
+
* example:
|
|
841
|
+
* [
|
|
842
|
+
* {
|
|
843
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
844
|
+
* "frequency_unit": "weekly",
|
|
845
|
+
* "value": 1000.245,
|
|
846
|
+
* "name": "avg consumption",
|
|
847
|
+
* "metadata": {
|
|
848
|
+
* "journey_title": "energy journey",
|
|
849
|
+
* "step_name": "avg consumption picker"
|
|
850
|
+
* }
|
|
851
|
+
* }
|
|
852
|
+
* ]
|
|
853
|
+
*/
|
|
854
|
+
PriceInputMappings;
|
|
855
|
+
/**
|
|
856
|
+
* 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'.
|
|
857
|
+
*/
|
|
858
|
+
on_request_approved?: boolean;
|
|
687
859
|
/**
|
|
688
860
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
689
861
|
*/
|
|
@@ -695,6 +867,160 @@ declare namespace Components {
|
|
|
695
867
|
* }
|
|
696
868
|
*/
|
|
697
869
|
PriceItem[];
|
|
870
|
+
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Represents a composite price input to the pricing library.
|
|
874
|
+
*/
|
|
875
|
+
export interface CompositePriceItemDto {
|
|
876
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
877
|
+
/**
|
|
878
|
+
* The quantity of products being purchased.
|
|
879
|
+
*/
|
|
880
|
+
quantity?: number;
|
|
881
|
+
price_mappings?: /**
|
|
882
|
+
* example:
|
|
883
|
+
* [
|
|
884
|
+
* {
|
|
885
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
886
|
+
* "frequency_unit": "weekly",
|
|
887
|
+
* "value": 1000.245,
|
|
888
|
+
* "name": "avg consumption",
|
|
889
|
+
* "metadata": {
|
|
890
|
+
* "journey_title": "energy journey",
|
|
891
|
+
* "step_name": "avg consumption picker"
|
|
892
|
+
* }
|
|
893
|
+
* }
|
|
894
|
+
* ]
|
|
895
|
+
*/
|
|
896
|
+
PriceInputMappings;
|
|
897
|
+
/**
|
|
898
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
899
|
+
*/
|
|
900
|
+
description?: string;
|
|
901
|
+
/**
|
|
902
|
+
* The id of the product.
|
|
903
|
+
*/
|
|
904
|
+
product_id?: string;
|
|
905
|
+
/**
|
|
906
|
+
* The id of the price.
|
|
907
|
+
*/
|
|
908
|
+
price_id?: string;
|
|
909
|
+
/**
|
|
910
|
+
* The taxes applied to the price item.
|
|
911
|
+
*/
|
|
912
|
+
taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
|
|
913
|
+
/**
|
|
914
|
+
* The taxes applied to the price item.
|
|
915
|
+
*/
|
|
916
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
917
|
+
/**
|
|
918
|
+
* The flag for prices that contain price components.
|
|
919
|
+
*/
|
|
920
|
+
is_composite_price?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* The snapshot of the product.
|
|
923
|
+
* example:
|
|
924
|
+
* {
|
|
925
|
+
* "$ref": "#/components/examples/product"
|
|
926
|
+
* }
|
|
927
|
+
*/
|
|
928
|
+
_product?: {
|
|
929
|
+
[name: string]: any;
|
|
930
|
+
/**
|
|
931
|
+
* The description for the product
|
|
932
|
+
*/
|
|
933
|
+
description?: string;
|
|
934
|
+
/**
|
|
935
|
+
* The product code
|
|
936
|
+
*/
|
|
937
|
+
code?: string;
|
|
938
|
+
/**
|
|
939
|
+
* The type of Product:
|
|
940
|
+
*
|
|
941
|
+
* | type | description |
|
|
942
|
+
* |----| ----|
|
|
943
|
+
* | `product` | Represents a physical good |
|
|
944
|
+
* | `service` | Represents a service or virtual product |
|
|
945
|
+
*
|
|
946
|
+
*/
|
|
947
|
+
type?: "product" | "service";
|
|
948
|
+
/**
|
|
949
|
+
* The product main name
|
|
950
|
+
*/
|
|
951
|
+
name?: string;
|
|
952
|
+
feature?: {
|
|
953
|
+
/**
|
|
954
|
+
* An arbitrary set of tags attached to a feature
|
|
955
|
+
*/
|
|
956
|
+
_tags?: string[];
|
|
957
|
+
feature?: string;
|
|
958
|
+
}[];
|
|
959
|
+
/**
|
|
960
|
+
* Stores references to products that can be cross sold with the current product.
|
|
961
|
+
*/
|
|
962
|
+
cross_sellable_products?: {
|
|
963
|
+
$relation?: EntityRelation[];
|
|
964
|
+
};
|
|
965
|
+
/**
|
|
966
|
+
* Stores references to a set of file images of the product
|
|
967
|
+
*/
|
|
968
|
+
product_images?: {
|
|
969
|
+
$relation?: EntityRelation[];
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* Stores references to a set of files downloadable from the product.
|
|
973
|
+
* e.g: tech specifications, quality control sheets, privacy policy agreements
|
|
974
|
+
*
|
|
975
|
+
*/
|
|
976
|
+
product_downloads?: {
|
|
977
|
+
$relation?: EntityRelation[];
|
|
978
|
+
};
|
|
979
|
+
/**
|
|
980
|
+
* A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product.
|
|
981
|
+
*/
|
|
982
|
+
price_options?: {
|
|
983
|
+
$relation?: EntityRelation[];
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Stores references to the availability files that define where this product is available.
|
|
987
|
+
* These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block.
|
|
988
|
+
*
|
|
989
|
+
*/
|
|
990
|
+
_availability_files?: File[];
|
|
991
|
+
/**
|
|
992
|
+
* The product id
|
|
993
|
+
*/
|
|
994
|
+
_id?: string;
|
|
995
|
+
/**
|
|
996
|
+
* The autogenerated product title
|
|
997
|
+
*/
|
|
998
|
+
_title?: string;
|
|
999
|
+
/**
|
|
1000
|
+
* The organization id the product belongs to
|
|
1001
|
+
*/
|
|
1002
|
+
_org_id?: string;
|
|
1003
|
+
/**
|
|
1004
|
+
* The product creation date
|
|
1005
|
+
*/
|
|
1006
|
+
_created_at?: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* The product last update date
|
|
1009
|
+
*/
|
|
1010
|
+
_updated_at?: string;
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
1014
|
+
*/
|
|
1015
|
+
item_components?: /* Represents a price input to the pricing library. */ PriceItemDto[];
|
|
1016
|
+
_price?: /**
|
|
1017
|
+
* The price entity schema for dynamic pricing
|
|
1018
|
+
* example:
|
|
1019
|
+
* {
|
|
1020
|
+
* "$ref": "#/components/examples/composite-price"
|
|
1021
|
+
* }
|
|
1022
|
+
*/
|
|
1023
|
+
CompositePrice;
|
|
698
1024
|
}
|
|
699
1025
|
/**
|
|
700
1026
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
@@ -710,12 +1036,41 @@ declare namespace Components {
|
|
|
710
1036
|
company_name?: string;
|
|
711
1037
|
vat_id?: string;
|
|
712
1038
|
/**
|
|
713
|
-
* A valid email identifying the customer.
|
|
1039
|
+
* A valid email identifying the customer.
|
|
1040
|
+
*/
|
|
1041
|
+
email?: string;
|
|
1042
|
+
phone?: string;
|
|
1043
|
+
}
|
|
1044
|
+
export type EntityId = string; // uuid
|
|
1045
|
+
/**
|
|
1046
|
+
* example:
|
|
1047
|
+
* {
|
|
1048
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1049
|
+
* "_org": "123",
|
|
1050
|
+
* "_schema": "contact",
|
|
1051
|
+
* "_tags": [
|
|
1052
|
+
* "example",
|
|
1053
|
+
* "mock"
|
|
1054
|
+
* ],
|
|
1055
|
+
* "_created_at": "2021-02-09T12:41:43.662Z",
|
|
1056
|
+
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
1057
|
+
* }
|
|
1058
|
+
*/
|
|
1059
|
+
export interface EntityItem {
|
|
1060
|
+
_id: EntityId /* uuid */;
|
|
1061
|
+
/**
|
|
1062
|
+
* Title of entity
|
|
714
1063
|
*/
|
|
715
|
-
|
|
716
|
-
|
|
1064
|
+
_title: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* Organization Id the entity belongs to
|
|
1067
|
+
*/
|
|
1068
|
+
_org: string;
|
|
1069
|
+
_schema: string;
|
|
1070
|
+
_tags?: string[];
|
|
1071
|
+
_created_at: string; // date-time
|
|
1072
|
+
_updated_at: string; // date-time
|
|
717
1073
|
}
|
|
718
|
-
export type EntityId = string; // uuid
|
|
719
1074
|
export interface EntityRelation {
|
|
720
1075
|
[name: string]: any;
|
|
721
1076
|
entity_id?: string;
|
|
@@ -1106,7 +1461,7 @@ declare namespace Components {
|
|
|
1106
1461
|
*
|
|
1107
1462
|
*/
|
|
1108
1463
|
OrderStatus;
|
|
1109
|
-
line_items?: /*
|
|
1464
|
+
line_items?: /* A valid set of product prices, quantities, (discounts) and taxes from a client. */ PriceItemsDto;
|
|
1110
1465
|
/**
|
|
1111
1466
|
* type of source, e.g. journey or manual
|
|
1112
1467
|
* example:
|
|
@@ -1213,18 +1568,27 @@ declare namespace Components {
|
|
|
1213
1568
|
*/
|
|
1214
1569
|
is_composite_price?: boolean;
|
|
1215
1570
|
/**
|
|
1216
|
-
* Describes how to compute the price per period. Either `per_unit` or `
|
|
1571
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1217
1572
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1218
|
-
* - `
|
|
1573
|
+
* - `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.
|
|
1574
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1575
|
+
* - `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.
|
|
1219
1576
|
*
|
|
1220
|
-
|
|
1577
|
+
*/
|
|
1578
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1579
|
+
/**
|
|
1580
|
+
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1221
1581
|
*
|
|
1222
1582
|
*/
|
|
1223
|
-
|
|
1583
|
+
tiers?: PriceTier[];
|
|
1224
1584
|
/**
|
|
1225
1585
|
* A brief description of the price.
|
|
1226
1586
|
*/
|
|
1227
1587
|
description?: string;
|
|
1588
|
+
/**
|
|
1589
|
+
* A detailed description of the price. This is shown on the order document and order table.
|
|
1590
|
+
*/
|
|
1591
|
+
long_description?: string;
|
|
1228
1592
|
/**
|
|
1229
1593
|
* The default tax rate applicable to the product.
|
|
1230
1594
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -1248,7 +1612,6 @@ declare namespace Components {
|
|
|
1248
1612
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1249
1613
|
* "type": "VAT",
|
|
1250
1614
|
* "description": "Tax description",
|
|
1251
|
-
* "behavior": "Exclusive",
|
|
1252
1615
|
* "active": "true",
|
|
1253
1616
|
* "region": "DE",
|
|
1254
1617
|
* "region_label": "Germany",
|
|
@@ -1264,15 +1627,9 @@ declare namespace Components {
|
|
|
1264
1627
|
*/
|
|
1265
1628
|
Tax[];
|
|
1266
1629
|
/**
|
|
1267
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1268
|
-
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1269
|
-
*
|
|
1270
|
-
*/
|
|
1271
|
-
tax_behavior?: "inclusive" | "exclusive";
|
|
1272
|
-
/**
|
|
1273
|
-
* Defines the tiered pricing type of the price.
|
|
1630
|
+
* Specifies whether the price is considered `inclusive` of taxes or not.
|
|
1274
1631
|
*/
|
|
1275
|
-
|
|
1632
|
+
is_tax_inclusive?: boolean;
|
|
1276
1633
|
/**
|
|
1277
1634
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1278
1635
|
*/
|
|
@@ -1343,7 +1700,7 @@ declare namespace Components {
|
|
|
1343
1700
|
/**
|
|
1344
1701
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
1345
1702
|
*/
|
|
1346
|
-
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
|
|
1703
|
+
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
|
|
1347
1704
|
/**
|
|
1348
1705
|
* The price creation date
|
|
1349
1706
|
*/
|
|
@@ -1385,6 +1742,57 @@ declare namespace Components {
|
|
|
1385
1742
|
*/
|
|
1386
1743
|
_tags?: string[];
|
|
1387
1744
|
}
|
|
1745
|
+
/**
|
|
1746
|
+
* example:
|
|
1747
|
+
* {
|
|
1748
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1749
|
+
* "frequency_unit": "weekly",
|
|
1750
|
+
* "value": 1000.245,
|
|
1751
|
+
* "name": "avg consumption",
|
|
1752
|
+
* "metadata": {
|
|
1753
|
+
* "journey_title": "energy journey",
|
|
1754
|
+
* "step_name": "avg consumption picker"
|
|
1755
|
+
* }
|
|
1756
|
+
* }
|
|
1757
|
+
*/
|
|
1758
|
+
export interface PriceInputMapping {
|
|
1759
|
+
price_id?: string;
|
|
1760
|
+
frequency_unit?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly" | "one_time";
|
|
1761
|
+
name?: string;
|
|
1762
|
+
value?: number;
|
|
1763
|
+
metadata?: {
|
|
1764
|
+
[name: string]: string;
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* example:
|
|
1769
|
+
* [
|
|
1770
|
+
* {
|
|
1771
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1772
|
+
* "frequency_unit": "weekly",
|
|
1773
|
+
* "value": 1000.245,
|
|
1774
|
+
* "name": "avg consumption",
|
|
1775
|
+
* "metadata": {
|
|
1776
|
+
* "journey_title": "energy journey",
|
|
1777
|
+
* "step_name": "avg consumption picker"
|
|
1778
|
+
* }
|
|
1779
|
+
* }
|
|
1780
|
+
* ]
|
|
1781
|
+
*/
|
|
1782
|
+
export type PriceInputMappings = /**
|
|
1783
|
+
* example:
|
|
1784
|
+
* {
|
|
1785
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1786
|
+
* "frequency_unit": "weekly",
|
|
1787
|
+
* "value": 1000.245,
|
|
1788
|
+
* "name": "avg consumption",
|
|
1789
|
+
* "metadata": {
|
|
1790
|
+
* "journey_title": "energy journey",
|
|
1791
|
+
* "step_name": "avg consumption picker"
|
|
1792
|
+
* }
|
|
1793
|
+
* }
|
|
1794
|
+
*/
|
|
1795
|
+
PriceInputMapping[];
|
|
1388
1796
|
/**
|
|
1389
1797
|
* Represents a price item
|
|
1390
1798
|
* example:
|
|
@@ -1393,19 +1801,39 @@ declare namespace Components {
|
|
|
1393
1801
|
* }
|
|
1394
1802
|
*/
|
|
1395
1803
|
export interface PriceItem {
|
|
1804
|
+
/**
|
|
1805
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
1806
|
+
*/
|
|
1807
|
+
amount_subtotal?: number;
|
|
1808
|
+
/**
|
|
1809
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
1810
|
+
*/
|
|
1811
|
+
amount_subtotal_decimal?: string;
|
|
1812
|
+
/**
|
|
1813
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
1814
|
+
*/
|
|
1815
|
+
amount_total?: number;
|
|
1816
|
+
/**
|
|
1817
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
1818
|
+
*/
|
|
1819
|
+
amount_total_decimal?: string;
|
|
1396
1820
|
/**
|
|
1397
1821
|
* price item id
|
|
1398
1822
|
*/
|
|
1399
|
-
|
|
1823
|
+
_id?: string;
|
|
1400
1824
|
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
1401
1825
|
/**
|
|
1402
1826
|
* The unit amount value
|
|
1403
1827
|
*/
|
|
1404
1828
|
unit_amount?: number;
|
|
1405
1829
|
/**
|
|
1406
|
-
*
|
|
1830
|
+
* The unit gross amount value.
|
|
1407
1831
|
*/
|
|
1408
|
-
|
|
1832
|
+
unit_amount_gross?: number;
|
|
1833
|
+
/**
|
|
1834
|
+
* Total tax amount for this line item.
|
|
1835
|
+
*/
|
|
1836
|
+
amount_tax?: number;
|
|
1409
1837
|
/**
|
|
1410
1838
|
* Net unit amount without taxes or discounts.
|
|
1411
1839
|
*/
|
|
@@ -1414,10 +1842,6 @@ declare namespace Components {
|
|
|
1414
1842
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1415
1843
|
*/
|
|
1416
1844
|
unit_amount_decimal?: string;
|
|
1417
|
-
/**
|
|
1418
|
-
* Total after (discounts and) taxes.
|
|
1419
|
-
*/
|
|
1420
|
-
amount_total?: number;
|
|
1421
1845
|
currency?: /**
|
|
1422
1846
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
1423
1847
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -1480,14 +1904,39 @@ declare namespace Components {
|
|
|
1480
1904
|
* The sum of amounts of the price items by recurrence.
|
|
1481
1905
|
*/
|
|
1482
1906
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
1907
|
+
price_mappings?: /**
|
|
1908
|
+
* example:
|
|
1909
|
+
* [
|
|
1910
|
+
* {
|
|
1911
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1912
|
+
* "frequency_unit": "weekly",
|
|
1913
|
+
* "value": 1000.245,
|
|
1914
|
+
* "name": "avg consumption",
|
|
1915
|
+
* "metadata": {
|
|
1916
|
+
* "journey_title": "energy journey",
|
|
1917
|
+
* "step_name": "avg consumption picker"
|
|
1918
|
+
* }
|
|
1919
|
+
* }
|
|
1920
|
+
* ]
|
|
1921
|
+
*/
|
|
1922
|
+
PriceInputMappings;
|
|
1923
|
+
/**
|
|
1924
|
+
* 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'.
|
|
1925
|
+
*/
|
|
1926
|
+
on_request_approved?: boolean;
|
|
1483
1927
|
/**
|
|
1484
1928
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1485
1929
|
*/
|
|
1486
1930
|
type?: "one_time" | "recurring";
|
|
1487
1931
|
/**
|
|
1488
|
-
*
|
|
1932
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1933
|
+
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1934
|
+
* - `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.
|
|
1935
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
1936
|
+
* - `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.
|
|
1937
|
+
*
|
|
1489
1938
|
*/
|
|
1490
|
-
|
|
1939
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1491
1940
|
}
|
|
1492
1941
|
/**
|
|
1493
1942
|
* Represents a price input to the pricing library.
|
|
@@ -1498,6 +1947,22 @@ declare namespace Components {
|
|
|
1498
1947
|
* The quantity of products being purchased.
|
|
1499
1948
|
*/
|
|
1500
1949
|
quantity?: number;
|
|
1950
|
+
price_mappings?: /**
|
|
1951
|
+
* example:
|
|
1952
|
+
* [
|
|
1953
|
+
* {
|
|
1954
|
+
* "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
1955
|
+
* "frequency_unit": "weekly",
|
|
1956
|
+
* "value": 1000.245,
|
|
1957
|
+
* "name": "avg consumption",
|
|
1958
|
+
* "metadata": {
|
|
1959
|
+
* "journey_title": "energy journey",
|
|
1960
|
+
* "step_name": "avg consumption picker"
|
|
1961
|
+
* }
|
|
1962
|
+
* }
|
|
1963
|
+
* ]
|
|
1964
|
+
*/
|
|
1965
|
+
PriceInputMappings;
|
|
1501
1966
|
/**
|
|
1502
1967
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
1503
1968
|
*/
|
|
@@ -1531,6 +1996,10 @@ declare namespace Components {
|
|
|
1531
1996
|
*/
|
|
1532
1997
|
_product?: {
|
|
1533
1998
|
[name: string]: any;
|
|
1999
|
+
/**
|
|
2000
|
+
* The description for the product
|
|
2001
|
+
*/
|
|
2002
|
+
description?: string;
|
|
1534
2003
|
/**
|
|
1535
2004
|
* The product code
|
|
1536
2005
|
*/
|
|
@@ -1617,10 +2086,31 @@ declare namespace Components {
|
|
|
1617
2086
|
* The unit amount value
|
|
1618
2087
|
*/
|
|
1619
2088
|
unit_amount?: number;
|
|
2089
|
+
/**
|
|
2090
|
+
* The unit gross amount value.
|
|
2091
|
+
*/
|
|
2092
|
+
unit_amount_gross?: number;
|
|
2093
|
+
unit_amount_currency?: /**
|
|
2094
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2095
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2096
|
+
*
|
|
2097
|
+
* example:
|
|
2098
|
+
* EUR
|
|
2099
|
+
*/
|
|
2100
|
+
Currency;
|
|
1620
2101
|
/**
|
|
1621
2102
|
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1622
2103
|
*/
|
|
1623
2104
|
unit_amount_decimal?: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
2107
|
+
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
2108
|
+
* - `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.
|
|
2109
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2110
|
+
* - `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2111
|
+
*
|
|
2112
|
+
*/
|
|
2113
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
1624
2114
|
/**
|
|
1625
2115
|
* The snapshot of the price linked to the price item.
|
|
1626
2116
|
* example:
|
|
@@ -1639,18 +2129,27 @@ declare namespace Components {
|
|
|
1639
2129
|
*/
|
|
1640
2130
|
is_composite_price?: boolean;
|
|
1641
2131
|
/**
|
|
1642
|
-
* Describes how to compute the price per period. Either `per_unit` or `
|
|
2132
|
+
* Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
|
|
1643
2133
|
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1644
|
-
* - `
|
|
2134
|
+
* - `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.
|
|
2135
|
+
* - `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
|
|
2136
|
+
* - `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.
|
|
1645
2137
|
*
|
|
1646
|
-
|
|
2138
|
+
*/
|
|
2139
|
+
pricing_model: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee";
|
|
2140
|
+
/**
|
|
2141
|
+
* Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee.
|
|
1647
2142
|
*
|
|
1648
2143
|
*/
|
|
1649
|
-
|
|
2144
|
+
tiers?: PriceTier[];
|
|
1650
2145
|
/**
|
|
1651
2146
|
* A brief description of the price.
|
|
1652
2147
|
*/
|
|
1653
2148
|
description?: string;
|
|
2149
|
+
/**
|
|
2150
|
+
* A detailed description of the price. This is shown on the order document and order table.
|
|
2151
|
+
*/
|
|
2152
|
+
long_description?: string;
|
|
1654
2153
|
/**
|
|
1655
2154
|
* The default tax rate applicable to the product.
|
|
1656
2155
|
* This field is deprecated, use the new `tax` attribute.
|
|
@@ -1674,7 +2173,6 @@ declare namespace Components {
|
|
|
1674
2173
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1675
2174
|
* "type": "VAT",
|
|
1676
2175
|
* "description": "Tax description",
|
|
1677
|
-
* "behavior": "Exclusive",
|
|
1678
2176
|
* "active": "true",
|
|
1679
2177
|
* "region": "DE",
|
|
1680
2178
|
* "region_label": "Germany",
|
|
@@ -1690,15 +2188,9 @@ declare namespace Components {
|
|
|
1690
2188
|
*/
|
|
1691
2189
|
Tax[];
|
|
1692
2190
|
/**
|
|
1693
|
-
* Specifies whether the price is considered `inclusive` of taxes or
|
|
1694
|
-
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1695
|
-
*
|
|
1696
|
-
*/
|
|
1697
|
-
tax_behavior?: "inclusive" | "exclusive";
|
|
1698
|
-
/**
|
|
1699
|
-
* Defines the tiered pricing type of the price.
|
|
2191
|
+
* Specifies whether the price is considered `inclusive` of taxes or not.
|
|
1700
2192
|
*/
|
|
1701
|
-
|
|
2193
|
+
is_tax_inclusive?: boolean;
|
|
1702
2194
|
/**
|
|
1703
2195
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1704
2196
|
*/
|
|
@@ -1769,7 +2261,7 @@ declare namespace Components {
|
|
|
1769
2261
|
/**
|
|
1770
2262
|
* The unit of measurement used for display purposes and possibly for calculations when the price is variable.
|
|
1771
2263
|
*/
|
|
1772
|
-
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l") | string;
|
|
2264
|
+
unit?: /* The unit of measurement used for display purposes and possibly for calculations when the price is variable. */ ("kw" | "kwh" | "m" | "m2" | "l" | "cubic-meter" | "cubic-meter-h" | "ls" | "a" | "kva" | "w" | "wp" | "kwp") | string;
|
|
1773
2265
|
/**
|
|
1774
2266
|
* The price creation date
|
|
1775
2267
|
*/
|
|
@@ -1817,7 +2309,61 @@ declare namespace Components {
|
|
|
1817
2309
|
/**
|
|
1818
2310
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
1819
2311
|
*/
|
|
1820
|
-
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto)[];
|
|
2312
|
+
export type PriceItemsDto = (/* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto)[];
|
|
2313
|
+
export interface PriceTier {
|
|
2314
|
+
up_to?: number | null;
|
|
2315
|
+
flat_fee_amount?: number;
|
|
2316
|
+
flat_fee_amount_decimal?: string;
|
|
2317
|
+
unit_amount?: number;
|
|
2318
|
+
unit_amount_decimal?: string;
|
|
2319
|
+
display_mode?: PriceTierDisplayMode;
|
|
2320
|
+
}
|
|
2321
|
+
export type PriceTierDisplayMode = "hidden" | "on_request";
|
|
2322
|
+
/**
|
|
2323
|
+
* The result from the calculation of a set of price items.
|
|
2324
|
+
*/
|
|
2325
|
+
export interface PricingDetails {
|
|
2326
|
+
items?: (/**
|
|
2327
|
+
* Represents a price item
|
|
2328
|
+
* example:
|
|
2329
|
+
* {
|
|
2330
|
+
* "$ref": "#/components/examples/price-item"
|
|
2331
|
+
* }
|
|
2332
|
+
*/
|
|
2333
|
+
PriceItem | /**
|
|
2334
|
+
* Represents a composite price input to the pricing library.
|
|
2335
|
+
* example:
|
|
2336
|
+
* {
|
|
2337
|
+
* "$ref": "#/components/examples/price-item"
|
|
2338
|
+
* }
|
|
2339
|
+
*/
|
|
2340
|
+
CompositePriceItem)[];
|
|
2341
|
+
/**
|
|
2342
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
2343
|
+
*/
|
|
2344
|
+
amount_subtotal?: number;
|
|
2345
|
+
/**
|
|
2346
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
2347
|
+
*/
|
|
2348
|
+
amount_total?: number;
|
|
2349
|
+
/**
|
|
2350
|
+
* The unit gross amount value.
|
|
2351
|
+
*/
|
|
2352
|
+
unit_amount_gross?: number;
|
|
2353
|
+
/**
|
|
2354
|
+
* This is the sum of all the price item tax amounts.
|
|
2355
|
+
*/
|
|
2356
|
+
amount_tax?: number;
|
|
2357
|
+
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
2358
|
+
currency?: /**
|
|
2359
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2360
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2361
|
+
*
|
|
2362
|
+
* example:
|
|
2363
|
+
* EUR
|
|
2364
|
+
*/
|
|
2365
|
+
Currency;
|
|
2366
|
+
}
|
|
1821
2367
|
/**
|
|
1822
2368
|
* The product entity
|
|
1823
2369
|
* example:
|
|
@@ -1827,6 +2373,10 @@ declare namespace Components {
|
|
|
1827
2373
|
*/
|
|
1828
2374
|
export interface Product {
|
|
1829
2375
|
[name: string]: any;
|
|
2376
|
+
/**
|
|
2377
|
+
* The description for the product
|
|
2378
|
+
*/
|
|
2379
|
+
description?: string;
|
|
1830
2380
|
/**
|
|
1831
2381
|
* The product code
|
|
1832
2382
|
*/
|
|
@@ -1909,6 +2459,22 @@ declare namespace Components {
|
|
|
1909
2459
|
* An amount associated with a specific recurrence.
|
|
1910
2460
|
*/
|
|
1911
2461
|
export interface RecurrenceAmount {
|
|
2462
|
+
/**
|
|
2463
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
2464
|
+
*/
|
|
2465
|
+
amount_subtotal: number;
|
|
2466
|
+
/**
|
|
2467
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
2468
|
+
*/
|
|
2469
|
+
amount_subtotal_decimal: string;
|
|
2470
|
+
/**
|
|
2471
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
2472
|
+
*/
|
|
2473
|
+
amount_total: number;
|
|
2474
|
+
/**
|
|
2475
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
2476
|
+
*/
|
|
2477
|
+
amount_total_decimal: string;
|
|
1912
2478
|
/**
|
|
1913
2479
|
* The price type.
|
|
1914
2480
|
*/
|
|
@@ -1916,24 +2482,44 @@ declare namespace Components {
|
|
|
1916
2482
|
/**
|
|
1917
2483
|
* The price billing period.
|
|
1918
2484
|
*/
|
|
1919
|
-
billing_period?:
|
|
1920
|
-
/**
|
|
1921
|
-
* Total of all items, with same recurrence, before (discounts or) taxes are applied.
|
|
1922
|
-
*/
|
|
1923
|
-
amount_subtotal: number;
|
|
2485
|
+
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
|
|
1924
2486
|
/**
|
|
1925
|
-
*
|
|
2487
|
+
* The unit gross amount value.
|
|
1926
2488
|
*/
|
|
1927
|
-
|
|
2489
|
+
unit_amount_gross?: number;
|
|
1928
2490
|
/**
|
|
1929
2491
|
* Total of all items taxes, with same recurrence.
|
|
1930
2492
|
*/
|
|
1931
2493
|
amount_tax?: number;
|
|
2494
|
+
currency?: /**
|
|
2495
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2496
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2497
|
+
*
|
|
2498
|
+
* example:
|
|
2499
|
+
* EUR
|
|
2500
|
+
*/
|
|
2501
|
+
Currency;
|
|
1932
2502
|
}
|
|
1933
2503
|
/**
|
|
1934
2504
|
* An amount associated with a specific recurrence.
|
|
1935
2505
|
*/
|
|
1936
2506
|
export interface RecurrenceAmountDto {
|
|
2507
|
+
/**
|
|
2508
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
2509
|
+
*/
|
|
2510
|
+
amount_subtotal: number;
|
|
2511
|
+
/**
|
|
2512
|
+
* Total of all items before (discounts or) taxes are applied, as a string with all the decimal places.
|
|
2513
|
+
*/
|
|
2514
|
+
amount_subtotal_decimal: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
2517
|
+
*/
|
|
2518
|
+
amount_total: number;
|
|
2519
|
+
/**
|
|
2520
|
+
* Total of all items after (discounts and) taxes are applied, as a string with all the decimal places.
|
|
2521
|
+
*/
|
|
2522
|
+
amount_total_decimal: string;
|
|
1937
2523
|
/**
|
|
1938
2524
|
* The price type.
|
|
1939
2525
|
*/
|
|
@@ -1941,19 +2527,40 @@ declare namespace Components {
|
|
|
1941
2527
|
/**
|
|
1942
2528
|
* The price billing period.
|
|
1943
2529
|
*/
|
|
1944
|
-
billing_period?:
|
|
2530
|
+
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
|
|
1945
2531
|
/**
|
|
1946
|
-
*
|
|
2532
|
+
* The unit gross amount value.
|
|
1947
2533
|
*/
|
|
1948
|
-
|
|
2534
|
+
unit_amount_gross?: number;
|
|
2535
|
+
/**
|
|
2536
|
+
* Total of all items taxes, with same recurrence.
|
|
2537
|
+
*/
|
|
2538
|
+
amount_tax?: number;
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* An amount associated with a specific recurrence and tax.
|
|
2542
|
+
*/
|
|
2543
|
+
export interface RecurrenceAmountWithTax {
|
|
2544
|
+
/**
|
|
2545
|
+
* The price type.
|
|
2546
|
+
*/
|
|
2547
|
+
type?: string;
|
|
2548
|
+
/**
|
|
2549
|
+
* The price billing period.
|
|
2550
|
+
*/
|
|
2551
|
+
billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
|
|
1949
2552
|
/**
|
|
1950
|
-
* Total of all items
|
|
2553
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
1951
2554
|
*/
|
|
1952
2555
|
amount_total: number;
|
|
1953
2556
|
/**
|
|
1954
2557
|
* Total of all items taxes, with same recurrence.
|
|
1955
2558
|
*/
|
|
1956
2559
|
amount_tax?: number;
|
|
2560
|
+
/**
|
|
2561
|
+
* Tax
|
|
2562
|
+
*/
|
|
2563
|
+
tax?: /* A tax amount associated with a specific tax rate. */ TaxAmountBreakdown;
|
|
1957
2564
|
}
|
|
1958
2565
|
export type SalesTax = "nontaxable" | "reduced" | "standard";
|
|
1959
2566
|
/**
|
|
@@ -1963,7 +2570,6 @@ declare namespace Components {
|
|
|
1963
2570
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1964
2571
|
* "type": "VAT",
|
|
1965
2572
|
* "description": "Tax description",
|
|
1966
|
-
* "behavior": "Exclusive",
|
|
1967
2573
|
* "active": "true",
|
|
1968
2574
|
* "region": "DE",
|
|
1969
2575
|
* "region_label": "Germany",
|
|
@@ -1995,7 +2601,6 @@ declare namespace Components {
|
|
|
1995
2601
|
type: "VAT" | "GST" | "Custom";
|
|
1996
2602
|
description?: string;
|
|
1997
2603
|
rate: number;
|
|
1998
|
-
behavior: "Exclusive" | "Inclusive" | "exclusive" | "inclusive";
|
|
1999
2604
|
active?: boolean;
|
|
2000
2605
|
region?: string;
|
|
2001
2606
|
region_label?: string;
|
|
@@ -2030,7 +2635,6 @@ declare namespace Components {
|
|
|
2030
2635
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2031
2636
|
* "type": "VAT",
|
|
2032
2637
|
* "description": "Tax description",
|
|
2033
|
-
* "behavior": "Exclusive",
|
|
2034
2638
|
* "active": "true",
|
|
2035
2639
|
* "region": "DE",
|
|
2036
2640
|
* "region_label": "Germany",
|
|
@@ -2081,7 +2685,6 @@ declare namespace Components {
|
|
|
2081
2685
|
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
2082
2686
|
* "type": "VAT",
|
|
2083
2687
|
* "description": "Tax description",
|
|
2084
|
-
* "behavior": "Exclusive",
|
|
2085
2688
|
* "active": "true",
|
|
2086
2689
|
* "region": "DE",
|
|
2087
2690
|
* "region_label": "Germany",
|
|
@@ -2123,11 +2726,58 @@ declare namespace Components {
|
|
|
2123
2726
|
*/
|
|
2124
2727
|
taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmountBreakdown)[];
|
|
2125
2728
|
/**
|
|
2126
|
-
* The aggregated price items
|
|
2729
|
+
* The aggregated price items recurrences.
|
|
2127
2730
|
*/
|
|
2128
2731
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
2732
|
+
/**
|
|
2733
|
+
* The aggregated price items recurrences by tax rate.
|
|
2734
|
+
*/
|
|
2735
|
+
recurrencesByTax?: (/* An amount associated with a specific recurrence and tax. */ RecurrenceAmountWithTax)[];
|
|
2129
2736
|
};
|
|
2130
2737
|
}
|
|
2738
|
+
/**
|
|
2739
|
+
* The availability rule error
|
|
2740
|
+
*/
|
|
2741
|
+
export interface ValidateAvailabilityFileError {
|
|
2742
|
+
/**
|
|
2743
|
+
* The line number where the error was found
|
|
2744
|
+
*/
|
|
2745
|
+
line?: number;
|
|
2746
|
+
/**
|
|
2747
|
+
* The error message
|
|
2748
|
+
*/
|
|
2749
|
+
msg: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* Data related to the error
|
|
2752
|
+
*/
|
|
2753
|
+
data?: string;
|
|
2754
|
+
}
|
|
2755
|
+
/**
|
|
2756
|
+
* The availability map file result payload
|
|
2757
|
+
* example:
|
|
2758
|
+
* {
|
|
2759
|
+
* "rules_parsed_count": 8,
|
|
2760
|
+
* "errors": [
|
|
2761
|
+
* "File must be UTF-8 encoded",
|
|
2762
|
+
* "Error on line 3 - street_number must be of type number",
|
|
2763
|
+
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2764
|
+
* ]
|
|
2765
|
+
* }
|
|
2766
|
+
*/
|
|
2767
|
+
export interface ValidateAvailabilityFileResult {
|
|
2768
|
+
/**
|
|
2769
|
+
* The status of the validation
|
|
2770
|
+
*/
|
|
2771
|
+
status: "success" | "error";
|
|
2772
|
+
/**
|
|
2773
|
+
* The number of rules successfully parsed
|
|
2774
|
+
*/
|
|
2775
|
+
rules_parsed_count: number;
|
|
2776
|
+
/**
|
|
2777
|
+
* The errors found on the file
|
|
2778
|
+
*/
|
|
2779
|
+
errors: /* The availability rule error */ ValidateAvailabilityFileError[];
|
|
2780
|
+
}
|
|
2131
2781
|
}
|
|
2132
2782
|
}
|
|
2133
2783
|
declare namespace Paths {
|
|
@@ -2252,6 +2902,34 @@ declare namespace Paths {
|
|
|
2252
2902
|
export type $400 = Components.Schemas.Error;
|
|
2253
2903
|
}
|
|
2254
2904
|
}
|
|
2905
|
+
namespace $ValidateAvailabilityFile {
|
|
2906
|
+
export interface HeaderParameters {
|
|
2907
|
+
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
|
|
2908
|
+
}
|
|
2909
|
+
namespace Parameters {
|
|
2910
|
+
export type Id = string;
|
|
2911
|
+
export type XEpilotOrgID = string;
|
|
2912
|
+
}
|
|
2913
|
+
export interface PathParameters {
|
|
2914
|
+
id: Parameters.Id;
|
|
2915
|
+
}
|
|
2916
|
+
namespace Responses {
|
|
2917
|
+
export type $200 = /**
|
|
2918
|
+
* The availability map file result payload
|
|
2919
|
+
* example:
|
|
2920
|
+
* {
|
|
2921
|
+
* "rules_parsed_count": 8,
|
|
2922
|
+
* "errors": [
|
|
2923
|
+
* "File must be UTF-8 encoded",
|
|
2924
|
+
* "Error on line 3 - street_number must be of type number",
|
|
2925
|
+
* "Error on line 6 - start_date cant be greater than end_date"
|
|
2926
|
+
* ]
|
|
2927
|
+
* }
|
|
2928
|
+
*/
|
|
2929
|
+
Components.Schemas.ValidateAvailabilityFileResult;
|
|
2930
|
+
export type $400 = Components.Schemas.Error;
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2255
2933
|
namespace CreateOrder {
|
|
2256
2934
|
export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
|
|
2257
2935
|
namespace Responses {
|
|
@@ -2350,6 +3028,16 @@ export interface OperationMethods {
|
|
|
2350
3028
|
data?: Paths.$AvailabilityCheck.RequestBody,
|
|
2351
3029
|
config?: AxiosRequestConfig
|
|
2352
3030
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
3031
|
+
/**
|
|
3032
|
+
* $validateAvailabilityFile - validateAvailabilityFile
|
|
3033
|
+
*
|
|
3034
|
+
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
3035
|
+
*/
|
|
3036
|
+
'$validateAvailabilityFile'(
|
|
3037
|
+
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
3038
|
+
data?: any,
|
|
3039
|
+
config?: AxiosRequestConfig
|
|
3040
|
+
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
2353
3041
|
/**
|
|
2354
3042
|
* $createOpportunity - createOpportunity
|
|
2355
3043
|
*
|
|
@@ -2438,6 +3126,18 @@ export interface PathsDictionary {
|
|
|
2438
3126
|
config?: AxiosRequestConfig
|
|
2439
3127
|
): OperationResponse<Paths.$AvailabilityCheck.Responses.$200>
|
|
2440
3128
|
}
|
|
3129
|
+
['/v1/validate-availability/{id}']: {
|
|
3130
|
+
/**
|
|
3131
|
+
* $validateAvailabilityFile - validateAvailabilityFile
|
|
3132
|
+
*
|
|
3133
|
+
* Validates an availability file, it returns an array of errors if the file is invalid
|
|
3134
|
+
*/
|
|
3135
|
+
'get'(
|
|
3136
|
+
parameters?: Parameters<Paths.$ValidateAvailabilityFile.PathParameters & Paths.$ValidateAvailabilityFile.HeaderParameters> | null,
|
|
3137
|
+
data?: any,
|
|
3138
|
+
config?: AxiosRequestConfig
|
|
3139
|
+
): OperationResponse<Paths.$ValidateAvailabilityFile.Responses.$200>
|
|
3140
|
+
}
|
|
2441
3141
|
['/v1/public/opportunity']: {
|
|
2442
3142
|
/**
|
|
2443
3143
|
* $createOpportunity - createOpportunity
|