@moovio/sdk 26.4.0 → 26.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/README.md +73 -59
  2. package/bin/mcp-server.js +1320 -514
  3. package/bin/mcp-server.js.map +50 -27
  4. package/funcs/googlePayLinkToken.d.ts +3 -1
  5. package/funcs/googlePayLinkToken.d.ts.map +1 -1
  6. package/funcs/googlePayLinkToken.js +3 -1
  7. package/funcs/googlePayLinkToken.js.map +1 -1
  8. package/funcs/transferConfigCreate.d.ts +15 -0
  9. package/funcs/transferConfigCreate.d.ts.map +1 -0
  10. package/funcs/transferConfigCreate.js +128 -0
  11. package/funcs/transferConfigCreate.js.map +1 -0
  12. package/funcs/transferConfigGet.d.ts +14 -0
  13. package/funcs/transferConfigGet.d.ts.map +1 -0
  14. package/funcs/transferConfigGet.js +122 -0
  15. package/funcs/transferConfigGet.js.map +1 -0
  16. package/funcs/transferConfigUpdate.d.ts +15 -0
  17. package/funcs/transferConfigUpdate.d.ts.map +1 -0
  18. package/funcs/transferConfigUpdate.js +126 -0
  19. package/funcs/transferConfigUpdate.js.map +1 -0
  20. package/jsr.json +1 -1
  21. package/lib/config.d.ts +3 -3
  22. package/lib/config.js +3 -3
  23. package/mcp-server/mcp-server.js +1 -1
  24. package/mcp-server/server.d.ts.map +1 -1
  25. package/mcp-server/server.js +7 -1
  26. package/mcp-server/server.js.map +1 -1
  27. package/mcp-server/tools/googlePayLinkToken.d.ts.map +1 -1
  28. package/mcp-server/tools/googlePayLinkToken.js +3 -1
  29. package/mcp-server/tools/googlePayLinkToken.js.map +1 -1
  30. package/mcp-server/tools/transferConfigCreate.d.ts +8 -0
  31. package/mcp-server/tools/transferConfigCreate.d.ts.map +1 -0
  32. package/mcp-server/tools/transferConfigCreate.js +62 -0
  33. package/mcp-server/tools/transferConfigCreate.js.map +1 -0
  34. package/mcp-server/tools/transferConfigGet.d.ts +8 -0
  35. package/mcp-server/tools/transferConfigGet.d.ts.map +1 -0
  36. package/mcp-server/tools/transferConfigGet.js +62 -0
  37. package/mcp-server/tools/transferConfigGet.js.map +1 -0
  38. package/mcp-server/tools/transferConfigUpdate.d.ts +8 -0
  39. package/mcp-server/tools/transferConfigUpdate.d.ts.map +1 -0
  40. package/mcp-server/tools/transferConfigUpdate.js +62 -0
  41. package/mcp-server/tools/transferConfigUpdate.js.map +1 -0
  42. package/models/components/createdtransfer.d.ts +4 -1
  43. package/models/components/createdtransfer.d.ts.map +1 -1
  44. package/models/components/createdtransfer.js +3 -0
  45. package/models/components/createdtransfer.js.map +1 -1
  46. package/models/components/createpaymentlink.d.ts +13 -0
  47. package/models/components/createpaymentlink.d.ts.map +1 -1
  48. package/models/components/createpaymentlink.js.map +1 -1
  49. package/models/components/createtippresets.d.ts +36 -0
  50. package/models/components/createtippresets.d.ts.map +1 -0
  51. package/models/components/createtippresets.js +64 -0
  52. package/models/components/createtippresets.js.map +1 -0
  53. package/models/components/createtransfer.d.ts +3 -3
  54. package/models/components/createtransfer.d.ts.map +1 -1
  55. package/models/components/createtransfer.js +3 -0
  56. package/models/components/createtransfer.js.map +1 -1
  57. package/models/components/createtransferamountdetails.d.ts +21 -0
  58. package/models/components/createtransferamountdetails.d.ts.map +1 -0
  59. package/models/components/createtransferamountdetails.js +59 -0
  60. package/models/components/createtransferamountdetails.js.map +1 -0
  61. package/models/components/createtransferamountdetailsvalidationerror.d.ts +17 -0
  62. package/models/components/createtransferamountdetailsvalidationerror.d.ts.map +1 -0
  63. package/models/components/createtransferamountdetailsvalidationerror.js +58 -0
  64. package/models/components/createtransferamountdetailsvalidationerror.js.map +1 -0
  65. package/models/components/createtransferconfig.d.ts +18 -0
  66. package/models/components/createtransferconfig.d.ts.map +1 -0
  67. package/models/components/{googlepayintermediatesigningkey.js → createtransferconfig.js} +13 -14
  68. package/models/components/createtransferconfig.js.map +1 -0
  69. package/models/components/googlepayassurancedetails.d.ts +28 -0
  70. package/models/components/googlepayassurancedetails.d.ts.map +1 -0
  71. package/models/components/googlepayassurancedetails.js +60 -0
  72. package/models/components/googlepayassurancedetails.js.map +1 -0
  73. package/models/components/googlepaybillingaddress.d.ts +73 -0
  74. package/models/components/googlepaybillingaddress.d.ts.map +1 -0
  75. package/models/components/googlepaybillingaddress.js +76 -0
  76. package/models/components/googlepaybillingaddress.js.map +1 -0
  77. package/models/components/googlepaycardinfo.d.ts +91 -0
  78. package/models/components/googlepaycardinfo.d.ts.map +1 -0
  79. package/models/components/googlepaycardinfo.js +98 -0
  80. package/models/components/googlepaycardinfo.js.map +1 -0
  81. package/models/components/googlepaypaymentmethoddata.d.ts +65 -0
  82. package/models/components/googlepaypaymentmethoddata.d.ts.map +1 -0
  83. package/models/components/googlepaypaymentmethoddata.js +76 -0
  84. package/models/components/googlepaypaymentmethoddata.js.map +1 -0
  85. package/models/components/googlepaytokenizationdata.d.ts +47 -0
  86. package/models/components/googlepaytokenizationdata.d.ts.map +1 -0
  87. package/models/components/googlepaytokenizationdata.js +70 -0
  88. package/models/components/googlepaytokenizationdata.js.map +1 -0
  89. package/models/components/index.d.ts +15 -2
  90. package/models/components/index.d.ts.map +1 -1
  91. package/models/components/index.js +15 -2
  92. package/models/components/index.js.map +1 -1
  93. package/models/components/linkedgooglepaypaymentmethod.d.ts +5 -10
  94. package/models/components/linkedgooglepaypaymentmethod.d.ts.map +1 -1
  95. package/models/components/linkedgooglepaypaymentmethod.js +4 -11
  96. package/models/components/linkedgooglepaypaymentmethod.js.map +1 -1
  97. package/models/components/linkgooglepay.d.ts +17 -9
  98. package/models/components/linkgooglepay.d.ts.map +1 -1
  99. package/models/components/linkgooglepay.js +5 -3
  100. package/models/components/linkgooglepay.js.map +1 -1
  101. package/models/components/paymentlink.d.ts +10 -0
  102. package/models/components/paymentlink.d.ts.map +1 -1
  103. package/models/components/paymentlink.js.map +1 -1
  104. package/models/components/paymentlinkcustomeroptions.d.ts +5 -0
  105. package/models/components/paymentlinkcustomeroptions.d.ts.map +1 -1
  106. package/models/components/paymentlinkcustomeroptions.js +2 -0
  107. package/models/components/paymentlinkcustomeroptions.js.map +1 -1
  108. package/models/components/puttippresets.d.ts +36 -0
  109. package/models/components/puttippresets.d.ts.map +1 -0
  110. package/models/components/puttippresets.js +64 -0
  111. package/models/components/puttippresets.js.map +1 -0
  112. package/models/components/puttransferconfig.d.ts +18 -0
  113. package/models/components/puttransferconfig.d.ts.map +1 -0
  114. package/models/components/puttransferconfig.js +59 -0
  115. package/models/components/puttransferconfig.js.map +1 -0
  116. package/models/components/tipcalculationbasis.d.ts +26 -0
  117. package/models/components/tipcalculationbasis.d.ts.map +1 -0
  118. package/models/components/tipcalculationbasis.js +56 -0
  119. package/models/components/tipcalculationbasis.js.map +1 -0
  120. package/models/components/tippresets.d.ts +39 -0
  121. package/models/components/tippresets.d.ts.map +1 -0
  122. package/models/components/tippresets.js +64 -0
  123. package/models/components/tippresets.js.map +1 -0
  124. package/models/components/transfer.d.ts +3 -3
  125. package/models/components/transfer.d.ts.map +1 -1
  126. package/models/components/transfer.js +3 -0
  127. package/models/components/transfer.js.map +1 -1
  128. package/models/components/transferamountdetails.d.ts +21 -0
  129. package/models/components/transferamountdetails.d.ts.map +1 -0
  130. package/models/components/transferamountdetails.js +59 -0
  131. package/models/components/transferamountdetails.js.map +1 -0
  132. package/models/components/transferconfig.d.ts +24 -0
  133. package/models/components/transferconfig.d.ts.map +1 -0
  134. package/models/components/{googlepaytoken.js → transferconfig.js} +13 -19
  135. package/models/components/transferconfig.js.map +1 -0
  136. package/models/components/transferdestination.d.ts +6 -0
  137. package/models/components/transferdestination.d.ts.map +1 -1
  138. package/models/components/transferdestination.js +3 -0
  139. package/models/components/transferdestination.js.map +1 -1
  140. package/models/components/transfersource.d.ts +6 -0
  141. package/models/components/transfersource.d.ts.map +1 -1
  142. package/models/components/transfersource.js +3 -0
  143. package/models/components/transfersource.js.map +1 -1
  144. package/models/errors/index.d.ts +1 -0
  145. package/models/errors/index.d.ts.map +1 -1
  146. package/models/errors/index.js +1 -0
  147. package/models/errors/index.js.map +1 -1
  148. package/models/errors/linkgooglepayerror.d.ts +14 -5
  149. package/models/errors/linkgooglepayerror.d.ts.map +1 -1
  150. package/models/errors/linkgooglepayerror.js +10 -4
  151. package/models/errors/linkgooglepayerror.js.map +1 -1
  152. package/models/errors/transfer.d.ts +3 -6
  153. package/models/errors/transfer.d.ts.map +1 -1
  154. package/models/errors/transfer.js +4 -0
  155. package/models/errors/transfer.js.map +1 -1
  156. package/models/errors/transferconfigvalidationerror.d.ts +43 -0
  157. package/models/errors/transferconfigvalidationerror.d.ts.map +1 -0
  158. package/models/errors/transferconfigvalidationerror.js +99 -0
  159. package/models/errors/transferconfigvalidationerror.js.map +1 -0
  160. package/models/errors/transfervalidationerror.d.ts +3 -0
  161. package/models/errors/transfervalidationerror.d.ts.map +1 -1
  162. package/models/errors/transfervalidationerror.js +6 -0
  163. package/models/errors/transfervalidationerror.js.map +1 -1
  164. package/models/operations/createtransferconfig.d.ts +42 -0
  165. package/models/operations/createtransferconfig.d.ts.map +1 -0
  166. package/models/operations/createtransferconfig.js +98 -0
  167. package/models/operations/createtransferconfig.js.map +1 -0
  168. package/models/operations/gettransferconfig.d.ts +37 -0
  169. package/models/operations/gettransferconfig.d.ts.map +1 -0
  170. package/models/operations/gettransferconfig.js +88 -0
  171. package/models/operations/gettransferconfig.js.map +1 -0
  172. package/models/operations/index.d.ts +3 -0
  173. package/models/operations/index.d.ts.map +1 -1
  174. package/models/operations/index.js +3 -0
  175. package/models/operations/index.js.map +1 -1
  176. package/models/operations/updatetransferconfig.d.ts +39 -0
  177. package/models/operations/updatetransferconfig.d.ts.map +1 -0
  178. package/models/operations/updatetransferconfig.js +98 -0
  179. package/models/operations/updatetransferconfig.js.map +1 -0
  180. package/package.json +1 -1
  181. package/sdk/googlepay.d.ts +3 -1
  182. package/sdk/googlepay.d.ts.map +1 -1
  183. package/sdk/googlepay.js +3 -1
  184. package/sdk/googlepay.js.map +1 -1
  185. package/sdk/sdk.d.ts +3 -0
  186. package/sdk/sdk.d.ts.map +1 -1
  187. package/sdk/sdk.js +4 -0
  188. package/sdk/sdk.js.map +1 -1
  189. package/sdk/transferconfig.d.ts +17 -0
  190. package/sdk/transferconfig.d.ts.map +1 -0
  191. package/sdk/transferconfig.js +33 -0
  192. package/sdk/transferconfig.js.map +1 -0
  193. package/src/funcs/googlePayLinkToken.ts +3 -1
  194. package/src/funcs/transferConfigCreate.ts +187 -0
  195. package/src/funcs/transferConfigGet.ts +172 -0
  196. package/src/funcs/transferConfigUpdate.ts +185 -0
  197. package/src/lib/config.ts +3 -3
  198. package/src/mcp-server/mcp-server.ts +1 -1
  199. package/src/mcp-server/server.ts +7 -1
  200. package/src/mcp-server/tools/googlePayLinkToken.ts +3 -1
  201. package/src/mcp-server/tools/transferConfigCreate.ts +35 -0
  202. package/src/mcp-server/tools/transferConfigGet.ts +35 -0
  203. package/src/mcp-server/tools/transferConfigUpdate.ts +35 -0
  204. package/src/models/components/createdtransfer.ts +11 -1
  205. package/src/models/components/createpaymentlink.ts +13 -0
  206. package/src/models/components/createtippresets.ts +83 -0
  207. package/src/models/components/createtransfer.ts +10 -3
  208. package/src/models/components/createtransferamountdetails.ts +62 -0
  209. package/src/models/components/createtransferamountdetailsvalidationerror.ts +59 -0
  210. package/src/models/components/createtransferconfig.ts +57 -0
  211. package/src/models/components/googlepayassurancedetails.ts +64 -0
  212. package/src/models/components/googlepaybillingaddress.ts +125 -0
  213. package/src/models/components/googlepaycardinfo.ts +153 -0
  214. package/src/models/components/googlepaypaymentmethoddata.ts +120 -0
  215. package/src/models/components/googlepaytokenizationdata.ts +91 -0
  216. package/src/models/components/index.ts +15 -2
  217. package/src/models/components/linkedgooglepaypaymentmethod.ts +11 -22
  218. package/src/models/components/linkgooglepay.ts +25 -15
  219. package/src/models/components/paymentlink.ts +10 -0
  220. package/src/models/components/paymentlinkcustomeroptions.ts +7 -0
  221. package/src/models/components/puttippresets.ts +79 -0
  222. package/src/models/components/puttransferconfig.ts +57 -0
  223. package/src/models/components/tipcalculationbasis.ts +35 -0
  224. package/src/models/components/tippresets.ts +82 -0
  225. package/src/models/components/transfer.ts +10 -3
  226. package/src/models/components/transferamountdetails.ts +60 -0
  227. package/src/models/components/transferconfig.ts +59 -0
  228. package/src/models/components/transferdestination.ts +13 -0
  229. package/src/models/components/transfersource.ts +13 -0
  230. package/src/models/errors/index.ts +1 -0
  231. package/src/models/errors/linkgooglepayerror.ts +24 -8
  232. package/src/models/errors/transfer.ts +6 -6
  233. package/src/models/errors/transferconfigvalidationerror.ts +110 -0
  234. package/src/models/errors/transfervalidationerror.ts +14 -0
  235. package/src/models/operations/createtransferconfig.ts +129 -0
  236. package/src/models/operations/gettransferconfig.ts +110 -0
  237. package/src/models/operations/index.ts +3 -0
  238. package/src/models/operations/updatetransferconfig.ts +126 -0
  239. package/src/sdk/googlepay.ts +3 -1
  240. package/src/sdk/sdk.ts +6 -0
  241. package/src/sdk/transferconfig.ts +54 -0
  242. package/models/components/googlepayintermediatesigningkey.d.ts +0 -28
  243. package/models/components/googlepayintermediatesigningkey.d.ts.map +0 -1
  244. package/models/components/googlepayintermediatesigningkey.js.map +0 -1
  245. package/models/components/googlepaytoken.d.ts +0 -44
  246. package/models/components/googlepaytoken.d.ts.map +0 -1
  247. package/models/components/googlepaytoken.js.map +0 -1
  248. package/src/models/components/googlepayintermediatesigningkey.ts +0 -66
  249. package/src/models/components/googlepaytoken.ts +0 -85
@@ -0,0 +1,79 @@
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
+ import {
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
15
+ import {
16
+ TipCalculationBasis,
17
+ TipCalculationBasis$inboundSchema,
18
+ TipCalculationBasis$outboundSchema,
19
+ } from "./tipcalculationbasis.js";
20
+
21
+ export type PutTipPresets = {
22
+ /**
23
+ * Defines which amount should be used when calculating the final payment total. This calculation applies for percentage tip values.
24
+ *
25
+ * @remarks
26
+ * - `pre-tax`: Tip amounts are calculated using the subtotal amount before taxes
27
+ * - `post-tax`: Tip amounts are calculated using the subtotal amount + taxes
28
+ */
29
+ calculationBasis?: TipCalculationBasis | undefined;
30
+ /**
31
+ * Defines the set of suggested tip preset values presented to customers. Percentages must be between 0 and 100 (exclusive) and must be unique. A maximum of 3 values are allowed.
32
+ */
33
+ percentageOptions?: Array<number> | undefined;
34
+ /**
35
+ * Defines the set of suggested tip preset values presented to customers. Fixed amounts must be positive and unique. A maximum of 3 values are allowed.
36
+ */
37
+ fixedAmountOptions?: Array<AmountDecimal> | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const PutTipPresets$inboundSchema: z.ZodType<
42
+ PutTipPresets,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ calculationBasis: TipCalculationBasis$inboundSchema.optional(),
47
+ percentageOptions: z.array(z.number().int()).optional(),
48
+ fixedAmountOptions: z.array(AmountDecimal$inboundSchema).optional(),
49
+ });
50
+ /** @internal */
51
+ export type PutTipPresets$Outbound = {
52
+ calculationBasis?: string | undefined;
53
+ percentageOptions?: Array<number> | undefined;
54
+ fixedAmountOptions?: Array<AmountDecimal$Outbound> | undefined;
55
+ };
56
+
57
+ /** @internal */
58
+ export const PutTipPresets$outboundSchema: z.ZodType<
59
+ PutTipPresets$Outbound,
60
+ z.ZodTypeDef,
61
+ PutTipPresets
62
+ > = z.object({
63
+ calculationBasis: TipCalculationBasis$outboundSchema.optional(),
64
+ percentageOptions: z.array(z.number().int()).optional(),
65
+ fixedAmountOptions: z.array(AmountDecimal$outboundSchema).optional(),
66
+ });
67
+
68
+ export function putTipPresetsToJSON(putTipPresets: PutTipPresets): string {
69
+ return JSON.stringify(PutTipPresets$outboundSchema.parse(putTipPresets));
70
+ }
71
+ export function putTipPresetsFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<PutTipPresets, SDKValidationError> {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) => PutTipPresets$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'PutTipPresets' from JSON`,
78
+ );
79
+ }
@@ -0,0 +1,57 @@
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
+ import {
10
+ PutTipPresets,
11
+ PutTipPresets$inboundSchema,
12
+ PutTipPresets$Outbound,
13
+ PutTipPresets$outboundSchema,
14
+ } from "./puttippresets.js";
15
+
16
+ export type PutTransferConfig = {
17
+ tipPresets: PutTipPresets;
18
+ };
19
+
20
+ /** @internal */
21
+ export const PutTransferConfig$inboundSchema: z.ZodType<
22
+ PutTransferConfig,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ tipPresets: PutTipPresets$inboundSchema,
27
+ });
28
+ /** @internal */
29
+ export type PutTransferConfig$Outbound = {
30
+ tipPresets: PutTipPresets$Outbound;
31
+ };
32
+
33
+ /** @internal */
34
+ export const PutTransferConfig$outboundSchema: z.ZodType<
35
+ PutTransferConfig$Outbound,
36
+ z.ZodTypeDef,
37
+ PutTransferConfig
38
+ > = z.object({
39
+ tipPresets: PutTipPresets$outboundSchema,
40
+ });
41
+
42
+ export function putTransferConfigToJSON(
43
+ putTransferConfig: PutTransferConfig,
44
+ ): string {
45
+ return JSON.stringify(
46
+ PutTransferConfig$outboundSchema.parse(putTransferConfig),
47
+ );
48
+ }
49
+ export function putTransferConfigFromJSON(
50
+ jsonString: string,
51
+ ): SafeParseResult<PutTransferConfig, SDKValidationError> {
52
+ return safeParse(
53
+ jsonString,
54
+ (x) => PutTransferConfig$inboundSchema.parse(JSON.parse(x)),
55
+ `Failed to parse 'PutTransferConfig' from JSON`,
56
+ );
57
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Defines which amount should be used when calculating the final payment total. This calculation applies for percentage tip values.
10
+ *
11
+ * @remarks
12
+ * - `pre-tax`: Tip amounts are calculated using the subtotal amount before taxes
13
+ * - `post-tax`: Tip amounts are calculated using the subtotal amount + taxes
14
+ */
15
+ export const TipCalculationBasis = {
16
+ PreTax: "pre-tax",
17
+ PostTax: "post-tax",
18
+ } as const;
19
+ /**
20
+ * Defines which amount should be used when calculating the final payment total. This calculation applies for percentage tip values.
21
+ *
22
+ * @remarks
23
+ * - `pre-tax`: Tip amounts are calculated using the subtotal amount before taxes
24
+ * - `post-tax`: Tip amounts are calculated using the subtotal amount + taxes
25
+ */
26
+ export type TipCalculationBasis = ClosedEnum<typeof TipCalculationBasis>;
27
+
28
+ /** @internal */
29
+ export const TipCalculationBasis$inboundSchema: z.ZodNativeEnum<
30
+ typeof TipCalculationBasis
31
+ > = z.nativeEnum(TipCalculationBasis);
32
+ /** @internal */
33
+ export const TipCalculationBasis$outboundSchema: z.ZodNativeEnum<
34
+ typeof TipCalculationBasis
35
+ > = TipCalculationBasis$inboundSchema;
@@ -0,0 +1,82 @@
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
+ import {
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
15
+ import {
16
+ TipCalculationBasis,
17
+ TipCalculationBasis$inboundSchema,
18
+ TipCalculationBasis$outboundSchema,
19
+ } from "./tipcalculationbasis.js";
20
+
21
+ /**
22
+ * Tip presets when calculating tips for a transfer.
23
+ */
24
+ export type TipPresets = {
25
+ /**
26
+ * Defines which amount should be used when calculating the final payment total. This calculation applies for percentage tip values.
27
+ *
28
+ * @remarks
29
+ * - `pre-tax`: Tip amounts are calculated using the subtotal amount before taxes
30
+ * - `post-tax`: Tip amounts are calculated using the subtotal amount + taxes
31
+ */
32
+ calculationBasis?: TipCalculationBasis | undefined;
33
+ /**
34
+ * Defines the set of suggested tip preset values presented to customers. Percentages must be between 0 and 100 (exclusive) and must be unique. A maximum of 3 values are allowed.
35
+ */
36
+ percentageOptions?: Array<number> | undefined;
37
+ /**
38
+ * Defines the set of suggested tip preset values presented to customers. Fixed amounts must be positive and unique. A maximum of 3 values are allowed.
39
+ */
40
+ fixedAmountOptions?: Array<AmountDecimal> | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const TipPresets$inboundSchema: z.ZodType<
45
+ TipPresets,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ calculationBasis: TipCalculationBasis$inboundSchema.optional(),
50
+ percentageOptions: z.array(z.number().int()).optional(),
51
+ fixedAmountOptions: z.array(AmountDecimal$inboundSchema).optional(),
52
+ });
53
+ /** @internal */
54
+ export type TipPresets$Outbound = {
55
+ calculationBasis?: string | undefined;
56
+ percentageOptions?: Array<number> | undefined;
57
+ fixedAmountOptions?: Array<AmountDecimal$Outbound> | undefined;
58
+ };
59
+
60
+ /** @internal */
61
+ export const TipPresets$outboundSchema: z.ZodType<
62
+ TipPresets$Outbound,
63
+ z.ZodTypeDef,
64
+ TipPresets
65
+ > = z.object({
66
+ calculationBasis: TipCalculationBasis$outboundSchema.optional(),
67
+ percentageOptions: z.array(z.number().int()).optional(),
68
+ fixedAmountOptions: z.array(AmountDecimal$outboundSchema).optional(),
69
+ });
70
+
71
+ export function tipPresetsToJSON(tipPresets: TipPresets): string {
72
+ return JSON.stringify(TipPresets$outboundSchema.parse(tipPresets));
73
+ }
74
+ export function tipPresetsFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<TipPresets, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => TipPresets$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'TipPresets' from JSON`,
81
+ );
82
+ }
@@ -48,6 +48,12 @@ import {
48
48
  MoovFeeDetails$Outbound,
49
49
  MoovFeeDetails$outboundSchema,
50
50
  } from "./moovfeedetails.js";
51
+ import {
52
+ TransferAmountDetails,
53
+ TransferAmountDetails$inboundSchema,
54
+ TransferAmountDetails$Outbound,
55
+ TransferAmountDetails$outboundSchema,
56
+ } from "./transferamountdetails.js";
51
57
  import {
52
58
  TransferDestination,
53
59
  TransferDestination$inboundSchema,
@@ -136,9 +142,6 @@ export type Transfer = {
136
142
  scheduleID?: string | undefined;
137
143
  occurrenceID?: string | undefined;
138
144
  paymentLinkCode?: string | undefined;
139
- /**
140
- * Optional sales tax amount. `transfer.amount.value` should be inclusive of any sales tax and represents the total amount charged.
141
- */
142
145
  salesTaxAmount?: Amount | undefined;
143
146
  /**
144
147
  * Optional alias from a foreign/external system which can be used to reference this resource.
@@ -155,6 +158,7 @@ export type Transfer = {
155
158
  * ID of the invoice that the transfer is associated with.
156
159
  */
157
160
  invoiceID?: string | undefined;
161
+ amountDetails?: TransferAmountDetails | undefined;
158
162
  };
159
163
 
160
164
  /** @internal */
@@ -193,6 +197,7 @@ export const Transfer$inboundSchema: z.ZodType<
193
197
  foreignID: z.string().optional(),
194
198
  lineItems: TransferLineItems$inboundSchema.optional(),
195
199
  invoiceID: z.string().optional(),
200
+ amountDetails: TransferAmountDetails$inboundSchema.optional(),
196
201
  });
197
202
  /** @internal */
198
203
  export type Transfer$Outbound = {
@@ -225,6 +230,7 @@ export type Transfer$Outbound = {
225
230
  foreignID?: string | undefined;
226
231
  lineItems?: TransferLineItems$Outbound | undefined;
227
232
  invoiceID?: string | undefined;
233
+ amountDetails?: TransferAmountDetails$Outbound | undefined;
228
234
  };
229
235
 
230
236
  /** @internal */
@@ -262,6 +268,7 @@ export const Transfer$outboundSchema: z.ZodType<
262
268
  foreignID: z.string().optional(),
263
269
  lineItems: TransferLineItems$outboundSchema.optional(),
264
270
  invoiceID: z.string().optional(),
271
+ amountDetails: TransferAmountDetails$outboundSchema.optional(),
265
272
  });
266
273
 
267
274
  export function transferToJSON(transfer: Transfer): string {
@@ -0,0 +1,60 @@
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
+ import {
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
15
+
16
+ export type TransferAmountDetails = {
17
+ /**
18
+ * The amount of tip applied to the transfer.
19
+ */
20
+ tip?: AmountDecimal | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const TransferAmountDetails$inboundSchema: z.ZodType<
25
+ TransferAmountDetails,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ tip: AmountDecimal$inboundSchema.optional(),
30
+ });
31
+ /** @internal */
32
+ export type TransferAmountDetails$Outbound = {
33
+ tip?: AmountDecimal$Outbound | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const TransferAmountDetails$outboundSchema: z.ZodType<
38
+ TransferAmountDetails$Outbound,
39
+ z.ZodTypeDef,
40
+ TransferAmountDetails
41
+ > = z.object({
42
+ tip: AmountDecimal$outboundSchema.optional(),
43
+ });
44
+
45
+ export function transferAmountDetailsToJSON(
46
+ transferAmountDetails: TransferAmountDetails,
47
+ ): string {
48
+ return JSON.stringify(
49
+ TransferAmountDetails$outboundSchema.parse(transferAmountDetails),
50
+ );
51
+ }
52
+ export function transferAmountDetailsFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<TransferAmountDetails, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => TransferAmountDetails$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'TransferAmountDetails' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,59 @@
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
+ import {
10
+ TipPresets,
11
+ TipPresets$inboundSchema,
12
+ TipPresets$Outbound,
13
+ TipPresets$outboundSchema,
14
+ } from "./tippresets.js";
15
+
16
+ /**
17
+ * Configurable options for a transfer.
18
+ */
19
+ export type TransferConfig = {
20
+ /**
21
+ * Tip presets when calculating tips for a transfer.
22
+ */
23
+ tipPresets?: TipPresets | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const TransferConfig$inboundSchema: z.ZodType<
28
+ TransferConfig,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ tipPresets: TipPresets$inboundSchema.optional(),
33
+ });
34
+ /** @internal */
35
+ export type TransferConfig$Outbound = {
36
+ tipPresets?: TipPresets$Outbound | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const TransferConfig$outboundSchema: z.ZodType<
41
+ TransferConfig$Outbound,
42
+ z.ZodTypeDef,
43
+ TransferConfig
44
+ > = z.object({
45
+ tipPresets: TipPresets$outboundSchema.optional(),
46
+ });
47
+
48
+ export function transferConfigToJSON(transferConfig: TransferConfig): string {
49
+ return JSON.stringify(TransferConfig$outboundSchema.parse(transferConfig));
50
+ }
51
+ export function transferConfigFromJSON(
52
+ jsonString: string,
53
+ ): SafeParseResult<TransferConfig, SDKValidationError> {
54
+ return safeParse(
55
+ jsonString,
56
+ (x) => TransferConfig$inboundSchema.parse(JSON.parse(x)),
57
+ `Failed to parse 'TransferConfig' from JSON`,
58
+ );
59
+ }
@@ -24,6 +24,12 @@ import {
24
24
  CardTransactionDetails$Outbound,
25
25
  CardTransactionDetails$outboundSchema,
26
26
  } from "./cardtransactiondetails.js";
27
+ import {
28
+ GooglePayResponse,
29
+ GooglePayResponse$inboundSchema,
30
+ GooglePayResponse$Outbound,
31
+ GooglePayResponse$outboundSchema,
32
+ } from "./googlepayresponse.js";
27
33
  import {
28
34
  InstantBankTransactionDetails,
29
35
  InstantBankTransactionDetails$inboundSchema,
@@ -118,6 +124,10 @@ export type TransferDestination = {
118
124
  * Describes an Apple Pay token on a Moov account.
119
125
  */
120
126
  applePay?: ApplePayResponse | undefined;
127
+ /**
128
+ * Describes a Google Pay token on a Moov account.
129
+ */
130
+ googlePay?: GooglePayResponse | undefined;
121
131
  /**
122
132
  * Card-specific details about the transaction.
123
133
  */
@@ -204,6 +214,7 @@ export const TransferDestination$inboundSchema: z.ZodType<
204
214
  card: TransferPaymentMethodsCard$inboundSchema.optional(),
205
215
  achDetails: ACHTransactionDetails$inboundSchema.optional(),
206
216
  applePay: ApplePayResponse$inboundSchema.optional(),
217
+ googlePay: GooglePayResponse$inboundSchema.optional(),
207
218
  cardDetails: CardTransactionDetails$inboundSchema.optional(),
208
219
  rtpDetails: z.lazy(() => RtpDetails$inboundSchema).optional(),
209
220
  instantBankDetails: InstantBankTransactionDetails$inboundSchema.optional(),
@@ -218,6 +229,7 @@ export type TransferDestination$Outbound = {
218
229
  card?: TransferPaymentMethodsCard$Outbound | undefined;
219
230
  achDetails?: ACHTransactionDetails$Outbound | undefined;
220
231
  applePay?: ApplePayResponse$Outbound | undefined;
232
+ googlePay?: GooglePayResponse$Outbound | undefined;
221
233
  cardDetails?: CardTransactionDetails$Outbound | undefined;
222
234
  rtpDetails?: RtpDetails$Outbound | undefined;
223
235
  instantBankDetails?: InstantBankTransactionDetails$Outbound | undefined;
@@ -237,6 +249,7 @@ export const TransferDestination$outboundSchema: z.ZodType<
237
249
  card: TransferPaymentMethodsCard$outboundSchema.optional(),
238
250
  achDetails: ACHTransactionDetails$outboundSchema.optional(),
239
251
  applePay: ApplePayResponse$outboundSchema.optional(),
252
+ googlePay: GooglePayResponse$outboundSchema.optional(),
240
253
  cardDetails: CardTransactionDetails$outboundSchema.optional(),
241
254
  rtpDetails: z.lazy(() => RtpDetails$outboundSchema).optional(),
242
255
  instantBankDetails: InstantBankTransactionDetails$outboundSchema.optional(),
@@ -24,6 +24,12 @@ import {
24
24
  CardTransactionDetails$Outbound,
25
25
  CardTransactionDetails$outboundSchema,
26
26
  } from "./cardtransactiondetails.js";
27
+ import {
28
+ GooglePayResponse,
29
+ GooglePayResponse$inboundSchema,
30
+ GooglePayResponse$Outbound,
31
+ GooglePayResponse$outboundSchema,
32
+ } from "./googlepayresponse.js";
27
33
  import {
28
34
  TransferAccount,
29
35
  TransferAccount$inboundSchema,
@@ -84,6 +90,10 @@ export type TransferSource = {
84
90
  * Describes an Apple Pay token on a Moov account.
85
91
  */
86
92
  applePay?: ApplePayResponse | undefined;
93
+ /**
94
+ * Describes a Google Pay token on a Moov account.
95
+ */
96
+ googlePay?: GooglePayResponse | undefined;
87
97
  /**
88
98
  * Describes payment card details captured with tap or in-person payment.
89
99
  */
@@ -112,6 +122,7 @@ export const TransferSource$inboundSchema: z.ZodType<
112
122
  wallet: TransferPaymentMethodsWallet$inboundSchema.optional(),
113
123
  card: TransferPaymentMethodsCard$inboundSchema.optional(),
114
124
  applePay: ApplePayResponse$inboundSchema.optional(),
125
+ googlePay: GooglePayResponse$inboundSchema.optional(),
115
126
  terminalCard: TransferTerminalCard$inboundSchema.optional(),
116
127
  cardDetails: CardTransactionDetails$inboundSchema.optional(),
117
128
  achDetails: ACHTransactionDetails$inboundSchema.optional(),
@@ -126,6 +137,7 @@ export type TransferSource$Outbound = {
126
137
  wallet?: TransferPaymentMethodsWallet$Outbound | undefined;
127
138
  card?: TransferPaymentMethodsCard$Outbound | undefined;
128
139
  applePay?: ApplePayResponse$Outbound | undefined;
140
+ googlePay?: GooglePayResponse$Outbound | undefined;
129
141
  terminalCard?: TransferTerminalCard$Outbound | undefined;
130
142
  cardDetails?: CardTransactionDetails$Outbound | undefined;
131
143
  achDetails?: ACHTransactionDetails$Outbound | undefined;
@@ -145,6 +157,7 @@ export const TransferSource$outboundSchema: z.ZodType<
145
157
  wallet: TransferPaymentMethodsWallet$outboundSchema.optional(),
146
158
  card: TransferPaymentMethodsCard$outboundSchema.optional(),
147
159
  applePay: ApplePayResponse$outboundSchema.optional(),
160
+ googlePay: GooglePayResponse$outboundSchema.optional(),
148
161
  terminalCard: TransferTerminalCard$outboundSchema.optional(),
149
162
  cardDetails: CardTransactionDetails$outboundSchema.optional(),
150
163
  achDetails: ACHTransactionDetails$outboundSchema.optional(),
@@ -53,6 +53,7 @@ export * from "./schedulevalidationerror.js";
53
53
  export * from "./sdkvalidationerror.js";
54
54
  export * from "./terminalapplicationerror.js";
55
55
  export * from "./transfer.js";
56
+ export * from "./transferconfigvalidationerror.js";
56
57
  export * from "./transferoptionsvalidationerror.js";
57
58
  export * from "./transfervalidationerror.js";
58
59
  export * from "./updatecarderror.js";
@@ -11,9 +11,13 @@ export type LinkGooglePayErrorData = {
11
11
  */
12
12
  error?: string | undefined;
13
13
  /**
14
- * Describes an error within the `token` request field.
14
+ * Describes an error within the `merchantAccountID` request field.
15
15
  */
16
- token?: string | undefined;
16
+ merchantAccountID?: string | undefined;
17
+ /**
18
+ * Describes an error within the `paymentMethodData` request field.
19
+ */
20
+ paymentMethodData?: string | undefined;
17
21
  };
18
22
 
19
23
  export class LinkGooglePayError extends MoovError {
@@ -22,9 +26,13 @@ export class LinkGooglePayError extends MoovError {
22
26
  */
23
27
  error?: string | undefined;
24
28
  /**
25
- * Describes an error within the `token` request field.
29
+ * Describes an error within the `merchantAccountID` request field.
30
+ */
31
+ merchantAccountID?: string | undefined;
32
+ /**
33
+ * Describes an error within the `paymentMethodData` request field.
26
34
  */
27
- token?: string | undefined;
35
+ paymentMethodData?: string | undefined;
28
36
 
29
37
  /** The original data that was passed to this error instance. */
30
38
  data$: LinkGooglePayErrorData;
@@ -39,7 +47,12 @@ export class LinkGooglePayError extends MoovError {
39
47
  super(message, httpMeta);
40
48
  this.data$ = err;
41
49
  if (err.error != null) this.error = err.error;
42
- if (err.token != null) this.token = err.token;
50
+ if (err.merchantAccountID != null) {
51
+ this.merchantAccountID = err.merchantAccountID;
52
+ }
53
+ if (err.paymentMethodData != null) {
54
+ this.paymentMethodData = err.paymentMethodData;
55
+ }
43
56
 
44
57
  this.name = "LinkGooglePayError";
45
58
  }
@@ -52,7 +65,8 @@ export const LinkGooglePayError$inboundSchema: z.ZodType<
52
65
  unknown
53
66
  > = z.object({
54
67
  error: z.string().optional(),
55
- token: z.string().optional(),
68
+ merchantAccountID: z.string().optional(),
69
+ paymentMethodData: z.string().optional(),
56
70
  request$: z.instanceof(Request),
57
71
  response$: z.instanceof(Response),
58
72
  body$: z.string(),
@@ -68,7 +82,8 @@ export const LinkGooglePayError$inboundSchema: z.ZodType<
68
82
  /** @internal */
69
83
  export type LinkGooglePayError$Outbound = {
70
84
  error?: string | undefined;
71
- token?: string | undefined;
85
+ merchantAccountID?: string | undefined;
86
+ paymentMethodData?: string | undefined;
72
87
  };
73
88
 
74
89
  /** @internal */
@@ -80,5 +95,6 @@ export const LinkGooglePayError$outboundSchema: z.ZodType<
80
95
  .transform(v => v.data$)
81
96
  .pipe(z.object({
82
97
  error: z.string().optional(),
83
- token: z.string().optional(),
98
+ merchantAccountID: z.string().optional(),
99
+ paymentMethodData: z.string().optional(),
84
100
  }));
@@ -65,9 +65,6 @@ export type TransferData = {
65
65
  scheduleID?: string | undefined;
66
66
  occurrenceID?: string | undefined;
67
67
  paymentLinkCode?: string | undefined;
68
- /**
69
- * Optional sales tax amount. `transfer.amount.value` should be inclusive of any sales tax and represents the total amount charged.
70
- */
71
68
  salesTaxAmount?: components.Amount | undefined;
72
69
  /**
73
70
  * Optional alias from a foreign/external system which can be used to reference this resource.
@@ -84,6 +81,7 @@ export type TransferData = {
84
81
  * ID of the invoice that the transfer is associated with.
85
82
  */
86
83
  invoiceID?: string | undefined;
84
+ amountDetails?: components.TransferAmountDetails | undefined;
87
85
  };
88
86
 
89
87
  /**
@@ -145,9 +143,6 @@ export class Transfer extends MoovError {
145
143
  scheduleID?: string | undefined;
146
144
  occurrenceID?: string | undefined;
147
145
  paymentLinkCode?: string | undefined;
148
- /**
149
- * Optional sales tax amount. `transfer.amount.value` should be inclusive of any sales tax and represents the total amount charged.
150
- */
151
146
  salesTaxAmount?: components.Amount | undefined;
152
147
  /**
153
148
  * Optional alias from a foreign/external system which can be used to reference this resource.
@@ -164,6 +159,7 @@ export class Transfer extends MoovError {
164
159
  * ID of the invoice that the transfer is associated with.
165
160
  */
166
161
  invoiceID?: string | undefined;
162
+ amountDetails?: components.TransferAmountDetails | undefined;
167
163
 
168
164
  /** The original data that was passed to this error instance. */
169
165
  data$: TransferData;
@@ -206,6 +202,7 @@ export class Transfer extends MoovError {
206
202
  if (err.foreignID != null) this.foreignID = err.foreignID;
207
203
  if (err.lineItems != null) this.lineItems = err.lineItems;
208
204
  if (err.invoiceID != null) this.invoiceID = err.invoiceID;
205
+ if (err.amountDetails != null) this.amountDetails = err.amountDetails;
209
206
 
210
207
  this.name = "Transfer";
211
208
  }
@@ -247,6 +244,7 @@ export const Transfer$inboundSchema: z.ZodType<
247
244
  foreignID: z.string().optional(),
248
245
  lineItems: components.TransferLineItems$inboundSchema.optional(),
249
246
  invoiceID: z.string().optional(),
247
+ amountDetails: components.TransferAmountDetails$inboundSchema.optional(),
250
248
  request$: z.instanceof(Request),
251
249
  response$: z.instanceof(Response),
252
250
  body$: z.string(),
@@ -290,6 +288,7 @@ export type Transfer$Outbound = {
290
288
  foreignID?: string | undefined;
291
289
  lineItems?: components.TransferLineItems$Outbound | undefined;
292
290
  invoiceID?: string | undefined;
291
+ amountDetails?: components.TransferAmountDetails$Outbound | undefined;
293
292
  };
294
293
 
295
294
  /** @internal */
@@ -330,4 +329,5 @@ export const Transfer$outboundSchema: z.ZodType<
330
329
  foreignID: z.string().optional(),
331
330
  lineItems: components.TransferLineItems$outboundSchema.optional(),
332
331
  invoiceID: z.string().optional(),
332
+ amountDetails: components.TransferAmountDetails$outboundSchema.optional(),
333
333
  }));