@flexprice/sdk 2.1.44-dev.1 → 2.1.44-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/docs/sdk/models/invoice-sync-settings.md +1 -0
  2. package/docs/sdk/models/self-billing-charge-response.md +35 -0
  3. package/docs/sdk/models/self-billing-plan-response.md +18 -0
  4. package/docs/sdk/models/self-billing-summary-response.md +1 -0
  5. package/docs/sdk/models/zoho-pay-pal-payment-method.md +17 -0
  6. package/docs/sdk/models/zoho-payment-gateway-settings.md +17 -0
  7. package/docs/sdk/models/zoho-payment-gateway.md +17 -0
  8. package/docs/sdks/selfbilling/README.md +1 -1
  9. package/esm/funcs/self-billing-get-self-billing-summary.d.ts +1 -1
  10. package/esm/funcs/self-billing-get-self-billing-summary.js +1 -1
  11. package/esm/lib/config.d.ts +3 -3
  12. package/esm/lib/config.js +3 -3
  13. package/esm/sdk/models/index.d.ts +5 -0
  14. package/esm/sdk/models/index.d.ts.map +1 -1
  15. package/esm/sdk/models/index.js +5 -0
  16. package/esm/sdk/models/index.js.map +1 -1
  17. package/esm/sdk/models/invoice-sync-settings.d.ts +2 -0
  18. package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -1
  19. package/esm/sdk/models/invoice-sync-settings.js +3 -0
  20. package/esm/sdk/models/invoice-sync-settings.js.map +1 -1
  21. package/esm/sdk/models/self-billing-charge-response.d.ts +45 -0
  22. package/esm/sdk/models/self-billing-charge-response.d.ts.map +1 -0
  23. package/esm/sdk/models/self-billing-charge-response.js +63 -0
  24. package/esm/sdk/models/self-billing-charge-response.js.map +1 -0
  25. package/esm/sdk/models/self-billing-plan-response.d.ts +14 -0
  26. package/esm/sdk/models/self-billing-plan-response.d.ts.map +1 -0
  27. package/esm/sdk/models/self-billing-plan-response.js +18 -0
  28. package/esm/sdk/models/self-billing-plan-response.js.map +1 -0
  29. package/esm/sdk/models/self-billing-summary-response.d.ts +2 -0
  30. package/esm/sdk/models/self-billing-summary-response.d.ts.map +1 -1
  31. package/esm/sdk/models/self-billing-summary-response.js +2 -0
  32. package/esm/sdk/models/self-billing-summary-response.js.map +1 -1
  33. package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts +10 -0
  34. package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts.map +1 -0
  35. package/esm/sdk/models/zoho-pay-pal-payment-method.js +11 -0
  36. package/esm/sdk/models/zoho-pay-pal-payment-method.js.map +1 -0
  37. package/esm/sdk/models/zoho-payment-gateway-settings.d.ts +14 -0
  38. package/esm/sdk/models/zoho-payment-gateway-settings.d.ts.map +1 -0
  39. package/esm/sdk/models/zoho-payment-gateway-settings.js +23 -0
  40. package/esm/sdk/models/zoho-payment-gateway-settings.js.map +1 -0
  41. package/esm/sdk/models/zoho-payment-gateway.d.ts +15 -0
  42. package/esm/sdk/models/zoho-payment-gateway.d.ts.map +1 -0
  43. package/esm/sdk/models/zoho-payment-gateway.js +16 -0
  44. package/esm/sdk/models/zoho-payment-gateway.js.map +1 -0
  45. package/esm/sdk/self-billing.d.ts +1 -1
  46. package/esm/sdk/self-billing.js +1 -1
  47. package/jsr.json +1 -1
  48. package/package.json +1 -1
  49. package/src/funcs/self-billing-get-self-billing-summary.ts +1 -1
  50. package/src/lib/config.ts +3 -3
  51. package/src/sdk/models/index.ts +5 -0
  52. package/src/sdk/models/invoice-sync-settings.ts +7 -0
  53. package/src/sdk/models/self-billing-charge-response.ts +124 -0
  54. package/src/sdk/models/self-billing-plan-response.ts +41 -0
  55. package/src/sdk/models/self-billing-summary-response.ts +6 -0
  56. package/src/sdk/models/zoho-pay-pal-payment-method.ts +19 -0
  57. package/src/sdk/models/zoho-payment-gateway-settings.ts +53 -0
  58. package/src/sdk/models/zoho-payment-gateway.ts +24 -0
  59. package/src/sdk/self-billing.ts +1 -1
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "./sdk-validation-error.js";
11
+ import {
12
+ ZohoPayPalPaymentMethod,
13
+ ZohoPayPalPaymentMethod$inboundSchema,
14
+ } from "./zoho-pay-pal-payment-method.js";
15
+ import {
16
+ ZohoPaymentGateway,
17
+ ZohoPaymentGateway$inboundSchema,
18
+ } from "./zoho-payment-gateway.js";
19
+
20
+ export type ZohoPaymentGatewaySettings = {
21
+ enabled?: boolean | undefined;
22
+ gateways?: Array<ZohoPaymentGateway> | undefined;
23
+ paypalPaymentMethod?: ZohoPayPalPaymentMethod | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const ZohoPaymentGatewaySettings$inboundSchema: z.ZodMiniType<
28
+ ZohoPaymentGatewaySettings,
29
+ unknown
30
+ > = z.pipe(
31
+ z.object({
32
+ enabled: types.optional(types.boolean()),
33
+ gateways: types.optional(z.array(ZohoPaymentGateway$inboundSchema)),
34
+ paypal_payment_method: types.optional(
35
+ ZohoPayPalPaymentMethod$inboundSchema,
36
+ ),
37
+ }),
38
+ z.transform((v) => {
39
+ return remap$(v, {
40
+ "paypal_payment_method": "paypalPaymentMethod",
41
+ });
42
+ }),
43
+ );
44
+
45
+ export function zohoPaymentGatewaySettingsFromJSON(
46
+ jsonString: string,
47
+ ): SafeParseResult<ZohoPaymentGatewaySettings, SDKValidationError> {
48
+ return safeParse(
49
+ jsonString,
50
+ (x) => ZohoPaymentGatewaySettings$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'ZohoPaymentGatewaySettings' from JSON`,
52
+ );
53
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ export const ZohoPaymentGateway = {
10
+ Paypal: "paypal",
11
+ Stripe: "stripe",
12
+ AuthorizeNet: "authorize_net",
13
+ PayflowPro: "payflow_pro",
14
+ Twocheckout: "2checkout",
15
+ Braintree: "braintree",
16
+ Razorpay: "razorpay",
17
+ } as const;
18
+ export type ZohoPaymentGateway = OpenEnum<typeof ZohoPaymentGateway>;
19
+
20
+ /** @internal */
21
+ export const ZohoPaymentGateway$inboundSchema: z.ZodMiniType<
22
+ ZohoPaymentGateway,
23
+ unknown
24
+ > = openEnums.inboundSchema(ZohoPaymentGateway);
@@ -99,7 +99,7 @@ export class SelfBilling extends ClientSDK {
99
99
  * Get self-billing summary
100
100
  *
101
101
  * @remarks
102
- * Returns the caller tenant's billing status, subscription, recent invoices and usage.
102
+ * Returns billing status, recent invoices, usage and a plan with charges. Charges use expanded subscription line-item prices, including overrides; without a current subscription they use the configured self-serve plan. Pricing terms are not an invoice total.
103
103
  */
104
104
  async getSelfBillingSummary(
105
105
  options?: RequestOptions,