|
1 |
| -import { type PaymentMethod } from '../../../data/global'; |
2 |
| -import { type PaymentData } from '../../../data/payments/data'; |
3 |
| -import type MaybeArray from '../../../types/MaybeArray'; |
4 |
| -import { type IdempotencyParameter, type PaginationParameters, type ThrottlingParameter } from '../../../types/parameters'; |
5 |
| -import type PickOptional from '../../../types/PickOptional'; |
| 1 | +import type { PaginationParameters, ThrottlingParameter } from '../../../types/parameters'; |
| 2 | +import type { CreateParameters as PaymentCreateParameters } from '../../payments/parameters'; |
6 | 3 |
|
7 | 4 | interface ContextParameters {
|
8 | 5 | customerId: string;
|
9 | 6 | }
|
10 | 7 |
|
11 |
| -export type CreateParameters = ContextParameters & |
12 |
| - Pick<PaymentData, 'amount' | 'description'> & |
13 |
| - PickOptional<PaymentData, 'locale' | 'mandateId' | 'metadata' | 'sequenceType' | 'webhookUrl' | 'redirectUrl'> & { |
14 |
| - /** |
15 |
| - * Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment method and your customer will skip the selection screen and is sent directly to |
16 |
| - * the chosen payment method. The parameter enables you to fully integrate the payment method selection into your website. |
17 |
| - * |
18 |
| - * You can also specify the methods in an array. By doing so we will still show the payment method selection screen but will only show the methods specified in the array. For example, you can use |
19 |
| - * this functionality to only show payment methods from a specific country to your customer `['bancontact', 'belfius']`. |
20 |
| - * |
21 |
| - * Possible values: `applepay` `bancontact` `banktransfer` `belfius` `creditcard` `directdebit` `eps` `giftcard` `giropay` `ideal` `kbc` `mybank` `paypal` `paysafecard` `przelewy24` `sofort` |
22 |
| - * |
23 |
| - * @see https://docs.mollie.com/reference/v2/payments-api/create-payment?path=method#parameters |
24 |
| - */ |
25 |
| - method?: MaybeArray<PaymentMethod>; |
26 |
| - } & IdempotencyParameter; |
| 8 | +export type CreateParameters = Exclude<PaymentCreateParameters, 'customerId'>; |
27 | 9 |
|
28 | 10 | export type PageParameters = ContextParameters & PaginationParameters;
|
29 | 11 |
|
|
0 commit comments