@moovio/sdk 0.2.0 → 0.3.0
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/README.md +8 -0
- package/docs/sdks/branding/README.md +113 -2
- package/funcs/brandingCreate.js +1 -1
- package/funcs/brandingCreate.js.map +1 -1
- package/funcs/brandingUpsert.d.ts +16 -0
- package/funcs/brandingUpsert.d.ts.map +1 -0
- package/funcs/brandingUpsert.js +132 -0
- package/funcs/brandingUpsert.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/achcreditsamedaypaymentmethod.d.ts +5 -5
- package/models/components/achcreditsamedaypaymentmethod.d.ts.map +1 -1
- package/models/components/achcreditsamedaypaymentmethod.js +3 -3
- package/models/components/achcreditsamedaypaymentmethod.js.map +1 -1
- package/models/components/achcreditstandardpaymentmethod.d.ts +5 -5
- package/models/components/achcreditstandardpaymentmethod.d.ts.map +1 -1
- package/models/components/achcreditstandardpaymentmethod.js +3 -3
- package/models/components/achcreditstandardpaymentmethod.js.map +1 -1
- package/models/components/achdebitcollectpaymentmethod.d.ts +5 -5
- package/models/components/achdebitcollectpaymentmethod.d.ts.map +1 -1
- package/models/components/achdebitcollectpaymentmethod.js +3 -3
- package/models/components/achdebitcollectpaymentmethod.js.map +1 -1
- package/models/components/achdebitfundpaymentmethod.d.ts +5 -5
- package/models/components/achdebitfundpaymentmethod.d.ts.map +1 -1
- package/models/components/achdebitfundpaymentmethod.js +3 -3
- package/models/components/achdebitfundpaymentmethod.js.map +1 -1
- package/models/components/applepaypaymentmethod.d.ts +6 -2
- package/models/components/applepaypaymentmethod.d.ts.map +1 -1
- package/models/components/applepaypaymentmethod.js +3 -2
- package/models/components/applepaypaymentmethod.js.map +1 -1
- package/models/components/brandcolors.d.ts +35 -0
- package/models/components/brandcolors.d.ts.map +1 -0
- package/models/components/{colors.js → brandcolors.js} +17 -18
- package/models/components/brandcolors.js.map +1 -0
- package/models/components/brandproperties.d.ts +33 -0
- package/models/components/brandproperties.d.ts.map +1 -0
- package/models/components/{brand.js → brandproperties.js} +20 -21
- package/models/components/brandproperties.js.map +1 -0
- package/models/components/cardpaymentpaymentmethod.d.ts +5 -5
- package/models/components/cardpaymentpaymentmethod.d.ts.map +1 -1
- package/models/components/cardpaymentpaymentmethod.js +3 -3
- package/models/components/cardpaymentpaymentmethod.js.map +1 -1
- package/models/components/createrepresentative.d.ts +1 -1
- package/models/components/index.d.ts +5 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -2
- package/models/components/index.js.map +1 -1
- package/models/components/moovwalletpaymentmethod.d.ts +3 -2
- package/models/components/moovwalletpaymentmethod.d.ts.map +1 -1
- package/models/components/moovwalletpaymentmethod.js +3 -2
- package/models/components/moovwalletpaymentmethod.js.map +1 -1
- package/models/components/paymentmethodsbankaccount.d.ts +66 -0
- package/models/components/paymentmethodsbankaccount.d.ts.map +1 -0
- package/models/components/paymentmethodsbankaccount.js +90 -0
- package/models/components/paymentmethodsbankaccount.js.map +1 -0
- package/models/components/paymentmethodscard.d.ts +121 -0
- package/models/components/paymentmethodscard.d.ts.map +1 -0
- package/models/components/paymentmethodscard.js +109 -0
- package/models/components/paymentmethodscard.js.map +1 -0
- package/models/components/paymentmethodswallet.d.ts +29 -0
- package/models/components/paymentmethodswallet.d.ts.map +1 -0
- package/models/components/paymentmethodswallet.js +69 -0
- package/models/components/paymentmethodswallet.js.map +1 -0
- package/models/components/pullfromcardpaymentmethod.d.ts +5 -5
- package/models/components/pullfromcardpaymentmethod.d.ts.map +1 -1
- package/models/components/pullfromcardpaymentmethod.js +3 -3
- package/models/components/pullfromcardpaymentmethod.js.map +1 -1
- package/models/components/pushtocardpaymentmethod.d.ts +5 -5
- package/models/components/pushtocardpaymentmethod.d.ts.map +1 -1
- package/models/components/pushtocardpaymentmethod.js +3 -3
- package/models/components/pushtocardpaymentmethod.js.map +1 -1
- package/models/components/rtpcreditpaymentmethod.d.ts +5 -5
- package/models/components/rtpcreditpaymentmethod.d.ts.map +1 -1
- package/models/components/rtpcreditpaymentmethod.js +3 -3
- package/models/components/rtpcreditpaymentmethod.js.map +1 -1
- package/models/operations/createbrand.d.ts +4 -4
- package/models/operations/createbrand.d.ts.map +1 -1
- package/models/operations/createbrand.js +6 -6
- package/models/operations/createbrand.js.map +1 -1
- package/models/operations/getbrand.d.ts +2 -2
- package/models/operations/getbrand.d.ts.map +1 -1
- package/models/operations/getbrand.js +2 -2
- package/models/operations/getbrand.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/updatebrand.d.ts +2 -2
- package/models/operations/updatebrand.d.ts.map +1 -1
- package/models/operations/updatebrand.js +2 -2
- package/models/operations/updatebrand.js.map +1 -1
- package/models/operations/upsertbrand.d.ts +101 -0
- package/models/operations/upsertbrand.d.ts.map +1 -0
- package/models/operations/upsertbrand.js +155 -0
- package/models/operations/upsertbrand.js.map +1 -0
- package/package.json +1 -1
- package/sdk/branding.d.ts +7 -0
- package/sdk/branding.d.ts.map +1 -1
- package/sdk/branding.js +10 -0
- package/sdk/branding.js.map +1 -1
- package/src/funcs/brandingCreate.ts +1 -1
- package/src/funcs/brandingUpsert.ts +165 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/achcreditsamedaypaymentmethod.ts +11 -11
- package/src/models/components/achcreditstandardpaymentmethod.ts +11 -11
- package/src/models/components/achdebitcollectpaymentmethod.ts +11 -11
- package/src/models/components/achdebitfundpaymentmethod.ts +11 -11
- package/src/models/components/applepaypaymentmethod.ts +13 -4
- package/src/models/components/brandcolors.ts +75 -0
- package/src/models/components/brandproperties.ts +73 -0
- package/src/models/components/cardpaymentpaymentmethod.ts +11 -11
- package/src/models/components/createrepresentative.ts +1 -1
- package/src/models/components/index.ts +5 -2
- package/src/models/components/moovwalletpaymentmethod.ts +10 -4
- package/src/models/components/paymentmethodsbankaccount.ts +133 -0
- package/src/models/components/paymentmethodscard.ts +226 -0
- package/src/models/components/paymentmethodswallet.ts +66 -0
- package/src/models/components/pullfromcardpaymentmethod.ts +11 -11
- package/src/models/components/pushtocardpaymentmethod.ts +11 -11
- package/src/models/components/rtpcreditpaymentmethod.ts +11 -11
- package/src/models/operations/createbrand.ts +10 -10
- package/src/models/operations/getbrand.ts +4 -4
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/updatebrand.ts +4 -4
- package/src/models/operations/upsertbrand.ts +231 -0
- package/src/sdk/branding.ts +18 -0
- package/models/components/brand.d.ts +0 -33
- package/models/components/brand.d.ts.map +0 -1
- package/models/components/brand.js.map +0 -1
- package/models/components/colors.d.ts +0 -32
- package/models/components/colors.d.ts.map +0 -1
- package/models/components/colors.js.map +0 -1
- package/src/models/components/brand.ts +0 -68
- package/src/models/components/colors.ts +0 -69
|
@@ -8,11 +8,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
PaymentMethodsBankAccount,
|
|
12
|
+
PaymentMethodsBankAccount$inboundSchema,
|
|
13
|
+
PaymentMethodsBankAccount$Outbound,
|
|
14
|
+
PaymentMethodsBankAccount$outboundSchema,
|
|
15
|
+
} from "./paymentmethodsbankaccount.js";
|
|
16
16
|
|
|
17
17
|
export const AchDebitCollectPaymentMethodPaymentMethodType = {
|
|
18
18
|
AchDebitCollect: "ach-debit-collect",
|
|
@@ -26,11 +26,11 @@ export type AchDebitCollectPaymentMethod = {
|
|
|
26
26
|
* ID of the payment method.
|
|
27
27
|
*/
|
|
28
28
|
paymentMethodID: string;
|
|
29
|
+
paymentMethodType: AchDebitCollectPaymentMethodPaymentMethodType;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* A bank account as contained within a payment method.
|
|
31
32
|
*/
|
|
32
|
-
bankAccount:
|
|
33
|
-
paymentMethodType: AchDebitCollectPaymentMethodPaymentMethodType;
|
|
33
|
+
bankAccount: PaymentMethodsBankAccount;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
@@ -63,16 +63,16 @@ export const AchDebitCollectPaymentMethod$inboundSchema: z.ZodType<
|
|
|
63
63
|
unknown
|
|
64
64
|
> = z.object({
|
|
65
65
|
paymentMethodID: z.string(),
|
|
66
|
-
bankAccount: BankAccount$inboundSchema,
|
|
67
66
|
paymentMethodType:
|
|
68
67
|
AchDebitCollectPaymentMethodPaymentMethodType$inboundSchema,
|
|
68
|
+
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
/** @internal */
|
|
72
72
|
export type AchDebitCollectPaymentMethod$Outbound = {
|
|
73
73
|
paymentMethodID: string;
|
|
74
|
-
bankAccount: BankAccount$Outbound;
|
|
75
74
|
paymentMethodType: string;
|
|
75
|
+
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/** @internal */
|
|
@@ -82,9 +82,9 @@ export const AchDebitCollectPaymentMethod$outboundSchema: z.ZodType<
|
|
|
82
82
|
AchDebitCollectPaymentMethod
|
|
83
83
|
> = z.object({
|
|
84
84
|
paymentMethodID: z.string(),
|
|
85
|
-
bankAccount: BankAccount$outboundSchema,
|
|
86
85
|
paymentMethodType:
|
|
87
86
|
AchDebitCollectPaymentMethodPaymentMethodType$outboundSchema,
|
|
87
|
+
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -8,11 +8,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
PaymentMethodsBankAccount,
|
|
12
|
+
PaymentMethodsBankAccount$inboundSchema,
|
|
13
|
+
PaymentMethodsBankAccount$Outbound,
|
|
14
|
+
PaymentMethodsBankAccount$outboundSchema,
|
|
15
|
+
} from "./paymentmethodsbankaccount.js";
|
|
16
16
|
|
|
17
17
|
export const AchDebitFundPaymentMethodPaymentMethodType = {
|
|
18
18
|
AchDebitFund: "ach-debit-fund",
|
|
@@ -26,11 +26,11 @@ export type AchDebitFundPaymentMethod = {
|
|
|
26
26
|
* ID of the payment method.
|
|
27
27
|
*/
|
|
28
28
|
paymentMethodID: string;
|
|
29
|
+
paymentMethodType: AchDebitFundPaymentMethodPaymentMethodType;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* A bank account as contained within a payment method.
|
|
31
32
|
*/
|
|
32
|
-
bankAccount:
|
|
33
|
-
paymentMethodType: AchDebitFundPaymentMethodPaymentMethodType;
|
|
33
|
+
bankAccount: PaymentMethodsBankAccount;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
@@ -63,15 +63,15 @@ export const AchDebitFundPaymentMethod$inboundSchema: z.ZodType<
|
|
|
63
63
|
unknown
|
|
64
64
|
> = z.object({
|
|
65
65
|
paymentMethodID: z.string(),
|
|
66
|
-
bankAccount: BankAccount$inboundSchema,
|
|
67
66
|
paymentMethodType: AchDebitFundPaymentMethodPaymentMethodType$inboundSchema,
|
|
67
|
+
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
71
|
export type AchDebitFundPaymentMethod$Outbound = {
|
|
72
72
|
paymentMethodID: string;
|
|
73
|
-
bankAccount: BankAccount$Outbound;
|
|
74
73
|
paymentMethodType: string;
|
|
74
|
+
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
@@ -81,8 +81,8 @@ export const AchDebitFundPaymentMethod$outboundSchema: z.ZodType<
|
|
|
81
81
|
AchDebitFundPaymentMethod
|
|
82
82
|
> = z.object({
|
|
83
83
|
paymentMethodID: z.string(),
|
|
84
|
-
bankAccount: BankAccount$outboundSchema,
|
|
85
84
|
paymentMethodType: AchDebitFundPaymentMethodPaymentMethodType$outboundSchema,
|
|
85
|
+
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
/**
|
|
@@ -7,6 +7,12 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ApplePayResponse,
|
|
12
|
+
ApplePayResponse$inboundSchema,
|
|
13
|
+
ApplePayResponse$Outbound,
|
|
14
|
+
ApplePayResponse$outboundSchema,
|
|
15
|
+
} from "./applepayresponse.js";
|
|
10
16
|
|
|
11
17
|
export const ApplePayPaymentMethodPaymentMethodType = {
|
|
12
18
|
ApplePay: "apple-pay",
|
|
@@ -21,7 +27,10 @@ export type ApplePayPaymentMethod = {
|
|
|
21
27
|
*/
|
|
22
28
|
paymentMethodID: string;
|
|
23
29
|
paymentMethodType: ApplePayPaymentMethodPaymentMethodType;
|
|
24
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Describes an Apple Pay token on a Moov account.
|
|
32
|
+
*/
|
|
33
|
+
applePay: ApplePayResponse;
|
|
25
34
|
};
|
|
26
35
|
|
|
27
36
|
/** @internal */
|
|
@@ -56,14 +65,14 @@ export const ApplePayPaymentMethod$inboundSchema: z.ZodType<
|
|
|
56
65
|
> = z.object({
|
|
57
66
|
paymentMethodID: z.string(),
|
|
58
67
|
paymentMethodType: ApplePayPaymentMethodPaymentMethodType$inboundSchema,
|
|
59
|
-
applePay:
|
|
68
|
+
applePay: ApplePayResponse$inboundSchema,
|
|
60
69
|
});
|
|
61
70
|
|
|
62
71
|
/** @internal */
|
|
63
72
|
export type ApplePayPaymentMethod$Outbound = {
|
|
64
73
|
paymentMethodID: string;
|
|
65
74
|
paymentMethodType: string;
|
|
66
|
-
applePay
|
|
75
|
+
applePay: ApplePayResponse$Outbound;
|
|
67
76
|
};
|
|
68
77
|
|
|
69
78
|
/** @internal */
|
|
@@ -74,7 +83,7 @@ export const ApplePayPaymentMethod$outboundSchema: z.ZodType<
|
|
|
74
83
|
> = z.object({
|
|
75
84
|
paymentMethodID: z.string(),
|
|
76
85
|
paymentMethodType: ApplePayPaymentMethodPaymentMethodType$outboundSchema,
|
|
77
|
-
applePay:
|
|
86
|
+
applePay: ApplePayResponse$outboundSchema,
|
|
78
87
|
});
|
|
79
88
|
|
|
80
89
|
/**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
BrandColor,
|
|
11
|
+
BrandColor$inboundSchema,
|
|
12
|
+
BrandColor$Outbound,
|
|
13
|
+
BrandColor$outboundSchema,
|
|
14
|
+
} from "./brandcolor.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Brand colors for light and dark modes.
|
|
18
|
+
*/
|
|
19
|
+
export type BrandColors = {
|
|
20
|
+
dark: BrandColor;
|
|
21
|
+
light: BrandColor;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const BrandColors$inboundSchema: z.ZodType<
|
|
26
|
+
BrandColors,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
dark: BrandColor$inboundSchema,
|
|
31
|
+
light: BrandColor$inboundSchema,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type BrandColors$Outbound = {
|
|
36
|
+
dark: BrandColor$Outbound;
|
|
37
|
+
light: BrandColor$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const BrandColors$outboundSchema: z.ZodType<
|
|
42
|
+
BrandColors$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
BrandColors
|
|
45
|
+
> = z.object({
|
|
46
|
+
dark: BrandColor$outboundSchema,
|
|
47
|
+
light: BrandColor$outboundSchema,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace BrandColors$ {
|
|
55
|
+
/** @deprecated use `BrandColors$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = BrandColors$inboundSchema;
|
|
57
|
+
/** @deprecated use `BrandColors$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = BrandColors$outboundSchema;
|
|
59
|
+
/** @deprecated use `BrandColors$Outbound` instead. */
|
|
60
|
+
export type Outbound = BrandColors$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function brandColorsToJSON(brandColors: BrandColors): string {
|
|
64
|
+
return JSON.stringify(BrandColors$outboundSchema.parse(brandColors));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function brandColorsFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<BrandColors, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => BrandColors$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'BrandColors' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
BrandColors,
|
|
11
|
+
BrandColors$inboundSchema,
|
|
12
|
+
BrandColors$Outbound,
|
|
13
|
+
BrandColors$outboundSchema,
|
|
14
|
+
} from "./brandcolors.js";
|
|
15
|
+
|
|
16
|
+
export type BrandProperties = {
|
|
17
|
+
/**
|
|
18
|
+
* Brand colors for light and dark modes.
|
|
19
|
+
*/
|
|
20
|
+
colors: BrandColors;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const BrandProperties$inboundSchema: z.ZodType<
|
|
25
|
+
BrandProperties,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
colors: BrandColors$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type BrandProperties$Outbound = {
|
|
34
|
+
colors: BrandColors$Outbound;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const BrandProperties$outboundSchema: z.ZodType<
|
|
39
|
+
BrandProperties$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
BrandProperties
|
|
42
|
+
> = z.object({
|
|
43
|
+
colors: BrandColors$outboundSchema,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace BrandProperties$ {
|
|
51
|
+
/** @deprecated use `BrandProperties$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = BrandProperties$inboundSchema;
|
|
53
|
+
/** @deprecated use `BrandProperties$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = BrandProperties$outboundSchema;
|
|
55
|
+
/** @deprecated use `BrandProperties$Outbound` instead. */
|
|
56
|
+
export type Outbound = BrandProperties$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function brandPropertiesToJSON(
|
|
60
|
+
brandProperties: BrandProperties,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(BrandProperties$outboundSchema.parse(brandProperties));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function brandPropertiesFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<BrandProperties, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => BrandProperties$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'BrandProperties' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -8,11 +8,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
PaymentMethodsCard,
|
|
12
|
+
PaymentMethodsCard$inboundSchema,
|
|
13
|
+
PaymentMethodsCard$Outbound,
|
|
14
|
+
PaymentMethodsCard$outboundSchema,
|
|
15
|
+
} from "./paymentmethodscard.js";
|
|
16
16
|
|
|
17
17
|
export const CardPaymentPaymentMethodPaymentMethodType = {
|
|
18
18
|
CardPayment: "card-payment",
|
|
@@ -26,11 +26,11 @@ export type CardPaymentPaymentMethod = {
|
|
|
26
26
|
* ID of the payment method.
|
|
27
27
|
*/
|
|
28
28
|
paymentMethodID: string;
|
|
29
|
+
paymentMethodType: CardPaymentPaymentMethodPaymentMethodType;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* A card as contained within a payment method.
|
|
31
32
|
*/
|
|
32
|
-
card:
|
|
33
|
-
paymentMethodType: CardPaymentPaymentMethodPaymentMethodType;
|
|
33
|
+
card: PaymentMethodsCard;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
@@ -63,15 +63,15 @@ export const CardPaymentPaymentMethod$inboundSchema: z.ZodType<
|
|
|
63
63
|
unknown
|
|
64
64
|
> = z.object({
|
|
65
65
|
paymentMethodID: z.string(),
|
|
66
|
-
card: Card$inboundSchema,
|
|
67
66
|
paymentMethodType: CardPaymentPaymentMethodPaymentMethodType$inboundSchema,
|
|
67
|
+
card: PaymentMethodsCard$inboundSchema,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
71
|
export type CardPaymentPaymentMethod$Outbound = {
|
|
72
72
|
paymentMethodID: string;
|
|
73
|
-
card: Card$Outbound;
|
|
74
73
|
paymentMethodType: string;
|
|
74
|
+
card: PaymentMethodsCard$Outbound;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
@@ -81,8 +81,8 @@ export const CardPaymentPaymentMethod$outboundSchema: z.ZodType<
|
|
|
81
81
|
CardPaymentPaymentMethod
|
|
82
82
|
> = z.object({
|
|
83
83
|
paymentMethodID: z.string(),
|
|
84
|
-
card: Card$outboundSchema,
|
|
85
84
|
paymentMethodType: CardPaymentPaymentMethodPaymentMethodType$outboundSchema,
|
|
85
|
+
card: PaymentMethodsCard$outboundSchema,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
/**
|
|
@@ -61,9 +61,10 @@ export * from "./birthdate.js";
|
|
|
61
61
|
export * from "./birthdateerror.js";
|
|
62
62
|
export * from "./birthdateupdate.js";
|
|
63
63
|
export * from "./birthdatevalidationerror.js";
|
|
64
|
-
export * from "./brand.js";
|
|
65
64
|
export * from "./brandcolor.js";
|
|
65
|
+
export * from "./brandcolors.js";
|
|
66
66
|
export * from "./brandcolorvalidationerror.js";
|
|
67
|
+
export * from "./brandproperties.js";
|
|
67
68
|
export * from "./businessprofile.js";
|
|
68
69
|
export * from "./businesstype.js";
|
|
69
70
|
export * from "./calltoaction.js";
|
|
@@ -99,7 +100,6 @@ export * from "./cardverificationresult.js";
|
|
|
99
100
|
export * from "./cardvolumedistribution.js";
|
|
100
101
|
export * from "./cardvolumedistributionerror.js";
|
|
101
102
|
export * from "./collectionpaymentmethodtype.js";
|
|
102
|
-
export * from "./colors.js";
|
|
103
103
|
export * from "./colorsvalidationerror.js";
|
|
104
104
|
export * from "./completebankaccountverification.js";
|
|
105
105
|
export * from "./completedmicrodeposits.js";
|
|
@@ -239,6 +239,9 @@ export * from "./paymentlinkpayoutdetails.js";
|
|
|
239
239
|
export * from "./paymentlinkpayoutdetailsupdate.js";
|
|
240
240
|
export * from "./paymentlinkstatus.js";
|
|
241
241
|
export * from "./paymentmethod.js";
|
|
242
|
+
export * from "./paymentmethodsbankaccount.js";
|
|
243
|
+
export * from "./paymentmethodscard.js";
|
|
244
|
+
export * from "./paymentmethodswallet.js";
|
|
242
245
|
export * from "./paymentmethodtype.js";
|
|
243
246
|
export * from "./payoutdetailserror.js";
|
|
244
247
|
export * from "./payoutrecipient.js";
|
|
@@ -7,6 +7,12 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
PaymentMethodsWallet,
|
|
12
|
+
PaymentMethodsWallet$inboundSchema,
|
|
13
|
+
PaymentMethodsWallet$Outbound,
|
|
14
|
+
PaymentMethodsWallet$outboundSchema,
|
|
15
|
+
} from "./paymentmethodswallet.js";
|
|
10
16
|
|
|
11
17
|
export const MoovWalletPaymentMethodPaymentMethodType = {
|
|
12
18
|
MoovWallet: "moov-wallet",
|
|
@@ -21,7 +27,7 @@ export type MoovWalletPaymentMethod = {
|
|
|
21
27
|
*/
|
|
22
28
|
paymentMethodID: string;
|
|
23
29
|
paymentMethodType: MoovWalletPaymentMethodPaymentMethodType;
|
|
24
|
-
wallet
|
|
30
|
+
wallet: PaymentMethodsWallet;
|
|
25
31
|
};
|
|
26
32
|
|
|
27
33
|
/** @internal */
|
|
@@ -55,14 +61,14 @@ export const MoovWalletPaymentMethod$inboundSchema: z.ZodType<
|
|
|
55
61
|
> = z.object({
|
|
56
62
|
paymentMethodID: z.string(),
|
|
57
63
|
paymentMethodType: MoovWalletPaymentMethodPaymentMethodType$inboundSchema,
|
|
58
|
-
wallet:
|
|
64
|
+
wallet: PaymentMethodsWallet$inboundSchema,
|
|
59
65
|
});
|
|
60
66
|
|
|
61
67
|
/** @internal */
|
|
62
68
|
export type MoovWalletPaymentMethod$Outbound = {
|
|
63
69
|
paymentMethodID: string;
|
|
64
70
|
paymentMethodType: string;
|
|
65
|
-
wallet
|
|
71
|
+
wallet: PaymentMethodsWallet$Outbound;
|
|
66
72
|
};
|
|
67
73
|
|
|
68
74
|
/** @internal */
|
|
@@ -73,7 +79,7 @@ export const MoovWalletPaymentMethod$outboundSchema: z.ZodType<
|
|
|
73
79
|
> = z.object({
|
|
74
80
|
paymentMethodID: z.string(),
|
|
75
81
|
paymentMethodType: MoovWalletPaymentMethodPaymentMethodType$outboundSchema,
|
|
76
|
-
wallet:
|
|
82
|
+
wallet: PaymentMethodsWallet$outboundSchema,
|
|
77
83
|
});
|
|
78
84
|
|
|
79
85
|
/**
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
BankAccountHolderType,
|
|
11
|
+
BankAccountHolderType$inboundSchema,
|
|
12
|
+
BankAccountHolderType$outboundSchema,
|
|
13
|
+
} from "./bankaccountholdertype.js";
|
|
14
|
+
import {
|
|
15
|
+
BankAccountStatus,
|
|
16
|
+
BankAccountStatus$inboundSchema,
|
|
17
|
+
BankAccountStatus$outboundSchema,
|
|
18
|
+
} from "./bankaccountstatus.js";
|
|
19
|
+
import {
|
|
20
|
+
BankAccountType,
|
|
21
|
+
BankAccountType$inboundSchema,
|
|
22
|
+
BankAccountType$outboundSchema,
|
|
23
|
+
} from "./bankaccounttype.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A bank account as contained within a payment method.
|
|
27
|
+
*/
|
|
28
|
+
export type PaymentMethodsBankAccount = {
|
|
29
|
+
bankAccountID: string;
|
|
30
|
+
/**
|
|
31
|
+
* Once the bank account is linked, we don't reveal the full bank account number.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
*
|
|
35
|
+
* The fingerprint acts as a way to identify whether two linked bank accounts are the same.
|
|
36
|
+
*/
|
|
37
|
+
fingerprint: string;
|
|
38
|
+
status: BankAccountStatus;
|
|
39
|
+
holderName: string;
|
|
40
|
+
/**
|
|
41
|
+
* The type of holder on a funding source.
|
|
42
|
+
*/
|
|
43
|
+
holderType: BankAccountHolderType;
|
|
44
|
+
bankName: string;
|
|
45
|
+
/**
|
|
46
|
+
* The bank account type.
|
|
47
|
+
*/
|
|
48
|
+
bankAccountType: BankAccountType;
|
|
49
|
+
routingNumber: string;
|
|
50
|
+
lastFourAccountNumber: string;
|
|
51
|
+
updatedOn: Date;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const PaymentMethodsBankAccount$inboundSchema: z.ZodType<
|
|
56
|
+
PaymentMethodsBankAccount,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
bankAccountID: z.string(),
|
|
61
|
+
fingerprint: z.string(),
|
|
62
|
+
status: BankAccountStatus$inboundSchema,
|
|
63
|
+
holderName: z.string(),
|
|
64
|
+
holderType: BankAccountHolderType$inboundSchema,
|
|
65
|
+
bankName: z.string(),
|
|
66
|
+
bankAccountType: BankAccountType$inboundSchema,
|
|
67
|
+
routingNumber: z.string(),
|
|
68
|
+
lastFourAccountNumber: z.string(),
|
|
69
|
+
updatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type PaymentMethodsBankAccount$Outbound = {
|
|
74
|
+
bankAccountID: string;
|
|
75
|
+
fingerprint: string;
|
|
76
|
+
status: string;
|
|
77
|
+
holderName: string;
|
|
78
|
+
holderType: string;
|
|
79
|
+
bankName: string;
|
|
80
|
+
bankAccountType: string;
|
|
81
|
+
routingNumber: string;
|
|
82
|
+
lastFourAccountNumber: string;
|
|
83
|
+
updatedOn: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const PaymentMethodsBankAccount$outboundSchema: z.ZodType<
|
|
88
|
+
PaymentMethodsBankAccount$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
PaymentMethodsBankAccount
|
|
91
|
+
> = z.object({
|
|
92
|
+
bankAccountID: z.string(),
|
|
93
|
+
fingerprint: z.string(),
|
|
94
|
+
status: BankAccountStatus$outboundSchema,
|
|
95
|
+
holderName: z.string(),
|
|
96
|
+
holderType: BankAccountHolderType$outboundSchema,
|
|
97
|
+
bankName: z.string(),
|
|
98
|
+
bankAccountType: BankAccountType$outboundSchema,
|
|
99
|
+
routingNumber: z.string(),
|
|
100
|
+
lastFourAccountNumber: z.string(),
|
|
101
|
+
updatedOn: z.date().transform(v => v.toISOString()),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export namespace PaymentMethodsBankAccount$ {
|
|
109
|
+
/** @deprecated use `PaymentMethodsBankAccount$inboundSchema` instead. */
|
|
110
|
+
export const inboundSchema = PaymentMethodsBankAccount$inboundSchema;
|
|
111
|
+
/** @deprecated use `PaymentMethodsBankAccount$outboundSchema` instead. */
|
|
112
|
+
export const outboundSchema = PaymentMethodsBankAccount$outboundSchema;
|
|
113
|
+
/** @deprecated use `PaymentMethodsBankAccount$Outbound` instead. */
|
|
114
|
+
export type Outbound = PaymentMethodsBankAccount$Outbound;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function paymentMethodsBankAccountToJSON(
|
|
118
|
+
paymentMethodsBankAccount: PaymentMethodsBankAccount,
|
|
119
|
+
): string {
|
|
120
|
+
return JSON.stringify(
|
|
121
|
+
PaymentMethodsBankAccount$outboundSchema.parse(paymentMethodsBankAccount),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function paymentMethodsBankAccountFromJSON(
|
|
126
|
+
jsonString: string,
|
|
127
|
+
): SafeParseResult<PaymentMethodsBankAccount, SDKValidationError> {
|
|
128
|
+
return safeParse(
|
|
129
|
+
jsonString,
|
|
130
|
+
(x) => PaymentMethodsBankAccount$inboundSchema.parse(JSON.parse(x)),
|
|
131
|
+
`Failed to parse 'PaymentMethodsBankAccount' from JSON`,
|
|
132
|
+
);
|
|
133
|
+
}
|