@paygentic/sdk 0.9.16 → 0.9.18
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 +9 -7
- package/dist/commonjs/funcs/revenueGetRevenueAccounts.d.ts +23 -0
- package/dist/commonjs/funcs/revenueGetRevenueAccounts.d.ts.map +1 -0
- package/dist/commonjs/funcs/revenueGetRevenueAccounts.js +129 -0
- package/dist/commonjs/funcs/revenueGetRevenueAccounts.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/accountfigure.d.ts +20 -0
- package/dist/commonjs/models/accountfigure.d.ts.map +1 -0
- package/dist/commonjs/models/accountfigure.js +51 -0
- package/dist/commonjs/models/accountfigure.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +5 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +5 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +3 -3
- package/dist/commonjs/models/invoice.js +1 -1
- package/dist/commonjs/models/operations/getrevenue.d.ts +7 -7
- package/dist/commonjs/models/operations/getrevenue.js +1 -1
- package/dist/commonjs/models/operations/getrevenueaccounts.d.ts +30 -0
- package/dist/commonjs/models/operations/getrevenueaccounts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getrevenueaccounts.js +52 -0
- package/dist/commonjs/models/operations/getrevenueaccounts.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/outstandingblock.d.ts +29 -0
- package/dist/commonjs/models/outstandingblock.d.ts.map +1 -0
- package/dist/commonjs/models/outstandingblock.js +54 -0
- package/dist/commonjs/models/outstandingblock.js.map +1 -0
- package/dist/commonjs/models/revenueaccountrow.d.ts +26 -0
- package/dist/commonjs/models/revenueaccountrow.d.ts.map +1 -0
- package/dist/commonjs/models/revenueaccountrow.js +54 -0
- package/dist/commonjs/models/revenueaccountrow.js.map +1 -0
- package/dist/commonjs/models/revenueaccountsresponse.d.ts +41 -0
- package/dist/commonjs/models/revenueaccountsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/revenueaccountsresponse.js +64 -0
- package/dist/commonjs/models/revenueaccountsresponse.js.map +1 -0
- package/dist/commonjs/models/revenueaccounttotal.d.ts +18 -0
- package/dist/commonjs/models/revenueaccounttotal.d.ts.map +1 -0
- package/dist/commonjs/models/revenueaccounttotal.js +52 -0
- package/dist/commonjs/models/revenueaccounttotal.js.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +4 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts.map +1 -1
- package/dist/commonjs/models/revenuesummaryresponse.js +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.js.map +1 -1
- package/dist/commonjs/sdk/revenue.d.ts +11 -0
- package/dist/commonjs/sdk/revenue.d.ts.map +1 -1
- package/dist/commonjs/sdk/revenue.js +14 -0
- package/dist/commonjs/sdk/revenue.js.map +1 -1
- package/dist/esm/funcs/revenueGetRevenueAccounts.d.ts +23 -0
- package/dist/esm/funcs/revenueGetRevenueAccounts.d.ts.map +1 -0
- package/dist/esm/funcs/revenueGetRevenueAccounts.js +93 -0
- package/dist/esm/funcs/revenueGetRevenueAccounts.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/accountfigure.d.ts +20 -0
- package/dist/esm/models/accountfigure.d.ts.map +1 -0
- package/dist/esm/models/accountfigure.js +14 -0
- package/dist/esm/models/accountfigure.js.map +1 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +3 -3
- package/dist/esm/models/invoice.js +1 -1
- package/dist/esm/models/operations/getrevenue.d.ts +7 -7
- package/dist/esm/models/operations/getrevenue.js +1 -1
- package/dist/esm/models/operations/getrevenueaccounts.d.ts +30 -0
- package/dist/esm/models/operations/getrevenueaccounts.d.ts.map +1 -0
- package/dist/esm/models/operations/getrevenueaccounts.js +15 -0
- package/dist/esm/models/operations/getrevenueaccounts.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/outstandingblock.d.ts +29 -0
- package/dist/esm/models/outstandingblock.d.ts.map +1 -0
- package/dist/esm/models/outstandingblock.js +17 -0
- package/dist/esm/models/outstandingblock.js.map +1 -0
- package/dist/esm/models/revenueaccountrow.d.ts +26 -0
- package/dist/esm/models/revenueaccountrow.d.ts.map +1 -0
- package/dist/esm/models/revenueaccountrow.js +17 -0
- package/dist/esm/models/revenueaccountrow.js.map +1 -0
- package/dist/esm/models/revenueaccountsresponse.d.ts +41 -0
- package/dist/esm/models/revenueaccountsresponse.d.ts.map +1 -0
- package/dist/esm/models/revenueaccountsresponse.js +27 -0
- package/dist/esm/models/revenueaccountsresponse.js.map +1 -0
- package/dist/esm/models/revenueaccounttotal.d.ts +18 -0
- package/dist/esm/models/revenueaccounttotal.d.ts.map +1 -0
- package/dist/esm/models/revenueaccounttotal.js +15 -0
- package/dist/esm/models/revenueaccounttotal.js.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts +4 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts.map +1 -1
- package/dist/esm/models/revenuesummaryresponse.js +1 -0
- package/dist/esm/models/revenuesummaryresponse.js.map +1 -1
- package/dist/esm/sdk/revenue.d.ts +11 -0
- package/dist/esm/sdk/revenue.d.ts.map +1 -1
- package/dist/esm/sdk/revenue.js +14 -0
- package/dist/esm/sdk/revenue.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/revenueGetRevenueAccounts.ts +186 -0
- package/src/lib/config.ts +2 -2
- package/src/models/accountfigure.ts +42 -0
- package/src/models/index.ts +5 -0
- package/src/models/invoice.ts +3 -3
- package/src/models/operations/getrevenue.ts +7 -7
- package/src/models/operations/getrevenueaccounts.ts +52 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/outstandingblock.ts +53 -0
- package/src/models/revenueaccountrow.ts +53 -0
- package/src/models/revenueaccountsresponse.ts +80 -0
- package/src/models/revenueaccounttotal.ts +43 -0
- package/src/models/revenuesummaryresponse.ts +5 -0
- package/src/sdk/revenue.ts +22 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenueaccountrow.js","sourceRoot":"","sources":["../../../src/models/revenueaccountrow.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAqB/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,8BAA8B;CAC5C,CAAC,CAAC;AAEH,MAAM,UAAU,yBAAyB,CACvC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+BAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { OffsetPagination } from "./offsetpagination.js";
|
|
6
|
+
import { RevenueAccountRow } from "./revenueaccountrow.js";
|
|
7
|
+
import { RevenueAccountTotal } from "./revenueaccounttotal.js";
|
|
8
|
+
/**
|
|
9
|
+
* Object type identifier
|
|
10
|
+
*/
|
|
11
|
+
export declare const RevenueAccountsResponseObject: {
|
|
12
|
+
readonly List: "list";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Object type identifier
|
|
16
|
+
*/
|
|
17
|
+
export type RevenueAccountsResponseObject = ClosedEnum<typeof RevenueAccountsResponseObject>;
|
|
18
|
+
export type RevenueAccountsResponse = {
|
|
19
|
+
/**
|
|
20
|
+
* Object type identifier
|
|
21
|
+
*/
|
|
22
|
+
object: RevenueAccountsResponseObject;
|
|
23
|
+
/**
|
|
24
|
+
* One entry per currency with at least one row in the filter, over every row and not only this page. The merchant's primary currency comes first, then the rest in alphabetical order. Empty when there are no rows.
|
|
25
|
+
*/
|
|
26
|
+
totals: Array<RevenueAccountTotal>;
|
|
27
|
+
/**
|
|
28
|
+
* One row per customer and currency with at least one unpaid invoice, in the currency order of `totals`, then by `outstanding.amount` descending, then by `customerId`. A customer billed in two currencies has two rows.
|
|
29
|
+
*/
|
|
30
|
+
data: Array<RevenueAccountRow>;
|
|
31
|
+
/**
|
|
32
|
+
* Offset-based pagination response.
|
|
33
|
+
*/
|
|
34
|
+
pagination: OffsetPagination;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const RevenueAccountsResponseObject$inboundSchema: z.ZodNativeEnum<typeof RevenueAccountsResponseObject>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const RevenueAccountsResponse$inboundSchema: z.ZodType<RevenueAccountsResponse, z.ZodTypeDef, unknown>;
|
|
40
|
+
export declare function revenueAccountsResponseFromJSON(jsonString: string): SafeParseResult<RevenueAccountsResponse, SDKValidationError>;
|
|
41
|
+
//# sourceMappingURL=revenueaccountsresponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenueaccountsresponse.d.ts","sourceRoot":"","sources":["../../../src/models/revenueaccountsresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,6BAA6B;;CAEhC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,6BAA6B,CACrC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,MAAM,EAAE,6BAA6B,CAAC;IACtC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACnC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC/B;;OAEG;IACH,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,aAAa,CACvE,OAAO,6BAA6B,CACS,CAAC;AAEhD,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,uBAAuB,EACvB,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { OffsetPagination$inboundSchema, } from "./offsetpagination.js";
|
|
7
|
+
import { RevenueAccountRow$inboundSchema, } from "./revenueaccountrow.js";
|
|
8
|
+
import { RevenueAccountTotal$inboundSchema, } from "./revenueaccounttotal.js";
|
|
9
|
+
/**
|
|
10
|
+
* Object type identifier
|
|
11
|
+
*/
|
|
12
|
+
export const RevenueAccountsResponseObject = {
|
|
13
|
+
List: "list",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const RevenueAccountsResponseObject$inboundSchema = z.nativeEnum(RevenueAccountsResponseObject);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const RevenueAccountsResponse$inboundSchema = z.object({
|
|
19
|
+
object: RevenueAccountsResponseObject$inboundSchema,
|
|
20
|
+
totals: z.array(RevenueAccountTotal$inboundSchema),
|
|
21
|
+
data: z.array(RevenueAccountRow$inboundSchema),
|
|
22
|
+
pagination: OffsetPagination$inboundSchema,
|
|
23
|
+
});
|
|
24
|
+
export function revenueAccountsResponseFromJSON(jsonString) {
|
|
25
|
+
return safeParse(jsonString, (x) => RevenueAccountsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RevenueAccountsResponse' from JSON`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=revenueaccountsresponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenueaccountsresponse.js","sourceRoot":"","sources":["../../../src/models/revenueaccountsresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,OAAO,EAEL,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,IAAI,EAAE,MAAM;CACJ,CAAC;AA2BX,gBAAgB;AAChB,MAAM,CAAC,MAAM,2CAA2C,GAEpD,CAAC,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;AAEhD,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,2CAA2C;IACnD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;IAClD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,+BAA+B,CAAC;IAC9C,UAAU,EAAE,8BAA8B;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { OutstandingBlock } from "./outstandingblock.js";
|
|
5
|
+
export type RevenueAccountTotal = {
|
|
6
|
+
/**
|
|
7
|
+
* ISO 4217 currency code of every amount in this entry
|
|
8
|
+
*/
|
|
9
|
+
currency: string;
|
|
10
|
+
/**
|
|
11
|
+
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
|
|
12
|
+
*/
|
|
13
|
+
outstanding: OutstandingBlock;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const RevenueAccountTotal$inboundSchema: z.ZodType<RevenueAccountTotal, z.ZodTypeDef, unknown>;
|
|
17
|
+
export declare function revenueAccountTotalFromJSON(jsonString: string): SafeParseResult<RevenueAccountTotal, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=revenueaccounttotal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenueaccounttotal.d.ts","sourceRoot":"","sources":["../../../src/models/revenueaccounttotal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,gBAAgB,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { OutstandingBlock$inboundSchema, } from "./outstandingblock.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const RevenueAccountTotal$inboundSchema = z.object({
|
|
9
|
+
currency: z.string(),
|
|
10
|
+
outstanding: OutstandingBlock$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function revenueAccountTotalFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => RevenueAccountTotal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RevenueAccountTotal' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=revenueaccounttotal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revenueaccounttotal.js","sourceRoot":"","sources":["../../../src/models/revenueaccounttotal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAa/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,8BAA8B;CAC5C,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
|
|
@@ -24,6 +24,10 @@ export type RevenueSummaryResponse = {
|
|
|
24
24
|
* Object type identifier
|
|
25
25
|
*/
|
|
26
26
|
object: "revenue_summary";
|
|
27
|
+
/**
|
|
28
|
+
* ISO 4217 currency code every figure in the response is in: the requested currency, or the merchant's primary currency when none was requested. Omitted when groupBy=currency is active.
|
|
29
|
+
*/
|
|
30
|
+
currency?: string | undefined;
|
|
27
31
|
/**
|
|
28
32
|
* Revenue: what was billed in the period, excluding tax, in units of the currency. On the default issue-date basis it is recognised when each invoice is issued; with periodBasis=billingPeriod, each invoice line counts in the period it bills, and a refund splits across its invoice's lines. An invoice counts whether it was since paid, is still outstanding, failed payment or was written off, less non-voided refunds. It is billings, not cash collected: what customers still owe is invoices.outstanding, including tax, and payment-link collections are under payments. Omitted when groupBy=currency is active.
|
|
29
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revenuesummaryresponse.d.ts","sourceRoot":"","sources":["../../../src/models/revenuesummaryresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,YAAY,CAAC,EAAE,kCAAkC,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,OAAO,CACtE,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAOzE;AAED,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,
|
|
1
|
+
{"version":3,"file":"revenuesummaryresponse.d.ts","sourceRoot":"","sources":["../../../src/models/revenuesummaryresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,YAAY,CAAC,EAAE,kCAAkC,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,OAAO,CACtE,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAOzE;AAED,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAiBP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -19,6 +19,7 @@ export function revenueSummaryResponseRevenueRangeFromJSON(jsonString) {
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export const RevenueSummaryResponse$inboundSchema = z.object({
|
|
21
21
|
object: z.literal("revenue_summary"),
|
|
22
|
+
currency: z.string().optional(),
|
|
22
23
|
netRevenue: z.string().optional(),
|
|
23
24
|
totalRefunds: z.string().optional(),
|
|
24
25
|
refundCount: z.number().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revenuesummaryresponse.js","sourceRoot":"","sources":["../../../src/models/revenuesummaryresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAEL,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"revenuesummaryresponse.js","sourceRoot":"","sources":["../../../src/models/revenuesummaryresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAEL,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAiEjC,gBAAgB;AAChB,MAAM,CAAC,MAAM,gDAAgD,GAIzD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACvE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CACtE,CAAC,CAAC;AAEH,MAAM,UAAU,0CAA0C,CACxD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,gDAAgD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvE,gEAAgE,CACjE,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACjD,QAAQ,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACjD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE;IAC3D,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IACrE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,QAAQ,EAAE;IAC3E,YAAY,EAAE,CAAC,CAAC,QAAQ,CACtB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gDAAgD,CAAC,CAC/D,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -9,5 +9,16 @@ export declare class Revenue extends ClientSDK {
|
|
|
9
9
|
* Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is what was billed in the period (by default, invoices issued in it; see periodBasis), whatever their status since, less refunds, both excluding tax; completed payments are reported under payments, never in revenue.
|
|
10
10
|
*/
|
|
11
11
|
get(request: operations.GetRevenueRequest, options?: RequestOptions): Promise<models.RevenueSummaryResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* List customer accounts
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Returns each customer's account as at today, one row per customer and currency, with a total per currency. Every figure covers all dates: there is no date window.
|
|
17
|
+
*
|
|
18
|
+
* `outstanding` is what customers owe: every invoice with status `ISSUED` or `PAYMENT_FAILED`, at the amount due printed on the invoice (subtotal and tax, each rounded to the currency's minor unit), so it is gross of tax. Revenue (`GET /v0/revenue`) is net of tax. `outstanding` splits into `awaitingPayment` (status `ISSUED`) and `paymentFailed` (status `PAYMENT_FAILED`, collection has ended); the two always add up to it, in count and amount. A credit invoice (a negative amount due) nets against what is owed and is counted in no `count`; nor is an invoice whose amount due rounds to zero. A customer with nothing counted and nothing owed has no row.
|
|
19
|
+
*
|
|
20
|
+
* Amounts are grouped by currency and never combined or converted. `totals` covers every row in the filter, not only the returned page, so the rows on one page add up to `totals` only when the page holds every row. Pages fetched in separate requests are separate reads.
|
|
21
|
+
*/
|
|
22
|
+
getRevenueAccounts(request: operations.GetRevenueAccountsRequest, options?: RequestOptions): Promise<models.RevenueAccountsResponse>;
|
|
12
23
|
}
|
|
13
24
|
//# sourceMappingURL=revenue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.d.ts","sourceRoot":"","sources":["../../../src/sdk/revenue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"revenue.d.ts","sourceRoot":"","sources":["../../../src/sdk/revenue.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC;IAQzC;;;;;;;;;OASG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC;CAO3C"}
|
package/dist/esm/sdk/revenue.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import { revenueGet } from "../funcs/revenueGet.js";
|
|
5
|
+
import { revenueGetRevenueAccounts } from "../funcs/revenueGetRevenueAccounts.js";
|
|
5
6
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
7
8
|
export class Revenue extends ClientSDK {
|
|
@@ -14,5 +15,18 @@ export class Revenue extends ClientSDK {
|
|
|
14
15
|
async get(request, options) {
|
|
15
16
|
return unwrapAsync(revenueGet(this, request, options));
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* List customer accounts
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Returns each customer's account as at today, one row per customer and currency, with a total per currency. Every figure covers all dates: there is no date window.
|
|
23
|
+
*
|
|
24
|
+
* `outstanding` is what customers owe: every invoice with status `ISSUED` or `PAYMENT_FAILED`, at the amount due printed on the invoice (subtotal and tax, each rounded to the currency's minor unit), so it is gross of tax. Revenue (`GET /v0/revenue`) is net of tax. `outstanding` splits into `awaitingPayment` (status `ISSUED`) and `paymentFailed` (status `PAYMENT_FAILED`, collection has ended); the two always add up to it, in count and amount. A credit invoice (a negative amount due) nets against what is owed and is counted in no `count`; nor is an invoice whose amount due rounds to zero. A customer with nothing counted and nothing owed has no row.
|
|
25
|
+
*
|
|
26
|
+
* Amounts are grouped by currency and never combined or converted. `totals` covers every row in the filter, not only the returned page, so the rows on one page add up to `totals` only when the page holds every row. Pages fetched in separate requests are separate reads.
|
|
27
|
+
*/
|
|
28
|
+
async getRevenueAccounts(request, options) {
|
|
29
|
+
return unwrapAsync(revenueGetRevenueAccounts(this, request, options));
|
|
30
|
+
}
|
|
17
31
|
}
|
|
18
32
|
//# sourceMappingURL=revenue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.js","sourceRoot":"","sources":["../../../src/sdk/revenue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,UAAU,CAC3B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"revenue.js","sourceRoot":"","sources":["../../../src/sdk/revenue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,UAAU,CAC3B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PaygenticCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List customer accounts
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Returns each customer's account as at today, one row per customer and currency, with a total per currency. Every figure covers all dates: there is no date window.
|
|
34
|
+
*
|
|
35
|
+
* `outstanding` is what customers owe: every invoice with status `ISSUED` or `PAYMENT_FAILED`, at the amount due printed on the invoice (subtotal and tax, each rounded to the currency's minor unit), so it is gross of tax. Revenue (`GET /v0/revenue`) is net of tax. `outstanding` splits into `awaitingPayment` (status `ISSUED`) and `paymentFailed` (status `PAYMENT_FAILED`, collection has ended); the two always add up to it, in count and amount. A credit invoice (a negative amount due) nets against what is owed and is counted in no `count`; nor is an invoice whose amount due rounds to zero. A customer with nothing counted and nothing owed has no row.
|
|
36
|
+
*
|
|
37
|
+
* Amounts are grouped by currency and never combined or converted. `totals` covers every row in the filter, not only the returned page, so the rows on one page add up to `totals` only when the page holds every row. Pages fetched in separate requests are separate reads.
|
|
38
|
+
*/
|
|
39
|
+
export function revenueGetRevenueAccounts(
|
|
40
|
+
client: PaygenticCore,
|
|
41
|
+
request: operations.GetRevenueAccountsRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
models.RevenueAccountsResponse,
|
|
46
|
+
| errors.BadRequest
|
|
47
|
+
| errors.ErrorT
|
|
48
|
+
| PaygenticError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: PaygenticCore,
|
|
67
|
+
request: operations.GetRevenueAccountsRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
models.RevenueAccountsResponse,
|
|
73
|
+
| errors.BadRequest
|
|
74
|
+
| errors.ErrorT
|
|
75
|
+
| PaygenticError
|
|
76
|
+
| ResponseValidationError
|
|
77
|
+
| ConnectionError
|
|
78
|
+
| RequestAbortedError
|
|
79
|
+
| RequestTimeoutError
|
|
80
|
+
| InvalidRequestError
|
|
81
|
+
| UnexpectedClientError
|
|
82
|
+
| SDKValidationError
|
|
83
|
+
>,
|
|
84
|
+
APICall,
|
|
85
|
+
]
|
|
86
|
+
> {
|
|
87
|
+
const parsed = safeParse(
|
|
88
|
+
request,
|
|
89
|
+
(value) => operations.GetRevenueAccountsRequest$outboundSchema.parse(value),
|
|
90
|
+
"Input validation failed",
|
|
91
|
+
);
|
|
92
|
+
if (!parsed.ok) {
|
|
93
|
+
return [parsed, { status: "invalid" }];
|
|
94
|
+
}
|
|
95
|
+
const payload = parsed.value;
|
|
96
|
+
const body = null;
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc("/v0/revenue/accounts")();
|
|
99
|
+
|
|
100
|
+
const query = encodeFormQuery({
|
|
101
|
+
"customerIds": payload.customerIds,
|
|
102
|
+
"limit": payload.limit,
|
|
103
|
+
"merchantId": payload.merchantId,
|
|
104
|
+
"offset": payload.offset,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const headers = new Headers(compactMap({
|
|
108
|
+
Accept: "application/json",
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
112
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
113
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
114
|
+
|
|
115
|
+
const context = {
|
|
116
|
+
options: client._options,
|
|
117
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
118
|
+
operationID: "getRevenueAccounts",
|
|
119
|
+
oAuth2Scopes: null,
|
|
120
|
+
|
|
121
|
+
resolvedSecurity: requestSecurity,
|
|
122
|
+
|
|
123
|
+
securitySource: client._options.bearerAuth,
|
|
124
|
+
retryConfig: options?.retries
|
|
125
|
+
|| client._options.retryConfig
|
|
126
|
+
|| { strategy: "none" },
|
|
127
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const requestRes = client._createRequest(context, {
|
|
131
|
+
security: requestSecurity,
|
|
132
|
+
method: "GET",
|
|
133
|
+
baseURL: options?.serverURL,
|
|
134
|
+
path: path,
|
|
135
|
+
headers: headers,
|
|
136
|
+
query: query,
|
|
137
|
+
body: body,
|
|
138
|
+
userAgent: client._options.userAgent,
|
|
139
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
140
|
+
}, options);
|
|
141
|
+
if (!requestRes.ok) {
|
|
142
|
+
return [requestRes, { status: "invalid" }];
|
|
143
|
+
}
|
|
144
|
+
const req = requestRes.value;
|
|
145
|
+
|
|
146
|
+
const doResult = await client._do(req, {
|
|
147
|
+
context,
|
|
148
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
149
|
+
retryConfig: context.retryConfig,
|
|
150
|
+
retryCodes: context.retryCodes,
|
|
151
|
+
});
|
|
152
|
+
if (!doResult.ok) {
|
|
153
|
+
return [doResult, { status: "request-error", request: req }];
|
|
154
|
+
}
|
|
155
|
+
const response = doResult.value;
|
|
156
|
+
|
|
157
|
+
const responseFields = {
|
|
158
|
+
HttpMeta: { Response: response, Request: req },
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const [result] = await M.match<
|
|
162
|
+
models.RevenueAccountsResponse,
|
|
163
|
+
| errors.BadRequest
|
|
164
|
+
| errors.ErrorT
|
|
165
|
+
| PaygenticError
|
|
166
|
+
| ResponseValidationError
|
|
167
|
+
| ConnectionError
|
|
168
|
+
| RequestAbortedError
|
|
169
|
+
| RequestTimeoutError
|
|
170
|
+
| InvalidRequestError
|
|
171
|
+
| UnexpectedClientError
|
|
172
|
+
| SDKValidationError
|
|
173
|
+
>(
|
|
174
|
+
M.json(200, models.RevenueAccountsResponse$inboundSchema),
|
|
175
|
+
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
176
|
+
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema),
|
|
177
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
178
|
+
M.fail("4XX"),
|
|
179
|
+
M.fail("5XX"),
|
|
180
|
+
)(response, req, { extraFields: responseFields });
|
|
181
|
+
if (!result.ok) {
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.9.
|
|
68
|
+
sdkVersion: "0.9.18",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.9.18 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A number of invoices and their total amount due, gross of tax.
|
|
12
|
+
*/
|
|
13
|
+
export type AccountFigure = {
|
|
14
|
+
/**
|
|
15
|
+
* Number of invoices with an amount due above zero. A credit invoice, or one whose amount due rounds to zero, is not counted.
|
|
16
|
+
*/
|
|
17
|
+
count: number;
|
|
18
|
+
/**
|
|
19
|
+
* Total amount due in major units of the currency, in its decimal places
|
|
20
|
+
*/
|
|
21
|
+
amount: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AccountFigure$inboundSchema: z.ZodType<
|
|
26
|
+
AccountFigure,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
count: z.number().int(),
|
|
31
|
+
amount: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function accountFigureFromJSON(
|
|
35
|
+
jsonString: string,
|
|
36
|
+
): SafeParseResult<AccountFigure, SDKValidationError> {
|
|
37
|
+
return safeParse(
|
|
38
|
+
jsonString,
|
|
39
|
+
(x) => AccountFigure$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
+
`Failed to parse 'AccountFigure' from JSON`,
|
|
41
|
+
);
|
|
42
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./accountfigure.js";
|
|
5
6
|
export * from "./address.js";
|
|
6
7
|
export * from "./approval.js";
|
|
7
8
|
export * from "./approvallist.js";
|
|
@@ -84,6 +85,7 @@ export * from "./orderbillingschedule.js";
|
|
|
84
85
|
export * from "./orderlineitem.js";
|
|
85
86
|
export * from "./orderlist.js";
|
|
86
87
|
export * from "./outofbandpaymentresult.js";
|
|
88
|
+
export * from "./outstandingblock.js";
|
|
87
89
|
export * from "./payment.js";
|
|
88
90
|
export * from "./paymentmethod.js";
|
|
89
91
|
export * from "./paymentsession.js";
|
|
@@ -117,6 +119,9 @@ export * from "./replacescheduleintervalsrequest.js";
|
|
|
117
119
|
export * from "./resolveditem.js";
|
|
118
120
|
export * from "./retrypaymenterror.js";
|
|
119
121
|
export * from "./retrypaymentresponse.js";
|
|
122
|
+
export * from "./revenueaccountrow.js";
|
|
123
|
+
export * from "./revenueaccountsresponse.js";
|
|
124
|
+
export * from "./revenueaccounttotal.js";
|
|
120
125
|
export * from "./revenuesummaryresponse.js";
|
|
121
126
|
export * from "./revenuetrendbucket.js";
|
|
122
127
|
export * from "./rulecondition.js";
|
package/src/models/invoice.ts
CHANGED
|
@@ -64,7 +64,7 @@ export const PdfSource = {
|
|
|
64
64
|
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice
|
|
67
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice issued before Paygentic rendered every document can report pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
68
68
|
*/
|
|
69
69
|
export const DocumentWithheldReason = {
|
|
70
70
|
TaxUnreconciled: "tax_unreconciled",
|
|
@@ -74,7 +74,7 @@ export const DocumentWithheldReason = {
|
|
|
74
74
|
TaxProviderDisagrees: "tax_provider_disagrees",
|
|
75
75
|
} as const;
|
|
76
76
|
/**
|
|
77
|
-
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice
|
|
77
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice issued before Paygentic rendered every document can report pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
78
78
|
*/
|
|
79
79
|
export type DocumentWithheldReason = OpenEnum<typeof DocumentWithheldReason>;
|
|
80
80
|
|
|
@@ -232,7 +232,7 @@ export type Invoice = {
|
|
|
232
232
|
*/
|
|
233
233
|
pdfSource?: PdfSource | null | undefined;
|
|
234
234
|
/**
|
|
235
|
-
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice
|
|
235
|
+
* Why no Paygentic-rendered document exists for this invoice, or null when none was withheld. A tax-registered merchant's document is a compliance artefact, so it is withheld unless the recorded tax reconciles with the provider exactly and the registered issuer identity is complete. Non-null therefore always accompanies pdfSource `null`, and never `paygentic`: an invoice whose document is withheld is not served the provider's in its place, because recording that link would mark the invoice as already served and stop a later repair rendering ours. Use it to tell a withheld invoice apart from one that simply has no document yet — both report pdfSource `null`, and only a withheld one names why. An invoice issued before Paygentic rendered every document can report pdfSource `tax_provider` with no reason, and needs no repair. Both an invoice with no document and a withheld one can be repaired by POST /v2/invoices/{id}/generate-pdf. `tax_unreconciled`: the provider's tax figure was never recorded against this invoice. `issuer_identity_incomplete`: the registered legal name, tax ID or address could not be read. `tax_component_unpriceable`: a recorded tax component carried no presentable amount. `ledger_mismatch`: the recorded tax figures and the invoice's own totals disagree. `tax_provider_disagrees`: the provider re-read its filing and reported a different tax to the one this invoice was charged — terminal, because correcting an issued invoice is a credit note's job, so retrying the repair cannot clear it. New values may be added, so treat an unrecognised one as withheld rather than failing.
|
|
236
236
|
*/
|
|
237
237
|
documentWithheldReason?: DocumentWithheldReason | null | undefined;
|
|
238
238
|
/**
|
|
@@ -19,7 +19,7 @@ export const GetRevenueBucketWidth = {
|
|
|
19
19
|
export type GetRevenueBucketWidth = ClosedEnum<typeof GetRevenueBucketWidth>;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
22
|
+
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), both in one currency like an ungrouped read, 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
23
23
|
*/
|
|
24
24
|
export const GroupBy = {
|
|
25
25
|
Plan: "plan",
|
|
@@ -27,7 +27,7 @@ export const GroupBy = {
|
|
|
27
27
|
Currency: "currency",
|
|
28
28
|
} as const;
|
|
29
29
|
/**
|
|
30
|
-
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
30
|
+
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), both in one currency like an ungrouped read, 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
31
31
|
*/
|
|
32
32
|
export type GroupBy = ClosedEnum<typeof GroupBy>;
|
|
33
33
|
|
|
@@ -57,23 +57,23 @@ export type GetRevenueRequest = {
|
|
|
57
57
|
*/
|
|
58
58
|
bucketWidth?: GetRevenueBucketWidth | undefined;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* The merchant whose revenue to read. Defaults to the merchant your API key belongs to, and is required when you belong to several merchants. Every read is scoped to one merchant; customerId and subscriptionIds narrow it further.
|
|
61
61
|
*/
|
|
62
62
|
merchantId?: string | undefined;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Narrow the read to one of the merchant's customers.
|
|
65
65
|
*/
|
|
66
66
|
customerId?: string | undefined;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Narrow the invoice figures to some of the merchant's subscriptions. A payment is not tied to a subscription, so the payment figures are not narrowed by it.
|
|
69
69
|
*/
|
|
70
70
|
subscriptionIds?: Array<string> | undefined;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* ISO 4217 currency code (e.g. 'USD') to scope every figure to. Defaults to the merchant's primary currency, except with groupBy=currency, where omitting it returns every currency.
|
|
73
73
|
*/
|
|
74
74
|
currency?: string | undefined;
|
|
75
75
|
/**
|
|
76
|
-
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
76
|
+
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), both in one currency like an ungrouped read, 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
77
77
|
*/
|
|
78
78
|
groupBy?: GroupBy | undefined;
|
|
79
79
|
/**
|