@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.
- package/bin/mcp-server.js +90 -36
- package/bin/mcp-server.js.map +21 -19
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/createpaymentlink.d.ts +2 -0
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js +2 -0
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoiceexternalpayment.d.ts +11 -2
- package/models/components/invoiceexternalpayment.d.ts.map +1 -1
- package/models/components/invoiceexternalpayment.js +10 -3
- package/models/components/invoiceexternalpayment.js.map +1 -1
- package/models/components/invoicepayment.d.ts +14 -2
- package/models/components/invoicepayment.d.ts.map +1 -1
- package/models/components/invoicepayment.js +11 -8
- package/models/components/invoicepayment.js.map +1 -1
- package/models/components/invoicepaymenttype.d.ts +12 -0
- package/models/components/invoicepaymenttype.d.ts.map +1 -0
- package/models/components/invoicepaymenttype.js +49 -0
- package/models/components/invoicepaymenttype.js.map +1 -0
- package/models/components/invoicetransferpayment.d.ts +11 -2
- package/models/components/invoicetransferpayment.d.ts.map +1 -1
- package/models/components/invoicetransferpayment.js +11 -3
- package/models/components/invoicetransferpayment.js.map +1 -1
- package/models/components/issuingmerchantdata.d.ts +6 -6
- package/models/components/issuingmerchantdata.d.ts.map +1 -1
- package/models/components/issuingmerchantdata.js +6 -6
- package/models/components/issuingmerchantdata.js.map +1 -1
- package/models/components/partnerfees.d.ts +7 -7
- package/models/components/partnerfees.d.ts.map +1 -1
- package/models/components/partnerfees.js +7 -7
- package/models/components/partnerfees.js.map +1 -1
- package/models/components/paymentlink.d.ts +5 -0
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +2 -0
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/product.d.ts +1 -1
- package/models/components/updateissuedcard.d.ts +3 -7
- package/models/components/updateissuedcard.d.ts.map +1 -1
- package/models/components/updateissuedcard.js +3 -3
- package/models/components/updateissuedcard.js.map +1 -1
- package/models/components/updateissuedcardstate.d.ts +23 -0
- package/models/components/updateissuedcardstate.d.ts.map +1 -0
- package/models/components/updateissuedcardstate.js +54 -0
- package/models/components/updateissuedcardstate.js.map +1 -0
- package/models/components/updatepaymentlink.d.ts +2 -0
- package/models/components/updatepaymentlink.d.ts.map +1 -1
- package/models/components/updatepaymentlink.js +2 -0
- package/models/components/updatepaymentlink.js.map +1 -1
- package/models/errors/createpaymentlinkerror.d.ts +3 -0
- package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
- package/models/errors/createpaymentlinkerror.js +4 -0
- package/models/errors/createpaymentlinkerror.js.map +1 -1
- package/models/errors/updatepaymentlinkerror.d.ts +3 -0
- package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
- package/models/errors/updatepaymentlinkerror.js +4 -0
- package/models/errors/updatepaymentlinkerror.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/createpaymentlink.ts +4 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/invoiceexternalpayment.ts +21 -4
- package/src/models/components/invoicepayment.ts +28 -12
- package/src/models/components/invoicepaymenttype.ts +21 -0
- package/src/models/components/invoicetransferpayment.ts +17 -4
- package/src/models/components/issuingmerchantdata.ts +12 -12
- package/src/models/components/partnerfees.ts +17 -17
- package/src/models/components/paymentlink.ts +7 -0
- package/src/models/components/product.ts +1 -1
- package/src/models/components/updateissuedcard.ts +8 -12
- package/src/models/components/updateissuedcardstate.ts +32 -0
- package/src/models/components/updatepaymentlink.ts +4 -0
- package/src/models/errors/createpaymentlinkerror.ts +6 -0
- package/src/models/errors/updatepaymentlinkerror.ts +6 -0
package/src/mcp-server/server.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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.
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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.
|
|
44
|
-
|
|
45
|
-
|
|
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:
|
|
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:
|
|
34
|
+
paymentType: PaymentType$inboundSchema,
|
|
22
35
|
transferID: z.string(),
|
|
23
36
|
});
|
|
24
37
|
/** @internal */
|
|
25
38
|
export type InvoiceTransferPayment$Outbound = {
|
|
26
|
-
paymentType:
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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()
|
|
47
|
+
networkID: z.string(),
|
|
48
48
|
name: z.string().optional(),
|
|
49
49
|
city: z.string().optional(),
|
|
50
|
-
country: z.string()
|
|
50
|
+
country: z.string(),
|
|
51
51
|
postalCode: z.string().optional(),
|
|
52
52
|
state: z.string().optional(),
|
|
53
|
-
mcc: z.string()
|
|
53
|
+
mcc: z.string(),
|
|
54
54
|
});
|
|
55
55
|
/** @internal */
|
|
56
56
|
export type IssuingMerchantData$Outbound = {
|
|
57
|
-
networkID
|
|
57
|
+
networkID: string;
|
|
58
58
|
name?: string | undefined;
|
|
59
59
|
city?: string | undefined;
|
|
60
|
-
country
|
|
60
|
+
country: string;
|
|
61
61
|
postalCode?: string | undefined;
|
|
62
62
|
state?: string | undefined;
|
|
63
|
-
mcc
|
|
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()
|
|
72
|
+
networkID: z.string(),
|
|
73
73
|
name: z.string().optional(),
|
|
74
74
|
city: z.string().optional(),
|
|
75
|
-
country: z.string()
|
|
75
|
+
country: z.string(),
|
|
76
76
|
postalCode: z.string().optional(),
|
|
77
77
|
state: z.string().optional(),
|
|
78
|
-
mcc: z.string()
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
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
|
|
23
|
+
minimumCommitment: AmountDecimal;
|
|
24
24
|
/**
|
|
25
25
|
* Fixed recurring fee for the billing period regardless of usage.
|
|
26
26
|
*/
|
|
27
|
-
monthlyPlatform
|
|
27
|
+
monthlyPlatform: AmountDecimal;
|
|
28
28
|
/**
|
|
29
29
|
* Total partner fees.
|
|
30
30
|
*/
|
|
31
|
-
total:
|
|
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:
|
|
41
|
-
monthlyPlatform:
|
|
42
|
-
total:
|
|
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
|
|
47
|
-
monthlyPlatform
|
|
48
|
-
total:
|
|
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:
|
|
58
|
-
monthlyPlatform:
|
|
59
|
-
total:
|
|
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(),
|
|
@@ -13,23 +13,19 @@ import {
|
|
|
13
13
|
CreateAuthorizedUserUpdate$outboundSchema,
|
|
14
14
|
} from "./createauthorizeduserupdate.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "./
|
|
16
|
+
UpdateIssuedCardState,
|
|
17
|
+
UpdateIssuedCardState$inboundSchema,
|
|
18
|
+
UpdateIssuedCardState$outboundSchema,
|
|
19
|
+
} from "./updateissuedcardstate.js";
|
|
20
20
|
|
|
21
21
|
export type UpdateIssuedCard = {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
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?:
|
|
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:
|
|
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:
|
|
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(),
|