UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

75 lines (71 loc) 3.07 kB
'use strict'; var tslib = require('tslib'); var microserviceHelpers = require('@lomray/microservice-helpers'); var classValidator = require('class-validator'); var classValidatorJsonschema = require('class-validator-jsonschema'); var typeorm = require('typeorm'); let EvidenceDetails = class EvidenceDetails { }; tslib.__decorate([ classValidatorJsonschema.JSONSchema({ description: 'Microservice dispute id', }), typeorm.PrimaryColumn('uuid'), classValidator.Length(1, 36), tslib.__metadata("design:type", String) ], EvidenceDetails.prototype, "disputeId", void 0); tslib.__decorate([ classValidatorJsonschema.JSONSchema({ description: 'Whether evidence has been submitted', }), typeorm.Column({ type: 'boolean', default: false }), classValidator.IsBoolean(), tslib.__metadata("design:type", Boolean) ], EvidenceDetails.prototype, "hasEvidence", void 0); tslib.__decorate([ classValidatorJsonschema.JSONSchema({ description: 'The number of times evidence has been submitted. Typically, evidence can be submitted only once.', }), typeorm.Column({ type: 'int', default: 0 }), classValidator.Min(0), classValidator.IsNumber(), microserviceHelpers.IsUndefinable(), tslib.__metadata("design:type", Number) ], EvidenceDetails.prototype, "submissionCount", void 0); tslib.__decorate([ classValidatorJsonschema.JSONSchema({ description: 'Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer’s bank or credit card company doesn’t allow a response for this particular dispute', }), typeorm.Column({ type: 'timestamp', default: null }), microserviceHelpers.IsTypeormDate(), microserviceHelpers.IsUndefinable(), tslib.__metadata("design:type", Object) ], EvidenceDetails.prototype, "dueBy", void 0); tslib.__decorate([ classValidatorJsonschema.JSONSchema({ description: 'Whether the last evidence submission was submitted past the due date. Defaults to false if no evidence submissions have occurred. If true, then delivery of the latest evidence is not guaranteed.', }), typeorm.Column({ type: 'boolean' }), classValidator.IsBoolean(), microserviceHelpers.IsUndefinable(), tslib.__metadata("design:type", Boolean) ], EvidenceDetails.prototype, "isPastBy", void 0); tslib.__decorate([ typeorm.OneToOne('Dispute', 'evidenceDetails'), classValidator.IsObject(), microserviceHelpers.IsUndefinable(), typeorm.JoinColumn({ name: 'disputeId', referencedColumnName: 'id' }), tslib.__metadata("design:type", Function) ], EvidenceDetails.prototype, "dispute", void 0); EvidenceDetails = tslib.__decorate([ classValidatorJsonschema.JSONSchema({ title: 'Evidence details', description: 'Dispute evidence details', properties: { dispute: { $ref: '#/definitions/Dispute' }, }, }), typeorm.Entity() ], EvidenceDetails); var EvidenceDetails$1 = EvidenceDetails; module.exports = EvidenceDetails$1;