resurgence-data 1.1.33 → 1.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integration/flutterwave/payloads.d.ts +8 -0
- package/dist/payment/payment-request/payment-request.dto.d.ts +8 -0
- package/dist/payment/payment-request/payment-request.dto.js +38 -1
- package/package.json +1 -1
- package/src/integration/flutterwave/payloads.ts +11 -0
- package/src/payment/payment-request/payment-request.dto.ts +30 -0
@@ -253,3 +253,11 @@ export interface TransactionCachePayload {
|
|
253
253
|
flwId: number;
|
254
254
|
transactionReference: string;
|
255
255
|
}
|
256
|
+
export interface FlutterwaveUSSDChargePayload {
|
257
|
+
account_bank: string;
|
258
|
+
amount: number;
|
259
|
+
currency: string;
|
260
|
+
email: string;
|
261
|
+
tx_ref: string;
|
262
|
+
fullname: string;
|
263
|
+
}
|
@@ -65,3 +65,11 @@ export declare class CardValidationPayload {
|
|
65
65
|
transactionReference: string;
|
66
66
|
otp: string;
|
67
67
|
}
|
68
|
+
export declare class USSDChargeDto {
|
69
|
+
transactionReference: string;
|
70
|
+
currency: string;
|
71
|
+
amount: number;
|
72
|
+
bankCode: string;
|
73
|
+
emailAddress?: string;
|
74
|
+
fullName?: string;
|
75
|
+
}
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.CardValidationPayload = exports.CardChargeAuthorizationDto = exports.CardChargeDTO = exports.APIPaymentRequestDto = exports.PaymentRequestDto = exports.TransactionSplitDto = void 0;
|
12
|
+
exports.USSDChargeDto = exports.CardValidationPayload = exports.CardChargeAuthorizationDto = exports.CardChargeDTO = exports.APIPaymentRequestDto = exports.PaymentRequestDto = exports.TransactionSplitDto = void 0;
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
14
14
|
const class_validator_1 = require("class-validator");
|
15
15
|
class TransactionSplitDto {
|
@@ -349,3 +349,40 @@ __decorate([
|
|
349
349
|
(0, class_validator_1.IsNotEmpty)({ message: "OTP is required" }),
|
350
350
|
__metadata("design:type", String)
|
351
351
|
], CardValidationPayload.prototype, "otp", void 0);
|
352
|
+
class USSDChargeDto {
|
353
|
+
}
|
354
|
+
exports.USSDChargeDto = USSDChargeDto;
|
355
|
+
__decorate([
|
356
|
+
(0, swagger_1.ApiProperty)({ description: "Transaction reference" }),
|
357
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please provide your transaction reference" }),
|
358
|
+
(0, class_validator_1.IsString)({ message: "Transaction reference must be a string" }),
|
359
|
+
__metadata("design:type", String)
|
360
|
+
], USSDChargeDto.prototype, "transactionReference", void 0);
|
361
|
+
__decorate([
|
362
|
+
(0, swagger_1.ApiProperty)({ description: "Charge currency" }),
|
363
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please check your currency" }),
|
364
|
+
__metadata("design:type", String)
|
365
|
+
], USSDChargeDto.prototype, "currency", void 0);
|
366
|
+
__decorate([
|
367
|
+
(0, swagger_1.ApiProperty)({ description: "amount to be paid" }),
|
368
|
+
(0, class_validator_1.IsNumber)({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" }),
|
369
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please specify the amount to be paid" }),
|
370
|
+
__metadata("design:type", Number)
|
371
|
+
], USSDChargeDto.prototype, "amount", void 0);
|
372
|
+
__decorate([
|
373
|
+
(0, swagger_1.ApiProperty)({ description: "Selected Bank Code" }),
|
374
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Please specify which bank you want " }),
|
375
|
+
__metadata("design:type", String)
|
376
|
+
], USSDChargeDto.prototype, "bankCode", void 0);
|
377
|
+
__decorate([
|
378
|
+
(0, swagger_1.ApiProperty)({ description: "Email address for the customer", required: false }),
|
379
|
+
(0, class_validator_1.IsString)({ message: "Email address must be a string" }),
|
380
|
+
(0, class_validator_1.IsOptional)(),
|
381
|
+
__metadata("design:type", String)
|
382
|
+
], USSDChargeDto.prototype, "emailAddress", void 0);
|
383
|
+
__decorate([
|
384
|
+
(0, swagger_1.ApiProperty)({ description: "Full name of the customer", required: false }),
|
385
|
+
(0, class_validator_1.IsString)({ message: "Full Name must be a string" }),
|
386
|
+
(0, class_validator_1.IsOptional)(),
|
387
|
+
__metadata("design:type", String)
|
388
|
+
], USSDChargeDto.prototype, "fullName", void 0);
|
package/package.json
CHANGED
@@ -268,3 +268,14 @@ export interface TransactionCachePayload {
|
|
268
268
|
flwId: number;
|
269
269
|
transactionReference: string;
|
270
270
|
}
|
271
|
+
|
272
|
+
//UUSD
|
273
|
+
|
274
|
+
export interface FlutterwaveUSSDChargePayload {
|
275
|
+
account_bank: string;
|
276
|
+
amount: number;
|
277
|
+
currency: string;
|
278
|
+
email: string;
|
279
|
+
tx_ref: string;
|
280
|
+
fullname: string;
|
281
|
+
}
|
@@ -281,3 +281,33 @@ export class CardValidationPayload {
|
|
281
281
|
@IsNotEmpty({ message: "OTP is required" })
|
282
282
|
otp: string;
|
283
283
|
}
|
284
|
+
|
285
|
+
export class USSDChargeDto {
|
286
|
+
@ApiProperty({ description: "Transaction reference" })
|
287
|
+
@IsNotEmpty({ message: "Please provide your transaction reference" })
|
288
|
+
@IsString({ message: "Transaction reference must be a string" })
|
289
|
+
transactionReference: string;
|
290
|
+
|
291
|
+
@ApiProperty({ description: "Charge currency" })
|
292
|
+
@IsNotEmpty({ message: "Please check your currency" })
|
293
|
+
currency: string;
|
294
|
+
|
295
|
+
@ApiProperty({ description: "amount to be paid" })
|
296
|
+
@IsNumber({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" })
|
297
|
+
@IsNotEmpty({ message: "Please specify the amount to be paid" })
|
298
|
+
amount: number;
|
299
|
+
|
300
|
+
@ApiProperty({ description: "Selected Bank Code" })
|
301
|
+
@IsNotEmpty({ message: "Please specify which bank you want " })
|
302
|
+
bankCode: string;
|
303
|
+
|
304
|
+
@ApiProperty({ description: "Email address for the customer", required: false })
|
305
|
+
@IsString({ message: "Email address must be a string" })
|
306
|
+
@IsOptional()
|
307
|
+
emailAddress?: string;
|
308
|
+
|
309
|
+
@ApiProperty({ description: "Full name of the customer", required: false })
|
310
|
+
@IsString({ message: "Full Name must be a string" })
|
311
|
+
@IsOptional()
|
312
|
+
fullName?: string;
|
313
|
+
}
|