@epilot/pricing-client 1.13.3 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +883 -64
- package/dist/openapi.json +3161 -1281
- package/package.json +3 -2
package/dist/openapi.d.ts
CHANGED
|
@@ -21,47 +21,47 @@ declare namespace Components {
|
|
|
21
21
|
/**
|
|
22
22
|
* The first line of the address. Typically the street address or PO Box number.
|
|
23
23
|
*/
|
|
24
|
-
street?: string;
|
|
24
|
+
street?: string | null;
|
|
25
25
|
/**
|
|
26
26
|
* The second line of the address. Typically the number of the apartment, suite, or unit.
|
|
27
27
|
*/
|
|
28
|
-
street_number?: string;
|
|
28
|
+
street_number?: string | null;
|
|
29
29
|
/**
|
|
30
30
|
* The postal code for the address.
|
|
31
31
|
*/
|
|
32
|
-
postal_code?: string;
|
|
32
|
+
postal_code?: string | null;
|
|
33
33
|
/**
|
|
34
34
|
* The name of the city, district, village, or town.
|
|
35
35
|
*/
|
|
36
|
-
city?: string;
|
|
36
|
+
city?: string | null;
|
|
37
37
|
/**
|
|
38
38
|
* The two-letter code for the country of the address.
|
|
39
39
|
*/
|
|
40
|
-
country?: string;
|
|
40
|
+
country?: string | null;
|
|
41
41
|
/**
|
|
42
42
|
* An additional description for the address
|
|
43
43
|
*/
|
|
44
|
-
additional_info?: string;
|
|
44
|
+
additional_info?: string | null;
|
|
45
45
|
/**
|
|
46
46
|
* the company name, usually used as extra delivery instructions
|
|
47
47
|
*/
|
|
48
|
-
company_name?: string;
|
|
48
|
+
company_name?: string | null;
|
|
49
49
|
/**
|
|
50
50
|
* the first name of the recipient, usually used as extra delivery instructions
|
|
51
51
|
*/
|
|
52
|
-
first_name?: string;
|
|
52
|
+
first_name?: string | null;
|
|
53
53
|
/**
|
|
54
54
|
* the last name of the recipient, usually used as extra delivery instructions
|
|
55
55
|
*/
|
|
56
|
-
last_name?: string;
|
|
56
|
+
last_name?: string | null;
|
|
57
57
|
/**
|
|
58
58
|
* the salutation of the recipient, usually used as extra delivery instructions
|
|
59
59
|
*/
|
|
60
|
-
salutation?: string;
|
|
60
|
+
salutation?: string | null;
|
|
61
61
|
/**
|
|
62
62
|
* the title of the recipient, usually used as extra delivery instructions
|
|
63
63
|
*/
|
|
64
|
-
title?: string;
|
|
64
|
+
title?: string | null;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Availability check request payload
|
|
@@ -181,7 +181,7 @@ declare namespace Components {
|
|
|
181
181
|
customer?: Customer;
|
|
182
182
|
billing_address?: Address;
|
|
183
183
|
delivery_address?: Address;
|
|
184
|
-
metadata?: /* A set of key-value pairs. */ MetaData;
|
|
184
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
185
185
|
line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
|
|
186
186
|
/**
|
|
187
187
|
* Total of all items before (discounts or) taxes are applied.
|
|
@@ -199,7 +199,7 @@ declare namespace Components {
|
|
|
199
199
|
* A valid cart payload from a client.
|
|
200
200
|
*/
|
|
201
201
|
export interface CartDto {
|
|
202
|
-
metadata?: /* A set of key-value pairs. */ MetaData;
|
|
202
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
203
203
|
customer?: Customer;
|
|
204
204
|
billing_address?: Address;
|
|
205
205
|
delivery_address?: Address;
|
|
@@ -215,7 +215,7 @@ declare namespace Components {
|
|
|
215
215
|
* ce99875f-fba9-4fe2-a8f9-afaf52059051
|
|
216
216
|
*/
|
|
217
217
|
source_id?: string;
|
|
218
|
-
source?: /*
|
|
218
|
+
source?: /* The order generation source */ OrderSource;
|
|
219
219
|
additional_addresses?: Address[];
|
|
220
220
|
payment_method?: /**
|
|
221
221
|
* A PaymentMethod represent your customer's payment instruments.
|
|
@@ -227,7 +227,18 @@ declare namespace Components {
|
|
|
227
227
|
* An array of file IDs, already upload into the File API, that are related with this cart
|
|
228
228
|
*/
|
|
229
229
|
files?: string[];
|
|
230
|
-
status?:
|
|
230
|
+
status?: /**
|
|
231
|
+
*
|
|
232
|
+
* | status | description |
|
|
233
|
+
* |-------------|-------|
|
|
234
|
+
* | `draft` | Starting state for all orders, at this point we can still edit the order |
|
|
235
|
+
* | `quote` | The order is in a quoting phase, bound to an expiration date |
|
|
236
|
+
* | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
|
|
237
|
+
* | `cancelled` | The order has been cancelled |
|
|
238
|
+
* | `completed` | The order is now closed and finalized |
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
OrderStatus;
|
|
231
242
|
tags?: string[];
|
|
232
243
|
journey_data?: {
|
|
233
244
|
[name: string]: any;
|
|
@@ -302,7 +313,21 @@ declare namespace Components {
|
|
|
302
313
|
* The number os results returned.
|
|
303
314
|
*/
|
|
304
315
|
hits?: number;
|
|
305
|
-
results?: (
|
|
316
|
+
results?: (/**
|
|
317
|
+
* The product entity
|
|
318
|
+
* example:
|
|
319
|
+
* {
|
|
320
|
+
* "$ref": "#/components/examples/product"
|
|
321
|
+
* }
|
|
322
|
+
*/
|
|
323
|
+
Product | /**
|
|
324
|
+
* The price entity schema for simple pricing
|
|
325
|
+
* example:
|
|
326
|
+
* {
|
|
327
|
+
* "$ref": "#/components/examples/price"
|
|
328
|
+
* }
|
|
329
|
+
*/
|
|
330
|
+
Price)[];
|
|
306
331
|
}
|
|
307
332
|
/**
|
|
308
333
|
* The cart checkout request payload
|
|
@@ -315,12 +340,268 @@ declare namespace Components {
|
|
|
315
340
|
* The cart checkout result
|
|
316
341
|
*/
|
|
317
342
|
export interface CheckoutCartResult {
|
|
318
|
-
order?:
|
|
343
|
+
order?: /**
|
|
344
|
+
* The order entity
|
|
345
|
+
* example:
|
|
346
|
+
* {
|
|
347
|
+
* "$ref": "#/components/examples/order-with-simple-prices"
|
|
348
|
+
* }
|
|
349
|
+
*/
|
|
350
|
+
Order;
|
|
319
351
|
}
|
|
320
352
|
/**
|
|
321
353
|
* The checkout mode for the cart checkout.
|
|
322
354
|
*/
|
|
323
355
|
export type CheckoutMode = "create_order" | "create_invoice" | "create_quote";
|
|
356
|
+
/**
|
|
357
|
+
* The price entity schema for dynamic pricing
|
|
358
|
+
* example:
|
|
359
|
+
* {
|
|
360
|
+
* "$ref": "#/components/examples/composite-price"
|
|
361
|
+
* }
|
|
362
|
+
*/
|
|
363
|
+
export interface CompositePrice {
|
|
364
|
+
[name: string]: any;
|
|
365
|
+
/**
|
|
366
|
+
* Whether the price can be used for new purchases.
|
|
367
|
+
*/
|
|
368
|
+
active?: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* A brief description of the price.
|
|
371
|
+
*/
|
|
372
|
+
description?: string;
|
|
373
|
+
/**
|
|
374
|
+
* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.
|
|
375
|
+
*/
|
|
376
|
+
price_components?: {
|
|
377
|
+
$relation?: PriceComponentRelation[];
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Three-letter ISO currency code, in lowercase.
|
|
381
|
+
*/
|
|
382
|
+
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
383
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
384
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
385
|
+
*
|
|
386
|
+
* example:
|
|
387
|
+
* EUR
|
|
388
|
+
*/
|
|
389
|
+
Currency;
|
|
390
|
+
/**
|
|
391
|
+
* The price creation date
|
|
392
|
+
*/
|
|
393
|
+
_created_at?: string;
|
|
394
|
+
/**
|
|
395
|
+
* The price id
|
|
396
|
+
*/
|
|
397
|
+
_id?: string;
|
|
398
|
+
/**
|
|
399
|
+
* The price autogenerated title
|
|
400
|
+
*/
|
|
401
|
+
_title?: string;
|
|
402
|
+
/**
|
|
403
|
+
* The price last update date
|
|
404
|
+
*/
|
|
405
|
+
_updated_at?: string;
|
|
406
|
+
/**
|
|
407
|
+
* The organization id the price belongs to
|
|
408
|
+
*/
|
|
409
|
+
_org_id?: string;
|
|
410
|
+
/**
|
|
411
|
+
* An arbitrary set of tags attached to the composite price
|
|
412
|
+
*/
|
|
413
|
+
_tags?: string[];
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Represents a composite price input to the pricing library.
|
|
417
|
+
* example:
|
|
418
|
+
* {
|
|
419
|
+
* "$ref": "#/components/examples/price-item"
|
|
420
|
+
* }
|
|
421
|
+
*/
|
|
422
|
+
export interface CompositePriceItem {
|
|
423
|
+
/**
|
|
424
|
+
* price item id
|
|
425
|
+
*/
|
|
426
|
+
id?: string;
|
|
427
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
428
|
+
/**
|
|
429
|
+
* The unit amount value
|
|
430
|
+
*/
|
|
431
|
+
unit_amount?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Total before any (discounts or) taxes are applied.
|
|
434
|
+
*/
|
|
435
|
+
amount_subtotal?: number;
|
|
436
|
+
/**
|
|
437
|
+
* Net unit amount without taxes or discounts.
|
|
438
|
+
*/
|
|
439
|
+
unit_amount_net?: number;
|
|
440
|
+
/**
|
|
441
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
442
|
+
*/
|
|
443
|
+
unit_amount_decimal?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Total after (discounts and) taxes.
|
|
446
|
+
*/
|
|
447
|
+
amount_total?: number;
|
|
448
|
+
currency?: /**
|
|
449
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
450
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
451
|
+
*
|
|
452
|
+
* example:
|
|
453
|
+
* EUR
|
|
454
|
+
*/
|
|
455
|
+
Currency;
|
|
456
|
+
/**
|
|
457
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
458
|
+
*/
|
|
459
|
+
description?: string;
|
|
460
|
+
/**
|
|
461
|
+
* The quantity of products being purchased.
|
|
462
|
+
*/
|
|
463
|
+
quantity?: number;
|
|
464
|
+
/**
|
|
465
|
+
* The id of the product.
|
|
466
|
+
*/
|
|
467
|
+
product_id?: string;
|
|
468
|
+
/**
|
|
469
|
+
* The id of the price.
|
|
470
|
+
*/
|
|
471
|
+
price_id?: string;
|
|
472
|
+
/**
|
|
473
|
+
* The flag for prices that contain price components.
|
|
474
|
+
*/
|
|
475
|
+
is_composite_price?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* The price snapshot data.
|
|
478
|
+
*/
|
|
479
|
+
_price?: /* The price snapshot data. */ /**
|
|
480
|
+
* The price entity schema for simple pricing
|
|
481
|
+
* example:
|
|
482
|
+
* {
|
|
483
|
+
* "$ref": "#/components/examples/price"
|
|
484
|
+
* }
|
|
485
|
+
*/
|
|
486
|
+
Price | /**
|
|
487
|
+
* The price entity schema for dynamic pricing
|
|
488
|
+
* example:
|
|
489
|
+
* {
|
|
490
|
+
* "$ref": "#/components/examples/composite-price"
|
|
491
|
+
* }
|
|
492
|
+
*/
|
|
493
|
+
CompositePrice;
|
|
494
|
+
/**
|
|
495
|
+
* The product snapshot data.
|
|
496
|
+
*/
|
|
497
|
+
_product?: /* The product snapshot data. */ /**
|
|
498
|
+
* The product entity
|
|
499
|
+
* example:
|
|
500
|
+
* {
|
|
501
|
+
* "$ref": "#/components/examples/product"
|
|
502
|
+
* }
|
|
503
|
+
*/
|
|
504
|
+
Product;
|
|
505
|
+
/**
|
|
506
|
+
* The taxes applied to the price item.
|
|
507
|
+
*/
|
|
508
|
+
taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmount)[];
|
|
509
|
+
/**
|
|
510
|
+
* The sum of amounts of the price items by recurrence.
|
|
511
|
+
*/
|
|
512
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[];
|
|
513
|
+
/**
|
|
514
|
+
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
515
|
+
*/
|
|
516
|
+
item_components?: /**
|
|
517
|
+
* Represents a price item
|
|
518
|
+
* example:
|
|
519
|
+
* {
|
|
520
|
+
* "$ref": "#/components/examples/price-item"
|
|
521
|
+
* }
|
|
522
|
+
*/
|
|
523
|
+
PriceItem[];
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Represents a composite price input to the pricing library.
|
|
527
|
+
*/
|
|
528
|
+
export interface CompositePriceItemDto {
|
|
529
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
530
|
+
/**
|
|
531
|
+
* The quantity of products being purchased.
|
|
532
|
+
*/
|
|
533
|
+
quantity?: number;
|
|
534
|
+
/**
|
|
535
|
+
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
536
|
+
*/
|
|
537
|
+
description?: string;
|
|
538
|
+
/**
|
|
539
|
+
* The id of the product.
|
|
540
|
+
*/
|
|
541
|
+
product_id?: string;
|
|
542
|
+
/**
|
|
543
|
+
* The id of the price.
|
|
544
|
+
*/
|
|
545
|
+
price_id?: string;
|
|
546
|
+
/**
|
|
547
|
+
* The unit amount value
|
|
548
|
+
*/
|
|
549
|
+
unit_amount?: number;
|
|
550
|
+
/**
|
|
551
|
+
* Three-letter ISO currency code, in lowercase.
|
|
552
|
+
*/
|
|
553
|
+
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
554
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
555
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
556
|
+
*
|
|
557
|
+
* example:
|
|
558
|
+
* EUR
|
|
559
|
+
*/
|
|
560
|
+
Currency;
|
|
561
|
+
/**
|
|
562
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
563
|
+
*/
|
|
564
|
+
unit_amount_decimal?: string;
|
|
565
|
+
/**
|
|
566
|
+
* The flag for prices that contain price components.
|
|
567
|
+
*/
|
|
568
|
+
is_composite_price?: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* The taxes applied to the price item.
|
|
571
|
+
*/
|
|
572
|
+
taxes?: (/* A valid tax rate from a client. */ TaxAmountDto)[];
|
|
573
|
+
/**
|
|
574
|
+
* The taxes applied to the price item.
|
|
575
|
+
*/
|
|
576
|
+
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
577
|
+
_price?: /**
|
|
578
|
+
* The price entity schema for simple pricing
|
|
579
|
+
* example:
|
|
580
|
+
* {
|
|
581
|
+
* "$ref": "#/components/examples/price"
|
|
582
|
+
* }
|
|
583
|
+
*/
|
|
584
|
+
Price | /**
|
|
585
|
+
* The price entity schema for dynamic pricing
|
|
586
|
+
* example:
|
|
587
|
+
* {
|
|
588
|
+
* "$ref": "#/components/examples/composite-price"
|
|
589
|
+
* }
|
|
590
|
+
*/
|
|
591
|
+
CompositePrice;
|
|
592
|
+
_product?: /**
|
|
593
|
+
* The product entity
|
|
594
|
+
* example:
|
|
595
|
+
* {
|
|
596
|
+
* "$ref": "#/components/examples/product"
|
|
597
|
+
* }
|
|
598
|
+
*/
|
|
599
|
+
Product;
|
|
600
|
+
/**
|
|
601
|
+
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
602
|
+
*/
|
|
603
|
+
item_components?: /* Represents a valid price item from a client. */ PriceItemDto[];
|
|
604
|
+
}
|
|
324
605
|
/**
|
|
325
606
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
326
607
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
@@ -371,7 +652,7 @@ declare namespace Components {
|
|
|
371
652
|
$relation?: EntityRelation;
|
|
372
653
|
}
|
|
373
654
|
/**
|
|
374
|
-
* A set of key-value pairs.
|
|
655
|
+
* A set of key-value pairs used to store meta data information about an entity.
|
|
375
656
|
*/
|
|
376
657
|
export type MetaData = ({
|
|
377
658
|
/**
|
|
@@ -385,6 +666,10 @@ declare namespace Components {
|
|
|
385
666
|
})[];
|
|
386
667
|
/**
|
|
387
668
|
* The opportunity entity
|
|
669
|
+
* example:
|
|
670
|
+
* {
|
|
671
|
+
* "$ref": "#/components/examples/opportunity"
|
|
672
|
+
* }
|
|
388
673
|
*/
|
|
389
674
|
export interface Opportunity {
|
|
390
675
|
[name: string]: any;
|
|
@@ -392,41 +677,157 @@ declare namespace Components {
|
|
|
392
677
|
* The opportunity id number for the customer (autogenerated if left blank)
|
|
393
678
|
*/
|
|
394
679
|
opportunity_number?: string;
|
|
680
|
+
/**
|
|
681
|
+
* The opportunity title for the opportunity
|
|
682
|
+
*/
|
|
683
|
+
opportunity_title?: string;
|
|
395
684
|
/**
|
|
396
685
|
* A description to frame this opportunity within its sales process
|
|
397
686
|
*/
|
|
398
687
|
description?: string;
|
|
399
688
|
/**
|
|
400
|
-
* The opportunity status
|
|
689
|
+
* The opportunity status (defined by the opportunity workflow)
|
|
690
|
+
*/
|
|
691
|
+
status?: string;
|
|
692
|
+
/**
|
|
693
|
+
* The expiration date
|
|
694
|
+
*/
|
|
695
|
+
due_date?: string;
|
|
696
|
+
/**
|
|
697
|
+
* The opportunity assignees
|
|
698
|
+
*/
|
|
699
|
+
assignee?: {
|
|
700
|
+
id?: string;
|
|
701
|
+
email?: string;
|
|
702
|
+
display_name?: string;
|
|
703
|
+
token?: string;
|
|
704
|
+
image_uri?: string;
|
|
705
|
+
organization_id?: string;
|
|
706
|
+
department?: string;
|
|
707
|
+
preferred_language?: string;
|
|
708
|
+
status?: string;
|
|
709
|
+
phone?: string;
|
|
710
|
+
email_notification_settings?: {
|
|
711
|
+
[key: string]: any;
|
|
712
|
+
};
|
|
713
|
+
is_signature_enabled?: boolean;
|
|
714
|
+
created_at?: string;
|
|
715
|
+
}[];
|
|
716
|
+
/**
|
|
717
|
+
* A list of customers related with the opportunity
|
|
718
|
+
*/
|
|
719
|
+
customer?: {
|
|
720
|
+
$relation?: EntityRelation[];
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* A set of dates associated with the opportunity
|
|
724
|
+
*/
|
|
725
|
+
dates?: ({
|
|
726
|
+
/**
|
|
727
|
+
* The date tags
|
|
728
|
+
*/
|
|
729
|
+
_tags?: string[];
|
|
730
|
+
/**
|
|
731
|
+
* The date value
|
|
732
|
+
*/
|
|
733
|
+
value?: string;
|
|
734
|
+
})[];
|
|
735
|
+
/**
|
|
736
|
+
* The billing address
|
|
401
737
|
*/
|
|
402
|
-
|
|
403
|
-
|
|
738
|
+
billing_address?: {
|
|
739
|
+
/**
|
|
740
|
+
* The relation from which a field is being referenced
|
|
741
|
+
*/
|
|
742
|
+
$relation_ref?: ({
|
|
743
|
+
/**
|
|
744
|
+
* The id of the referenced entity
|
|
745
|
+
*/
|
|
746
|
+
entity_id?: string;
|
|
747
|
+
/**
|
|
748
|
+
* The path to the target attribute being referenced
|
|
749
|
+
*/
|
|
750
|
+
path?: string;
|
|
751
|
+
})[];
|
|
752
|
+
};
|
|
753
|
+
/**
|
|
754
|
+
* The delivery address
|
|
755
|
+
*/
|
|
756
|
+
delivery_address?: {
|
|
757
|
+
/**
|
|
758
|
+
* The relation from which a field is being referenced
|
|
759
|
+
*/
|
|
760
|
+
$relation_ref?: ({
|
|
761
|
+
/**
|
|
762
|
+
* The id of the referenced entity
|
|
763
|
+
*/
|
|
764
|
+
entity_id?: string;
|
|
765
|
+
/**
|
|
766
|
+
* The path to the target attribute being referenced
|
|
767
|
+
*/
|
|
768
|
+
path?: string;
|
|
769
|
+
})[];
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* A list of additional addresses
|
|
773
|
+
*/
|
|
774
|
+
address?: {
|
|
775
|
+
/**
|
|
776
|
+
* The relation from which a field is being referenced
|
|
777
|
+
*/
|
|
778
|
+
$relation_ref?: ({
|
|
779
|
+
/**
|
|
780
|
+
* The id of the referenced entity
|
|
781
|
+
*/
|
|
782
|
+
entity_id?: string;
|
|
783
|
+
/**
|
|
784
|
+
* The path to the target attribute being referenced
|
|
785
|
+
*/
|
|
786
|
+
path?: string;
|
|
787
|
+
})[];
|
|
788
|
+
};
|
|
789
|
+
/**
|
|
790
|
+
* The order relations items, representing quotes or orders associated with the opportunity
|
|
791
|
+
*/
|
|
792
|
+
items?: {
|
|
404
793
|
$relation?: /* An order relation reference */ OrderRelation[];
|
|
405
794
|
};
|
|
406
795
|
/**
|
|
407
796
|
* Organization Id the order belongs to
|
|
408
797
|
*/
|
|
409
798
|
_org_id?: string;
|
|
799
|
+
/**
|
|
800
|
+
* The opportunity id
|
|
801
|
+
*/
|
|
410
802
|
_id?: string;
|
|
803
|
+
/**
|
|
804
|
+
* The opportunity creation date
|
|
805
|
+
*/
|
|
411
806
|
_created_at?: string;
|
|
807
|
+
/**
|
|
808
|
+
* The opportunity last update date
|
|
809
|
+
*/
|
|
412
810
|
_updated_at?: string;
|
|
413
811
|
/**
|
|
414
|
-
*
|
|
812
|
+
* Type of source, e.g. journey or manual
|
|
415
813
|
* example:
|
|
416
814
|
* journey
|
|
417
815
|
*/
|
|
418
816
|
source_type?: string;
|
|
419
817
|
/**
|
|
420
|
-
*
|
|
818
|
+
* Identifier for source e.g. journey ID
|
|
421
819
|
* example:
|
|
422
820
|
* ce99875f-fba9-4fe2-a8f9-afaf52059051
|
|
423
821
|
*/
|
|
424
822
|
source_id?: string;
|
|
425
|
-
source?: /*
|
|
823
|
+
source?: /* The opportunity generation source */ OpportunitySource;
|
|
824
|
+
/**
|
|
825
|
+
* An arbitrary set of tags attached to the opportunity
|
|
826
|
+
*/
|
|
426
827
|
_tags?: string[];
|
|
427
828
|
}
|
|
428
829
|
/**
|
|
429
|
-
*
|
|
830
|
+
* The opportunity generation source
|
|
430
831
|
*/
|
|
431
832
|
export interface OpportunitySource {
|
|
432
833
|
/**
|
|
@@ -444,40 +845,85 @@ declare namespace Components {
|
|
|
444
845
|
}
|
|
445
846
|
/**
|
|
446
847
|
* The order entity
|
|
848
|
+
* example:
|
|
849
|
+
* {
|
|
850
|
+
* "$ref": "#/components/examples/order-with-simple-prices"
|
|
851
|
+
* }
|
|
447
852
|
*/
|
|
448
853
|
export interface Order {
|
|
449
854
|
[name: string]: any;
|
|
450
855
|
/**
|
|
451
|
-
* The order
|
|
856
|
+
* The order number (customer facing)
|
|
452
857
|
*/
|
|
453
858
|
order_number?: string;
|
|
454
859
|
/**
|
|
455
|
-
* The cart id that originated or is associated with the order
|
|
860
|
+
* The cart id that originated or is associated with the this order
|
|
456
861
|
*/
|
|
457
862
|
cart_id?: string;
|
|
458
|
-
status?:
|
|
863
|
+
status?: /**
|
|
864
|
+
*
|
|
865
|
+
* | status | description |
|
|
866
|
+
* |-------------|-------|
|
|
867
|
+
* | `draft` | Starting state for all orders, at this point we can still edit the order |
|
|
868
|
+
* | `quote` | The order is in a quoting phase, bound to an expiration date |
|
|
869
|
+
* | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
|
|
870
|
+
* | `cancelled` | The order has been cancelled |
|
|
871
|
+
* | `completed` | The order is now closed and finalized |
|
|
872
|
+
*
|
|
873
|
+
*/
|
|
874
|
+
OrderStatus;
|
|
459
875
|
/**
|
|
460
|
-
*
|
|
876
|
+
* Type of source, e.g. journey or manual
|
|
461
877
|
* example:
|
|
462
878
|
* journey
|
|
463
879
|
*/
|
|
464
880
|
source_type?: string;
|
|
465
881
|
/**
|
|
466
|
-
*
|
|
882
|
+
* Identifier for source e.g. journey ID
|
|
467
883
|
* example:
|
|
468
884
|
* ce99875f-fba9-4fe2-a8f9-afaf52059051
|
|
469
885
|
*/
|
|
470
886
|
source_id?: string;
|
|
471
|
-
source?: /*
|
|
472
|
-
metadata?: /* A set of key-value pairs. */ MetaData;
|
|
887
|
+
source?: /* The order generation source */ OrderSource;
|
|
888
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
889
|
+
/**
|
|
890
|
+
* A list of customers related with the opportunity
|
|
891
|
+
*/
|
|
892
|
+
customer?: {
|
|
893
|
+
$relation?: EntityRelation[];
|
|
894
|
+
};
|
|
895
|
+
/**
|
|
896
|
+
* The billing contact first name
|
|
897
|
+
*/
|
|
473
898
|
billing_first_name?: string;
|
|
899
|
+
/**
|
|
900
|
+
* The billing contact last name
|
|
901
|
+
*/
|
|
474
902
|
billing_last_name?: string;
|
|
903
|
+
/**
|
|
904
|
+
* The billing account name
|
|
905
|
+
*/
|
|
475
906
|
billing_company_name?: string;
|
|
907
|
+
/**
|
|
908
|
+
* The billing account VAT
|
|
909
|
+
*/
|
|
476
910
|
billing_vat?: string;
|
|
911
|
+
/**
|
|
912
|
+
* The billing email
|
|
913
|
+
*/
|
|
477
914
|
billing_email?: string;
|
|
915
|
+
/**
|
|
916
|
+
* The billing phone
|
|
917
|
+
*/
|
|
478
918
|
billing_phone?: string;
|
|
919
|
+
/**
|
|
920
|
+
* The billing address
|
|
921
|
+
*/
|
|
479
922
|
billing_address?: Address[];
|
|
480
|
-
|
|
923
|
+
/**
|
|
924
|
+
* The order main currency
|
|
925
|
+
*/
|
|
926
|
+
currency?: /* The order main currency */ /**
|
|
481
927
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
482
928
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
483
929
|
*
|
|
@@ -485,16 +931,18 @@ declare namespace Components {
|
|
|
485
931
|
* EUR
|
|
486
932
|
*/
|
|
487
933
|
Currency;
|
|
934
|
+
/**
|
|
935
|
+
* The delivery address
|
|
936
|
+
*/
|
|
488
937
|
delivery_address?: Address[];
|
|
938
|
+
/**
|
|
939
|
+
* The payment method details for the order
|
|
940
|
+
*/
|
|
489
941
|
payment_method?: /**
|
|
490
942
|
* A PaymentMethod represent your customer's payment instruments.
|
|
491
943
|
*
|
|
492
944
|
*/
|
|
493
945
|
PaymentMethod[];
|
|
494
|
-
/**
|
|
495
|
-
* The id of an existing contact.
|
|
496
|
-
*/
|
|
497
|
-
contact?: string;
|
|
498
946
|
line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
|
|
499
947
|
/**
|
|
500
948
|
* Total of all items before (discounts or) taxes are applied.
|
|
@@ -509,16 +957,39 @@ declare namespace Components {
|
|
|
509
957
|
* Organization Id the order belongs to
|
|
510
958
|
*/
|
|
511
959
|
_org_id?: string;
|
|
960
|
+
/**
|
|
961
|
+
* The order id
|
|
962
|
+
*/
|
|
512
963
|
_id?: string;
|
|
964
|
+
/**
|
|
965
|
+
* The order creation date
|
|
966
|
+
*/
|
|
513
967
|
_created_at?: string;
|
|
968
|
+
/**
|
|
969
|
+
* The order last update date
|
|
970
|
+
*/
|
|
514
971
|
_updated_at?: string;
|
|
972
|
+
/**
|
|
973
|
+
* An arbitrary set of tags attached to the order
|
|
974
|
+
*/
|
|
515
975
|
_tags?: string[];
|
|
516
976
|
}
|
|
517
977
|
/**
|
|
518
978
|
* Order Entity Payload
|
|
519
979
|
*/
|
|
520
980
|
export interface OrderPayload {
|
|
521
|
-
status?:
|
|
981
|
+
status?: /**
|
|
982
|
+
*
|
|
983
|
+
* | status | description |
|
|
984
|
+
* |-------------|-------|
|
|
985
|
+
* | `draft` | Starting state for all orders, at this point we can still edit the order |
|
|
986
|
+
* | `quote` | The order is in a quoting phase, bound to an expiration date |
|
|
987
|
+
* | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
|
|
988
|
+
* | `cancelled` | The order has been cancelled |
|
|
989
|
+
* | `completed` | The order is now closed and finalized |
|
|
990
|
+
*
|
|
991
|
+
*/
|
|
992
|
+
OrderStatus;
|
|
522
993
|
line_items?: /* Tracks a set of product prices, quantities, (discounts) and taxes. */ PriceItems;
|
|
523
994
|
/**
|
|
524
995
|
* type of source, e.g. journey or manual
|
|
@@ -564,7 +1035,7 @@ declare namespace Components {
|
|
|
564
1035
|
_tags?: string[];
|
|
565
1036
|
}
|
|
566
1037
|
/**
|
|
567
|
-
*
|
|
1038
|
+
* The order generation source
|
|
568
1039
|
*/
|
|
569
1040
|
export interface OrderSource {
|
|
570
1041
|
/**
|
|
@@ -581,7 +1052,15 @@ declare namespace Components {
|
|
|
581
1052
|
title?: string;
|
|
582
1053
|
}
|
|
583
1054
|
/**
|
|
584
|
-
*
|
|
1055
|
+
*
|
|
1056
|
+
* | status | description |
|
|
1057
|
+
* |-------------|-------|
|
|
1058
|
+
* | `draft` | Starting state for all orders, at this point we can still edit the order |
|
|
1059
|
+
* | `quote` | The order is in a quoting phase, bound to an expiration date |
|
|
1060
|
+
* | `placed` | The order has been paid and can now be fulfilled (shipped, delivered, complete) or canceled |
|
|
1061
|
+
* | `cancelled` | The order has been cancelled |
|
|
1062
|
+
* | `completed` | The order is now closed and finalized |
|
|
1063
|
+
*
|
|
585
1064
|
*/
|
|
586
1065
|
export type OrderStatus = "draft" | "quote" | "placed" | "cancelled" | "completed";
|
|
587
1066
|
/**
|
|
@@ -601,21 +1080,78 @@ declare namespace Components {
|
|
|
601
1080
|
};
|
|
602
1081
|
}
|
|
603
1082
|
/**
|
|
604
|
-
* The price
|
|
1083
|
+
* The price entity schema for simple pricing
|
|
1084
|
+
* example:
|
|
1085
|
+
* {
|
|
1086
|
+
* "$ref": "#/components/examples/price"
|
|
1087
|
+
* }
|
|
605
1088
|
*/
|
|
606
1089
|
export interface Price {
|
|
607
1090
|
[name: string]: any;
|
|
1091
|
+
/**
|
|
1092
|
+
* Whether the price can be used for new purchases.
|
|
1093
|
+
*/
|
|
608
1094
|
active?: boolean;
|
|
609
|
-
|
|
1095
|
+
/**
|
|
1096
|
+
* Describes how to compute the price per period. Either `per_unit` or `tiered`.
|
|
1097
|
+
* - `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
|
|
1098
|
+
* - `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
|
|
1099
|
+
*
|
|
1100
|
+
* ⚠️ Tiered pricing is **not supported** yet.
|
|
1101
|
+
*
|
|
1102
|
+
*/
|
|
1103
|
+
billing_scheme?: "per_unit";
|
|
1104
|
+
/**
|
|
1105
|
+
* A brief description of the price.
|
|
1106
|
+
*/
|
|
610
1107
|
description?: string;
|
|
611
|
-
|
|
1108
|
+
/**
|
|
1109
|
+
* The default tax rate applicable to the product.
|
|
1110
|
+
* This field is deprecated, use the new `tax` attribute.
|
|
1111
|
+
*
|
|
1112
|
+
*/
|
|
1113
|
+
sales_tax?: /**
|
|
1114
|
+
* The default tax rate applicable to the product.
|
|
1115
|
+
* This field is deprecated, use the new `tax` attribute.
|
|
1116
|
+
*
|
|
1117
|
+
*/
|
|
1118
|
+
SalesTax;
|
|
1119
|
+
/**
|
|
1120
|
+
* The default tax rate applied to the price
|
|
1121
|
+
*/
|
|
1122
|
+
tax?: {
|
|
1123
|
+
$relation?: EntityRelation[];
|
|
1124
|
+
};
|
|
1125
|
+
/**
|
|
1126
|
+
* Specifies whether the price is considered `inclusive` of taxes or `exclusive` of taxes.
|
|
1127
|
+
* One of `inclusive`, `exclusive`, or `unspecified`.
|
|
1128
|
+
*
|
|
1129
|
+
*/
|
|
612
1130
|
tax_behavior?: "inclusive" | "exclusive";
|
|
613
|
-
|
|
1131
|
+
/**
|
|
1132
|
+
* Defines the tiered pricing type of the price.
|
|
1133
|
+
*/
|
|
1134
|
+
tiers_mode?: "standard";
|
|
1135
|
+
/**
|
|
1136
|
+
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
1137
|
+
*/
|
|
614
1138
|
type?: "one_time" | "recurring";
|
|
615
|
-
|
|
1139
|
+
/**
|
|
1140
|
+
* For recurring prices `billing_period` defines the default extent of the recurrence.
|
|
1141
|
+
*/
|
|
1142
|
+
billing_period?: /* For recurring prices `billing_period` defines the default extent of the recurrence. */ BillingPeriod;
|
|
1143
|
+
/**
|
|
1144
|
+
* The unit amount in cents to be charged, represented as a whole integer if possible.
|
|
1145
|
+
*/
|
|
616
1146
|
unit_amount?: number;
|
|
1147
|
+
/**
|
|
1148
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1149
|
+
*/
|
|
617
1150
|
unit_amount_decimal?: string;
|
|
618
|
-
|
|
1151
|
+
/**
|
|
1152
|
+
* Three-letter ISO currency code, in lowercase.
|
|
1153
|
+
*/
|
|
1154
|
+
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
619
1155
|
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
620
1156
|
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
621
1157
|
*
|
|
@@ -623,28 +1159,104 @@ declare namespace Components {
|
|
|
623
1159
|
* EUR
|
|
624
1160
|
*/
|
|
625
1161
|
Currency;
|
|
1162
|
+
/**
|
|
1163
|
+
* Defines the way the price amount is display in epilot journeys.
|
|
1164
|
+
*/
|
|
1165
|
+
price_display_in_journeys?: "show_price" | "show_as_starting_price" | "show_as_on_request";
|
|
1166
|
+
/**
|
|
1167
|
+
* The billing period duration
|
|
1168
|
+
*/
|
|
626
1169
|
billing_duration_amount?: number;
|
|
1170
|
+
/**
|
|
1171
|
+
* The billing period duration unit
|
|
1172
|
+
*/
|
|
627
1173
|
billing_duration_unit?: "weeks" | "months" | "years";
|
|
1174
|
+
/**
|
|
1175
|
+
* The notice period duration
|
|
1176
|
+
*/
|
|
628
1177
|
notice_time_amount?: number;
|
|
1178
|
+
/**
|
|
1179
|
+
* The notice period duration unit
|
|
1180
|
+
*/
|
|
629
1181
|
notice_time_unit?: "weeks" | "months" | "years";
|
|
1182
|
+
/**
|
|
1183
|
+
* The termination period duration
|
|
1184
|
+
*/
|
|
630
1185
|
termination_time_amount?: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* The termination period duration unit
|
|
1188
|
+
*/
|
|
631
1189
|
termination_time_unit?: "weeks" | "months" | "years";
|
|
1190
|
+
/**
|
|
1191
|
+
* The renewal period duration
|
|
1192
|
+
*/
|
|
632
1193
|
renewal_duration_amount?: number;
|
|
1194
|
+
/**
|
|
1195
|
+
* The renewal period duration unit
|
|
1196
|
+
*/
|
|
633
1197
|
renewal_duration_unit?: "weeks" | "months" | "years";
|
|
1198
|
+
/**
|
|
1199
|
+
* The price creation date
|
|
1200
|
+
*/
|
|
634
1201
|
_created_at?: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* The price id
|
|
1204
|
+
*/
|
|
635
1205
|
_id?: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* The price autogenerated title
|
|
1208
|
+
*/
|
|
636
1209
|
_title?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* The price last update date
|
|
1212
|
+
*/
|
|
637
1213
|
_updated_at?: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* The organization id the price belongs to
|
|
1216
|
+
*/
|
|
1217
|
+
_org_id?: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* An arbitrary set of tags attached to the price
|
|
1220
|
+
*/
|
|
1221
|
+
_tags?: string[];
|
|
1222
|
+
}
|
|
1223
|
+
export interface PriceComponentRelation {
|
|
1224
|
+
/**
|
|
1225
|
+
* The id of the price component
|
|
1226
|
+
*/
|
|
1227
|
+
entity_id?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* By default, the quantity is set to 1, when greater than 1 this value is used as a multiplicative factor.
|
|
1230
|
+
* E.g: 16 x Solar Modules - Premium price.
|
|
1231
|
+
*
|
|
1232
|
+
*/
|
|
1233
|
+
quantity?: number;
|
|
1234
|
+
item?: /**
|
|
1235
|
+
* The price entity schema for simple pricing
|
|
1236
|
+
* example:
|
|
1237
|
+
* {
|
|
1238
|
+
* "$ref": "#/components/examples/price"
|
|
1239
|
+
* }
|
|
1240
|
+
*/
|
|
1241
|
+
Price;
|
|
1242
|
+
/**
|
|
1243
|
+
* An arbitrary set of tags attached to the composite price - component relation
|
|
1244
|
+
*/
|
|
1245
|
+
_tags?: string[];
|
|
638
1246
|
}
|
|
639
1247
|
/**
|
|
640
1248
|
* Represents a price item
|
|
1249
|
+
* example:
|
|
1250
|
+
* {
|
|
1251
|
+
* "$ref": "#/components/examples/price-item"
|
|
1252
|
+
* }
|
|
641
1253
|
*/
|
|
642
1254
|
export interface PriceItem {
|
|
643
1255
|
/**
|
|
644
1256
|
* price item id
|
|
645
1257
|
*/
|
|
646
1258
|
id?: string;
|
|
647
|
-
metadata?: /* A set of key-value pairs. */ MetaData;
|
|
1259
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
648
1260
|
/**
|
|
649
1261
|
* The unit amount value
|
|
650
1262
|
*/
|
|
@@ -654,9 +1266,13 @@ declare namespace Components {
|
|
|
654
1266
|
*/
|
|
655
1267
|
amount_subtotal?: number;
|
|
656
1268
|
/**
|
|
657
|
-
* Net unit amount without taxes.
|
|
1269
|
+
* Net unit amount without taxes or discounts.
|
|
658
1270
|
*/
|
|
659
1271
|
unit_amount_net?: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1274
|
+
*/
|
|
1275
|
+
unit_amount_decimal?: string;
|
|
660
1276
|
/**
|
|
661
1277
|
* Total after (discounts and) taxes.
|
|
662
1278
|
*/
|
|
@@ -685,8 +1301,39 @@ declare namespace Components {
|
|
|
685
1301
|
* The id of the price.
|
|
686
1302
|
*/
|
|
687
1303
|
price_id?: string;
|
|
688
|
-
|
|
689
|
-
|
|
1304
|
+
/**
|
|
1305
|
+
* The flag for prices that contain price components.
|
|
1306
|
+
*/
|
|
1307
|
+
is_composite_price?: boolean;
|
|
1308
|
+
/**
|
|
1309
|
+
* The price snapshot data.
|
|
1310
|
+
*/
|
|
1311
|
+
_price?: /* The price snapshot data. */ /**
|
|
1312
|
+
* The price entity schema for simple pricing
|
|
1313
|
+
* example:
|
|
1314
|
+
* {
|
|
1315
|
+
* "$ref": "#/components/examples/price"
|
|
1316
|
+
* }
|
|
1317
|
+
*/
|
|
1318
|
+
Price | /**
|
|
1319
|
+
* The price entity schema for dynamic pricing
|
|
1320
|
+
* example:
|
|
1321
|
+
* {
|
|
1322
|
+
* "$ref": "#/components/examples/composite-price"
|
|
1323
|
+
* }
|
|
1324
|
+
*/
|
|
1325
|
+
CompositePrice;
|
|
1326
|
+
/**
|
|
1327
|
+
* The product snapshot data.
|
|
1328
|
+
*/
|
|
1329
|
+
_product?: /* The product snapshot data. */ /**
|
|
1330
|
+
* The product entity
|
|
1331
|
+
* example:
|
|
1332
|
+
* {
|
|
1333
|
+
* "$ref": "#/components/examples/product"
|
|
1334
|
+
* }
|
|
1335
|
+
*/
|
|
1336
|
+
Product;
|
|
690
1337
|
/**
|
|
691
1338
|
* The taxes applied to the price item.
|
|
692
1339
|
*/
|
|
@@ -700,7 +1347,7 @@ declare namespace Components {
|
|
|
700
1347
|
* Represents a valid price item from a client.
|
|
701
1348
|
*/
|
|
702
1349
|
export interface PriceItemDto {
|
|
703
|
-
metadata?: /* A set of key-value pairs. */ MetaData;
|
|
1350
|
+
metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData;
|
|
704
1351
|
/**
|
|
705
1352
|
* The quantity of products being purchased.
|
|
706
1353
|
*/
|
|
@@ -717,6 +1364,29 @@ declare namespace Components {
|
|
|
717
1364
|
* The id of the price.
|
|
718
1365
|
*/
|
|
719
1366
|
price_id?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* The unit amount value
|
|
1369
|
+
*/
|
|
1370
|
+
unit_amount?: number;
|
|
1371
|
+
/**
|
|
1372
|
+
* Three-letter ISO currency code, in lowercase.
|
|
1373
|
+
*/
|
|
1374
|
+
unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /**
|
|
1375
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
1376
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
1377
|
+
*
|
|
1378
|
+
* example:
|
|
1379
|
+
* EUR
|
|
1380
|
+
*/
|
|
1381
|
+
Currency;
|
|
1382
|
+
/**
|
|
1383
|
+
* The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.
|
|
1384
|
+
*/
|
|
1385
|
+
unit_amount_decimal?: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* The flag for prices that contain price components.
|
|
1388
|
+
*/
|
|
1389
|
+
is_composite_price?: boolean;
|
|
720
1390
|
/**
|
|
721
1391
|
* The taxes applied to the price item.
|
|
722
1392
|
*/
|
|
@@ -725,16 +1395,51 @@ declare namespace Components {
|
|
|
725
1395
|
* The taxes applied to the price item.
|
|
726
1396
|
*/
|
|
727
1397
|
recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmountDto)[];
|
|
728
|
-
_price?:
|
|
1398
|
+
_price?: /**
|
|
1399
|
+
* The price entity schema for simple pricing
|
|
1400
|
+
* example:
|
|
1401
|
+
* {
|
|
1402
|
+
* "$ref": "#/components/examples/price"
|
|
1403
|
+
* }
|
|
1404
|
+
*/
|
|
1405
|
+
Price | /**
|
|
1406
|
+
* The price entity schema for dynamic pricing
|
|
1407
|
+
* example:
|
|
1408
|
+
* {
|
|
1409
|
+
* "$ref": "#/components/examples/composite-price"
|
|
1410
|
+
* }
|
|
1411
|
+
*/
|
|
1412
|
+
CompositePrice;
|
|
729
1413
|
/**
|
|
730
1414
|
* The product linked to the price item.
|
|
731
1415
|
*/
|
|
732
|
-
_product?:
|
|
1416
|
+
_product?: /**
|
|
1417
|
+
* The product entity
|
|
1418
|
+
* example:
|
|
1419
|
+
* {
|
|
1420
|
+
* "$ref": "#/components/examples/product"
|
|
1421
|
+
* }
|
|
1422
|
+
*/
|
|
1423
|
+
Product;
|
|
733
1424
|
}
|
|
734
1425
|
/**
|
|
735
1426
|
* Tracks a set of product prices, quantities, (discounts) and taxes.
|
|
736
1427
|
*/
|
|
737
|
-
export type PriceItems = (
|
|
1428
|
+
export type PriceItems = (/**
|
|
1429
|
+
* Represents a price item
|
|
1430
|
+
* example:
|
|
1431
|
+
* {
|
|
1432
|
+
* "$ref": "#/components/examples/price-item"
|
|
1433
|
+
* }
|
|
1434
|
+
*/
|
|
1435
|
+
PriceItem | /**
|
|
1436
|
+
* Represents a composite price input to the pricing library.
|
|
1437
|
+
* example:
|
|
1438
|
+
* {
|
|
1439
|
+
* "$ref": "#/components/examples/price-item"
|
|
1440
|
+
* }
|
|
1441
|
+
*/
|
|
1442
|
+
CompositePriceItem)[];
|
|
738
1443
|
/**
|
|
739
1444
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
740
1445
|
*/
|
|
@@ -743,7 +1448,14 @@ declare namespace Components {
|
|
|
743
1448
|
* The result from the calculation of a set of price items.
|
|
744
1449
|
*/
|
|
745
1450
|
export interface PricingDetails {
|
|
746
|
-
items?: (
|
|
1451
|
+
items?: (/**
|
|
1452
|
+
* Represents a price item
|
|
1453
|
+
* example:
|
|
1454
|
+
* {
|
|
1455
|
+
* "$ref": "#/components/examples/price-item"
|
|
1456
|
+
* }
|
|
1457
|
+
*/
|
|
1458
|
+
PriceItem)[];
|
|
747
1459
|
/**
|
|
748
1460
|
* Total of all items before (discounts or) taxes are applied.
|
|
749
1461
|
*/
|
|
@@ -755,16 +1467,91 @@ declare namespace Components {
|
|
|
755
1467
|
total_details?: /* The total details with tax (and discount) aggregated totals. */ TotalDetails;
|
|
756
1468
|
}
|
|
757
1469
|
/**
|
|
758
|
-
* The product
|
|
1470
|
+
* The product entity
|
|
1471
|
+
* example:
|
|
1472
|
+
* {
|
|
1473
|
+
* "$ref": "#/components/examples/product"
|
|
1474
|
+
* }
|
|
759
1475
|
*/
|
|
760
1476
|
export interface Product {
|
|
761
1477
|
[name: string]: any;
|
|
1478
|
+
/**
|
|
1479
|
+
* The product code
|
|
1480
|
+
*/
|
|
762
1481
|
code?: string;
|
|
763
|
-
|
|
1482
|
+
/**
|
|
1483
|
+
* The type of Product:
|
|
1484
|
+
*
|
|
1485
|
+
* | type | description |
|
|
1486
|
+
* |----| ----|
|
|
1487
|
+
* | `product` | Represents a physical good |
|
|
1488
|
+
* | `service` | Represents a service or virtual product |
|
|
1489
|
+
*
|
|
1490
|
+
*/
|
|
1491
|
+
type?: "product" | "service";
|
|
1492
|
+
/**
|
|
1493
|
+
* The product main name
|
|
1494
|
+
*/
|
|
764
1495
|
name?: string;
|
|
1496
|
+
feature?: {
|
|
1497
|
+
/**
|
|
1498
|
+
* An arbitrary set of tags attached to a feature
|
|
1499
|
+
*/
|
|
1500
|
+
_tags?: string[];
|
|
1501
|
+
feature?: string;
|
|
1502
|
+
}[];
|
|
1503
|
+
/**
|
|
1504
|
+
* Stores references to products that can be cross sold with the current product.
|
|
1505
|
+
*/
|
|
1506
|
+
cross_sellable_products?: {
|
|
1507
|
+
$relation?: EntityRelation[];
|
|
1508
|
+
};
|
|
1509
|
+
/**
|
|
1510
|
+
* Stores references to a set of file images of the product
|
|
1511
|
+
*/
|
|
1512
|
+
product_images?: {
|
|
1513
|
+
$relation?: EntityRelation[];
|
|
1514
|
+
};
|
|
1515
|
+
/**
|
|
1516
|
+
* Stores references to a set of files downloadable from the product.
|
|
1517
|
+
* e.g: tech specifications, quality control sheets, privacy policy agreements
|
|
1518
|
+
*
|
|
1519
|
+
*/
|
|
1520
|
+
product_downloads?: {
|
|
1521
|
+
$relation?: EntityRelation[];
|
|
1522
|
+
};
|
|
1523
|
+
/**
|
|
1524
|
+
* A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product.
|
|
1525
|
+
*/
|
|
1526
|
+
price_options?: {
|
|
1527
|
+
$relation?: EntityRelation[];
|
|
1528
|
+
};
|
|
1529
|
+
/**
|
|
1530
|
+
* Stores references to the availability files that define where this product is available.
|
|
1531
|
+
* These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block.
|
|
1532
|
+
*
|
|
1533
|
+
*/
|
|
1534
|
+
_availability_files?: File[];
|
|
1535
|
+
/**
|
|
1536
|
+
* The product id
|
|
1537
|
+
*/
|
|
765
1538
|
_id?: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* The autogenerated product title
|
|
1541
|
+
*/
|
|
766
1542
|
_title?: string;
|
|
767
|
-
|
|
1543
|
+
/**
|
|
1544
|
+
* The organization id the product belongs to
|
|
1545
|
+
*/
|
|
1546
|
+
_org_id?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* The product creation date
|
|
1549
|
+
*/
|
|
1550
|
+
_created_at?: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* The product last update date
|
|
1553
|
+
*/
|
|
1554
|
+
_updated_at?: string;
|
|
768
1555
|
}
|
|
769
1556
|
/**
|
|
770
1557
|
* An amount associated with a specific recurrence.
|
|
@@ -939,9 +1726,23 @@ declare namespace Paths {
|
|
|
939
1726
|
namespace Parameters {
|
|
940
1727
|
export type XIvyOrgID = string;
|
|
941
1728
|
}
|
|
942
|
-
export type RequestBody =
|
|
1729
|
+
export type RequestBody = /**
|
|
1730
|
+
* The opportunity entity
|
|
1731
|
+
* example:
|
|
1732
|
+
* {
|
|
1733
|
+
* "$ref": "#/components/examples/opportunity"
|
|
1734
|
+
* }
|
|
1735
|
+
*/
|
|
1736
|
+
Components.Schemas.Opportunity;
|
|
943
1737
|
namespace Responses {
|
|
944
|
-
export type $201 =
|
|
1738
|
+
export type $201 = /**
|
|
1739
|
+
* The opportunity entity
|
|
1740
|
+
* example:
|
|
1741
|
+
* {
|
|
1742
|
+
* "$ref": "#/components/examples/opportunity"
|
|
1743
|
+
* }
|
|
1744
|
+
*/
|
|
1745
|
+
Components.Schemas.Opportunity;
|
|
945
1746
|
export type $400 = Components.Schemas.Error;
|
|
946
1747
|
}
|
|
947
1748
|
}
|
|
@@ -999,7 +1800,14 @@ declare namespace Paths {
|
|
|
999
1800
|
namespace CreateOrder {
|
|
1000
1801
|
export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
|
|
1001
1802
|
namespace Responses {
|
|
1002
|
-
export type $201 =
|
|
1803
|
+
export type $201 = /**
|
|
1804
|
+
* The order entity
|
|
1805
|
+
* example:
|
|
1806
|
+
* {
|
|
1807
|
+
* "$ref": "#/components/examples/order-with-simple-prices"
|
|
1808
|
+
* }
|
|
1809
|
+
*/
|
|
1810
|
+
Components.Schemas.Order;
|
|
1003
1811
|
export type $400 = Components.Schemas.Error;
|
|
1004
1812
|
}
|
|
1005
1813
|
}
|
|
@@ -1012,7 +1820,14 @@ declare namespace Paths {
|
|
|
1012
1820
|
}
|
|
1013
1821
|
export type RequestBody = /* Order Entity Payload */ Components.Schemas.OrderPayload;
|
|
1014
1822
|
namespace Responses {
|
|
1015
|
-
export type $200 =
|
|
1823
|
+
export type $200 = /**
|
|
1824
|
+
* The order entity
|
|
1825
|
+
* example:
|
|
1826
|
+
* {
|
|
1827
|
+
* "$ref": "#/components/examples/order-with-simple-prices"
|
|
1828
|
+
* }
|
|
1829
|
+
*/
|
|
1830
|
+
Components.Schemas.Order;
|
|
1016
1831
|
export type $400 = Components.Schemas.Error;
|
|
1017
1832
|
}
|
|
1018
1833
|
}
|
|
@@ -1083,7 +1898,9 @@ export interface OperationMethods {
|
|
|
1083
1898
|
/**
|
|
1084
1899
|
* $createOpportunity - createOpportunity
|
|
1085
1900
|
*
|
|
1086
|
-
* This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
|
|
1901
|
+
* This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
|
|
1902
|
+
*
|
|
1903
|
+
* Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
|
|
1087
1904
|
* The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
|
|
1088
1905
|
*
|
|
1089
1906
|
*/
|
|
@@ -1170,7 +1987,9 @@ export interface PathsDictionary {
|
|
|
1170
1987
|
/**
|
|
1171
1988
|
* $createOpportunity - createOpportunity
|
|
1172
1989
|
*
|
|
1173
|
-
* This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
|
|
1990
|
+
* This API is Deprecated. Please use the Entity API or Submission API to create opportunities.
|
|
1991
|
+
*
|
|
1992
|
+
* Enables the creation of a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.
|
|
1174
1993
|
* The `opportunity_number` can be used to universally identify an opportunity within epilot platform.
|
|
1175
1994
|
*
|
|
1176
1995
|
*/
|