@paygentic/sdk 0.9.4 → 0.9.6

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 (220) hide show
  1. package/README.md +12 -5
  2. package/dist/commonjs/funcs/pricesUpdate.d.ts +1 -1
  3. package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/pricesUpdate.js +2 -2
  5. package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
  6. package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts +19 -0
  7. package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.js +127 -0
  9. package/dist/commonjs/funcs/subscriptionsCreateSubscriptionAdjustment.js.map +1 -0
  10. package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts +18 -0
  11. package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.js +128 -0
  13. package/dist/commonjs/funcs/subscriptionsDeleteSubscriptionAdjustment.js.map +1 -0
  14. package/dist/commonjs/funcs/subscriptionsListSubscriptionAdjustments.d.ts +19 -0
  15. package/dist/commonjs/funcs/subscriptionsListSubscriptionAdjustments.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/subscriptionsListSubscriptionAdjustments.js +129 -0
  17. package/dist/commonjs/funcs/subscriptionsListSubscriptionAdjustments.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts +53 -0
  21. package/dist/commonjs/models/createsubscriptionadjustmentrequest.d.ts.map +1 -0
  22. package/dist/commonjs/models/createsubscriptionadjustmentrequest.js +63 -0
  23. package/dist/commonjs/models/createsubscriptionadjustmentrequest.js.map +1 -0
  24. package/dist/commonjs/models/errors/index.d.ts +1 -0
  25. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/errors/index.js +1 -0
  27. package/dist/commonjs/models/errors/index.js.map +1 -1
  28. package/dist/commonjs/models/errors/updateprice.d.ts +36 -0
  29. package/dist/commonjs/models/errors/updateprice.d.ts.map +1 -0
  30. package/dist/commonjs/models/errors/updateprice.js +77 -0
  31. package/dist/commonjs/models/errors/updateprice.js.map +1 -0
  32. package/dist/commonjs/models/index.d.ts +4 -1
  33. package/dist/commonjs/models/index.d.ts.map +1 -1
  34. package/dist/commonjs/models/index.js +4 -1
  35. package/dist/commonjs/models/index.js.map +1 -1
  36. package/dist/commonjs/models/operations/createprice.d.ts +8 -3
  37. package/dist/commonjs/models/operations/createprice.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/createprice.js +2 -1
  39. package/dist/commonjs/models/operations/createprice.js.map +1 -1
  40. package/dist/commonjs/models/operations/createsubscriptionadjustment.d.ts +18 -0
  41. package/dist/commonjs/models/operations/createsubscriptionadjustment.d.ts.map +1 -0
  42. package/dist/commonjs/models/operations/createsubscriptionadjustment.js +56 -0
  43. package/dist/commonjs/models/operations/createsubscriptionadjustment.js.map +1 -0
  44. package/dist/commonjs/models/operations/deletesubscriptionadjustment.d.ts +20 -0
  45. package/dist/commonjs/models/operations/deletesubscriptionadjustment.d.ts.map +1 -0
  46. package/dist/commonjs/models/operations/deletesubscriptionadjustment.js +50 -0
  47. package/dist/commonjs/models/operations/deletesubscriptionadjustment.js.map +1 -0
  48. package/dist/commonjs/models/operations/index.d.ts +3 -0
  49. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/index.js +3 -0
  51. package/dist/commonjs/models/operations/index.js.map +1 -1
  52. package/dist/commonjs/models/operations/listsubscriptionadjustments.d.ts +25 -0
  53. package/dist/commonjs/models/operations/listsubscriptionadjustments.d.ts.map +1 -0
  54. package/dist/commonjs/models/operations/listsubscriptionadjustments.js +51 -0
  55. package/dist/commonjs/models/operations/listsubscriptionadjustments.js.map +1 -0
  56. package/dist/commonjs/models/operations/updateprice.d.ts +18 -3
  57. package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/updateprice.js +14 -2
  59. package/dist/commonjs/models/operations/updateprice.js.map +1 -1
  60. package/dist/commonjs/models/planversionpriceslot.d.ts +4 -0
  61. package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
  62. package/dist/commonjs/models/planversionpriceslot.js +1 -0
  63. package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
  64. package/dist/commonjs/models/price.d.ts +4 -0
  65. package/dist/commonjs/models/price.d.ts.map +1 -1
  66. package/dist/commonjs/models/price.js +1 -0
  67. package/dist/commonjs/models/price.js.map +1 -1
  68. package/dist/commonjs/models/pricemodel.d.ts +2 -2
  69. package/dist/commonjs/models/pricemodel.js +1 -1
  70. package/dist/commonjs/models/pricemodelinput.d.ts +3 -2
  71. package/dist/commonjs/models/pricemodelinput.d.ts.map +1 -1
  72. package/dist/commonjs/models/pricemodelinput.js +2 -1
  73. package/dist/commonjs/models/pricemodelinput.js.map +1 -1
  74. package/dist/commonjs/models/priceproperties.d.ts +125 -0
  75. package/dist/commonjs/models/priceproperties.d.ts.map +1 -0
  76. package/dist/commonjs/models/priceproperties.js +152 -0
  77. package/dist/commonjs/models/priceproperties.js.map +1 -0
  78. package/dist/commonjs/models/schemasprice.d.ts +7 -3
  79. package/dist/commonjs/models/schemasprice.d.ts.map +1 -1
  80. package/dist/commonjs/models/schemasprice.js +3 -2
  81. package/dist/commonjs/models/schemasprice.js.map +1 -1
  82. package/dist/commonjs/models/subscriptionadjustment.d.ts +49 -0
  83. package/dist/commonjs/models/subscriptionadjustment.d.ts.map +1 -0
  84. package/dist/commonjs/models/subscriptionadjustment.js +68 -0
  85. package/dist/commonjs/models/subscriptionadjustment.js.map +1 -0
  86. package/dist/commonjs/models/subscriptionadjustmentsresponse.d.ts +16 -0
  87. package/dist/commonjs/models/subscriptionadjustmentsresponse.d.ts.map +1 -0
  88. package/dist/commonjs/models/subscriptionadjustmentsresponse.js +53 -0
  89. package/dist/commonjs/models/subscriptionadjustmentsresponse.js.map +1 -0
  90. package/dist/commonjs/sdk/subscriptions.d.ts +21 -0
  91. package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
  92. package/dist/commonjs/sdk/subscriptions.js +30 -0
  93. package/dist/commonjs/sdk/subscriptions.js.map +1 -1
  94. package/dist/esm/funcs/pricesUpdate.d.ts +1 -1
  95. package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
  96. package/dist/esm/funcs/pricesUpdate.js +2 -2
  97. package/dist/esm/funcs/pricesUpdate.js.map +1 -1
  98. package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts +19 -0
  99. package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.d.ts.map +1 -0
  100. package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.js +91 -0
  101. package/dist/esm/funcs/subscriptionsCreateSubscriptionAdjustment.js.map +1 -0
  102. package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts +18 -0
  103. package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.d.ts.map +1 -0
  104. package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.js +92 -0
  105. package/dist/esm/funcs/subscriptionsDeleteSubscriptionAdjustment.js.map +1 -0
  106. package/dist/esm/funcs/subscriptionsListSubscriptionAdjustments.d.ts +19 -0
  107. package/dist/esm/funcs/subscriptionsListSubscriptionAdjustments.d.ts.map +1 -0
  108. package/dist/esm/funcs/subscriptionsListSubscriptionAdjustments.js +93 -0
  109. package/dist/esm/funcs/subscriptionsListSubscriptionAdjustments.js.map +1 -0
  110. package/dist/esm/lib/config.d.ts +2 -2
  111. package/dist/esm/lib/config.js +2 -2
  112. package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts +53 -0
  113. package/dist/esm/models/createsubscriptionadjustmentrequest.d.ts.map +1 -0
  114. package/dist/esm/models/createsubscriptionadjustmentrequest.js +26 -0
  115. package/dist/esm/models/createsubscriptionadjustmentrequest.js.map +1 -0
  116. package/dist/esm/models/errors/index.d.ts +1 -0
  117. package/dist/esm/models/errors/index.d.ts.map +1 -1
  118. package/dist/esm/models/errors/index.js +1 -0
  119. package/dist/esm/models/errors/index.js.map +1 -1
  120. package/dist/esm/models/errors/updateprice.d.ts +36 -0
  121. package/dist/esm/models/errors/updateprice.d.ts.map +1 -0
  122. package/dist/esm/models/errors/updateprice.js +40 -0
  123. package/dist/esm/models/errors/updateprice.js.map +1 -0
  124. package/dist/esm/models/index.d.ts +4 -1
  125. package/dist/esm/models/index.d.ts.map +1 -1
  126. package/dist/esm/models/index.js +4 -1
  127. package/dist/esm/models/index.js.map +1 -1
  128. package/dist/esm/models/operations/createprice.d.ts +8 -3
  129. package/dist/esm/models/operations/createprice.d.ts.map +1 -1
  130. package/dist/esm/models/operations/createprice.js +2 -1
  131. package/dist/esm/models/operations/createprice.js.map +1 -1
  132. package/dist/esm/models/operations/createsubscriptionadjustment.d.ts +18 -0
  133. package/dist/esm/models/operations/createsubscriptionadjustment.d.ts.map +1 -0
  134. package/dist/esm/models/operations/createsubscriptionadjustment.js +19 -0
  135. package/dist/esm/models/operations/createsubscriptionadjustment.js.map +1 -0
  136. package/dist/esm/models/operations/deletesubscriptionadjustment.d.ts +20 -0
  137. package/dist/esm/models/operations/deletesubscriptionadjustment.d.ts.map +1 -0
  138. package/dist/esm/models/operations/deletesubscriptionadjustment.js +13 -0
  139. package/dist/esm/models/operations/deletesubscriptionadjustment.js.map +1 -0
  140. package/dist/esm/models/operations/index.d.ts +3 -0
  141. package/dist/esm/models/operations/index.d.ts.map +1 -1
  142. package/dist/esm/models/operations/index.js +3 -0
  143. package/dist/esm/models/operations/index.js.map +1 -1
  144. package/dist/esm/models/operations/listsubscriptionadjustments.d.ts +25 -0
  145. package/dist/esm/models/operations/listsubscriptionadjustments.d.ts.map +1 -0
  146. package/dist/esm/models/operations/listsubscriptionadjustments.js +14 -0
  147. package/dist/esm/models/operations/listsubscriptionadjustments.js.map +1 -0
  148. package/dist/esm/models/operations/updateprice.d.ts +18 -3
  149. package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
  150. package/dist/esm/models/operations/updateprice.js +12 -1
  151. package/dist/esm/models/operations/updateprice.js.map +1 -1
  152. package/dist/esm/models/planversionpriceslot.d.ts +4 -0
  153. package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
  154. package/dist/esm/models/planversionpriceslot.js +1 -0
  155. package/dist/esm/models/planversionpriceslot.js.map +1 -1
  156. package/dist/esm/models/price.d.ts +4 -0
  157. package/dist/esm/models/price.d.ts.map +1 -1
  158. package/dist/esm/models/price.js +1 -0
  159. package/dist/esm/models/price.js.map +1 -1
  160. package/dist/esm/models/pricemodel.d.ts +2 -2
  161. package/dist/esm/models/pricemodel.js +1 -1
  162. package/dist/esm/models/pricemodelinput.d.ts +3 -2
  163. package/dist/esm/models/pricemodelinput.d.ts.map +1 -1
  164. package/dist/esm/models/pricemodelinput.js +2 -1
  165. package/dist/esm/models/pricemodelinput.js.map +1 -1
  166. package/dist/esm/models/priceproperties.d.ts +125 -0
  167. package/dist/esm/models/priceproperties.d.ts.map +1 -0
  168. package/dist/esm/models/priceproperties.js +104 -0
  169. package/dist/esm/models/priceproperties.js.map +1 -0
  170. package/dist/esm/models/schemasprice.d.ts +7 -3
  171. package/dist/esm/models/schemasprice.d.ts.map +1 -1
  172. package/dist/esm/models/schemasprice.js +3 -2
  173. package/dist/esm/models/schemasprice.js.map +1 -1
  174. package/dist/esm/models/subscriptionadjustment.d.ts +49 -0
  175. package/dist/esm/models/subscriptionadjustment.d.ts.map +1 -0
  176. package/dist/esm/models/subscriptionadjustment.js +31 -0
  177. package/dist/esm/models/subscriptionadjustment.js.map +1 -0
  178. package/dist/esm/models/subscriptionadjustmentsresponse.d.ts +16 -0
  179. package/dist/esm/models/subscriptionadjustmentsresponse.d.ts.map +1 -0
  180. package/dist/esm/models/subscriptionadjustmentsresponse.js +16 -0
  181. package/dist/esm/models/subscriptionadjustmentsresponse.js.map +1 -0
  182. package/dist/esm/sdk/subscriptions.d.ts +21 -0
  183. package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
  184. package/dist/esm/sdk/subscriptions.js +30 -0
  185. package/dist/esm/sdk/subscriptions.js.map +1 -1
  186. package/jsr.json +1 -1
  187. package/package.json +1 -1
  188. package/src/funcs/pricesUpdate.ts +5 -1
  189. package/src/funcs/subscriptionsCreateSubscriptionAdjustment.ts +186 -0
  190. package/src/funcs/subscriptionsDeleteSubscriptionAdjustment.ts +185 -0
  191. package/src/funcs/subscriptionsListSubscriptionAdjustments.ts +183 -0
  192. package/src/lib/config.ts +2 -2
  193. package/src/models/createsubscriptionadjustmentrequest.ts +85 -0
  194. package/src/models/errors/index.ts +1 -0
  195. package/src/models/errors/updateprice.ts +71 -0
  196. package/src/models/index.ts +4 -1
  197. package/src/models/operations/createprice.ts +10 -4
  198. package/src/models/operations/createsubscriptionadjustment.ts +48 -0
  199. package/src/models/operations/deletesubscriptionadjustment.ts +42 -0
  200. package/src/models/operations/index.ts +3 -0
  201. package/src/models/operations/listsubscriptionadjustments.ts +48 -0
  202. package/src/models/operations/updateprice.ts +40 -4
  203. package/src/models/planversionpriceslot.ts +5 -0
  204. package/src/models/price.ts +5 -0
  205. package/src/models/pricemodel.ts +2 -2
  206. package/src/models/pricemodelinput.ts +3 -2
  207. package/src/models/priceproperties.ts +325 -0
  208. package/src/models/schemasprice.ts +11 -6
  209. package/src/models/subscriptionadjustment.ts +94 -0
  210. package/src/models/subscriptionadjustmentsresponse.ts +44 -0
  211. package/src/sdk/subscriptions.ts +54 -0
  212. package/dist/commonjs/models/pricepropertiesunion.d.ts +0 -152
  213. package/dist/commonjs/models/pricepropertiesunion.d.ts.map +0 -1
  214. package/dist/commonjs/models/pricepropertiesunion.js +0 -169
  215. package/dist/commonjs/models/pricepropertiesunion.js.map +0 -1
  216. package/dist/esm/models/pricepropertiesunion.d.ts +0 -152
  217. package/dist/esm/models/pricepropertiesunion.d.ts.map +0 -1
  218. package/dist/esm/models/pricepropertiesunion.js +0 -121
  219. package/dist/esm/models/pricepropertiesunion.js.map +0 -1
  220. package/src/models/pricepropertiesunion.ts +0 -364
@@ -1,364 +0,0 @@
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 { ClosedEnum } from "../types/enums.js";
8
- import { Result as SafeParseResult } from "../types/fp.js";
9
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * Percentage pricing model
13
- */
14
- export type PriceProperties4 = {
15
- /**
16
- * Ceiling amount limiting total charge regardless of percentage calculation. Sample values: '500.00' caps fees at $500 maximum, '2000.00' limits charges to $2000 per period
17
- */
18
- maxCharge: string;
19
- /**
20
- * Floor amount charged regardless of percentage calculation. Sample values: '5.00' ensures minimum $5 fee, '25.00' guarantees at least $25 per billing event
21
- */
22
- minCharge: string;
23
- /**
24
- * Rate expressed as decimal between 0 and 10, supporting up to 4 decimal precision. Sample values: '0.03' represents 3%, '0.075' represents 7.5%, '1.10' represents 110%
25
- */
26
- percentage: string;
27
- };
28
-
29
- /**
30
- * Function used for volume pricing calculations
31
- */
32
- export const FunctionT = {
33
- Linear: "linear",
34
- } as const;
35
- /**
36
- * Function used for volume pricing calculations
37
- */
38
- export type FunctionT = ClosedEnum<typeof FunctionT>;
39
-
40
- export type ParametersT = {
41
- /**
42
- * Function used for volume pricing calculations
43
- */
44
- function: FunctionT;
45
- /**
46
- * Gradient for volume pricing calculations
47
- */
48
- gradient: string;
49
- /**
50
- * Maximum value for volume pricing
51
- */
52
- max: string;
53
- /**
54
- * Minimum value for volume pricing
55
- */
56
- min: string;
57
- };
58
-
59
- /**
60
- * Volume pricing model
61
- */
62
- export type PriceProperties3 = {
63
- /**
64
- * Default value for volume pricing
65
- */
66
- default: string;
67
- parameters: ParametersT;
68
- };
69
-
70
- /**
71
- * Dynamic pricing model
72
- */
73
- export type PriceProperties2 = {
74
- /**
75
- * Upper limit of the price range for dynamic pricing. Sample values: '0.10' means $0.10 per token for large volumes at peak times
76
- */
77
- maxPrice: string;
78
- /**
79
- * Lower limit of the price range for dynamic pricing. Sample values: '0.01' means $0.01 per token for low volumes during off-peak hours
80
- */
81
- minPrice: string;
82
- };
83
-
84
- /**
85
- * Standard pricing model
86
- */
87
- export type PriceProperties1 = {
88
- /**
89
- * Per-unit cost in decimal format for fixed-rate pricing. Sample values: '0.00002' represents $0.00002 per token, '0.15' represents $0.15 per gigabyte stored, '0.05' represents $0.05 per API call. Per unit. Total per period = quantity × unitPrice; see the `quantity` field. A negative value defines a usage-scaled rebate: the line's subtotal is negative and reduces the invoice. A rebate never drives an invoice total below zero, so set rebate rates below the charges they offset. A negative unitPrice is only valid on a metered price (a billableMetricId is required — there is no usage to scale on a fee price) and cannot be combined with grantDiscountEnabled, a hard-limit feature, or a pricingUnitId. When a rebate and a charge price share a billable metric but attach to different features, they compute against different quantity bases: a price attached to a feature bills the overage against its allowance, while a featureless price bills the raw metered usage. That is a permitted configuration, not an error. Attach both to the same feature to bill them against one basis.
90
- */
91
- unitPrice: string;
92
- };
93
-
94
- export type PricePropertiesUnion =
95
- | PriceProperties4
96
- | PriceProperties2
97
- | PriceProperties3
98
- | PriceProperties1;
99
-
100
- /** @internal */
101
- export const PriceProperties4$inboundSchema: z.ZodType<
102
- PriceProperties4,
103
- z.ZodTypeDef,
104
- unknown
105
- > = z.object({
106
- maxCharge: z.string(),
107
- minCharge: z.string(),
108
- percentage: z.string(),
109
- });
110
- /** @internal */
111
- export type PriceProperties4$Outbound = {
112
- maxCharge: string;
113
- minCharge: string;
114
- percentage: string;
115
- };
116
-
117
- /** @internal */
118
- export const PriceProperties4$outboundSchema: z.ZodType<
119
- PriceProperties4$Outbound,
120
- z.ZodTypeDef,
121
- PriceProperties4
122
- > = z.object({
123
- maxCharge: z.string(),
124
- minCharge: z.string(),
125
- percentage: z.string(),
126
- });
127
-
128
- export function priceProperties4ToJSON(
129
- priceProperties4: PriceProperties4,
130
- ): string {
131
- return JSON.stringify(
132
- PriceProperties4$outboundSchema.parse(priceProperties4),
133
- );
134
- }
135
- export function priceProperties4FromJSON(
136
- jsonString: string,
137
- ): SafeParseResult<PriceProperties4, SDKValidationError> {
138
- return safeParse(
139
- jsonString,
140
- (x) => PriceProperties4$inboundSchema.parse(JSON.parse(x)),
141
- `Failed to parse 'PriceProperties4' from JSON`,
142
- );
143
- }
144
-
145
- /** @internal */
146
- export const FunctionT$inboundSchema: z.ZodNativeEnum<typeof FunctionT> = z
147
- .nativeEnum(FunctionT);
148
- /** @internal */
149
- export const FunctionT$outboundSchema: z.ZodNativeEnum<typeof FunctionT> =
150
- FunctionT$inboundSchema;
151
-
152
- /** @internal */
153
- export const ParametersT$inboundSchema: z.ZodType<
154
- ParametersT,
155
- z.ZodTypeDef,
156
- unknown
157
- > = z.object({
158
- function: FunctionT$inboundSchema,
159
- gradient: z.string(),
160
- max: z.string(),
161
- min: z.string(),
162
- });
163
- /** @internal */
164
- export type ParametersT$Outbound = {
165
- function: string;
166
- gradient: string;
167
- max: string;
168
- min: string;
169
- };
170
-
171
- /** @internal */
172
- export const ParametersT$outboundSchema: z.ZodType<
173
- ParametersT$Outbound,
174
- z.ZodTypeDef,
175
- ParametersT
176
- > = z.object({
177
- function: FunctionT$outboundSchema,
178
- gradient: z.string(),
179
- max: z.string(),
180
- min: z.string(),
181
- });
182
-
183
- export function parametersToJSON(parametersT: ParametersT): string {
184
- return JSON.stringify(ParametersT$outboundSchema.parse(parametersT));
185
- }
186
- export function parametersFromJSON(
187
- jsonString: string,
188
- ): SafeParseResult<ParametersT, SDKValidationError> {
189
- return safeParse(
190
- jsonString,
191
- (x) => ParametersT$inboundSchema.parse(JSON.parse(x)),
192
- `Failed to parse 'ParametersT' from JSON`,
193
- );
194
- }
195
-
196
- /** @internal */
197
- export const PriceProperties3$inboundSchema: z.ZodType<
198
- PriceProperties3,
199
- z.ZodTypeDef,
200
- unknown
201
- > = z.object({
202
- default: z.string(),
203
- parameters: z.lazy(() => ParametersT$inboundSchema),
204
- });
205
- /** @internal */
206
- export type PriceProperties3$Outbound = {
207
- default: string;
208
- parameters: ParametersT$Outbound;
209
- };
210
-
211
- /** @internal */
212
- export const PriceProperties3$outboundSchema: z.ZodType<
213
- PriceProperties3$Outbound,
214
- z.ZodTypeDef,
215
- PriceProperties3
216
- > = z.object({
217
- default: z.string(),
218
- parameters: z.lazy(() => ParametersT$outboundSchema),
219
- });
220
-
221
- export function priceProperties3ToJSON(
222
- priceProperties3: PriceProperties3,
223
- ): string {
224
- return JSON.stringify(
225
- PriceProperties3$outboundSchema.parse(priceProperties3),
226
- );
227
- }
228
- export function priceProperties3FromJSON(
229
- jsonString: string,
230
- ): SafeParseResult<PriceProperties3, SDKValidationError> {
231
- return safeParse(
232
- jsonString,
233
- (x) => PriceProperties3$inboundSchema.parse(JSON.parse(x)),
234
- `Failed to parse 'PriceProperties3' from JSON`,
235
- );
236
- }
237
-
238
- /** @internal */
239
- export const PriceProperties2$inboundSchema: z.ZodType<
240
- PriceProperties2,
241
- z.ZodTypeDef,
242
- unknown
243
- > = z.object({
244
- maxPrice: z.string(),
245
- minPrice: z.string(),
246
- });
247
- /** @internal */
248
- export type PriceProperties2$Outbound = {
249
- maxPrice: string;
250
- minPrice: string;
251
- };
252
-
253
- /** @internal */
254
- export const PriceProperties2$outboundSchema: z.ZodType<
255
- PriceProperties2$Outbound,
256
- z.ZodTypeDef,
257
- PriceProperties2
258
- > = z.object({
259
- maxPrice: z.string(),
260
- minPrice: z.string(),
261
- });
262
-
263
- export function priceProperties2ToJSON(
264
- priceProperties2: PriceProperties2,
265
- ): string {
266
- return JSON.stringify(
267
- PriceProperties2$outboundSchema.parse(priceProperties2),
268
- );
269
- }
270
- export function priceProperties2FromJSON(
271
- jsonString: string,
272
- ): SafeParseResult<PriceProperties2, SDKValidationError> {
273
- return safeParse(
274
- jsonString,
275
- (x) => PriceProperties2$inboundSchema.parse(JSON.parse(x)),
276
- `Failed to parse 'PriceProperties2' from JSON`,
277
- );
278
- }
279
-
280
- /** @internal */
281
- export const PriceProperties1$inboundSchema: z.ZodType<
282
- PriceProperties1,
283
- z.ZodTypeDef,
284
- unknown
285
- > = z.object({
286
- unitPrice: z.string(),
287
- });
288
- /** @internal */
289
- export type PriceProperties1$Outbound = {
290
- unitPrice: string;
291
- };
292
-
293
- /** @internal */
294
- export const PriceProperties1$outboundSchema: z.ZodType<
295
- PriceProperties1$Outbound,
296
- z.ZodTypeDef,
297
- PriceProperties1
298
- > = z.object({
299
- unitPrice: z.string(),
300
- });
301
-
302
- export function priceProperties1ToJSON(
303
- priceProperties1: PriceProperties1,
304
- ): string {
305
- return JSON.stringify(
306
- PriceProperties1$outboundSchema.parse(priceProperties1),
307
- );
308
- }
309
- export function priceProperties1FromJSON(
310
- jsonString: string,
311
- ): SafeParseResult<PriceProperties1, SDKValidationError> {
312
- return safeParse(
313
- jsonString,
314
- (x) => PriceProperties1$inboundSchema.parse(JSON.parse(x)),
315
- `Failed to parse 'PriceProperties1' from JSON`,
316
- );
317
- }
318
-
319
- /** @internal */
320
- export const PricePropertiesUnion$inboundSchema: z.ZodType<
321
- PricePropertiesUnion,
322
- z.ZodTypeDef,
323
- unknown
324
- > = z.union([
325
- z.lazy(() => PriceProperties4$inboundSchema),
326
- z.lazy(() => PriceProperties2$inboundSchema),
327
- z.lazy(() => PriceProperties3$inboundSchema),
328
- z.lazy(() => PriceProperties1$inboundSchema),
329
- ]);
330
- /** @internal */
331
- export type PricePropertiesUnion$Outbound =
332
- | PriceProperties4$Outbound
333
- | PriceProperties2$Outbound
334
- | PriceProperties3$Outbound
335
- | PriceProperties1$Outbound;
336
-
337
- /** @internal */
338
- export const PricePropertiesUnion$outboundSchema: z.ZodType<
339
- PricePropertiesUnion$Outbound,
340
- z.ZodTypeDef,
341
- PricePropertiesUnion
342
- > = z.union([
343
- z.lazy(() => PriceProperties4$outboundSchema),
344
- z.lazy(() => PriceProperties2$outboundSchema),
345
- z.lazy(() => PriceProperties3$outboundSchema),
346
- z.lazy(() => PriceProperties1$outboundSchema),
347
- ]);
348
-
349
- export function pricePropertiesUnionToJSON(
350
- pricePropertiesUnion: PricePropertiesUnion,
351
- ): string {
352
- return JSON.stringify(
353
- PricePropertiesUnion$outboundSchema.parse(pricePropertiesUnion),
354
- );
355
- }
356
- export function pricePropertiesUnionFromJSON(
357
- jsonString: string,
358
- ): SafeParseResult<PricePropertiesUnion, SDKValidationError> {
359
- return safeParse(
360
- jsonString,
361
- (x) => PricePropertiesUnion$inboundSchema.parse(JSON.parse(x)),
362
- `Failed to parse 'PricePropertiesUnion' from JSON`,
363
- );
364
- }