From 39829f5d7c95a2834941e845f4a525240ea84454 Mon Sep 17 00:00:00 2001 From: Tim Ohlsen Date: Sat, 10 Aug 2024 16:48:32 +0200 Subject: [PATCH 1/3] pricing type to array Following https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response the response is an array of MethodPricing --- src/data/methods/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/methods/data.ts b/src/data/methods/data.ts index eba4df75..6928f98d 100644 --- a/src/data/methods/data.ts +++ b/src/data/methods/data.ts @@ -32,7 +32,7 @@ export interface MethodData extends Model<'method', PaymentMethodEnum> { * * @see https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response */ - pricing: MethodPricing; + pricing: MethodPricing[]; /** * An object with several URL objects relevant to the payment method. Every URL object will contain an `href` and a `type` field. * From c5cc313bbfb0a33136481b0f6be3c1b8d9e2a1c3 Mon Sep 17 00:00:00 2001 From: Jan Paepke Date: Wed, 11 Sep 2024 15:42:08 +0200 Subject: [PATCH 2/3] complete optional method includes --- src/data/methods/data.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/data/methods/data.ts b/src/data/methods/data.ts index 6928f98d..36ba7e68 100644 --- a/src/data/methods/data.ts +++ b/src/data/methods/data.ts @@ -32,7 +32,13 @@ export interface MethodData extends Model<'method', PaymentMethodEnum> { * * @see https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response */ - pricing: MethodPricing[]; + pricing?: MethodPricing[]; + /** + * Pricing set of the payment method what will be include if you add the parameter. + * + * @see https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response + */ + issuers?: MethodIssuers[]; /** * An object with several URL objects relevant to the payment method. Every URL object will contain an `href` and a `type` field. * @@ -93,3 +99,10 @@ export interface MethodPricing { variable: string; feeRegion: FeeRegion; } + +export interface MethodIssuers { + resource: string; + id: string; + name: string; + image: Image; +} From 2862cf4207b0e308c0cbc423801386c0e16b6566 Mon Sep 17 00:00:00 2001 From: "Pimm \"de Chinchilla\" Hogeling" Date: Mon, 16 Sep 2024 23:50:43 +0200 Subject: [PATCH 3/3] Update documentation in MethodsData. --- src/data/methods/data.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data/methods/data.ts b/src/data/methods/data.ts index 36ba7e68..5c358758 100644 --- a/src/data/methods/data.ts +++ b/src/data/methods/data.ts @@ -28,13 +28,14 @@ export interface MethodData extends Model<'method', PaymentMethodEnum> { */ image: Image; /** - * Pricing set of the payment method what will be include if you add the parameter. + * Array of objects describing the pricing configuration applicable for this payment method on your account. * * @see https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response */ pricing?: MethodPricing[]; /** - * Pricing set of the payment method what will be include if you add the parameter. + * Array of objects for each 'issuer' that is available for this payment method. Only relevant for iDEAL, KBC/CBC, + * gift cards, and vouchers. * * @see https://docs.mollie.com/reference/v2/methods-api/get-method?path=pricing#response */