mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Added upcomingPassInformation getter
This commit is contained in:
@@ -276,7 +276,7 @@ export default class PKPass extends Bundle {
|
||||
|
||||
if (this.type !== "eventTicket") {
|
||||
throw new TypeError(
|
||||
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE,
|
||||
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE_SET,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -297,6 +297,16 @@ export default class PKPass extends Bundle {
|
||||
this[propsSymbol].upcomingPassInformation = value;
|
||||
}
|
||||
|
||||
public get upcomingPassInformation(): Schemas.UpcomingPassInformationEntry[] {
|
||||
if (this.type !== "eventTicket") {
|
||||
throw new TypeError(
|
||||
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE_GET,
|
||||
);
|
||||
}
|
||||
|
||||
return this[propsSymbol].upcomingPassInformation || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting a transitType property
|
||||
* for a boardingPass.
|
||||
|
||||
Reference in New Issue
Block a user