Skip to content

Commit f540028

Browse files
committed
sync Params of payments.create to customersPayments.create
1 parent 54d2189 commit f540028

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

src/binders/customers/payments/parameters.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
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';
63

74
interface ContextParameters {
85
customerId: string;
96
}
107

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'>;
279

2810
export type PageParameters = ContextParameters & PaginationParameters;
2911

0 commit comments

Comments
 (0)