lago-javascript-client 0.27.0-beta → 0.28.0-beta
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/README.md +3 -3
- package/esm/mod.js +2 -2
- package/esm/{swagger → openapi}/client.js +207 -156
- package/package.json +2 -2
- package/script/mod.js +2 -2
- package/script/{swagger → openapi}/client.js +207 -156
- package/types/mod.d.ts +2 -2
- package/types/{swagger → openapi}/client.d.ts +463 -256
|
@@ -6,7 +6,7 @@ export interface BillableMetricGroup {
|
|
|
6
6
|
export interface BillableMetricObject {
|
|
7
7
|
/**
|
|
8
8
|
* @format uuid
|
|
9
|
-
* @example "
|
|
9
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
10
10
|
*/
|
|
11
11
|
lago_id: string;
|
|
12
12
|
/** @example "bm1" */
|
|
@@ -56,7 +56,7 @@ export interface BillableMetricInput {
|
|
|
56
56
|
export interface GroupObject {
|
|
57
57
|
/**
|
|
58
58
|
* @format uuid
|
|
59
|
-
* @example "
|
|
59
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
60
60
|
*/
|
|
61
61
|
lago_id: string;
|
|
62
62
|
/** @example "region" */
|
|
@@ -70,7 +70,7 @@ export interface Groups {
|
|
|
70
70
|
export interface AddOnObject {
|
|
71
71
|
/**
|
|
72
72
|
* @format uuid
|
|
73
|
-
* @example "
|
|
73
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
74
74
|
*/
|
|
75
75
|
lago_id: string;
|
|
76
76
|
/** @example "example name" */
|
|
@@ -112,19 +112,19 @@ export interface AddOnInput {
|
|
|
112
112
|
export interface AppliedAddOnObject {
|
|
113
113
|
/**
|
|
114
114
|
* @format uuid
|
|
115
|
-
* @example "
|
|
115
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
116
116
|
*/
|
|
117
117
|
lago_id: string;
|
|
118
118
|
/**
|
|
119
119
|
* @format uuid
|
|
120
|
-
* @example "
|
|
120
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
121
121
|
*/
|
|
122
122
|
lago_add_on_id: string;
|
|
123
123
|
/** @example "code" */
|
|
124
124
|
add_on_code: string;
|
|
125
125
|
/**
|
|
126
126
|
* @format uuid
|
|
127
|
-
* @example "
|
|
127
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
128
128
|
*/
|
|
129
129
|
lago_customer_id: string;
|
|
130
130
|
/** @example "1234567" */
|
|
@@ -157,7 +157,7 @@ export interface AppliedAddOnInput {
|
|
|
157
157
|
export interface CouponObject {
|
|
158
158
|
/**
|
|
159
159
|
* @format uuid
|
|
160
|
-
* @example "
|
|
160
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
161
161
|
*/
|
|
162
162
|
lago_id: string;
|
|
163
163
|
/** @example "coupon1" */
|
|
@@ -235,19 +235,19 @@ export interface CouponInput {
|
|
|
235
235
|
export interface AppliedCouponObject {
|
|
236
236
|
/**
|
|
237
237
|
* @format uuid
|
|
238
|
-
* @example "
|
|
238
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
239
239
|
*/
|
|
240
240
|
lago_id: string;
|
|
241
241
|
/**
|
|
242
242
|
* @format uuid
|
|
243
|
-
* @example "
|
|
243
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
244
244
|
*/
|
|
245
245
|
lago_coupon_id: string;
|
|
246
246
|
/** @example "example_code" */
|
|
247
247
|
coupon_code: string;
|
|
248
248
|
/**
|
|
249
249
|
* @format uuid
|
|
250
|
-
* @example "
|
|
250
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
251
251
|
*/
|
|
252
252
|
lago_customer_id: string;
|
|
253
253
|
/** @example "123456" */
|
|
@@ -322,7 +322,7 @@ export interface BillingConfigurationOrganization {
|
|
|
322
322
|
export interface OrganizationObject {
|
|
323
323
|
/**
|
|
324
324
|
* @format uuid
|
|
325
|
-
* @example "
|
|
325
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
326
326
|
*/
|
|
327
327
|
lago_id?: string;
|
|
328
328
|
/** @example "example name" */
|
|
@@ -411,7 +411,7 @@ export interface BillingConfigurationCustomer {
|
|
|
411
411
|
export interface CustomerMetadataObject {
|
|
412
412
|
/**
|
|
413
413
|
* @format uuid
|
|
414
|
-
* @example "
|
|
414
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
415
415
|
*/
|
|
416
416
|
lago_id?: string;
|
|
417
417
|
/** @example "name" */
|
|
@@ -429,7 +429,7 @@ export interface CustomerMetadataObject {
|
|
|
429
429
|
export interface CustomerObject {
|
|
430
430
|
/**
|
|
431
431
|
* @format uuid
|
|
432
|
-
* @example "
|
|
432
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
433
433
|
*/
|
|
434
434
|
lago_id: string;
|
|
435
435
|
/** @example "12345" */
|
|
@@ -528,7 +528,7 @@ export interface CustomerInput {
|
|
|
528
528
|
metadata?: {
|
|
529
529
|
/**
|
|
530
530
|
* @format uuid
|
|
531
|
-
* @example "
|
|
531
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
532
532
|
*/
|
|
533
533
|
id?: string;
|
|
534
534
|
/** @example "name" */
|
|
@@ -550,16 +550,17 @@ export interface ChargeUsageObject {
|
|
|
550
550
|
charge: {
|
|
551
551
|
/**
|
|
552
552
|
* @format uuid
|
|
553
|
-
* @example "
|
|
553
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
554
554
|
*/
|
|
555
555
|
lago_id?: string;
|
|
556
556
|
/** Charge model type */
|
|
557
557
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
558
|
+
instant?: boolean;
|
|
558
559
|
};
|
|
559
560
|
billable_metric: {
|
|
560
561
|
/**
|
|
561
562
|
* @format uuid
|
|
562
|
-
* @example "
|
|
563
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
563
564
|
*/
|
|
564
565
|
lago_id?: string;
|
|
565
566
|
/** @example "Example name" */
|
|
@@ -572,7 +573,7 @@ export interface ChargeUsageObject {
|
|
|
572
573
|
groups: {
|
|
573
574
|
/**
|
|
574
575
|
* @format uuid
|
|
575
|
-
* @example "
|
|
576
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
576
577
|
*/
|
|
577
578
|
lago_id?: string;
|
|
578
579
|
/** @example "key" */
|
|
@@ -621,14 +622,14 @@ export interface CustomerUsage {
|
|
|
621
622
|
export interface EventObject {
|
|
622
623
|
/**
|
|
623
624
|
* @format uuid
|
|
624
|
-
* @example "
|
|
625
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
625
626
|
*/
|
|
626
627
|
lago_id: string;
|
|
627
628
|
/** @example "987654321" */
|
|
628
629
|
transaction_id: string;
|
|
629
630
|
/**
|
|
630
631
|
* @format uuid
|
|
631
|
-
* @example "
|
|
632
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
632
633
|
*/
|
|
633
634
|
lago_customer_id: string;
|
|
634
635
|
/** @example "123456" */
|
|
@@ -643,7 +644,7 @@ export interface EventObject {
|
|
|
643
644
|
properties?: object;
|
|
644
645
|
/**
|
|
645
646
|
* @format uuid
|
|
646
|
-
* @example "
|
|
647
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
647
648
|
*/
|
|
648
649
|
lago_subscription_id: string;
|
|
649
650
|
/** @example "123456" */
|
|
@@ -700,6 +701,16 @@ export interface BatchEventInput {
|
|
|
700
701
|
export interface Fees {
|
|
701
702
|
fees: FeeObject[];
|
|
702
703
|
}
|
|
704
|
+
export interface FeesPaginated {
|
|
705
|
+
fees: FeeObject[];
|
|
706
|
+
meta: PaginationMeta;
|
|
707
|
+
}
|
|
708
|
+
export interface FeeUpdateInput {
|
|
709
|
+
invoice: {
|
|
710
|
+
/** Status */
|
|
711
|
+
payment_status: "pending" | "succeeded" | "failed" | "refunded";
|
|
712
|
+
};
|
|
713
|
+
}
|
|
703
714
|
export interface GroupPropertiesObject {
|
|
704
715
|
/** @example "123456" */
|
|
705
716
|
group_id: string;
|
|
@@ -708,12 +719,12 @@ export interface GroupPropertiesObject {
|
|
|
708
719
|
export interface ChargeObject {
|
|
709
720
|
/**
|
|
710
721
|
* @format uuid
|
|
711
|
-
* @example "
|
|
722
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
712
723
|
*/
|
|
713
724
|
lago_id: string;
|
|
714
725
|
/**
|
|
715
726
|
* @format uuid
|
|
716
|
-
* @example "
|
|
727
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
717
728
|
*/
|
|
718
729
|
lago_billable_metric_id: string;
|
|
719
730
|
/** @example "bm_code" */
|
|
@@ -725,13 +736,15 @@ export interface ChargeObject {
|
|
|
725
736
|
created_at: string;
|
|
726
737
|
/** Charge model type */
|
|
727
738
|
charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
739
|
+
/** @example true */
|
|
740
|
+
instant?: boolean;
|
|
728
741
|
properties?: object;
|
|
729
742
|
group_properties?: GroupPropertiesObject[];
|
|
730
743
|
}
|
|
731
744
|
export interface PlanObject {
|
|
732
745
|
/**
|
|
733
746
|
* @format uuid
|
|
734
|
-
* @example "
|
|
747
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
735
748
|
*/
|
|
736
749
|
lago_id: string;
|
|
737
750
|
/** @example "example name" */
|
|
@@ -792,16 +805,17 @@ export interface PlanInput {
|
|
|
792
805
|
charges?: {
|
|
793
806
|
/**
|
|
794
807
|
* @format uuid
|
|
795
|
-
* @example "
|
|
808
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
796
809
|
*/
|
|
797
810
|
id?: string;
|
|
798
811
|
/**
|
|
799
812
|
* @format uuid
|
|
800
|
-
* @example "
|
|
813
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
801
814
|
*/
|
|
802
815
|
billable_metric_id?: string;
|
|
803
816
|
/** Charge model type */
|
|
804
817
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
818
|
+
instant?: boolean;
|
|
805
819
|
properties?: object;
|
|
806
820
|
group_properties?: {
|
|
807
821
|
/** @example "123456" */
|
|
@@ -814,14 +828,14 @@ export interface PlanInput {
|
|
|
814
828
|
export interface SubscriptionObject {
|
|
815
829
|
/**
|
|
816
830
|
* @format uuid
|
|
817
|
-
* @example "
|
|
831
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
818
832
|
*/
|
|
819
833
|
lago_id: string;
|
|
820
834
|
/** @example "12345" */
|
|
821
835
|
external_id: string;
|
|
822
836
|
/**
|
|
823
837
|
* @format uuid
|
|
824
|
-
* @example "
|
|
838
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
825
839
|
*/
|
|
826
840
|
lago_customer_id: string;
|
|
827
841
|
/** @example "54321" */
|
|
@@ -908,7 +922,7 @@ export interface SubscriptionUpdateInput {
|
|
|
908
922
|
export interface CreditObject {
|
|
909
923
|
/**
|
|
910
924
|
* @format uuid
|
|
911
|
-
* @example "
|
|
925
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
912
926
|
*/
|
|
913
927
|
lago_id: string;
|
|
914
928
|
/** @example 1200 */
|
|
@@ -918,7 +932,7 @@ export interface CreditObject {
|
|
|
918
932
|
item: {
|
|
919
933
|
/**
|
|
920
934
|
* @format uuid
|
|
921
|
-
* @example "
|
|
935
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
922
936
|
*/
|
|
923
937
|
lago_id: string;
|
|
924
938
|
/** @example "coupon" */
|
|
@@ -931,7 +945,7 @@ export interface CreditObject {
|
|
|
931
945
|
invoice: {
|
|
932
946
|
/**
|
|
933
947
|
* @format uuid
|
|
934
|
-
* @example "
|
|
948
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
935
949
|
*/
|
|
936
950
|
lago_id: string;
|
|
937
951
|
payment_status: "pending" | "succeeded" | "failed";
|
|
@@ -940,14 +954,21 @@ export interface CreditObject {
|
|
|
940
954
|
export interface FeeObject {
|
|
941
955
|
/**
|
|
942
956
|
* @format uuid
|
|
943
|
-
* @example "
|
|
957
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
944
958
|
*/
|
|
945
959
|
lago_id: string;
|
|
946
960
|
/**
|
|
947
961
|
* @format uuid
|
|
948
|
-
* @example "
|
|
962
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
949
963
|
*/
|
|
950
964
|
lago_group_id?: string;
|
|
965
|
+
/**
|
|
966
|
+
* @format uuid
|
|
967
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
968
|
+
*/
|
|
969
|
+
lago_invoice_id?: string;
|
|
970
|
+
/** @example "54321" */
|
|
971
|
+
external_subscription_id?: string;
|
|
951
972
|
/** @example 1000 */
|
|
952
973
|
amount_cents: number;
|
|
953
974
|
/** @example "EUR" */
|
|
@@ -964,6 +985,37 @@ export interface FeeObject {
|
|
|
964
985
|
total_amount_currency?: string;
|
|
965
986
|
/** @example 5 */
|
|
966
987
|
events_count?: number;
|
|
988
|
+
/**
|
|
989
|
+
* @format date-time
|
|
990
|
+
* @example "2022-08-08T00:00:00Z"
|
|
991
|
+
*/
|
|
992
|
+
from_date?: string;
|
|
993
|
+
/**
|
|
994
|
+
* @format date-time
|
|
995
|
+
* @example "2022-08-08T00:00:00Z"
|
|
996
|
+
*/
|
|
997
|
+
to_date?: string;
|
|
998
|
+
payment_status: "pending" | "succeeded" | "failed" | "refunded";
|
|
999
|
+
/**
|
|
1000
|
+
* @format date-time
|
|
1001
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1002
|
+
*/
|
|
1003
|
+
created_at: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* @format date-time
|
|
1006
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1007
|
+
*/
|
|
1008
|
+
succeeded_at?: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* @format date-time
|
|
1011
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1012
|
+
*/
|
|
1013
|
+
failed_at?: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* @format date-time
|
|
1016
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1017
|
+
*/
|
|
1018
|
+
refunded_at?: string;
|
|
967
1019
|
item: {
|
|
968
1020
|
/** Billing time */
|
|
969
1021
|
type: "charge" | "add_on" | "subscription" | "credit";
|
|
@@ -971,12 +1023,18 @@ export interface FeeObject {
|
|
|
971
1023
|
code: string;
|
|
972
1024
|
/** @example "name" */
|
|
973
1025
|
name: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* @format uuid
|
|
1028
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1029
|
+
*/
|
|
1030
|
+
lago_item_id: string;
|
|
1031
|
+
item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
|
|
974
1032
|
};
|
|
975
1033
|
}
|
|
976
1034
|
export interface InvoiceMetadataObject {
|
|
977
1035
|
/**
|
|
978
1036
|
* @format uuid
|
|
979
|
-
* @example "
|
|
1037
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
980
1038
|
*/
|
|
981
1039
|
lago_id?: string;
|
|
982
1040
|
/** @example "name" */
|
|
@@ -992,7 +1050,7 @@ export interface InvoiceMetadataObject {
|
|
|
992
1050
|
export interface InvoiceObject {
|
|
993
1051
|
/**
|
|
994
1052
|
* @format uuid
|
|
995
|
-
* @example "
|
|
1053
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
996
1054
|
*/
|
|
997
1055
|
lago_id: string;
|
|
998
1056
|
/** @example 12345 */
|
|
@@ -1051,7 +1109,7 @@ export interface InvoiceInput {
|
|
|
1051
1109
|
metadata?: {
|
|
1052
1110
|
/**
|
|
1053
1111
|
* @format uuid
|
|
1054
|
-
* @example "
|
|
1112
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1055
1113
|
*/
|
|
1056
1114
|
id?: string;
|
|
1057
1115
|
/** @example "name" */
|
|
@@ -1064,12 +1122,12 @@ export interface InvoiceInput {
|
|
|
1064
1122
|
export interface WalletObject {
|
|
1065
1123
|
/**
|
|
1066
1124
|
* @format uuid
|
|
1067
|
-
* @example "
|
|
1125
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1068
1126
|
*/
|
|
1069
1127
|
lago_id: string;
|
|
1070
1128
|
/**
|
|
1071
1129
|
* @format uuid
|
|
1072
|
-
* @example "
|
|
1130
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1073
1131
|
*/
|
|
1074
1132
|
lago_customer_id: string;
|
|
1075
1133
|
/** @example "12345" */
|
|
@@ -1084,8 +1142,13 @@ export interface WalletObject {
|
|
|
1084
1142
|
rate_amount: number;
|
|
1085
1143
|
/** @example 500 */
|
|
1086
1144
|
credits_balance: number;
|
|
1087
|
-
/**
|
|
1145
|
+
/**
|
|
1146
|
+
* @deprecated
|
|
1147
|
+
* @example 1000
|
|
1148
|
+
*/
|
|
1088
1149
|
balance: number;
|
|
1150
|
+
/** @example 100000 */
|
|
1151
|
+
balance_cents: number;
|
|
1089
1152
|
/** @example 100 */
|
|
1090
1153
|
consumed_credits: number;
|
|
1091
1154
|
/**
|
|
@@ -1155,12 +1218,12 @@ export interface WalletUpdateInput {
|
|
|
1155
1218
|
export interface WalletTransactionObject {
|
|
1156
1219
|
/**
|
|
1157
1220
|
* @format uuid
|
|
1158
|
-
* @example "
|
|
1221
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1159
1222
|
*/
|
|
1160
1223
|
lago_id: string;
|
|
1161
1224
|
/**
|
|
1162
1225
|
* @format uuid
|
|
1163
|
-
* @example "
|
|
1226
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1164
1227
|
*/
|
|
1165
1228
|
lago_wallet_id: string;
|
|
1166
1229
|
/** Status */
|
|
@@ -1192,7 +1255,7 @@ export interface WalletTransactionInput {
|
|
|
1192
1255
|
wallet_transaction: {
|
|
1193
1256
|
/**
|
|
1194
1257
|
* @format uuid
|
|
1195
|
-
* @example "
|
|
1258
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1196
1259
|
*/
|
|
1197
1260
|
wallet_id: string;
|
|
1198
1261
|
/** @example 100 */
|
|
@@ -1204,7 +1267,7 @@ export interface WalletTransactionInput {
|
|
|
1204
1267
|
export interface CreditNoteItemObject {
|
|
1205
1268
|
/**
|
|
1206
1269
|
* @format uuid
|
|
1207
|
-
* @example "
|
|
1270
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1208
1271
|
*/
|
|
1209
1272
|
lago_id: string;
|
|
1210
1273
|
/** @example 1220 */
|
|
@@ -1216,7 +1279,7 @@ export interface CreditNoteItemObject {
|
|
|
1216
1279
|
export interface CreditNoteObject {
|
|
1217
1280
|
/**
|
|
1218
1281
|
* @format uuid
|
|
1219
|
-
* @example "
|
|
1282
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1220
1283
|
*/
|
|
1221
1284
|
lago_id: string;
|
|
1222
1285
|
/** @example 1234 */
|
|
@@ -1225,7 +1288,7 @@ export interface CreditNoteObject {
|
|
|
1225
1288
|
number: string;
|
|
1226
1289
|
/**
|
|
1227
1290
|
* @format uuid
|
|
1228
|
-
* @example "
|
|
1291
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1229
1292
|
*/
|
|
1230
1293
|
lago_invoice_id: string;
|
|
1231
1294
|
/** @example "123456789" */
|
|
@@ -1292,7 +1355,7 @@ export interface CreditNoteInput {
|
|
|
1292
1355
|
credit_note: {
|
|
1293
1356
|
/**
|
|
1294
1357
|
* @format uuid
|
|
1295
|
-
* @example "
|
|
1358
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1296
1359
|
*/
|
|
1297
1360
|
invoice_id: string;
|
|
1298
1361
|
/** Reason */
|
|
@@ -1306,7 +1369,7 @@ export interface CreditNoteInput {
|
|
|
1306
1369
|
items: {
|
|
1307
1370
|
/**
|
|
1308
1371
|
* @format uuid
|
|
1309
|
-
* @example "
|
|
1372
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1310
1373
|
*/
|
|
1311
1374
|
fee_id: string;
|
|
1312
1375
|
/** @example 20 */
|
|
@@ -1320,6 +1383,18 @@ export interface CreditNoteUpdateInput {
|
|
|
1320
1383
|
refund_status: "pending" | "succeeded" | "failed";
|
|
1321
1384
|
};
|
|
1322
1385
|
}
|
|
1386
|
+
export interface PaginationMeta {
|
|
1387
|
+
/** Current page */
|
|
1388
|
+
current_page: number;
|
|
1389
|
+
/** Next page */
|
|
1390
|
+
next_page?: number;
|
|
1391
|
+
/** Previous page */
|
|
1392
|
+
prev_page?: number;
|
|
1393
|
+
/** Total number of pages */
|
|
1394
|
+
total_pages: number;
|
|
1395
|
+
/** Total number of records */
|
|
1396
|
+
total_count: number;
|
|
1397
|
+
}
|
|
1323
1398
|
export interface ApiResponseBadRequest {
|
|
1324
1399
|
/**
|
|
1325
1400
|
* @format int32
|
|
@@ -1361,6 +1436,17 @@ export interface ApiResponseNotFound {
|
|
|
1361
1436
|
/** @example "object_not_found" */
|
|
1362
1437
|
code: string;
|
|
1363
1438
|
}
|
|
1439
|
+
export interface ApiResponseForbidden {
|
|
1440
|
+
/**
|
|
1441
|
+
* @format int32
|
|
1442
|
+
* @example 403
|
|
1443
|
+
*/
|
|
1444
|
+
status: number;
|
|
1445
|
+
/** @example "Forbidden" */
|
|
1446
|
+
error: string;
|
|
1447
|
+
/** @example "feature_unavailable" */
|
|
1448
|
+
code: string;
|
|
1449
|
+
}
|
|
1364
1450
|
export interface ApiResponseNotAllowed {
|
|
1365
1451
|
/**
|
|
1366
1452
|
* @format int32
|
|
@@ -1432,7 +1518,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1432
1518
|
}
|
|
1433
1519
|
/**
|
|
1434
1520
|
* @title Lago API documentation
|
|
1435
|
-
* @version 0.
|
|
1521
|
+
* @version 0.28.0-beta
|
|
1436
1522
|
* @baseUrl https://api.getlago.com/api/v1
|
|
1437
1523
|
* @externalDocs https://github.com/getlago
|
|
1438
1524
|
* @contact <tech@getlago.com>
|
|
@@ -1451,6 +1537,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1451
1537
|
* @secure
|
|
1452
1538
|
*/
|
|
1453
1539
|
createBillableMetric: (data: BillableMetricInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1540
|
+
/**
|
|
1541
|
+
* @description Find all billable metrics in certain organisation
|
|
1542
|
+
*
|
|
1543
|
+
* @tags billable_metrics
|
|
1544
|
+
* @name FindAllBillableMetrics
|
|
1545
|
+
* @summary Find Billable metrics
|
|
1546
|
+
* @request GET:/billable_metrics
|
|
1547
|
+
* @secure
|
|
1548
|
+
*/
|
|
1549
|
+
findAllBillableMetrics: (query?: {
|
|
1550
|
+
/**
|
|
1551
|
+
* Number of page
|
|
1552
|
+
* @example 2
|
|
1553
|
+
*/
|
|
1554
|
+
page?: number;
|
|
1555
|
+
/**
|
|
1556
|
+
* Number of records per page
|
|
1557
|
+
* @example 20
|
|
1558
|
+
*/
|
|
1559
|
+
per_page?: number;
|
|
1560
|
+
}, params?: RequestParams) => Promise<HttpResponse<BillableMetrics, ApiResponseUnauthorized>>;
|
|
1454
1561
|
/**
|
|
1455
1562
|
* @description Update an existing billable metric by code
|
|
1456
1563
|
*
|
|
@@ -1481,27 +1588,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1481
1588
|
* @secure
|
|
1482
1589
|
*/
|
|
1483
1590
|
destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1484
|
-
/**
|
|
1485
|
-
* @description Find all billable metrics in certain organisation
|
|
1486
|
-
*
|
|
1487
|
-
* @tags billable_metrics
|
|
1488
|
-
* @name FindAllBillableMetrics
|
|
1489
|
-
* @summary Find Billable metrics
|
|
1490
|
-
* @request GET:/billable_metrics/
|
|
1491
|
-
* @secure
|
|
1492
|
-
*/
|
|
1493
|
-
findAllBillableMetrics: (query?: {
|
|
1494
|
-
/**
|
|
1495
|
-
* Number of page
|
|
1496
|
-
* @example 2
|
|
1497
|
-
*/
|
|
1498
|
-
page?: number;
|
|
1499
|
-
/**
|
|
1500
|
-
* Number of records per page
|
|
1501
|
-
* @example 20
|
|
1502
|
-
*/
|
|
1503
|
-
per_page?: number;
|
|
1504
|
-
}, params?: RequestParams) => Promise<HttpResponse<BillableMetrics, ApiResponseUnauthorized>>;
|
|
1505
1591
|
/**
|
|
1506
1592
|
* @description Find all billable metric groups in certain organisation
|
|
1507
1593
|
*
|
|
@@ -1535,6 +1621,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1535
1621
|
* @secure
|
|
1536
1622
|
*/
|
|
1537
1623
|
createAddOn: (data: AddOnInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1624
|
+
/**
|
|
1625
|
+
* @description Find all add-ons in certain organisation
|
|
1626
|
+
*
|
|
1627
|
+
* @tags add_ons
|
|
1628
|
+
* @name FindAllAddOns
|
|
1629
|
+
* @summary Find add-ons
|
|
1630
|
+
* @request GET:/add_ons
|
|
1631
|
+
* @secure
|
|
1632
|
+
*/
|
|
1633
|
+
findAllAddOns: (query?: {
|
|
1634
|
+
/**
|
|
1635
|
+
* Number of page
|
|
1636
|
+
* @example 2
|
|
1637
|
+
*/
|
|
1638
|
+
page?: number;
|
|
1639
|
+
/**
|
|
1640
|
+
* Number of records per page
|
|
1641
|
+
* @example 20
|
|
1642
|
+
*/
|
|
1643
|
+
per_page?: number;
|
|
1644
|
+
}, params?: RequestParams) => Promise<HttpResponse<AddOns, ApiResponseUnauthorized>>;
|
|
1538
1645
|
/**
|
|
1539
1646
|
* @description Update an existing add-on by code
|
|
1540
1647
|
*
|
|
@@ -1565,27 +1672,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1565
1672
|
* @secure
|
|
1566
1673
|
*/
|
|
1567
1674
|
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1568
|
-
/**
|
|
1569
|
-
* @description Find all add-ons in certain organisation
|
|
1570
|
-
*
|
|
1571
|
-
* @tags add_ons
|
|
1572
|
-
* @name FindAllAddOns
|
|
1573
|
-
* @summary Find add-ons
|
|
1574
|
-
* @request GET:/add_ons/
|
|
1575
|
-
* @secure
|
|
1576
|
-
*/
|
|
1577
|
-
findAllAddOns: (query?: {
|
|
1578
|
-
/**
|
|
1579
|
-
* Number of page
|
|
1580
|
-
* @example 2
|
|
1581
|
-
*/
|
|
1582
|
-
page?: number;
|
|
1583
|
-
/**
|
|
1584
|
-
* Number of records per page
|
|
1585
|
-
* @example 20
|
|
1586
|
-
*/
|
|
1587
|
-
per_page?: number;
|
|
1588
|
-
}, params?: RequestParams) => Promise<HttpResponse<AddOns, ApiResponseUnauthorized>>;
|
|
1589
1675
|
};
|
|
1590
1676
|
appliedAddOns: {
|
|
1591
1677
|
/**
|
|
@@ -1610,6 +1696,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1610
1696
|
* @secure
|
|
1611
1697
|
*/
|
|
1612
1698
|
createCoupon: (data: CouponInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1699
|
+
/**
|
|
1700
|
+
* @description Find all coupons in certain organisation
|
|
1701
|
+
*
|
|
1702
|
+
* @tags coupons
|
|
1703
|
+
* @name FindAllCoupons
|
|
1704
|
+
* @summary Find Coupons
|
|
1705
|
+
* @request GET:/coupons
|
|
1706
|
+
* @secure
|
|
1707
|
+
*/
|
|
1708
|
+
findAllCoupons: (query?: {
|
|
1709
|
+
/**
|
|
1710
|
+
* Number of page
|
|
1711
|
+
* @example 2
|
|
1712
|
+
*/
|
|
1713
|
+
page?: number;
|
|
1714
|
+
/**
|
|
1715
|
+
* Number of records per page
|
|
1716
|
+
* @example 20
|
|
1717
|
+
*/
|
|
1718
|
+
per_page?: number;
|
|
1719
|
+
}, params?: RequestParams) => Promise<HttpResponse<Coupons, ApiResponseUnauthorized>>;
|
|
1613
1720
|
/**
|
|
1614
1721
|
* @description Update an existing coupon by code
|
|
1615
1722
|
*
|
|
@@ -1640,27 +1747,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1640
1747
|
* @secure
|
|
1641
1748
|
*/
|
|
1642
1749
|
destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1643
|
-
/**
|
|
1644
|
-
* @description Find all coupons in certain organisation
|
|
1645
|
-
*
|
|
1646
|
-
* @tags coupons
|
|
1647
|
-
* @name FindAllCoupons
|
|
1648
|
-
* @summary Find Coupons
|
|
1649
|
-
* @request GET:/coupons/
|
|
1650
|
-
* @secure
|
|
1651
|
-
*/
|
|
1652
|
-
findAllCoupons: (query?: {
|
|
1653
|
-
/**
|
|
1654
|
-
* Number of page
|
|
1655
|
-
* @example 2
|
|
1656
|
-
*/
|
|
1657
|
-
page?: number;
|
|
1658
|
-
/**
|
|
1659
|
-
* Number of records per page
|
|
1660
|
-
* @example 20
|
|
1661
|
-
*/
|
|
1662
|
-
per_page?: number;
|
|
1663
|
-
}, params?: RequestParams) => Promise<HttpResponse<Coupons, ApiResponseUnauthorized>>;
|
|
1664
1750
|
};
|
|
1665
1751
|
appliedCoupons: {
|
|
1666
1752
|
/**
|
|
@@ -1679,7 +1765,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1679
1765
|
* @tags coupons
|
|
1680
1766
|
* @name FindAllAppliedCoupons
|
|
1681
1767
|
* @summary Find Applied Coupons
|
|
1682
|
-
* @request GET:/applied_coupons
|
|
1768
|
+
* @request GET:/applied_coupons
|
|
1683
1769
|
* @secure
|
|
1684
1770
|
*/
|
|
1685
1771
|
findAllAppliedCoupons: (query?: {
|
|
@@ -1709,7 +1795,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1709
1795
|
* @tags organizations
|
|
1710
1796
|
* @name UpdateOrganization
|
|
1711
1797
|
* @summary Update an existing Organization
|
|
1712
|
-
* @request PUT:/organizations
|
|
1798
|
+
* @request PUT:/organizations
|
|
1713
1799
|
* @secure
|
|
1714
1800
|
*/
|
|
1715
1801
|
updateOrganization: (data: OrganizationInput, params?: RequestParams) => Promise<HttpResponse<Organization, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
@@ -1725,6 +1811,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1725
1811
|
* @secure
|
|
1726
1812
|
*/
|
|
1727
1813
|
createCustomer: (data: CustomerInput, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1814
|
+
/**
|
|
1815
|
+
* @description Find all customers in certain organisation
|
|
1816
|
+
*
|
|
1817
|
+
* @tags customers
|
|
1818
|
+
* @name FindAllCustomers
|
|
1819
|
+
* @summary Find customers
|
|
1820
|
+
* @request GET:/customers
|
|
1821
|
+
* @secure
|
|
1822
|
+
*/
|
|
1823
|
+
findAllCustomers: (query?: {
|
|
1824
|
+
/**
|
|
1825
|
+
* Number of page
|
|
1826
|
+
* @example 2
|
|
1827
|
+
*/
|
|
1828
|
+
page?: number;
|
|
1829
|
+
/**
|
|
1830
|
+
* Number of records per page
|
|
1831
|
+
* @example 20
|
|
1832
|
+
*/
|
|
1833
|
+
per_page?: number;
|
|
1834
|
+
}, params?: RequestParams) => Promise<HttpResponse<Customers, ApiResponseUnauthorized>>;
|
|
1728
1835
|
/**
|
|
1729
1836
|
* @description Return a single customer
|
|
1730
1837
|
*
|
|
@@ -1762,36 +1869,30 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1762
1869
|
external_subscription_id: string;
|
|
1763
1870
|
}, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1764
1871
|
/**
|
|
1765
|
-
* @description
|
|
1872
|
+
* @description Get customer portal URL
|
|
1766
1873
|
*
|
|
1767
1874
|
* @tags customers
|
|
1768
|
-
* @name
|
|
1769
|
-
* @summary
|
|
1770
|
-
* @request
|
|
1875
|
+
* @name GetCustomerPortalUrl
|
|
1876
|
+
* @summary Get customer portal URL
|
|
1877
|
+
* @request GET:/customers/{customer_external_id}/portal_url
|
|
1771
1878
|
* @secure
|
|
1772
1879
|
*/
|
|
1773
|
-
|
|
1880
|
+
getCustomerPortalUrl: (customerExternalId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
1881
|
+
customer: {
|
|
1882
|
+
/** @example "https://app.lago.com/customer-portal/abc/" */
|
|
1883
|
+
portal_url: string;
|
|
1884
|
+
};
|
|
1885
|
+
}, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseForbidden>>;
|
|
1774
1886
|
/**
|
|
1775
|
-
* @description
|
|
1887
|
+
* @description Delete customer's appplied coupon
|
|
1776
1888
|
*
|
|
1777
1889
|
* @tags customers
|
|
1778
|
-
* @name
|
|
1779
|
-
* @summary
|
|
1780
|
-
* @request
|
|
1890
|
+
* @name DeleteAppliedCoupon
|
|
1891
|
+
* @summary Delete customer's appplied coupon
|
|
1892
|
+
* @request DELETE:/customers/{customer_external_id}/applied_coupons/{applied_coupon_id}
|
|
1781
1893
|
* @secure
|
|
1782
1894
|
*/
|
|
1783
|
-
|
|
1784
|
-
/**
|
|
1785
|
-
* Number of page
|
|
1786
|
-
* @example 2
|
|
1787
|
-
*/
|
|
1788
|
-
page?: number;
|
|
1789
|
-
/**
|
|
1790
|
-
* Number of records per page
|
|
1791
|
-
* @example 20
|
|
1792
|
-
*/
|
|
1793
|
-
per_page?: number;
|
|
1794
|
-
}, params?: RequestParams) => Promise<HttpResponse<Customers, ApiResponseUnauthorized>>;
|
|
1895
|
+
deleteAppliedCoupon: (customerExternalId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1795
1896
|
};
|
|
1796
1897
|
events: {
|
|
1797
1898
|
/**
|
|
@@ -1846,6 +1947,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1846
1947
|
* @secure
|
|
1847
1948
|
*/
|
|
1848
1949
|
createPlan: (data: PlanInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
1950
|
+
/**
|
|
1951
|
+
* @description Find all plans in certain organisation
|
|
1952
|
+
*
|
|
1953
|
+
* @tags plans
|
|
1954
|
+
* @name FindAllPlans
|
|
1955
|
+
* @summary Find plans
|
|
1956
|
+
* @request GET:/plans
|
|
1957
|
+
* @secure
|
|
1958
|
+
*/
|
|
1959
|
+
findAllPlans: (query?: {
|
|
1960
|
+
/**
|
|
1961
|
+
* Number of page
|
|
1962
|
+
* @example 2
|
|
1963
|
+
*/
|
|
1964
|
+
page?: number;
|
|
1965
|
+
/**
|
|
1966
|
+
* Number of records per page
|
|
1967
|
+
* @example 20
|
|
1968
|
+
*/
|
|
1969
|
+
per_page?: number;
|
|
1970
|
+
}, params?: RequestParams) => Promise<HttpResponse<Plans, ApiResponseUnauthorized>>;
|
|
1849
1971
|
/**
|
|
1850
1972
|
* @description Update an existing plan by code
|
|
1851
1973
|
*
|
|
@@ -1876,16 +1998,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1876
1998
|
* @secure
|
|
1877
1999
|
*/
|
|
1878
2000
|
destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2001
|
+
};
|
|
2002
|
+
subscriptions: {
|
|
1879
2003
|
/**
|
|
1880
|
-
* @description
|
|
2004
|
+
* @description Assign a plan to a customer
|
|
1881
2005
|
*
|
|
1882
|
-
* @tags
|
|
1883
|
-
* @name
|
|
1884
|
-
* @summary
|
|
1885
|
-
* @request
|
|
2006
|
+
* @tags subscriptions
|
|
2007
|
+
* @name CreateSubscription
|
|
2008
|
+
* @summary Assign a plan to a customer
|
|
2009
|
+
* @request POST:/subscriptions
|
|
1886
2010
|
* @secure
|
|
1887
2011
|
*/
|
|
1888
|
-
|
|
2012
|
+
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2013
|
+
/**
|
|
2014
|
+
* @description Find all suscriptions for certain customer
|
|
2015
|
+
*
|
|
2016
|
+
* @tags subscriptions
|
|
2017
|
+
* @name FindAllSubscriptions
|
|
2018
|
+
* @summary Find subscriptions
|
|
2019
|
+
* @request GET:/subscriptions
|
|
2020
|
+
* @secure
|
|
2021
|
+
*/
|
|
2022
|
+
findAllSubscriptions: (query: {
|
|
1889
2023
|
/**
|
|
1890
2024
|
* Number of page
|
|
1891
2025
|
* @example 2
|
|
@@ -1896,19 +2030,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1896
2030
|
* @example 20
|
|
1897
2031
|
*/
|
|
1898
2032
|
per_page?: number;
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
* @tags subscriptions
|
|
1906
|
-
* @name CreateSubscription
|
|
1907
|
-
* @summary Assign a plan to a customer
|
|
1908
|
-
* @request POST:/subscriptions
|
|
1909
|
-
* @secure
|
|
1910
|
-
*/
|
|
1911
|
-
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2033
|
+
/**
|
|
2034
|
+
* External customer ID
|
|
2035
|
+
* @example "12345"
|
|
2036
|
+
*/
|
|
2037
|
+
external_customer_id: string;
|
|
2038
|
+
}, params?: RequestParams) => Promise<HttpResponse<Subscriptions, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1912
2039
|
/**
|
|
1913
2040
|
* @description Update an existing subscription by external ID
|
|
1914
2041
|
*
|
|
@@ -1929,16 +2056,30 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1929
2056
|
* @secure
|
|
1930
2057
|
*/
|
|
1931
2058
|
destroySubscription: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
2059
|
+
};
|
|
2060
|
+
webhooks: {
|
|
1932
2061
|
/**
|
|
1933
|
-
* @description
|
|
2062
|
+
* @description Webhook public key
|
|
1934
2063
|
*
|
|
1935
|
-
* @tags
|
|
1936
|
-
* @name
|
|
1937
|
-
* @summary
|
|
1938
|
-
* @request GET:/
|
|
2064
|
+
* @tags webhooks
|
|
2065
|
+
* @name FetchPublicKey
|
|
2066
|
+
* @summary Fetch webhook public key
|
|
2067
|
+
* @request GET:/webhooks/public_key
|
|
1939
2068
|
* @secure
|
|
1940
2069
|
*/
|
|
1941
|
-
|
|
2070
|
+
fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiResponseUnauthorized>>;
|
|
2071
|
+
};
|
|
2072
|
+
invoices: {
|
|
2073
|
+
/**
|
|
2074
|
+
* @description Find all invoices in certain organisation
|
|
2075
|
+
*
|
|
2076
|
+
* @tags invoices
|
|
2077
|
+
* @name FindAllInvoices
|
|
2078
|
+
* @summary Find all invoices
|
|
2079
|
+
* @request GET:/invoices
|
|
2080
|
+
* @secure
|
|
2081
|
+
*/
|
|
2082
|
+
findAllInvoices: (query?: {
|
|
1942
2083
|
/**
|
|
1943
2084
|
* Number of page
|
|
1944
2085
|
* @example 2
|
|
@@ -1953,22 +2094,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1953
2094
|
* External customer ID
|
|
1954
2095
|
* @example "12345"
|
|
1955
2096
|
*/
|
|
1956
|
-
external_customer_id
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2097
|
+
external_customer_id?: string;
|
|
2098
|
+
/**
|
|
2099
|
+
* Date from
|
|
2100
|
+
* @format date
|
|
2101
|
+
* @example "2022-07-08"
|
|
2102
|
+
*/
|
|
2103
|
+
issuing_date_from?: string;
|
|
2104
|
+
/**
|
|
2105
|
+
* Date to
|
|
2106
|
+
* @format date
|
|
2107
|
+
* @example "2022-08-09"
|
|
2108
|
+
*/
|
|
2109
|
+
issuing_date_to?: string;
|
|
2110
|
+
/** Status */
|
|
2111
|
+
status?: "draft" | "finalized";
|
|
2112
|
+
}, params?: RequestParams) => Promise<HttpResponse<Invoices, ApiResponseUnauthorized>>;
|
|
1972
2113
|
/**
|
|
1973
2114
|
* @description Update an existing invoice
|
|
1974
2115
|
*
|
|
@@ -2029,16 +2170,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2029
2170
|
* @secure
|
|
2030
2171
|
*/
|
|
2031
2172
|
finalizeInvoice: (id: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2173
|
+
};
|
|
2174
|
+
fees: {
|
|
2032
2175
|
/**
|
|
2033
|
-
* @description
|
|
2176
|
+
* @description Return a single fee
|
|
2034
2177
|
*
|
|
2035
|
-
* @tags
|
|
2036
|
-
* @name
|
|
2037
|
-
* @summary Find
|
|
2038
|
-
* @request GET:/
|
|
2178
|
+
* @tags fees
|
|
2179
|
+
* @name FindFee
|
|
2180
|
+
* @summary Find fee by ID
|
|
2181
|
+
* @request GET:/fees/{id}
|
|
2039
2182
|
* @secure
|
|
2040
2183
|
*/
|
|
2041
|
-
|
|
2184
|
+
findFee: (id: string, params?: RequestParams) => Promise<HttpResponse<FeeObject, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2185
|
+
/**
|
|
2186
|
+
* @description Update an existing fee
|
|
2187
|
+
*
|
|
2188
|
+
* @tags fees
|
|
2189
|
+
* @name UpdateFee
|
|
2190
|
+
* @summary Update an existing fee
|
|
2191
|
+
* @request PUT:/fees/{id}
|
|
2192
|
+
* @secure
|
|
2193
|
+
*/
|
|
2194
|
+
updateFee: (id: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<FeeObject, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2195
|
+
/**
|
|
2196
|
+
* @description Find all fees of an organization and filter them
|
|
2197
|
+
*
|
|
2198
|
+
* @tags fees
|
|
2199
|
+
* @name FindAllFees
|
|
2200
|
+
* @summary Find all fees
|
|
2201
|
+
* @request GET:/fees
|
|
2202
|
+
* @secure
|
|
2203
|
+
*/
|
|
2204
|
+
findAllFees: (query?: {
|
|
2042
2205
|
/**
|
|
2043
2206
|
* Number of page
|
|
2044
2207
|
* @example 2
|
|
@@ -2055,35 +2218,79 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2055
2218
|
*/
|
|
2056
2219
|
external_customer_id?: string;
|
|
2057
2220
|
/**
|
|
2058
|
-
*
|
|
2059
|
-
* @
|
|
2060
|
-
* @example "2022-07-08"
|
|
2221
|
+
* External subscription ID
|
|
2222
|
+
* @example "12345"
|
|
2061
2223
|
*/
|
|
2062
|
-
|
|
2224
|
+
external_subscription_id?: string;
|
|
2063
2225
|
/**
|
|
2064
|
-
*
|
|
2065
|
-
* @
|
|
2066
|
-
* @example "2022-08-09"
|
|
2226
|
+
* Amount currency
|
|
2227
|
+
* @example "EUR"
|
|
2067
2228
|
*/
|
|
2068
|
-
|
|
2229
|
+
currency?: string;
|
|
2069
2230
|
/**
|
|
2070
|
-
*
|
|
2071
|
-
* @example "
|
|
2231
|
+
* Fee type
|
|
2232
|
+
* @example "charge"
|
|
2072
2233
|
*/
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2234
|
+
fee_type?: "charge" | "add_on" | "subscription" | "credit" | "instant_charge";
|
|
2235
|
+
/**
|
|
2236
|
+
* Code of the source billable metric
|
|
2237
|
+
* @example "bm_code"
|
|
2238
|
+
*/
|
|
2239
|
+
billable_metric_code?: string;
|
|
2240
|
+
/**
|
|
2241
|
+
* Payment status
|
|
2242
|
+
* @example "succeeded"
|
|
2243
|
+
*/
|
|
2244
|
+
payment_status?: "pending" | "succeeded" | "failed" | "refunded";
|
|
2245
|
+
/**
|
|
2246
|
+
* Creation datetime from
|
|
2247
|
+
* @format date-time
|
|
2248
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2249
|
+
*/
|
|
2250
|
+
created_at_from?: string;
|
|
2251
|
+
/**
|
|
2252
|
+
* Creation date to
|
|
2253
|
+
* @format date-time
|
|
2254
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2255
|
+
*/
|
|
2256
|
+
created_at_to?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* Payment succees date from
|
|
2259
|
+
* @format date-time
|
|
2260
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2261
|
+
*/
|
|
2262
|
+
succeeded_at_from?: string;
|
|
2263
|
+
/**
|
|
2264
|
+
* Payment succees date to
|
|
2265
|
+
* @format date-time
|
|
2266
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2267
|
+
*/
|
|
2268
|
+
succeeded_at_to?: string;
|
|
2269
|
+
/**
|
|
2270
|
+
* Payment failed date from
|
|
2271
|
+
* @format date-time
|
|
2272
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2273
|
+
*/
|
|
2274
|
+
failed_at_from?: string;
|
|
2275
|
+
/**
|
|
2276
|
+
* Payment failed date to
|
|
2277
|
+
* @format date-time
|
|
2278
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2279
|
+
*/
|
|
2280
|
+
failed_at_to?: string;
|
|
2281
|
+
/**
|
|
2282
|
+
* Payment refund date from
|
|
2283
|
+
* @format date-time
|
|
2284
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2285
|
+
*/
|
|
2286
|
+
refunded_at_from?: string;
|
|
2287
|
+
/**
|
|
2288
|
+
* Payment refund date to
|
|
2289
|
+
* @format date-time
|
|
2290
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2291
|
+
*/
|
|
2292
|
+
refunded_at_to?: string;
|
|
2293
|
+
}, params?: RequestParams) => Promise<HttpResponse<FeesPaginated, ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
2087
2294
|
};
|
|
2088
2295
|
wallets: {
|
|
2089
2296
|
/**
|
|
@@ -2096,6 +2303,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2096
2303
|
* @secure
|
|
2097
2304
|
*/
|
|
2098
2305
|
createWallet: (data: WalletInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
2306
|
+
/**
|
|
2307
|
+
* @description Find all wallets for certain customer
|
|
2308
|
+
*
|
|
2309
|
+
* @tags wallets
|
|
2310
|
+
* @name FindAllWallets
|
|
2311
|
+
* @summary Find wallets
|
|
2312
|
+
* @request GET:/wallets
|
|
2313
|
+
* @secure
|
|
2314
|
+
*/
|
|
2315
|
+
findAllWallets: (query: {
|
|
2316
|
+
/**
|
|
2317
|
+
* Number of page
|
|
2318
|
+
* @example 2
|
|
2319
|
+
*/
|
|
2320
|
+
page?: number;
|
|
2321
|
+
/**
|
|
2322
|
+
* Number of records per page
|
|
2323
|
+
* @example 20
|
|
2324
|
+
*/
|
|
2325
|
+
per_page?: number;
|
|
2326
|
+
/**
|
|
2327
|
+
* External customer ID
|
|
2328
|
+
* @example "12345"
|
|
2329
|
+
*/
|
|
2330
|
+
external_customer_id: string;
|
|
2331
|
+
}, params?: RequestParams) => Promise<HttpResponse<Wallets, ApiResponseUnauthorized>>;
|
|
2099
2332
|
/**
|
|
2100
2333
|
* @description Update an existing wallet
|
|
2101
2334
|
*
|
|
@@ -2126,32 +2359,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2126
2359
|
* @secure
|
|
2127
2360
|
*/
|
|
2128
2361
|
destroyWallet: (id: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
2129
|
-
/**
|
|
2130
|
-
* @description Find all wallets for certain customer
|
|
2131
|
-
*
|
|
2132
|
-
* @tags wallets
|
|
2133
|
-
* @name FindAllWallets
|
|
2134
|
-
* @summary Find wallets
|
|
2135
|
-
* @request GET:/wallets/
|
|
2136
|
-
* @secure
|
|
2137
|
-
*/
|
|
2138
|
-
findAllWallets: (query: {
|
|
2139
|
-
/**
|
|
2140
|
-
* Number of page
|
|
2141
|
-
* @example 2
|
|
2142
|
-
*/
|
|
2143
|
-
page?: number;
|
|
2144
|
-
/**
|
|
2145
|
-
* Number of records per page
|
|
2146
|
-
* @example 20
|
|
2147
|
-
*/
|
|
2148
|
-
per_page?: number;
|
|
2149
|
-
/**
|
|
2150
|
-
* External customer ID
|
|
2151
|
-
* @example "12345"
|
|
2152
|
-
*/
|
|
2153
|
-
external_customer_id: string;
|
|
2154
|
-
}, params?: RequestParams) => Promise<HttpResponse<Wallets, ApiResponseUnauthorized>>;
|
|
2155
2362
|
/**
|
|
2156
2363
|
* @description Find all wallet transactions for certain wallet
|
|
2157
2364
|
*
|
|
@@ -2207,6 +2414,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2207
2414
|
* @secure
|
|
2208
2415
|
*/
|
|
2209
2416
|
createCreditNote: (data: CreditNoteInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
2417
|
+
/**
|
|
2418
|
+
* @description Find all credit notes in certain organisation
|
|
2419
|
+
*
|
|
2420
|
+
* @tags credit_notes
|
|
2421
|
+
* @name FindAllCreditNotes
|
|
2422
|
+
* @summary Find Credit notes
|
|
2423
|
+
* @request GET:/credit_notes
|
|
2424
|
+
* @secure
|
|
2425
|
+
*/
|
|
2426
|
+
findAllCreditNotes: (query?: {
|
|
2427
|
+
/**
|
|
2428
|
+
* Number of page
|
|
2429
|
+
* @example 2
|
|
2430
|
+
*/
|
|
2431
|
+
page?: number;
|
|
2432
|
+
/**
|
|
2433
|
+
* Number of records per page
|
|
2434
|
+
* @example 20
|
|
2435
|
+
*/
|
|
2436
|
+
per_page?: number;
|
|
2437
|
+
/**
|
|
2438
|
+
* External customer ID
|
|
2439
|
+
* @example "12345"
|
|
2440
|
+
*/
|
|
2441
|
+
external_customer_id?: string;
|
|
2442
|
+
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiResponseUnauthorized>>;
|
|
2210
2443
|
/**
|
|
2211
2444
|
* @description Update an existing credit note
|
|
2212
2445
|
*
|
|
@@ -2247,32 +2480,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2247
2480
|
* @secure
|
|
2248
2481
|
*/
|
|
2249
2482
|
voidCreditNote: (id: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
2250
|
-
/**
|
|
2251
|
-
* @description Find all credit notes in certain organisation
|
|
2252
|
-
*
|
|
2253
|
-
* @tags credit_notes
|
|
2254
|
-
* @name FindAllCreditNotes
|
|
2255
|
-
* @summary Find Credit notes
|
|
2256
|
-
* @request GET:/credit_notes/
|
|
2257
|
-
* @secure
|
|
2258
|
-
*/
|
|
2259
|
-
findAllCreditNotes: (query?: {
|
|
2260
|
-
/**
|
|
2261
|
-
* Number of page
|
|
2262
|
-
* @example 2
|
|
2263
|
-
*/
|
|
2264
|
-
page?: number;
|
|
2265
|
-
/**
|
|
2266
|
-
* Number of records per page
|
|
2267
|
-
* @example 20
|
|
2268
|
-
*/
|
|
2269
|
-
per_page?: number;
|
|
2270
|
-
/**
|
|
2271
|
-
* External customer ID
|
|
2272
|
-
* @example "12345"
|
|
2273
|
-
*/
|
|
2274
|
-
external_customer_id?: string;
|
|
2275
|
-
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiResponseUnauthorized>>;
|
|
2276
2483
|
};
|
|
2277
2484
|
}
|
|
2278
2485
|
export {};
|