mollie-api-typescript 0.3.1 → 0.3.3
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 +125 -16
- package/bin/mcp-server.js.map +15 -14
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/billingaddress.d.ts +135 -0
- package/dist/commonjs/models/billingaddress.d.ts.map +1 -0
- package/dist/commonjs/models/billingaddress.js +91 -0
- package/dist/commonjs/models/billingaddress.js.map +1 -0
- package/dist/commonjs/models/createwebhook.d.ts +2 -2
- package/dist/commonjs/models/createwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/createwebhook.js +2 -2
- package/dist/commonjs/models/createwebhook.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/method.d.ts +6 -0
- package/dist/commonjs/models/method.d.ts.map +1 -1
- package/dist/commonjs/models/method.js +2 -0
- package/dist/commonjs/models/method.js.map +1 -1
- package/dist/commonjs/models/methodresponse.d.ts +2 -0
- package/dist/commonjs/models/methodresponse.d.ts.map +1 -1
- package/dist/commonjs/models/methodresponse.js +2 -0
- package/dist/commonjs/models/methodresponse.js.map +1 -1
- package/dist/commonjs/models/operations/updatepayment.d.ts +13 -2
- package/dist/commonjs/models/operations/updatepayment.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatepayment.js +2 -2
- package/dist/commonjs/models/operations/updatepayment.js.map +1 -1
- package/dist/commonjs/models/paymentmethod.d.ts +2 -0
- package/dist/commonjs/models/paymentmethod.d.ts.map +1 -1
- package/dist/commonjs/models/paymentmethod.js +2 -0
- package/dist/commonjs/models/paymentmethod.js.map +1 -1
- package/dist/commonjs/models/paymentrequest.d.ts +144 -2
- package/dist/commonjs/models/paymentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/paymentrequest.js +54 -3
- package/dist/commonjs/models/paymentrequest.js.map +1 -1
- package/dist/commonjs/models/paymentresponse.d.ts +144 -2
- package/dist/commonjs/models/paymentresponse.d.ts.map +1 -1
- package/dist/commonjs/models/paymentresponse.js +54 -3
- package/dist/commonjs/models/paymentresponse.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/billingaddress.d.ts +135 -0
- package/dist/esm/models/billingaddress.d.ts.map +1 -0
- package/dist/esm/models/billingaddress.js +53 -0
- package/dist/esm/models/billingaddress.js.map +1 -0
- package/dist/esm/models/createwebhook.d.ts +2 -2
- package/dist/esm/models/createwebhook.d.ts.map +1 -1
- package/dist/esm/models/createwebhook.js +2 -2
- package/dist/esm/models/createwebhook.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/method.d.ts +6 -0
- package/dist/esm/models/method.d.ts.map +1 -1
- package/dist/esm/models/method.js +2 -0
- package/dist/esm/models/method.js.map +1 -1
- package/dist/esm/models/methodresponse.d.ts +2 -0
- package/dist/esm/models/methodresponse.d.ts.map +1 -1
- package/dist/esm/models/methodresponse.js +2 -0
- package/dist/esm/models/methodresponse.js.map +1 -1
- package/dist/esm/models/operations/updatepayment.d.ts +13 -2
- package/dist/esm/models/operations/updatepayment.d.ts.map +1 -1
- package/dist/esm/models/operations/updatepayment.js +2 -2
- package/dist/esm/models/operations/updatepayment.js.map +1 -1
- package/dist/esm/models/paymentmethod.d.ts +2 -0
- package/dist/esm/models/paymentmethod.d.ts.map +1 -1
- package/dist/esm/models/paymentmethod.js +2 -0
- package/dist/esm/models/paymentmethod.js.map +1 -1
- package/dist/esm/models/paymentrequest.d.ts +144 -2
- package/dist/esm/models/paymentrequest.d.ts.map +1 -1
- package/dist/esm/models/paymentrequest.js +51 -2
- package/dist/esm/models/paymentrequest.js.map +1 -1
- package/dist/esm/models/paymentresponse.d.ts +144 -2
- package/dist/esm/models/paymentresponse.d.ts.map +1 -1
- package/dist/esm/models/paymentresponse.js +51 -2
- package/dist/esm/models/paymentresponse.js.map +1 -1
- package/docs/sdks/customers/README.md +0 -2
- package/docs/sdks/payments/README.md +0 -4
- package/examples/package-lock.json +1 -1
- package/jsr.json +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/billingaddress.ts +190 -0
- package/src/models/createwebhook.ts +4 -4
- package/src/models/index.ts +1 -0
- package/src/models/method.ts +2 -0
- package/src/models/methodresponse.ts +2 -0
- package/src/models/operations/updatepayment.ts +15 -4
- package/src/models/paymentmethod.ts +2 -0
- package/src/models/paymentrequest.ts +205 -4
- package/src/models/paymentresponse.ts +205 -4
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* conversion.
|
|
15
|
+
*
|
|
16
|
+
* Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
17
|
+
* `country`.
|
|
18
|
+
*
|
|
19
|
+
* Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
20
|
+
*/
|
|
21
|
+
export type BillingAddress = {
|
|
22
|
+
/**
|
|
23
|
+
* The title of the person, for example *Mr.* or *Mrs.*.
|
|
24
|
+
*/
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The given name (first name) of the person should be at least two characters and cannot contain only
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* numbers.
|
|
31
|
+
*
|
|
32
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
33
|
+
*/
|
|
34
|
+
givenName?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* numbers.
|
|
40
|
+
*
|
|
41
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
42
|
+
*/
|
|
43
|
+
familyName?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The name of the organization, in case the addressee is an organization.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
*
|
|
49
|
+
* Required for payment method `billie`.
|
|
50
|
+
*/
|
|
51
|
+
organizationName?: any | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* A street and street number.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
*
|
|
57
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
58
|
+
*/
|
|
59
|
+
streetAndNumber?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Any additional addressing details, for example an apartment number.
|
|
62
|
+
*/
|
|
63
|
+
streetAdditional?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* A postal code. This field may be required if the provided country has a postal code system.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
*
|
|
69
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
70
|
+
*/
|
|
71
|
+
postalCode?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* A valid e-mail address.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
*
|
|
77
|
+
* If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
78
|
+
* email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
79
|
+
*
|
|
80
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
81
|
+
*/
|
|
82
|
+
email?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070.
|
|
85
|
+
*/
|
|
86
|
+
phone?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* A city name.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
*
|
|
92
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
93
|
+
*/
|
|
94
|
+
city?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The top-level administrative subdivision of the country. For example: Noord-Holland.
|
|
97
|
+
*/
|
|
98
|
+
region?: string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
*
|
|
104
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
105
|
+
*/
|
|
106
|
+
country?: string | undefined;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const BillingAddress$inboundSchema: z.ZodType<
|
|
111
|
+
BillingAddress,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
unknown
|
|
114
|
+
> = z.object({
|
|
115
|
+
title: z.string().optional(),
|
|
116
|
+
givenName: z.string().optional(),
|
|
117
|
+
familyName: z.string().optional(),
|
|
118
|
+
organizationName: z.any().optional(),
|
|
119
|
+
streetAndNumber: z.string().optional(),
|
|
120
|
+
streetAdditional: z.string().optional(),
|
|
121
|
+
postalCode: z.string().optional(),
|
|
122
|
+
email: z.string().optional(),
|
|
123
|
+
phone: z.string().optional(),
|
|
124
|
+
city: z.string().optional(),
|
|
125
|
+
region: z.string().optional(),
|
|
126
|
+
country: z.string().optional(),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export type BillingAddress$Outbound = {
|
|
131
|
+
title?: string | undefined;
|
|
132
|
+
givenName?: string | undefined;
|
|
133
|
+
familyName?: string | undefined;
|
|
134
|
+
organizationName?: any | undefined;
|
|
135
|
+
streetAndNumber?: string | undefined;
|
|
136
|
+
streetAdditional?: string | undefined;
|
|
137
|
+
postalCode?: string | undefined;
|
|
138
|
+
email?: string | undefined;
|
|
139
|
+
phone?: string | undefined;
|
|
140
|
+
city?: string | undefined;
|
|
141
|
+
region?: string | undefined;
|
|
142
|
+
country?: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const BillingAddress$outboundSchema: z.ZodType<
|
|
147
|
+
BillingAddress$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
BillingAddress
|
|
150
|
+
> = z.object({
|
|
151
|
+
title: z.string().optional(),
|
|
152
|
+
givenName: z.string().optional(),
|
|
153
|
+
familyName: z.string().optional(),
|
|
154
|
+
organizationName: z.any().optional(),
|
|
155
|
+
streetAndNumber: z.string().optional(),
|
|
156
|
+
streetAdditional: z.string().optional(),
|
|
157
|
+
postalCode: z.string().optional(),
|
|
158
|
+
email: z.string().optional(),
|
|
159
|
+
phone: z.string().optional(),
|
|
160
|
+
city: z.string().optional(),
|
|
161
|
+
region: z.string().optional(),
|
|
162
|
+
country: z.string().optional(),
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @internal
|
|
167
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
168
|
+
*/
|
|
169
|
+
export namespace BillingAddress$ {
|
|
170
|
+
/** @deprecated use `BillingAddress$inboundSchema` instead. */
|
|
171
|
+
export const inboundSchema = BillingAddress$inboundSchema;
|
|
172
|
+
/** @deprecated use `BillingAddress$outboundSchema` instead. */
|
|
173
|
+
export const outboundSchema = BillingAddress$outboundSchema;
|
|
174
|
+
/** @deprecated use `BillingAddress$Outbound` instead. */
|
|
175
|
+
export type Outbound = BillingAddress$Outbound;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function billingAddressToJSON(billingAddress: BillingAddress): string {
|
|
179
|
+
return JSON.stringify(BillingAddress$outboundSchema.parse(billingAddress));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function billingAddressFromJSON(
|
|
183
|
+
jsonString: string,
|
|
184
|
+
): SafeParseResult<BillingAddress, SDKValidationError> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) => BillingAddress$inboundSchema.parse(JSON.parse(x)),
|
|
188
|
+
`Failed to parse 'BillingAddress' from JSON`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
@@ -55,7 +55,7 @@ export type CreateWebhook = {
|
|
|
55
55
|
/**
|
|
56
56
|
* The identifier uniquely referring to the profile that created the subscription.
|
|
57
57
|
*/
|
|
58
|
-
profileId: string;
|
|
58
|
+
profileId: string | null;
|
|
59
59
|
/**
|
|
60
60
|
* The subscription's date time of creation.
|
|
61
61
|
*/
|
|
@@ -152,7 +152,7 @@ export const CreateWebhook$inboundSchema: z.ZodType<
|
|
|
152
152
|
resource: z.string(),
|
|
153
153
|
id: z.string(),
|
|
154
154
|
url: z.string(),
|
|
155
|
-
profileId: z.string(),
|
|
155
|
+
profileId: z.nullable(z.string()),
|
|
156
156
|
createdAt: z.string(),
|
|
157
157
|
name: z.string(),
|
|
158
158
|
eventTypes: z.array(WebhookEventTypes$inboundSchema),
|
|
@@ -171,7 +171,7 @@ export type CreateWebhook$Outbound = {
|
|
|
171
171
|
resource: string;
|
|
172
172
|
id: string;
|
|
173
173
|
url: string;
|
|
174
|
-
profileId: string;
|
|
174
|
+
profileId: string | null;
|
|
175
175
|
createdAt: string;
|
|
176
176
|
name: string;
|
|
177
177
|
eventTypes: Array<string>;
|
|
@@ -190,7 +190,7 @@ export const CreateWebhook$outboundSchema: z.ZodType<
|
|
|
190
190
|
resource: z.string(),
|
|
191
191
|
id: z.string(),
|
|
192
192
|
url: z.string(),
|
|
193
|
-
profileId: z.string(),
|
|
193
|
+
profileId: z.nullable(z.string()),
|
|
194
194
|
createdAt: z.string(),
|
|
195
195
|
name: z.string(),
|
|
196
196
|
eventTypes: z.array(WebhookEventTypes$outboundSchema),
|
package/src/models/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./balancetransferpartytype.js";
|
|
|
16
16
|
export * from "./balancetransferpartytyperesponse.js";
|
|
17
17
|
export * from "./balancetransferstatus.js";
|
|
18
18
|
export * from "./balancetransferstatusreasonresponse.js";
|
|
19
|
+
export * from "./billingaddress.js";
|
|
19
20
|
export * from "./capabilityrequirementstatus.js";
|
|
20
21
|
export * from "./capabilitystatus.js";
|
|
21
22
|
export * from "./capabilitystatusreason.js";
|
package/src/models/method.ts
CHANGED
|
@@ -39,6 +39,7 @@ export const Method = {
|
|
|
39
39
|
Klarnapaynow: "klarnapaynow",
|
|
40
40
|
Klarnasliceit: "klarnasliceit",
|
|
41
41
|
Mbway: "mbway",
|
|
42
|
+
Mobilepay: "mobilepay",
|
|
42
43
|
Multibanco: "multibanco",
|
|
43
44
|
Mybank: "mybank",
|
|
44
45
|
Paybybank: "paybybank",
|
|
@@ -52,6 +53,7 @@ export const Method = {
|
|
|
52
53
|
Swish: "swish",
|
|
53
54
|
Trustly: "trustly",
|
|
54
55
|
Twint: "twint",
|
|
56
|
+
Vipps: "vipps",
|
|
55
57
|
Voucher: "voucher",
|
|
56
58
|
} as const;
|
|
57
59
|
/**
|
|
@@ -43,6 +43,7 @@ export const MethodResponse = {
|
|
|
43
43
|
Klarnapaynow: "klarnapaynow",
|
|
44
44
|
Klarnasliceit: "klarnasliceit",
|
|
45
45
|
Mbway: "mbway",
|
|
46
|
+
Mobilepay: "mobilepay",
|
|
46
47
|
Multibanco: "multibanco",
|
|
47
48
|
Mybank: "mybank",
|
|
48
49
|
Paybybank: "paybybank",
|
|
@@ -56,6 +57,7 @@ export const MethodResponse = {
|
|
|
56
57
|
Swish: "swish",
|
|
57
58
|
Trustly: "trustly",
|
|
58
59
|
Twint: "twint",
|
|
60
|
+
Vipps: "vipps",
|
|
59
61
|
Voucher: "voucher",
|
|
60
62
|
} as const;
|
|
61
63
|
/**
|
|
@@ -129,7 +129,18 @@ export type UpdatePaymentRequestBody = {
|
|
|
129
129
|
* A valid issuer for iDEAL is for example `ideal_INGBNL2A` (for ING Bank).
|
|
130
130
|
*/
|
|
131
131
|
issuer?: string | null | undefined;
|
|
132
|
-
|
|
132
|
+
/**
|
|
133
|
+
* The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
134
|
+
*
|
|
135
|
+
* @remarks
|
|
136
|
+
* conversion.
|
|
137
|
+
*
|
|
138
|
+
* Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
139
|
+
* `country`.
|
|
140
|
+
*
|
|
141
|
+
* Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
142
|
+
*/
|
|
143
|
+
billingAddress?: models.BillingAddress | undefined;
|
|
133
144
|
shippingAddress?: models.PaymentAddress | undefined;
|
|
134
145
|
billingEmail?: string | undefined;
|
|
135
146
|
};
|
|
@@ -163,7 +174,7 @@ export const UpdatePaymentRequestBody$inboundSchema: z.ZodType<
|
|
|
163
174
|
restrictPaymentMethodsToCountry: z.nullable(z.string()).optional(),
|
|
164
175
|
testmode: z.nullable(z.boolean()).optional(),
|
|
165
176
|
issuer: z.nullable(z.string()).optional(),
|
|
166
|
-
billingAddress: models.
|
|
177
|
+
billingAddress: models.BillingAddress$inboundSchema.optional(),
|
|
167
178
|
shippingAddress: models.PaymentAddress$inboundSchema.optional(),
|
|
168
179
|
billingEmail: z.string().optional(),
|
|
169
180
|
});
|
|
@@ -181,7 +192,7 @@ export type UpdatePaymentRequestBody$Outbound = {
|
|
|
181
192
|
restrictPaymentMethodsToCountry?: string | null | undefined;
|
|
182
193
|
testmode?: boolean | null | undefined;
|
|
183
194
|
issuer?: string | null | undefined;
|
|
184
|
-
billingAddress?: models.
|
|
195
|
+
billingAddress?: models.BillingAddress$Outbound | undefined;
|
|
185
196
|
shippingAddress?: models.PaymentAddress$Outbound | undefined;
|
|
186
197
|
billingEmail?: string | undefined;
|
|
187
198
|
};
|
|
@@ -203,7 +214,7 @@ export const UpdatePaymentRequestBody$outboundSchema: z.ZodType<
|
|
|
203
214
|
restrictPaymentMethodsToCountry: z.nullable(z.string()).optional(),
|
|
204
215
|
testmode: z.nullable(z.boolean()).optional(),
|
|
205
216
|
issuer: z.nullable(z.string()).optional(),
|
|
206
|
-
billingAddress: models.
|
|
217
|
+
billingAddress: models.BillingAddress$outboundSchema.optional(),
|
|
207
218
|
shippingAddress: models.PaymentAddress$outboundSchema.optional(),
|
|
208
219
|
billingEmail: z.string().optional(),
|
|
209
220
|
});
|
|
@@ -39,6 +39,7 @@ export const PaymentMethod = {
|
|
|
39
39
|
Klarnasliceit: "klarnasliceit",
|
|
40
40
|
Klarna: "klarna",
|
|
41
41
|
Mbway: "mbway",
|
|
42
|
+
Mobilepay: "mobilepay",
|
|
42
43
|
Multibanco: "multibanco",
|
|
43
44
|
Mybank: "mybank",
|
|
44
45
|
Paybybank: "paybybank",
|
|
@@ -54,6 +55,7 @@ export const PaymentMethod = {
|
|
|
54
55
|
Swish: "swish",
|
|
55
56
|
Trustly: "trustly",
|
|
56
57
|
Twint: "twint",
|
|
58
|
+
Vipps: "vipps",
|
|
57
59
|
Voucher: "voucher",
|
|
58
60
|
} as const;
|
|
59
61
|
/**
|
|
@@ -134,6 +134,105 @@ export type PaymentRequestLine = {
|
|
|
134
134
|
recurring?: RecurringLineItem | undefined;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* conversion.
|
|
142
|
+
*
|
|
143
|
+
* Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
144
|
+
* `country`.
|
|
145
|
+
*
|
|
146
|
+
* Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
147
|
+
*/
|
|
148
|
+
export type PaymentRequestBillingAddress = {
|
|
149
|
+
/**
|
|
150
|
+
* The title of the person, for example *Mr.* or *Mrs.*.
|
|
151
|
+
*/
|
|
152
|
+
title?: string | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* The given name (first name) of the person should be at least two characters and cannot contain only
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* numbers.
|
|
158
|
+
*
|
|
159
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
160
|
+
*/
|
|
161
|
+
givenName?: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
164
|
+
*
|
|
165
|
+
* @remarks
|
|
166
|
+
* numbers.
|
|
167
|
+
*
|
|
168
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
169
|
+
*/
|
|
170
|
+
familyName?: string | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* The name of the organization, in case the addressee is an organization.
|
|
173
|
+
*
|
|
174
|
+
* @remarks
|
|
175
|
+
*
|
|
176
|
+
* Required for payment method `billie`.
|
|
177
|
+
*/
|
|
178
|
+
organizationName?: any | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* A street and street number.
|
|
181
|
+
*
|
|
182
|
+
* @remarks
|
|
183
|
+
*
|
|
184
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
185
|
+
*/
|
|
186
|
+
streetAndNumber?: string | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Any additional addressing details, for example an apartment number.
|
|
189
|
+
*/
|
|
190
|
+
streetAdditional?: string | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* A postal code. This field may be required if the provided country has a postal code system.
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
*
|
|
196
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
197
|
+
*/
|
|
198
|
+
postalCode?: string | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* A valid e-mail address.
|
|
201
|
+
*
|
|
202
|
+
* @remarks
|
|
203
|
+
*
|
|
204
|
+
* If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
205
|
+
* email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
206
|
+
*
|
|
207
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
208
|
+
*/
|
|
209
|
+
email?: string | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070.
|
|
212
|
+
*/
|
|
213
|
+
phone?: string | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* A city name.
|
|
216
|
+
*
|
|
217
|
+
* @remarks
|
|
218
|
+
*
|
|
219
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
220
|
+
*/
|
|
221
|
+
city?: string | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* The top-level administrative subdivision of the country. For example: Noord-Holland.
|
|
224
|
+
*/
|
|
225
|
+
region?: string | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
228
|
+
*
|
|
229
|
+
* @remarks
|
|
230
|
+
*
|
|
231
|
+
* Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
232
|
+
*/
|
|
233
|
+
country?: string | undefined;
|
|
234
|
+
};
|
|
235
|
+
|
|
137
236
|
/**
|
|
138
237
|
* With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
139
238
|
*
|
|
@@ -269,7 +368,18 @@ export type PaymentRequest = {
|
|
|
269
368
|
* Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
|
|
270
369
|
*/
|
|
271
370
|
lines?: Array<PaymentRequestLine> | null | undefined;
|
|
272
|
-
|
|
371
|
+
/**
|
|
372
|
+
* The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
373
|
+
*
|
|
374
|
+
* @remarks
|
|
375
|
+
* conversion.
|
|
376
|
+
*
|
|
377
|
+
* Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
378
|
+
* `country`.
|
|
379
|
+
*
|
|
380
|
+
* Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
381
|
+
*/
|
|
382
|
+
billingAddress?: PaymentRequestBillingAddress | undefined;
|
|
273
383
|
shippingAddress?: PaymentAddress | undefined;
|
|
274
384
|
/**
|
|
275
385
|
* Allows you to preset the language to be used.
|
|
@@ -592,6 +702,95 @@ export function paymentRequestLineFromJSON(
|
|
|
592
702
|
);
|
|
593
703
|
}
|
|
594
704
|
|
|
705
|
+
/** @internal */
|
|
706
|
+
export const PaymentRequestBillingAddress$inboundSchema: z.ZodType<
|
|
707
|
+
PaymentRequestBillingAddress,
|
|
708
|
+
z.ZodTypeDef,
|
|
709
|
+
unknown
|
|
710
|
+
> = z.object({
|
|
711
|
+
title: z.string().optional(),
|
|
712
|
+
givenName: z.string().optional(),
|
|
713
|
+
familyName: z.string().optional(),
|
|
714
|
+
organizationName: z.any().optional(),
|
|
715
|
+
streetAndNumber: z.string().optional(),
|
|
716
|
+
streetAdditional: z.string().optional(),
|
|
717
|
+
postalCode: z.string().optional(),
|
|
718
|
+
email: z.string().optional(),
|
|
719
|
+
phone: z.string().optional(),
|
|
720
|
+
city: z.string().optional(),
|
|
721
|
+
region: z.string().optional(),
|
|
722
|
+
country: z.string().optional(),
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
/** @internal */
|
|
726
|
+
export type PaymentRequestBillingAddress$Outbound = {
|
|
727
|
+
title?: string | undefined;
|
|
728
|
+
givenName?: string | undefined;
|
|
729
|
+
familyName?: string | undefined;
|
|
730
|
+
organizationName?: any | undefined;
|
|
731
|
+
streetAndNumber?: string | undefined;
|
|
732
|
+
streetAdditional?: string | undefined;
|
|
733
|
+
postalCode?: string | undefined;
|
|
734
|
+
email?: string | undefined;
|
|
735
|
+
phone?: string | undefined;
|
|
736
|
+
city?: string | undefined;
|
|
737
|
+
region?: string | undefined;
|
|
738
|
+
country?: string | undefined;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
/** @internal */
|
|
742
|
+
export const PaymentRequestBillingAddress$outboundSchema: z.ZodType<
|
|
743
|
+
PaymentRequestBillingAddress$Outbound,
|
|
744
|
+
z.ZodTypeDef,
|
|
745
|
+
PaymentRequestBillingAddress
|
|
746
|
+
> = z.object({
|
|
747
|
+
title: z.string().optional(),
|
|
748
|
+
givenName: z.string().optional(),
|
|
749
|
+
familyName: z.string().optional(),
|
|
750
|
+
organizationName: z.any().optional(),
|
|
751
|
+
streetAndNumber: z.string().optional(),
|
|
752
|
+
streetAdditional: z.string().optional(),
|
|
753
|
+
postalCode: z.string().optional(),
|
|
754
|
+
email: z.string().optional(),
|
|
755
|
+
phone: z.string().optional(),
|
|
756
|
+
city: z.string().optional(),
|
|
757
|
+
region: z.string().optional(),
|
|
758
|
+
country: z.string().optional(),
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* @internal
|
|
763
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
764
|
+
*/
|
|
765
|
+
export namespace PaymentRequestBillingAddress$ {
|
|
766
|
+
/** @deprecated use `PaymentRequestBillingAddress$inboundSchema` instead. */
|
|
767
|
+
export const inboundSchema = PaymentRequestBillingAddress$inboundSchema;
|
|
768
|
+
/** @deprecated use `PaymentRequestBillingAddress$outboundSchema` instead. */
|
|
769
|
+
export const outboundSchema = PaymentRequestBillingAddress$outboundSchema;
|
|
770
|
+
/** @deprecated use `PaymentRequestBillingAddress$Outbound` instead. */
|
|
771
|
+
export type Outbound = PaymentRequestBillingAddress$Outbound;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export function paymentRequestBillingAddressToJSON(
|
|
775
|
+
paymentRequestBillingAddress: PaymentRequestBillingAddress,
|
|
776
|
+
): string {
|
|
777
|
+
return JSON.stringify(
|
|
778
|
+
PaymentRequestBillingAddress$outboundSchema.parse(
|
|
779
|
+
paymentRequestBillingAddress,
|
|
780
|
+
),
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export function paymentRequestBillingAddressFromJSON(
|
|
785
|
+
jsonString: string,
|
|
786
|
+
): SafeParseResult<PaymentRequestBillingAddress, SDKValidationError> {
|
|
787
|
+
return safeParse(
|
|
788
|
+
jsonString,
|
|
789
|
+
(x) => PaymentRequestBillingAddress$inboundSchema.parse(JSON.parse(x)),
|
|
790
|
+
`Failed to parse 'PaymentRequestBillingAddress' from JSON`,
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
|
|
595
794
|
/** @internal */
|
|
596
795
|
export const PaymentRequestApplicationFee$inboundSchema: z.ZodType<
|
|
597
796
|
PaymentRequestApplicationFee,
|
|
@@ -723,7 +922,8 @@ export const PaymentRequest$inboundSchema: z.ZodType<
|
|
|
723
922
|
webhookUrl: z.nullable(z.string()).optional(),
|
|
724
923
|
lines: z.nullable(z.array(z.lazy(() => PaymentRequestLine$inboundSchema)))
|
|
725
924
|
.optional(),
|
|
726
|
-
billingAddress:
|
|
925
|
+
billingAddress: z.lazy(() => PaymentRequestBillingAddress$inboundSchema)
|
|
926
|
+
.optional(),
|
|
727
927
|
shippingAddress: PaymentAddress$inboundSchema.optional(),
|
|
728
928
|
locale: z.nullable(Locale$inboundSchema).optional(),
|
|
729
929
|
method: z.nullable(Method$inboundSchema).optional(),
|
|
@@ -772,7 +972,7 @@ export type PaymentRequest$Outbound = {
|
|
|
772
972
|
cancelUrl?: string | null | undefined;
|
|
773
973
|
webhookUrl?: string | null | undefined;
|
|
774
974
|
lines?: Array<PaymentRequestLine$Outbound> | null | undefined;
|
|
775
|
-
billingAddress?:
|
|
975
|
+
billingAddress?: PaymentRequestBillingAddress$Outbound | undefined;
|
|
776
976
|
shippingAddress?: PaymentAddress$Outbound | undefined;
|
|
777
977
|
locale?: string | null | undefined;
|
|
778
978
|
method?: string | null | undefined;
|
|
@@ -824,7 +1024,8 @@ export const PaymentRequest$outboundSchema: z.ZodType<
|
|
|
824
1024
|
webhookUrl: z.nullable(z.string()).optional(),
|
|
825
1025
|
lines: z.nullable(z.array(z.lazy(() => PaymentRequestLine$outboundSchema)))
|
|
826
1026
|
.optional(),
|
|
827
|
-
billingAddress:
|
|
1027
|
+
billingAddress: z.lazy(() => PaymentRequestBillingAddress$outboundSchema)
|
|
1028
|
+
.optional(),
|
|
828
1029
|
shippingAddress: PaymentAddress$outboundSchema.optional(),
|
|
829
1030
|
locale: z.nullable(Locale$outboundSchema).optional(),
|
|
830
1031
|
method: z.nullable(Method$outboundSchema).optional(),
|