Skip to content

Commit ca91a39

Browse files
authored
Merge pull request #763 from inplayer-org/feature/sepa-address
Added an additional address param used for specific countries
2 parents cd2230d + 003f963 commit ca91a39

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
# [3.13.1] - 16-08-2022
6+
7+
### Added
8+
9+
- Added `address` param in direct debit payments method which is needed for specific coutries
10+
511
# [3.13.0] - 26-06-2022
612

713
### Added

index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ export interface DefaultCreditCardData {
573573
export interface DirectDebitMandateData {
574574
name: string;
575575
iban: string;
576+
address?: string;
576577
}
577578

578579
export interface DirectDebitChargeData {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@inplayer-org/inplayer.js",
3-
"version": "3.13.0",
3+
"version": "3.13.1",
44
"author": "InPlayer",
55
"license": "MIT",
66
"description": "A Javascript SDK for Inplayer's RESTful API",

src/endpoints/payment.ts

+4
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ class Payment extends BaseExtend {
638638
* @async
639639
* @param {string} name The customer's bank full name
640640
* @param {string} iban The customer's bank IBAN number
641+
* @param {string} address The customer's address used for specific countries
641642
* @example
642643
* InPlayer.Payment
643644
* .createDirectDebitMandate({
@@ -673,13 +674,16 @@ class Payment extends BaseExtend {
673674
async createDirectDebitMandate({
674675
name,
675676
iban,
677+
address,
676678
}: {
677679
name: string;
678680
iban: string;
681+
address?: string;
679682
}): Promise<AxiosResponse<CreateDirectDebitResponse>> {
680683
const body = {
681684
name,
682685
iban,
686+
...(address && { address }),
683687
};
684688

685689
const tokenObject = await this.request.getToken();

src/models/IPayment.ts

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export interface ConfirmDonationPaymentRequestBody {
129129
export interface CreateDirectDebitMandateData {
130130
name: string;
131131
iban: string;
132+
address?: string;
132133
}
133134

134135
export interface DirectDebitData {
@@ -193,6 +194,7 @@ export interface CreateDirectDebitResponse {
193194
export interface DirectDebitMandateData {
194195
name: string;
195196
iban: string;
197+
address?: string;
196198
}
197199

198200
export interface PurchaseDetails {

0 commit comments

Comments
 (0)