1
1
import { BaseResource } from "."
2
- import { CheckPayment , CreateCheckPaymentSimulation , UnitConfig , UnitResponse } from "../types"
2
+ import { AtmAuthorizationRequest , CardTransactionAuthorizationRequest , CheckPayment , CreateAtmAuthorizationRequestSimulation ,
3
+ CreateCardPurchaseAuthorizationRequestSimulation , CreateCardTransactionAuthorizationRequestSimulation , CreateCheckPaymentSimulation , PurchaseAuthorizationRequest , UnitConfig , UnitResponse } from "../types"
3
4
import { AchReceivedPayment , Application , ApplicationDocument , AchPayment } from "../types"
4
5
import {
5
6
ApproveApplicationSimulation ,
@@ -139,4 +140,37 @@ export class Simulations extends BaseResource {
139
140
}
140
141
)
141
142
}
143
+
144
+ public async createCardTransactionAuthorizationRequest (
145
+ request : CreateCardTransactionAuthorizationRequestSimulation
146
+ ) : Promise < UnitResponse < CardTransactionAuthorizationRequest > > {
147
+ return this . httpPost < UnitResponse < CardTransactionAuthorizationRequest > > (
148
+ "authorization-requests/card-transaction" ,
149
+ {
150
+ data : request
151
+ }
152
+ )
153
+ }
154
+
155
+ public async createCardPurchaseAuthorizationRequest (
156
+ request : CreateCardPurchaseAuthorizationRequestSimulation
157
+ ) : Promise < UnitResponse < PurchaseAuthorizationRequest > > {
158
+ return this . httpPost < UnitResponse < PurchaseAuthorizationRequest > > (
159
+ "authorization-requests/purchase" ,
160
+ {
161
+ data : request
162
+ }
163
+ )
164
+ }
165
+
166
+ public async createAtmAuthorizationRequest (
167
+ request : CreateAtmAuthorizationRequestSimulation
168
+ ) : Promise < UnitResponse < AtmAuthorizationRequest > > {
169
+ return this . httpPost < UnitResponse < AtmAuthorizationRequest > > (
170
+ "authorization-requests/atm" ,
171
+ {
172
+ data : request
173
+ }
174
+ )
175
+ }
142
176
}
0 commit comments