Google Pass EventTicketClass GET from API does not include `issuerName`, but `localizedIssuerName`
I'm working with the Google Pass for EventTicketClass. After successfully creating a Class, I am later retrieving it via the Event Ticket Class Repository GET function. The retrieval is OK, but the conversion to the Class object fails due to class validation on the API response.
Here is a sample API response:
{
"allowMultipleUsersPerObject": true,
"confirmationCodeLabel": "orderNumber",
"dateTime": {
"doorsOpen": "2023-01-18T17:30-05:00",
"end": "2023-01-18T21:00-05:00",
"kind": "walletobjects#eventDateTime",
"start": "2023-01-18T18:30-05:00"
},
"eventId": "my-id",
"eventName": {
"defaultValue": {
"kind": "walletobjects#translatedString",
"language": "en",
"value": "my event name"
},
"kind": "walletobjects#localizedString"
},
"homepageUri": {
"uri": "my.uri"
},
"id": "3388000000022084756.my.uri_my-id",
"kind": "walletobjects#eventTicketClass",
"localizedIssuerName": {
"defaultValue": {
"kind": "walletobjects#translatedString",
"language": "en",
"value": "myissuer"
},
"kind": "walletobjects#localizedString"
},
"multipleDevicesAndHoldersAllowedStatus": "multipleHolders",
"reviewStatus": "approved",
"venue": {
"address": {
"defaultValue": {
"kind": "walletobjects#translatedString",
"language": "en",
"value": "my address"
},
"kind": "walletobjects#localizedString"
},
"kind": "walletobjects#eventVenue",
"name": {
"defaultValue": {
"kind": "walletobjects#translatedString",
"language": "en",
"value": "my location"
},
"kind": "walletobjects#localizedString"
}
},
"version": "1"
}
BaseRepository calls the get function and when it runs return new $class($response); it throws a ValidationException with the message:
Validation errors:
- `Chiiya\Passes\Google\Passes\EventTicketClass->issuerName`: The field is required.
The response does not include issuerName, but localizedIssuerName. I believe this should be corrected to match the API's response.
Weird, according to the documentation it should be a required property: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#EventTicketClass
Is this an issue only for the GET request?
Weird, according to the documentation it should be a required property: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#EventTicketClass Is this an issue only for the
GETrequest?
Yes- it's only an issue in the GET request