resurgence-data 1.1.28 → 1.1.29

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.
@@ -49,6 +49,7 @@ export declare class CardChargeDTO {
49
49
  transactionReference: string;
50
50
  cardHolderName?: string;
51
51
  redirectUrl?: string;
52
+ amount: number;
52
53
  }
53
54
  export declare class CardChargeAuthorizationDto {
54
55
  transactionReference: string;
@@ -242,7 +242,7 @@ __decorate([
242
242
  __metadata("design:type", String)
243
243
  ], CardChargeDTO.prototype, "cardNumber", void 0);
244
244
  __decorate([
245
- (0, swagger_1.ApiProperty)({ description: "Charge CVV" }),
245
+ (0, swagger_1.ApiProperty)({ description: "Card CVV" }),
246
246
  (0, class_validator_1.IsNotEmpty)({ message: "You must provide a security code" }),
247
247
  (0, class_validator_1.IsNumberString)(),
248
248
  (0, class_validator_1.Length)(3, 3, { message: "Please check your security code" }),
@@ -282,6 +282,12 @@ __decorate([
282
282
  (0, class_validator_1.IsOptional)(),
283
283
  __metadata("design:type", String)
284
284
  ], CardChargeDTO.prototype, "redirectUrl", void 0);
285
+ __decorate([
286
+ (0, swagger_1.ApiProperty)({ description: "amount to be paid" }),
287
+ (0, class_validator_1.IsNumber)({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" }),
288
+ (0, class_validator_1.IsNotEmpty)({ message: "Please specify the amount to be paid" }),
289
+ __metadata("design:type", Number)
290
+ ], CardChargeDTO.prototype, "amount", void 0);
285
291
  class CardChargeAuthorizationDto {
286
292
  }
287
293
  exports.CardChargeAuthorizationDto = CardChargeAuthorizationDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -13,6 +13,7 @@ import {
13
13
  IsIP,
14
14
  IsUrl,
15
15
  IsEmail,
16
+ IsNumber,
16
17
  } from "class-validator";
17
18
 
18
19
  export class TransactionSplitDto {
@@ -199,7 +200,7 @@ export class CardChargeDTO {
199
200
  @IsNumberString()
200
201
  @MinLength(8, { message: "Please check you card number" })
201
202
  cardNumber: string;
202
- @ApiProperty({ description: "Charge CVV" })
203
+ @ApiProperty({ description: "Card CVV" })
203
204
  @IsNotEmpty({ message: "You must provide a security code" })
204
205
  @IsNumberString()
205
206
  @Length(3, 3, { message: "Please check your security code" })
@@ -226,6 +227,10 @@ export class CardChargeDTO {
226
227
  @ApiProperty({ description: "3D Secure redirect url for customer" })
227
228
  @IsOptional()
228
229
  redirectUrl?: string;
230
+ @ApiProperty({ description: "amount to be paid" })
231
+ @IsNumber({ allowNaN: false, allowInfinity: false }, { message: "Amount must be a number" })
232
+ @IsNotEmpty({ message: "Please specify the amount to be paid" })
233
+ amount: number;
229
234
  }
230
235
 
231
236
  export class CardChargeAuthorizationDto {