File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ module.exports = {
203
203
"client_wallets_transactions" : [ "/${apiVersion}/${clientId}/clients/wallets/${fundsType}/${currency}/transactions/" , "GET" ] ,
204
204
"client_create_bankaccount_iban" : [ "/${apiVersion}/${clientId}/clients/bankaccounts/iban" , "POST" ] ,
205
205
"client_create_payout" : [ "/${apiVersion}/${clientId}/clients/payouts" , "POST" ] ,
206
+ "client_create_bankwire_direct" : [ "/${apiVersion}/${clientId}/clients/payins/bankwire/direct" , "POST" ] ,
206
207
207
208
"banking_aliases_iban_create" : [ "/${apiVersion}/${clientId}/wallets/${walletId}/bankingaliases/iban" , "POST" ] ,
208
209
"banking_aliases_get" : [ "/${apiVersion}/${clientId}/bankingaliases/${id}" , "GET" ] ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ var Transaction = require('../models/Transaction');
11
11
var ClientWallet = require ( '../models/ClientWallet' ) ;
12
12
var BankAccount = require ( '../models/BankAccount' ) ;
13
13
var PayOut = require ( '../models/PayOut' ) ;
14
+ var PayIn = require ( '../models/PayIn' ) ;
14
15
15
16
var Clients = Service . extend ( {
16
17
/**
@@ -180,6 +181,15 @@ var Clients = Service.extend({
180
181
} ) ;
181
182
182
183
return this . _api . method ( 'client_create_payout' , callback , options ) ;
184
+ } ,
185
+
186
+ createBankWireDirectPayIn : function ( payIn , callback , options ) {
187
+ options = this . _api . _getOptions ( callback , options , {
188
+ data : payIn ,
189
+ dataClass : PayIn
190
+ } ) ;
191
+
192
+ return this . _api . method ( 'client_create_bankwire_direct' , callback , options ) ;
183
193
}
184
194
} ) ;
185
195
Original file line number Diff line number Diff line change @@ -204,4 +204,31 @@ describe("Clients", function () {
204
204
expect ( createdPayOut . Id ) . not . to . be . undefined ;
205
205
} ) ;
206
206
} ) ;
207
+
208
+ describe ( "Create PayIn BankWire Direct" , function ( ) {
209
+ var created ;
210
+
211
+ before ( function ( done ) {
212
+ const dto = {
213
+ "CreditedWalletId" : "CREDIT_EUR" ,
214
+ "DeclaredDebitedFunds" : {
215
+ "Currency" : "EUR" ,
216
+ "Amount" : 1000
217
+ }
218
+ } ;
219
+ api . Clients . createBankWireDirectPayIn ( dto , function ( data ) {
220
+ created = data ;
221
+ done ( ) ;
222
+ } ) ;
223
+ } ) ;
224
+
225
+ it ( 'should create the payin' , function ( ) {
226
+ expect ( created ) . not . to . be . undefined ;
227
+ expect ( created . Id ) . not . to . be . undefined ;
228
+ expect ( created . Type ) . to . eq ( 'PAYIN' ) ;
229
+ expect ( created . Status ) . to . eq ( 'CREATED' ) ;
230
+ expect ( created . PaymentType ) . to . eq ( 'BANK_WIRE' ) ;
231
+ expect ( created . ExecutionType ) . to . eq ( 'DIRECT' ) ;
232
+ } ) ;
233
+ } ) ;
207
234
} ) ;
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ import { ValueOf } from "../types";
2
2
import { enums } from "../enums" ;
3
3
import { address } from "./address" ;
4
4
import { entityBase } from "./entityBase" ;
5
+ import { money } from "./money" ;
5
6
6
7
export namespace client {
8
+ import MoneyData = money . MoneyData ;
9
+
7
10
type BusinessType = "MARKETPLACE" | "CROWDFUNDING" | "FRANCHISE" | "OTHER" ;
8
11
9
12
type Sector =
@@ -183,4 +186,18 @@ export namespace client {
183
186
*/
184
187
File : string ;
185
188
}
189
+
190
+ interface CreateBankWireDirectPayIn {
191
+ /**
192
+ * The unique identifier of the credited wallet.
193
+ * In the case of the direct bank wire to the Repudiation Wallet,
194
+ * this value has the format CREDIT_CCY where CCY is the currency of the Client Wallet to be credited (e.g., CREDIT_EUR).
195
+ */
196
+ CreditedWalletId : string ;
197
+
198
+ /**
199
+ * Information about the declared funds to be wired by the platform to the returned bank account.
200
+ */
201
+ DeclaredDebitedFunds : MoneyData ;
202
+ }
186
203
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { wallet } from "../models/wallet";
3
3
import { CurrencyISO } from "../types" ;
4
4
import { transaction } from "../models/transaction" ;
5
5
import { base } from "../base" ;
6
+ import { payIn } from "../models/payIn" ;
6
7
import NoArgMethodOverload = base . NoArgMethodOverload ;
7
8
import MethodOverload = base . MethodOverload ;
8
9
import TwoArgsMethodOverload = base . TwoArgsMethodOverload ;
@@ -67,4 +68,10 @@ export class Clients {
67
68
getClientWalletTransactions : TwoArgsMethodOverload < wallet . ClientFundsType ,
68
69
CurrencyISO ,
69
70
transaction . TransactionData [ ] > ;
71
+
72
+ /**
73
+ * Create a Direct Bank Wire PayIn, instead of a Settlement Transfer, to the Repudiation Wallet in order to settle the negative balance due to a LOST dispute.
74
+ * The object expires 1 month after creation if no funds are received.
75
+ */
76
+ createBankWireDirectPayIn : MethodOverload < client . CreateBankWireDirectPayIn , payIn . BankWireDirectPayInData >
70
77
}
You can’t perform that action at this time.
0 commit comments