mirror of
https://github.com/google-wallet/rest-samples.git
synced 2026-01-08 05:03:54 -05:00
minor updates to .NET formatting, corrected links in java README
This commit is contained in:
@@ -66,7 +66,8 @@ class DemoEventTicket
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -190,8 +191,10 @@ class DemoEventTicket
|
||||
}
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData> {
|
||||
new TextModuleData {
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
@@ -199,27 +202,36 @@ class DemoEventTicket
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri> {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData> {
|
||||
new ImageModuleData {
|
||||
MainImage = new Image {
|
||||
SourceUri = new ImageUri {
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString {
|
||||
DefaultValue = new TranslatedString {
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
@@ -233,8 +245,10 @@ class DemoEventTicket
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint> {
|
||||
new LatLongPoint {
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
@@ -384,8 +398,10 @@ class DemoEventTicket
|
||||
}
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData> {
|
||||
new TextModuleData {
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
@@ -393,27 +409,36 @@ class DemoEventTicket
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri> {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData> {
|
||||
new ImageModuleData {
|
||||
MainImage = new Image {
|
||||
SourceUri = new ImageUri {
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString {
|
||||
DefaultValue = new TranslatedString {
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
@@ -427,8 +452,10 @@ class DemoEventTicket
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint> {
|
||||
new LatLongPoint {
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
@@ -481,7 +508,8 @@ class DemoEventTicket
|
||||
{
|
||||
iss = credentials.Id,
|
||||
aud = "google",
|
||||
origins = new string[] {
|
||||
origins = new string[]
|
||||
{
|
||||
"www.example.com"
|
||||
},
|
||||
typ = "savetowallet",
|
||||
@@ -489,10 +517,12 @@ class DemoEventTicket
|
||||
{
|
||||
// The listed classes and objects will be created
|
||||
// when the user saves the pass to their wallet
|
||||
eventTicketClasses = new JObject[] {
|
||||
eventTicketClasses = new JObject[]
|
||||
{
|
||||
serializedClass
|
||||
},
|
||||
eventTicketObjects = new JObject[] {
|
||||
eventTicketObjects = new JObject[]
|
||||
{
|
||||
serializedObject
|
||||
}
|
||||
})),
|
||||
@@ -626,8 +656,10 @@ class DemoEventTicket
|
||||
}
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData> {
|
||||
new TextModuleData {
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
@@ -635,27 +667,36 @@ class DemoEventTicket
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri> {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri {
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData> {
|
||||
new ImageModuleData {
|
||||
MainImage = new Image {
|
||||
SourceUri = new ImageUri {
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString {
|
||||
DefaultValue = new TranslatedString {
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
@@ -669,8 +710,10 @@ class DemoEventTicket
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint> {
|
||||
new LatLongPoint {
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
|
||||
@@ -66,7 +66,8 @@ class DemoFlight
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
|
||||
@@ -65,7 +65,8 @@ class DemoGeneric
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -179,54 +180,54 @@ class DemoGeneric
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
new ImageModuleData
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
MainImage = new Image
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
|
||||
@@ -66,7 +66,8 @@ class DemoGiftCard
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -183,67 +184,67 @@ class DemoGiftCard
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
new ImageModuleData
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
MainImage = new Image
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
CardNumber = "Card number",
|
||||
Pin = "1234",
|
||||
Balance = new Money
|
||||
@@ -355,67 +356,67 @@ class DemoGiftCard
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
new ImageModuleData
|
||||
MainImage = new Image
|
||||
{
|
||||
MainImage = new Image
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
CardNumber = "Card number",
|
||||
Pin = "1234",
|
||||
Balance = new Money
|
||||
|
||||
@@ -66,7 +66,8 @@ class DemoLoyalty
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -199,67 +200,67 @@ class DemoLoyalty
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
new ImageModuleData
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
MainImage = new Image
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
AccountId = "Account id",
|
||||
AccountName = "Account name",
|
||||
LoyaltyPoints = new LoyaltyPoints
|
||||
@@ -386,14 +387,14 @@ class DemoLoyalty
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
@@ -413,40 +414,40 @@ class DemoLoyalty
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
new ImageModuleData
|
||||
MainImage = new Image
|
||||
{
|
||||
MainImage = new Image
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
AccountId = "Account id",
|
||||
AccountName = "Account name",
|
||||
LoyaltyPoints = new LoyaltyPoints
|
||||
|
||||
@@ -66,7 +66,8 @@ class DemoOffer
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -186,67 +187,67 @@ class DemoOffer
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
new ImageModuleData
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
MainImage = new Image
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
ValidTimeInterval = new TimeInterval
|
||||
{
|
||||
Start = new Google.Apis.Walletobjects.v1.Data.DateTime
|
||||
@@ -361,67 +362,67 @@ class DemoOffer
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
new ImageModuleData
|
||||
MainImage = new Image
|
||||
{
|
||||
MainImage = new Image
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
ValidTimeInterval = new TimeInterval
|
||||
{
|
||||
Start = new Google.Apis.Walletobjects.v1.Data.DateTime
|
||||
|
||||
@@ -66,7 +66,8 @@ class DemoTransit
|
||||
{
|
||||
credentials = (ServiceAccountCredential)GoogleCredential
|
||||
.FromFile(keyFilePath)
|
||||
.CreateScoped(new[] {
|
||||
.CreateScoped(new[]
|
||||
{
|
||||
"https://www.googleapis.com/auth/wallet_object.issuer"
|
||||
})
|
||||
.UnderlyingCredential;
|
||||
@@ -199,67 +200,67 @@ class DemoTransit
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
MainImage = new Image
|
||||
new ImageModuleData
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
MainImage = new Image
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
PassengerType = "SINGLE_PASSENGER",
|
||||
PassengerNames = "Passenger names",
|
||||
TicketLeg = new TicketLeg
|
||||
@@ -409,67 +410,67 @@ class DemoTransit
|
||||
}
|
||||
},
|
||||
TextModulesData = new List<TextModuleData>
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
new TextModuleData
|
||||
{
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Header = "Text module header",
|
||||
Body = "Text module body",
|
||||
Id = "TEXT_MODULE_ID"
|
||||
}
|
||||
},
|
||||
LinksModuleData = new LinksModuleData
|
||||
{
|
||||
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
UriValue = "http://maps.google.com/",
|
||||
Description = "Link module URI description",
|
||||
Id = "LINK_MODULE_URI_ID"
|
||||
},
|
||||
new Google.Apis.Walletobjects.v1.Data.Uri
|
||||
{
|
||||
UriValue = "tel:6505555555",
|
||||
Description = "Link module tel description",
|
||||
Id = "LINK_MODULE_TEL_ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
ImageModulesData = new List<ImageModuleData>
|
||||
{
|
||||
new ImageModuleData
|
||||
{
|
||||
new ImageModuleData
|
||||
MainImage = new Image
|
||||
{
|
||||
MainImage = new Image
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
SourceUri = new ImageUri
|
||||
{
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
ContentDescription = new LocalizedString
|
||||
{
|
||||
DefaultValue = new TranslatedString
|
||||
{
|
||||
Language = "en-US",
|
||||
Value = "Image module description"
|
||||
}
|
||||
}
|
||||
},
|
||||
Id = "IMAGE_MODULE_ID"
|
||||
}
|
||||
},
|
||||
Barcode = new Barcode
|
||||
{
|
||||
Type = "QR_CODE",
|
||||
Value = "QR code"
|
||||
},
|
||||
Locations = new List<LatLongPoint>
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
new LatLongPoint
|
||||
{
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
Latitude = 37.424015499999996,
|
||||
Longitude = -122.09259560000001
|
||||
}
|
||||
},
|
||||
PassengerType = "SINGLE_PASSENGER",
|
||||
PassengerNames = "Passenger names",
|
||||
TicketLeg = new TicketLeg
|
||||
|
||||
@@ -8,13 +8,13 @@ creating a pass class, updating issuer permissions, and more.
|
||||
|
||||
| Pass type | File |
|
||||
|-----------|------|
|
||||
| Event tickets | [DemoEventTicket.cs](./DemoEventTicket.cs) |
|
||||
| Flight boarding passes | [DemoFlight.cs](./DemoFlight.cs) |
|
||||
| Generic passes | [DemoGeneric.cs](./DemoGeneric.cs) |
|
||||
| Gift cards | [DemoGiftCard.cs](./DemoGiftCard.cs) |
|
||||
| Loyalty program membership | [DemoLoyalty.cs](./DemoLoyalty.cs) |
|
||||
| Offers and promotions | [DemoOffer.cs](./DemoOffer.cs) |
|
||||
| Transit passes | [DemoTransit.cs](./DemoTransit.cs) |
|
||||
| Event tickets | [DemoEventTicket.java](./src/main/java/DemoEventTicket.java) |
|
||||
| Flight boarding passes | [DemoFlight.java](./src/main/java/DemoFlight.java) |
|
||||
| Generic passes | [DemoGeneric.java](./src/main/java/DemoGeneric.java) |
|
||||
| Gift cards | [DemoGiftCard.java](./src/main/java/DemoGiftCard.java) |
|
||||
| Loyalty program membership | [DemoLoyalty.java](./src/main/java/DemoLoyalty.java) |
|
||||
| Offers and promotions | [DemoOffer.java](./src/main/java/DemoOffer.java) |
|
||||
| Transit passes | [DemoTransit.java](./src/main/java/DemoTransit.java) |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
0
python/__init__.py
Normal file
0
python/__init__.py
Normal file
Reference in New Issue
Block a user