resurgence-data 1.1.34 → 1.1.35

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.
@@ -73,3 +73,10 @@ export declare class USSDChargeDto {
73
73
  emailAddress?: string;
74
74
  fullName?: string;
75
75
  }
76
+ export declare class BankTransferChargeDto {
77
+ transactionReference: string;
78
+ currency: string;
79
+ amount: number;
80
+ emailAddress?: string;
81
+ fullName?: string;
82
+ }
@@ -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.USSDChargeDto = exports.CardValidationPayload = exports.CardChargeAuthorizationDto = exports.CardChargeDTO = exports.APIPaymentRequestDto = exports.PaymentRequestDto = exports.TransactionSplitDto = void 0;
12
+ exports.BankTransferChargeDto = 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 {
@@ -386,3 +386,35 @@ __decorate([
386
386
  (0, class_validator_1.IsOptional)(),
387
387
  __metadata("design:type", String)
388
388
  ], USSDChargeDto.prototype, "fullName", void 0);
389
+ class BankTransferChargeDto {
390
+ }
391
+ exports.BankTransferChargeDto = BankTransferChargeDto;
392
+ __decorate([
393
+ (0, swagger_1.ApiProperty)({ description: "Transaction reference" }),
394
+ (0, class_validator_1.IsNotEmpty)({ message: "Please provide your transaction reference" }),
395
+ (0, class_validator_1.IsString)({ message: "Transaction reference must be a string" }),
396
+ __metadata("design:type", String)
397
+ ], BankTransferChargeDto.prototype, "transactionReference", void 0);
398
+ __decorate([
399
+ (0, swagger_1.ApiProperty)({ description: "Charge currency" }),
400
+ (0, class_validator_1.IsNotEmpty)({ message: "Please check your currency" }),
401
+ __metadata("design:type", String)
402
+ ], BankTransferChargeDto.prototype, "currency", void 0);
403
+ __decorate([
404
+ (0, swagger_1.ApiProperty)({ description: "amount to be paid" }),
405
+ (0, class_validator_1.IsNumber)({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" }),
406
+ (0, class_validator_1.IsNotEmpty)({ message: "Please specify the amount to be paid" }),
407
+ __metadata("design:type", Number)
408
+ ], BankTransferChargeDto.prototype, "amount", void 0);
409
+ __decorate([
410
+ (0, swagger_1.ApiProperty)({ description: "Email address for the customer", required: false }),
411
+ (0, class_validator_1.IsString)({ message: "Email address must be a string" }),
412
+ (0, class_validator_1.IsOptional)(),
413
+ __metadata("design:type", String)
414
+ ], BankTransferChargeDto.prototype, "emailAddress", void 0);
415
+ __decorate([
416
+ (0, swagger_1.ApiProperty)({ description: "Full name of the customer", required: false }),
417
+ (0, class_validator_1.IsString)({ message: "Full Name must be a string" }),
418
+ (0, class_validator_1.IsOptional)(),
419
+ __metadata("design:type", String)
420
+ ], BankTransferChargeDto.prototype, "fullName", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.1.34",
3
+ "version": "1.1.35",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -311,3 +311,29 @@ export class USSDChargeDto {
311
311
  @IsOptional()
312
312
  fullName?: string;
313
313
  }
314
+
315
+ export class BankTransferChargeDto {
316
+ @ApiProperty({ description: "Transaction reference" })
317
+ @IsNotEmpty({ message: "Please provide your transaction reference" })
318
+ @IsString({ message: "Transaction reference must be a string" })
319
+ transactionReference: string;
320
+
321
+ @ApiProperty({ description: "Charge currency" })
322
+ @IsNotEmpty({ message: "Please check your currency" })
323
+ currency: string;
324
+
325
+ @ApiProperty({ description: "amount to be paid" })
326
+ @IsNumber({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" })
327
+ @IsNotEmpty({ message: "Please specify the amount to be paid" })
328
+ amount: number;
329
+
330
+ @ApiProperty({ description: "Email address for the customer", required: false })
331
+ @IsString({ message: "Email address must be a string" })
332
+ @IsOptional()
333
+ emailAddress?: string;
334
+
335
+ @ApiProperty({ description: "Full name of the customer", required: false })
336
+ @IsString({ message: "Full Name must be a string" })
337
+ @IsOptional()
338
+ fullName?: string;
339
+ }