@moovio/sdk 0.22.4 → 0.22.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 (84) hide show
  1. package/bin/mcp-server.js +90 -36
  2. package/bin/mcp-server.js.map +21 -19
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/createpaymentlink.d.ts +2 -0
  10. package/models/components/createpaymentlink.d.ts.map +1 -1
  11. package/models/components/createpaymentlink.js +2 -0
  12. package/models/components/createpaymentlink.js.map +1 -1
  13. package/models/components/index.d.ts +2 -0
  14. package/models/components/index.d.ts.map +1 -1
  15. package/models/components/index.js +2 -0
  16. package/models/components/index.js.map +1 -1
  17. package/models/components/invoiceexternalpayment.d.ts +11 -2
  18. package/models/components/invoiceexternalpayment.d.ts.map +1 -1
  19. package/models/components/invoiceexternalpayment.js +10 -3
  20. package/models/components/invoiceexternalpayment.js.map +1 -1
  21. package/models/components/invoicepayment.d.ts +14 -2
  22. package/models/components/invoicepayment.d.ts.map +1 -1
  23. package/models/components/invoicepayment.js +11 -8
  24. package/models/components/invoicepayment.js.map +1 -1
  25. package/models/components/invoicepaymenttype.d.ts +12 -0
  26. package/models/components/invoicepaymenttype.d.ts.map +1 -0
  27. package/models/components/invoicepaymenttype.js +49 -0
  28. package/models/components/invoicepaymenttype.js.map +1 -0
  29. package/models/components/invoicetransferpayment.d.ts +11 -2
  30. package/models/components/invoicetransferpayment.d.ts.map +1 -1
  31. package/models/components/invoicetransferpayment.js +11 -3
  32. package/models/components/invoicetransferpayment.js.map +1 -1
  33. package/models/components/issuingmerchantdata.d.ts +6 -6
  34. package/models/components/issuingmerchantdata.d.ts.map +1 -1
  35. package/models/components/issuingmerchantdata.js +6 -6
  36. package/models/components/issuingmerchantdata.js.map +1 -1
  37. package/models/components/partnerfees.d.ts +7 -7
  38. package/models/components/partnerfees.d.ts.map +1 -1
  39. package/models/components/partnerfees.js +7 -7
  40. package/models/components/partnerfees.js.map +1 -1
  41. package/models/components/paymentlink.d.ts +5 -0
  42. package/models/components/paymentlink.d.ts.map +1 -1
  43. package/models/components/paymentlink.js +2 -0
  44. package/models/components/paymentlink.js.map +1 -1
  45. package/models/components/product.d.ts +1 -1
  46. package/models/components/updateissuedcard.d.ts +3 -7
  47. package/models/components/updateissuedcard.d.ts.map +1 -1
  48. package/models/components/updateissuedcard.js +3 -3
  49. package/models/components/updateissuedcard.js.map +1 -1
  50. package/models/components/updateissuedcardstate.d.ts +23 -0
  51. package/models/components/updateissuedcardstate.d.ts.map +1 -0
  52. package/models/components/updateissuedcardstate.js +54 -0
  53. package/models/components/updateissuedcardstate.js.map +1 -0
  54. package/models/components/updatepaymentlink.d.ts +2 -0
  55. package/models/components/updatepaymentlink.d.ts.map +1 -1
  56. package/models/components/updatepaymentlink.js +2 -0
  57. package/models/components/updatepaymentlink.js.map +1 -1
  58. package/models/errors/createpaymentlinkerror.d.ts +3 -0
  59. package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
  60. package/models/errors/createpaymentlinkerror.js +4 -0
  61. package/models/errors/createpaymentlinkerror.js.map +1 -1
  62. package/models/errors/updatepaymentlinkerror.d.ts +3 -0
  63. package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
  64. package/models/errors/updatepaymentlinkerror.js +4 -0
  65. package/models/errors/updatepaymentlinkerror.js.map +1 -1
  66. package/package.json +1 -1
  67. package/src/lib/config.ts +3 -3
  68. package/src/mcp-server/mcp-server.ts +1 -1
  69. package/src/mcp-server/server.ts +1 -1
  70. package/src/models/components/createpaymentlink.ts +4 -0
  71. package/src/models/components/index.ts +2 -0
  72. package/src/models/components/invoiceexternalpayment.ts +21 -4
  73. package/src/models/components/invoicepayment.ts +28 -12
  74. package/src/models/components/invoicepaymenttype.ts +21 -0
  75. package/src/models/components/invoicetransferpayment.ts +17 -4
  76. package/src/models/components/issuingmerchantdata.ts +12 -12
  77. package/src/models/components/partnerfees.ts +17 -17
  78. package/src/models/components/paymentlink.ts +7 -0
  79. package/src/models/components/product.ts +1 -1
  80. package/src/models/components/updateissuedcard.ts +8 -12
  81. package/src/models/components/updateissuedcardstate.ts +32 -0
  82. package/src/models/components/updatepaymentlink.ts +4 -0
  83. package/src/models/errors/createpaymentlinkerror.ts +6 -0
  84. package/src/models/errors/updatepaymentlinkerror.ts +6 -0
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.22.4",
22
+ currentVersion: "0.22.6",
23
23
  },
24
24
  });
25
25
 
@@ -192,7 +192,7 @@ export function createMCPServer(deps: {
192
192
  }) {
193
193
  const server = new McpServer({
194
194
  name: "Moov",
195
- version: "0.22.4",
195
+ version: "0.22.6",
196
196
  });
197
197
 
198
198
  const client = new MoovCore({
@@ -62,6 +62,7 @@ export type CreatePaymentLink = {
62
62
  */
63
63
  merchantPaymentMethodID: string;
64
64
  amount: Amount;
65
+ salesTaxAmount?: Amount | undefined;
65
66
  /**
66
67
  * An optional limit on the number of times this payment link can be used.
67
68
  *
@@ -102,6 +103,7 @@ export const CreatePaymentLink$inboundSchema: z.ZodType<
102
103
  partnerAccountID: z.string(),
103
104
  merchantPaymentMethodID: z.string(),
104
105
  amount: Amount$inboundSchema,
106
+ salesTaxAmount: Amount$inboundSchema.optional(),
105
107
  maxUses: z.number().int().optional(),
106
108
  expiresOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
107
109
  .optional(),
@@ -116,6 +118,7 @@ export type CreatePaymentLink$Outbound = {
116
118
  partnerAccountID: string;
117
119
  merchantPaymentMethodID: string;
118
120
  amount: Amount$Outbound;
121
+ salesTaxAmount?: Amount$Outbound | undefined;
119
122
  maxUses?: number | undefined;
120
123
  expiresOn?: string | undefined;
121
124
  display: PaymentLinkDisplayOptions$Outbound;
@@ -134,6 +137,7 @@ export const CreatePaymentLink$outboundSchema: z.ZodType<
134
137
  partnerAccountID: z.string(),
135
138
  merchantPaymentMethodID: z.string(),
136
139
  amount: Amount$outboundSchema,
140
+ salesTaxAmount: Amount$outboundSchema.optional(),
137
141
  maxUses: z.number().int().optional(),
138
142
  expiresOn: z.date().transform(v => v.toISOString()).optional(),
139
143
  display: PaymentLinkDisplayOptions$outboundSchema,
@@ -259,6 +259,7 @@ export * from "./invoicelineitems.js";
259
259
  export * from "./invoicelineitemsvalidationerror.js";
260
260
  export * from "./invoicelineitemvalidationerror.js";
261
261
  export * from "./invoicepayment.js";
262
+ export * from "./invoicepaymenttype.js";
262
263
  export * from "./invoicestatus.js";
263
264
  export * from "./invoicetransferpayment.js";
264
265
  export * from "./issuedcard.js";
@@ -470,6 +471,7 @@ export * from "./updatecardexpiration.js";
470
471
  export * from "./updateevidence.js";
471
472
  export * from "./updateinvoice.js";
472
473
  export * from "./updateissuedcard.js";
474
+ export * from "./updateissuedcardstate.js";
473
475
  export * from "./updatepaymentlink.js";
474
476
  export * from "./updaterepresentative.js";
475
477
  export * from "./updateticket.js";
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
  import {
@@ -13,21 +14,37 @@ import {
13
14
  AmountDecimal$outboundSchema,
14
15
  } from "./amountdecimal.js";
15
16
 
17
+ export const InvoiceExternalPaymentPaymentType = {
18
+ External: "external",
19
+ } as const;
20
+ export type InvoiceExternalPaymentPaymentType = ClosedEnum<
21
+ typeof InvoiceExternalPaymentPaymentType
22
+ >;
23
+
16
24
  export type InvoiceExternalPayment = {
17
- paymentType: "external";
25
+ paymentType: InvoiceExternalPaymentPaymentType;
18
26
  description: string;
19
27
  foreignID?: string | undefined;
20
28
  paymentDate?: Date | undefined;
21
29
  amount: AmountDecimal;
22
30
  };
23
31
 
32
+ /** @internal */
33
+ export const InvoiceExternalPaymentPaymentType$inboundSchema: z.ZodNativeEnum<
34
+ typeof InvoiceExternalPaymentPaymentType
35
+ > = z.nativeEnum(InvoiceExternalPaymentPaymentType);
36
+ /** @internal */
37
+ export const InvoiceExternalPaymentPaymentType$outboundSchema: z.ZodNativeEnum<
38
+ typeof InvoiceExternalPaymentPaymentType
39
+ > = InvoiceExternalPaymentPaymentType$inboundSchema;
40
+
24
41
  /** @internal */
25
42
  export const InvoiceExternalPayment$inboundSchema: z.ZodType<
26
43
  InvoiceExternalPayment,
27
44
  z.ZodTypeDef,
28
45
  unknown
29
46
  > = z.object({
30
- paymentType: z.literal("external"),
47
+ paymentType: InvoiceExternalPaymentPaymentType$inboundSchema,
31
48
  description: z.string(),
32
49
  foreignID: z.string().optional(),
33
50
  paymentDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -36,7 +53,7 @@ export const InvoiceExternalPayment$inboundSchema: z.ZodType<
36
53
  });
37
54
  /** @internal */
38
55
  export type InvoiceExternalPayment$Outbound = {
39
- paymentType: "external";
56
+ paymentType: string;
40
57
  description: string;
41
58
  foreignID?: string | undefined;
42
59
  paymentDate?: string | undefined;
@@ -49,7 +66,7 @@ export const InvoiceExternalPayment$outboundSchema: z.ZodType<
49
66
  z.ZodTypeDef,
50
67
  InvoiceExternalPayment
51
68
  > = z.object({
52
- paymentType: z.literal("external"),
69
+ paymentType: InvoiceExternalPaymentPaymentType$outboundSchema,
53
70
  description: z.string(),
54
71
  foreignID: z.string().optional(),
55
72
  paymentDate: z.date().transform(v => v.toISOString()).optional(),
@@ -12,6 +12,11 @@ import {
12
12
  InvoiceExternalPayment$Outbound,
13
13
  InvoiceExternalPayment$outboundSchema,
14
14
  } from "./invoiceexternalpayment.js";
15
+ import {
16
+ InvoicePaymentType,
17
+ InvoicePaymentType$inboundSchema,
18
+ InvoicePaymentType$outboundSchema,
19
+ } from "./invoicepaymenttype.js";
15
20
  import {
16
21
  InvoiceTransferPayment,
17
22
  InvoiceTransferPayment$inboundSchema,
@@ -19,31 +24,42 @@ import {
19
24
  InvoiceTransferPayment$outboundSchema,
20
25
  } from "./invoicetransferpayment.js";
21
26
 
22
- export type InvoicePayment = InvoiceTransferPayment | InvoiceExternalPayment;
27
+ /**
28
+ * Payment made towards an invoice, will be either a transfer or an external payment.
29
+ */
30
+ export type InvoicePayment = {
31
+ paymentType: InvoicePaymentType;
32
+ transfer?: InvoiceTransferPayment | undefined;
33
+ external?: InvoiceExternalPayment | undefined;
34
+ };
23
35
 
24
36
  /** @internal */
25
37
  export const InvoicePayment$inboundSchema: z.ZodType<
26
38
  InvoicePayment,
27
39
  z.ZodTypeDef,
28
40
  unknown
29
- > = z.union([
30
- InvoiceTransferPayment$inboundSchema,
31
- InvoiceExternalPayment$inboundSchema,
32
- ]);
41
+ > = z.object({
42
+ paymentType: InvoicePaymentType$inboundSchema,
43
+ transfer: InvoiceTransferPayment$inboundSchema.optional(),
44
+ external: InvoiceExternalPayment$inboundSchema.optional(),
45
+ });
33
46
  /** @internal */
34
- export type InvoicePayment$Outbound =
35
- | InvoiceTransferPayment$Outbound
36
- | InvoiceExternalPayment$Outbound;
47
+ export type InvoicePayment$Outbound = {
48
+ paymentType: string;
49
+ transfer?: InvoiceTransferPayment$Outbound | undefined;
50
+ external?: InvoiceExternalPayment$Outbound | undefined;
51
+ };
37
52
 
38
53
  /** @internal */
39
54
  export const InvoicePayment$outboundSchema: z.ZodType<
40
55
  InvoicePayment$Outbound,
41
56
  z.ZodTypeDef,
42
57
  InvoicePayment
43
- > = z.union([
44
- InvoiceTransferPayment$outboundSchema,
45
- InvoiceExternalPayment$outboundSchema,
46
- ]);
58
+ > = z.object({
59
+ paymentType: InvoicePaymentType$outboundSchema,
60
+ transfer: InvoiceTransferPayment$outboundSchema.optional(),
61
+ external: InvoiceExternalPayment$outboundSchema.optional(),
62
+ });
47
63
 
48
64
  export function invoicePaymentToJSON(invoicePayment: InvoicePayment): string {
49
65
  return JSON.stringify(InvoicePayment$outboundSchema.parse(invoicePayment));
@@ -0,0 +1,21 @@
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
+ export const InvoicePaymentType = {
9
+ Transfer: "transfer",
10
+ External: "external",
11
+ } as const;
12
+ export type InvoicePaymentType = ClosedEnum<typeof InvoicePaymentType>;
13
+
14
+ /** @internal */
15
+ export const InvoicePaymentType$inboundSchema: z.ZodNativeEnum<
16
+ typeof InvoicePaymentType
17
+ > = z.nativeEnum(InvoicePaymentType);
18
+ /** @internal */
19
+ export const InvoicePaymentType$outboundSchema: z.ZodNativeEnum<
20
+ typeof InvoicePaymentType
21
+ > = InvoicePaymentType$inboundSchema;
@@ -4,26 +4,39 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
 
11
+ export const PaymentType = {
12
+ Transfer: "transfer",
13
+ } as const;
14
+ export type PaymentType = ClosedEnum<typeof PaymentType>;
15
+
10
16
  export type InvoiceTransferPayment = {
11
- paymentType: "transfer";
17
+ paymentType: PaymentType;
12
18
  transferID: string;
13
19
  };
14
20
 
21
+ /** @internal */
22
+ export const PaymentType$inboundSchema: z.ZodNativeEnum<typeof PaymentType> = z
23
+ .nativeEnum(PaymentType);
24
+ /** @internal */
25
+ export const PaymentType$outboundSchema: z.ZodNativeEnum<typeof PaymentType> =
26
+ PaymentType$inboundSchema;
27
+
15
28
  /** @internal */
16
29
  export const InvoiceTransferPayment$inboundSchema: z.ZodType<
17
30
  InvoiceTransferPayment,
18
31
  z.ZodTypeDef,
19
32
  unknown
20
33
  > = z.object({
21
- paymentType: z.literal("transfer"),
34
+ paymentType: PaymentType$inboundSchema,
22
35
  transferID: z.string(),
23
36
  });
24
37
  /** @internal */
25
38
  export type InvoiceTransferPayment$Outbound = {
26
- paymentType: "transfer";
39
+ paymentType: string;
27
40
  transferID: string;
28
41
  };
29
42
 
@@ -33,7 +46,7 @@ export const InvoiceTransferPayment$outboundSchema: z.ZodType<
33
46
  z.ZodTypeDef,
34
47
  InvoiceTransferPayment
35
48
  > = z.object({
36
- paymentType: z.literal("transfer"),
49
+ paymentType: PaymentType$outboundSchema,
37
50
  transferID: z.string(),
38
51
  });
39
52
 
@@ -11,7 +11,7 @@ export type IssuingMerchantData = {
11
11
  /**
12
12
  * External identifier used to identify the merchant with the card brand.
13
13
  */
14
- networkID?: string | undefined;
14
+ networkID: string;
15
15
  /**
16
16
  * Name of the merchant.
17
17
  */
@@ -23,7 +23,7 @@ export type IssuingMerchantData = {
23
23
  /**
24
24
  * Two-letter country code.
25
25
  */
26
- country?: string | undefined;
26
+ country: string;
27
27
  /**
28
28
  * The merchant's five-digit postal code.
29
29
  */
@@ -35,7 +35,7 @@ export type IssuingMerchantData = {
35
35
  /**
36
36
  * The Merchant Category Code.
37
37
  */
38
- mcc?: string | undefined;
38
+ mcc: string;
39
39
  };
40
40
 
41
41
  /** @internal */
@@ -44,23 +44,23 @@ export const IssuingMerchantData$inboundSchema: z.ZodType<
44
44
  z.ZodTypeDef,
45
45
  unknown
46
46
  > = z.object({
47
- networkID: z.string().optional(),
47
+ networkID: z.string(),
48
48
  name: z.string().optional(),
49
49
  city: z.string().optional(),
50
- country: z.string().optional(),
50
+ country: z.string(),
51
51
  postalCode: z.string().optional(),
52
52
  state: z.string().optional(),
53
- mcc: z.string().optional(),
53
+ mcc: z.string(),
54
54
  });
55
55
  /** @internal */
56
56
  export type IssuingMerchantData$Outbound = {
57
- networkID?: string | undefined;
57
+ networkID: string;
58
58
  name?: string | undefined;
59
59
  city?: string | undefined;
60
- country?: string | undefined;
60
+ country: string;
61
61
  postalCode?: string | undefined;
62
62
  state?: string | undefined;
63
- mcc?: string | undefined;
63
+ mcc: string;
64
64
  };
65
65
 
66
66
  /** @internal */
@@ -69,13 +69,13 @@ export const IssuingMerchantData$outboundSchema: z.ZodType<
69
69
  z.ZodTypeDef,
70
70
  IssuingMerchantData
71
71
  > = z.object({
72
- networkID: z.string().optional(),
72
+ networkID: z.string(),
73
73
  name: z.string().optional(),
74
74
  city: z.string().optional(),
75
- country: z.string().optional(),
75
+ country: z.string(),
76
76
  postalCode: z.string().optional(),
77
77
  state: z.string().optional(),
78
- mcc: z.string().optional(),
78
+ mcc: z.string(),
79
79
  });
80
80
 
81
81
  export function issuingMerchantDataToJSON(
@@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
  import {
10
- BillingCountAndAmount,
11
- BillingCountAndAmount$inboundSchema,
12
- BillingCountAndAmount$Outbound,
13
- BillingCountAndAmount$outboundSchema,
14
- } from "./billingcountandamount.js";
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
15
15
 
16
16
  /**
17
17
  * Monthly partner costs that are charged separately and not included in residual subtotal (e.g. platform fees, minimums).
@@ -20,15 +20,15 @@ export type PartnerFees = {
20
20
  /**
21
21
  * The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
22
22
  */
23
- minimumCommitment?: BillingCountAndAmount | undefined;
23
+ minimumCommitment: AmountDecimal;
24
24
  /**
25
25
  * Fixed recurring fee for the billing period regardless of usage.
26
26
  */
27
- monthlyPlatform?: BillingCountAndAmount | undefined;
27
+ monthlyPlatform: AmountDecimal;
28
28
  /**
29
29
  * Total partner fees.
30
30
  */
31
- total: BillingCountAndAmount;
31
+ total: AmountDecimal;
32
32
  };
33
33
 
34
34
  /** @internal */
@@ -37,15 +37,15 @@ export const PartnerFees$inboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  unknown
39
39
  > = z.object({
40
- minimumCommitment: BillingCountAndAmount$inboundSchema.optional(),
41
- monthlyPlatform: BillingCountAndAmount$inboundSchema.optional(),
42
- total: BillingCountAndAmount$inboundSchema,
40
+ minimumCommitment: AmountDecimal$inboundSchema,
41
+ monthlyPlatform: AmountDecimal$inboundSchema,
42
+ total: AmountDecimal$inboundSchema,
43
43
  });
44
44
  /** @internal */
45
45
  export type PartnerFees$Outbound = {
46
- minimumCommitment?: BillingCountAndAmount$Outbound | undefined;
47
- monthlyPlatform?: BillingCountAndAmount$Outbound | undefined;
48
- total: BillingCountAndAmount$Outbound;
46
+ minimumCommitment: AmountDecimal$Outbound;
47
+ monthlyPlatform: AmountDecimal$Outbound;
48
+ total: AmountDecimal$Outbound;
49
49
  };
50
50
 
51
51
  /** @internal */
@@ -54,9 +54,9 @@ export const PartnerFees$outboundSchema: z.ZodType<
54
54
  z.ZodTypeDef,
55
55
  PartnerFees
56
56
  > = z.object({
57
- minimumCommitment: BillingCountAndAmount$outboundSchema.optional(),
58
- monthlyPlatform: BillingCountAndAmount$outboundSchema.optional(),
59
- total: BillingCountAndAmount$outboundSchema,
57
+ minimumCommitment: AmountDecimal$outboundSchema,
58
+ monthlyPlatform: AmountDecimal$outboundSchema,
59
+ total: AmountDecimal$outboundSchema,
60
60
  });
61
61
 
62
62
  export function partnerFeesToJSON(partnerFees: PartnerFees): string {
@@ -86,6 +86,10 @@ export type PaymentLink = {
86
86
  */
87
87
  link: string;
88
88
  amount: Amount;
89
+ /**
90
+ * Optional sales tax amount.
91
+ */
92
+ salesTaxAmount?: Amount | undefined;
89
93
  /**
90
94
  * The number of times this payment link has been used.
91
95
  */
@@ -144,6 +148,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
144
148
  merchantPaymentMethodID: z.string(),
145
149
  link: z.string(),
146
150
  amount: Amount$inboundSchema,
151
+ salesTaxAmount: Amount$inboundSchema.optional(),
147
152
  uses: z.number().int(),
148
153
  maxUses: z.number().int().optional(),
149
154
  lastUsedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -172,6 +177,7 @@ export type PaymentLink$Outbound = {
172
177
  merchantPaymentMethodID: string;
173
178
  link: string;
174
179
  amount: Amount$Outbound;
180
+ salesTaxAmount?: Amount$Outbound | undefined;
175
181
  uses: number;
176
182
  maxUses?: number | undefined;
177
183
  lastUsedOn?: string | undefined;
@@ -202,6 +208,7 @@ export const PaymentLink$outboundSchema: z.ZodType<
202
208
  merchantPaymentMethodID: z.string(),
203
209
  link: z.string(),
204
210
  amount: Amount$outboundSchema,
211
+ salesTaxAmount: Amount$outboundSchema.optional(),
205
212
  uses: z.number().int(),
206
213
  maxUses: z.number().int().optional(),
207
214
  lastUsedOn: z.date().transform(v => v.toISOString()).optional(),
@@ -26,7 +26,7 @@ import {
26
26
  } from "./productoptiongroup.js";
27
27
 
28
28
  /**
29
- * A product available for purchase, which may have optional configuration options.
29
+ * A good or service offered by a merchant.
30
30
  */
31
31
  export type Product = {
32
32
  /**
@@ -13,23 +13,19 @@ import {
13
13
  CreateAuthorizedUserUpdate$outboundSchema,
14
14
  } from "./createauthorizeduserupdate.js";
15
15
  import {
16
- IssuedCardState,
17
- IssuedCardState$inboundSchema,
18
- IssuedCardState$outboundSchema,
19
- } from "./issuedcardstate.js";
16
+ UpdateIssuedCardState,
17
+ UpdateIssuedCardState$inboundSchema,
18
+ UpdateIssuedCardState$outboundSchema,
19
+ } from "./updateissuedcardstate.js";
20
20
 
21
21
  export type UpdateIssuedCard = {
22
22
  /**
23
- * The `state` represents the operational status of an issued card. A card can only approve incoming authorizations if it is in an active state.
23
+ * Updates the state of a Moov issued card.
24
24
  *
25
25
  * @remarks
26
- *
27
- * - `active`: The card is operational and approves authorizations. Generally becomes active shortly after card creation.
28
- * - `inactive`: The card cannot approve authorizations. This is currently a temporary state assigned post-creation during the activation process.
29
26
  * - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires.
30
- * - `pending-verification`: Awaiting additional authorized user verification before the card can be activated.
31
27
  */
32
- state?: IssuedCardState | undefined;
28
+ state?: UpdateIssuedCardState | undefined;
33
29
  memo?: string | undefined;
34
30
  /**
35
31
  * Fields for identifying an authorized individual.
@@ -43,7 +39,7 @@ export const UpdateIssuedCard$inboundSchema: z.ZodType<
43
39
  z.ZodTypeDef,
44
40
  unknown
45
41
  > = z.object({
46
- state: IssuedCardState$inboundSchema.optional(),
42
+ state: UpdateIssuedCardState$inboundSchema.optional(),
47
43
  memo: z.string().optional(),
48
44
  authorizedUser: CreateAuthorizedUserUpdate$inboundSchema.optional(),
49
45
  });
@@ -60,7 +56,7 @@ export const UpdateIssuedCard$outboundSchema: z.ZodType<
60
56
  z.ZodTypeDef,
61
57
  UpdateIssuedCard
62
58
  > = z.object({
63
- state: IssuedCardState$outboundSchema.optional(),
59
+ state: UpdateIssuedCardState$outboundSchema.optional(),
64
60
  memo: z.string().optional(),
65
61
  authorizedUser: CreateAuthorizedUserUpdate$outboundSchema.optional(),
66
62
  });
@@ -0,0 +1,32 @@
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
+ * Updates the state of a Moov issued card.
10
+ *
11
+ * @remarks
12
+ * - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires.
13
+ */
14
+ export const UpdateIssuedCardState = {
15
+ Closed: "closed",
16
+ } as const;
17
+ /**
18
+ * Updates the state of a Moov issued card.
19
+ *
20
+ * @remarks
21
+ * - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires.
22
+ */
23
+ export type UpdateIssuedCardState = ClosedEnum<typeof UpdateIssuedCardState>;
24
+
25
+ /** @internal */
26
+ export const UpdateIssuedCardState$inboundSchema: z.ZodNativeEnum<
27
+ typeof UpdateIssuedCardState
28
+ > = z.nativeEnum(UpdateIssuedCardState);
29
+ /** @internal */
30
+ export const UpdateIssuedCardState$outboundSchema: z.ZodNativeEnum<
31
+ typeof UpdateIssuedCardState
32
+ > = UpdateIssuedCardState$inboundSchema;
@@ -45,6 +45,7 @@ import {
45
45
 
46
46
  export type UpdatePaymentLink = {
47
47
  amount?: AmountUpdate | undefined;
48
+ salesTaxAmount?: AmountUpdate | undefined;
48
49
  expiresOn?: Date | null | undefined;
49
50
  /**
50
51
  * Customizable display options for a payment link.
@@ -72,6 +73,7 @@ export const UpdatePaymentLink$inboundSchema: z.ZodType<
72
73
  unknown
73
74
  > = z.object({
74
75
  amount: AmountUpdate$inboundSchema.optional(),
76
+ salesTaxAmount: AmountUpdate$inboundSchema.optional(),
75
77
  expiresOn: z.nullable(
76
78
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
77
79
  ).optional(),
@@ -84,6 +86,7 @@ export const UpdatePaymentLink$inboundSchema: z.ZodType<
84
86
  /** @internal */
85
87
  export type UpdatePaymentLink$Outbound = {
86
88
  amount?: AmountUpdate$Outbound | undefined;
89
+ salesTaxAmount?: AmountUpdate$Outbound | undefined;
87
90
  expiresOn?: string | null | undefined;
88
91
  display?: PaymentLinkDisplayOptionsUpdate$Outbound | undefined;
89
92
  customer?: PaymentLinkCustomerOptions$Outbound | undefined;
@@ -99,6 +102,7 @@ export const UpdatePaymentLink$outboundSchema: z.ZodType<
99
102
  UpdatePaymentLink
100
103
  > = z.object({
101
104
  amount: AmountUpdate$outboundSchema.optional(),
105
+ salesTaxAmount: AmountUpdate$outboundSchema.optional(),
102
106
  expiresOn: z.nullable(z.date().transform(v => v.toISOString())).optional(),
103
107
  display: PaymentLinkDisplayOptionsUpdate$outboundSchema.optional(),
104
108
  customer: PaymentLinkCustomerOptions$outboundSchema.optional(),
@@ -10,6 +10,7 @@ export type CreatePaymentLinkErrorData = {
10
10
  partnerAccountID?: string | undefined;
11
11
  merchantPaymentMethodID?: string | undefined;
12
12
  amount?: components.AmountValidationError | undefined;
13
+ salesTaxAmount?: components.AmountValidationError | undefined;
13
14
  maxUses?: string | undefined;
14
15
  expiresOn?: string | undefined;
15
16
  display?: components.DisplayOptionsError | undefined;
@@ -22,6 +23,7 @@ export class CreatePaymentLinkError extends MoovError {
22
23
  partnerAccountID?: string | undefined;
23
24
  merchantPaymentMethodID?: string | undefined;
24
25
  amount?: components.AmountValidationError | undefined;
26
+ salesTaxAmount?: components.AmountValidationError | undefined;
25
27
  maxUses?: string | undefined;
26
28
  expiresOn?: string | undefined;
27
29
  display?: components.DisplayOptionsError | undefined;
@@ -48,6 +50,7 @@ export class CreatePaymentLinkError extends MoovError {
48
50
  this.merchantPaymentMethodID = err.merchantPaymentMethodID;
49
51
  }
50
52
  if (err.amount != null) this.amount = err.amount;
53
+ if (err.salesTaxAmount != null) this.salesTaxAmount = err.salesTaxAmount;
51
54
  if (err.maxUses != null) this.maxUses = err.maxUses;
52
55
  if (err.expiresOn != null) this.expiresOn = err.expiresOn;
53
56
  if (err.display != null) this.display = err.display;
@@ -68,6 +71,7 @@ export const CreatePaymentLinkError$inboundSchema: z.ZodType<
68
71
  partnerAccountID: z.string().optional(),
69
72
  merchantPaymentMethodID: z.string().optional(),
70
73
  amount: components.AmountValidationError$inboundSchema.optional(),
74
+ salesTaxAmount: components.AmountValidationError$inboundSchema.optional(),
71
75
  maxUses: z.string().optional(),
72
76
  expiresOn: z.string().optional(),
73
77
  display: components.DisplayOptionsError$inboundSchema.optional(),
@@ -92,6 +96,7 @@ export type CreatePaymentLinkError$Outbound = {
92
96
  partnerAccountID?: string | undefined;
93
97
  merchantPaymentMethodID?: string | undefined;
94
98
  amount?: components.AmountValidationError$Outbound | undefined;
99
+ salesTaxAmount?: components.AmountValidationError$Outbound | undefined;
95
100
  maxUses?: string | undefined;
96
101
  expiresOn?: string | undefined;
97
102
  display?: components.DisplayOptionsError$Outbound | undefined;
@@ -113,6 +118,7 @@ export const CreatePaymentLinkError$outboundSchema: z.ZodType<
113
118
  partnerAccountID: z.string().optional(),
114
119
  merchantPaymentMethodID: z.string().optional(),
115
120
  amount: components.AmountValidationError$outboundSchema.optional(),
121
+ salesTaxAmount: components.AmountValidationError$outboundSchema.optional(),
116
122
  maxUses: z.string().optional(),
117
123
  expiresOn: z.string().optional(),
118
124
  display: components.DisplayOptionsError$outboundSchema.optional(),
@@ -8,6 +8,7 @@ import { MoovError } from "./mooverror.js";
8
8
 
9
9
  export type UpdatePaymentLinkErrorData = {
10
10
  amount?: components.AmountValidationError | undefined;
11
+ salesTaxAmount?: components.AmountValidationError | undefined;
11
12
  expiresOn?: string | undefined;
12
13
  display?: components.DisplayOptionsError | undefined;
13
14
  payment?: components.PaymentDetailsError | undefined;
@@ -17,6 +18,7 @@ export type UpdatePaymentLinkErrorData = {
17
18
 
18
19
  export class UpdatePaymentLinkError extends MoovError {
19
20
  amount?: components.AmountValidationError | undefined;
21
+ salesTaxAmount?: components.AmountValidationError | undefined;
20
22
  expiresOn?: string | undefined;
21
23
  display?: components.DisplayOptionsError | undefined;
22
24
  payment?: components.PaymentDetailsError | undefined;
@@ -36,6 +38,7 @@ export class UpdatePaymentLinkError extends MoovError {
36
38
  super(message, httpMeta);
37
39
  this.data$ = err;
38
40
  if (err.amount != null) this.amount = err.amount;
41
+ if (err.salesTaxAmount != null) this.salesTaxAmount = err.salesTaxAmount;
39
42
  if (err.expiresOn != null) this.expiresOn = err.expiresOn;
40
43
  if (err.display != null) this.display = err.display;
41
44
  if (err.payment != null) this.payment = err.payment;
@@ -53,6 +56,7 @@ export const UpdatePaymentLinkError$inboundSchema: z.ZodType<
53
56
  unknown
54
57
  > = z.object({
55
58
  amount: components.AmountValidationError$inboundSchema.optional(),
59
+ salesTaxAmount: components.AmountValidationError$inboundSchema.optional(),
56
60
  expiresOn: z.string().optional(),
57
61
  display: components.DisplayOptionsError$inboundSchema.optional(),
58
62
  payment: components.PaymentDetailsError$inboundSchema.optional(),
@@ -74,6 +78,7 @@ export const UpdatePaymentLinkError$inboundSchema: z.ZodType<
74
78
  /** @internal */
75
79
  export type UpdatePaymentLinkError$Outbound = {
76
80
  amount?: components.AmountValidationError$Outbound | undefined;
81
+ salesTaxAmount?: components.AmountValidationError$Outbound | undefined;
77
82
  expiresOn?: string | undefined;
78
83
  display?: components.DisplayOptionsError$Outbound | undefined;
79
84
  payment?: components.PaymentDetailsError$Outbound | undefined;
@@ -92,6 +97,7 @@ export const UpdatePaymentLinkError$outboundSchema: z.ZodType<
92
97
  .transform(v => v.data$)
93
98
  .pipe(z.object({
94
99
  amount: components.AmountValidationError$outboundSchema.optional(),
100
+ salesTaxAmount: components.AmountValidationError$outboundSchema.optional(),
95
101
  expiresOn: z.string().optional(),
96
102
  display: components.DisplayOptionsError$outboundSchema.optional(),
97
103
  payment: components.PaymentDetailsError$outboundSchema.optional(),