Skip to content

Commit

Permalink
🚧 (mon-pix): return hasSeenCertificationInstructions on candidate par…
Browse files Browse the repository at this point in the history
…ticipation route
  • Loading branch information
AndreiaPena committed Jul 3, 2024
1 parent 2776663 commit a7b5f61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/lib/domain/models/CertificationCandidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const certificationCandidateParticipationJoiSchema = Joi.object({
.empty(null),
prepaymentCode: Joi.string().allow(null).optional(),
subscriptions: Joi.array().items(subscriptionSchema).unique('type').required(),
hasSeenCertificationInstructions: Joi.boolean().optional(),
});

class CertificationCandidate {
Expand Down Expand Up @@ -84,6 +85,7 @@ class CertificationCandidate {
billingMode = null,
prepaymentCode = null,
subscriptions = [],
hasSeenCertificationInstructions = false,
} = {}) {
this.id = id;
this.firstName = firstName;
Expand All @@ -107,6 +109,7 @@ class CertificationCandidate {
this.subscriptions = subscriptions;
this.billingMode = billingMode;
this.prepaymentCode = prepaymentCode;
this.hasSeenCertificationInstructions = hasSeenCertificationInstructions;

Object.defineProperty(this, 'complementaryCertification', {
enumerable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const serialize = function (certificationCandidates) {
'complementaryCertification',
'billingMode',
'prepaymentCode',
'hasSeenCertificationInstructions',
],
}).serialize(certificationCandidates);
};
Expand Down

0 comments on commit a7b5f61

Please sign in to comment.