const newClass = {
id: `${issuerId}.${classSuffix}`,
classTemplateInfo: {
cardTemplateOverride: {
cardRowTemplateInfos: [
{
twoItems: {
startItem: {
firstValue: {
fields: [
{
fieldPath: "object.textModulesData['date']",
},
],
},
},
endItem: {
firstValue: {
fields: [
{
fieldPath: "object.textModulesData['time']",
},
],
},
},
},
},
{
oneItem: {
item: {
firstValue: {
fields: [
{
fieldPath: "object.textModulesData['pax']",
},
],
},
},
},
},
],
},
},
};
const newObject = {
id: `${issuerId}.${objectSuffix}`,
classId: `${issuerId}.${classSuffix}`,
genericType: "GENERIC_TYPE_UNSPECIFIED",
state: "ACTIVE",
logo: {
sourceUri: {
uri: "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/pass_google_logo.jpg",
},
contentDescription: {
defaultValue: {
language: "en-US",
value: "LOGO_IMAGE_DESCRIPTION",
},
},
},
cardTitle: {
defaultValue: {
language: "en-US",
value: "User Name",
},
},
subheader: {
defaultValue: {
language: "en-US",
value: "Demo demo",
},
},
header: {
defaultValue: {
language: "en-US",
value: "PARTY",
},
},
textModulesData: [
{
id: "date",
header: "DATE",
body: "4th FEB' 24",
},
{
id: "time",
header: "TIME",
body: "12 AM",
},
{
id: "pax",
header: "PAX",
body: "4",
},
],
barcode: {
type: "QR_CODE",
value: "BARCODE_VALUE",
alternateText: "12324334",
},
hexBackgroundColor: "#c01b3b",
heroImage: {
sourceUri: {
uri: "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/google-io-hero-demo-only.png",
},
contentDescription: {
defaultValue: {
language: "en-US",
value: "HERO_IMAGE_DESCRIPTION",
},
},
},
};
This is waht I need to acheive. Can someone help me to fix this?
Help me to get this date , time and pax visible on card. please.
I am using the json that the pass builder has provided. but cant understand whats wrong here.
If someone is having any working code please provide the structure to help to complete the working of this pass .
New contributor
Aleena Antony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.