-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Pass object additional feilds #31
Conversation
Pass.Coupon, Pass.EventTicket, Pass.EventTicket, and Pass.Generic don't have any additional feilds availabe so we don't need to provide methods for additional feilds. boardingPass was being overwritten by the additonal feild method, now fixed. resolves coorasse#29
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need some additional tests here? I am unsure about removing all these fields. Can you give me more context? Thank you
Co-authored-by: Alessandro Rodi <coorasse@gmail.com>
If you look at the documentation for Pass.Coupon Pass.EventTicket Pass.Generic Pass.BoardingPass is the only pass type that allows for an additional property. |
pass[:groupingIdentifier] = @pass.grouping_identifier if @pass.grouping_identifier | ||
pass[:nfc] = @pass.nfc if @pass.nfc | ||
pass[:relevantDate] = @pass.relevant_date if @pass.relevant_date | ||
pass[:semantics] = @pass.semantics if @pass.semantics | ||
pass[:store_card] = @pass.store_card if @pass.store_card | ||
pass[:userInfo] = @pass.user_info if @pass.user_info | ||
|
||
pass[@pass.pass_type] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can be confident that this does not cause any new problems, because
pass[:coupon]
, pass[:eventTicket]
, and pass[:generic]
were being overwritten by pass[@pass.pass_type]
here.
pass[:store_card]
should've been pass[:storeCard]
, so it never did anything useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Pass.Coupon, Pass.EventTicket, Pass.EventTicket, and Pass.Generic don't have any additional feilds availabe so we don't need to provide methods for additional fields.
https://developer.apple.com/documentation/walletpasses/pass
boardingPass was being overwritten by the additional field method, now fixed.
resolves #29