Eventticketobject: addmessage

Requires authorization

Adds a message to the event ticket object referenced by the given object ID.

Request

HTTP request

POST https://www.googleapis.com/walletobjects/v1/eventTicketObject/resourceId/addMessage

Parameters

Parameter name Value Description
Path parameters
resourceId string The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/wallet_object.issuer

Request body

In the request body, supply data with the following structure:

{
  "message": {
    "kind": "walletobjects#walletObjectMessage",
    "header": string,
    "localizedHeader": {
      "kind": "walletobjects#localizedString",
      "translatedValues": [
        {
          "kind": "walletobjects#translatedString",
          "language": string,
          "value": string
        }
      ],
      "defaultValue": {
        "kind": "walletobjects#translatedString",
        "language": string,
        "value": string
      }
    },
    "body": string,
    "localizedBody": {
      "kind": "walletobjects#localizedString",
      "translatedValues": [
        {
          "kind": "walletobjects#translatedString",
          "language": string,
          "value": string
        }
      ],
      "defaultValue": {
        "kind": "walletobjects#translatedString",
        "language": string,
        "value": string
      }
    },
    "displayInterval": {
      "kind": "walletobjects#timeInterval",
      "start": {
        "date": string
      },
      "end": {
        "date": string
      }
    },
    "id": string,
    "messageType": string
  }
}
Property name Value Description Notes
message nested object Container object for messages.
message.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#walletObjectMessage".
message.header string The message header. writable
message.localizedHeader nested object Translated strings for the message header. writable
message.localizedHeader.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#localizedString".
message.localizedHeader.translatedValues[] list Contains the translations for the string. writable
message.localizedHeader.translatedValues[].kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#translatedString".
message.localizedHeader.translatedValues[].language string Represents the BCP 47 language tag. Example values are "en-US", "en-GB", "de", or "de-AT".

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedHeader.translatedValues[].value string The UTF-8 encoded translated string.

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedHeader.defaultValue nested object Contains the string to be displayed if no appropriate translation is available.

Required for each nested object of kind walletobjects#localizedString.
writable
message.localizedHeader.defaultValue.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#translatedString".
message.localizedHeader.defaultValue.language string Represents the BCP 47 language tag. Example values are "en-US", "en-GB", "de", or "de-AT".

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedHeader.defaultValue.value string The UTF-8 encoded translated string.

Required for each nested object of kind walletobjects#translatedString.
writable
message.body string The message body. writable
message.localizedBody nested object Translated strings for the message body. writable
message.localizedBody.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#localizedString".
message.localizedBody.translatedValues[] list Contains the translations for the string. writable
message.localizedBody.translatedValues[].kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#translatedString".
message.localizedBody.translatedValues[].language string Represents the BCP 47 language tag. Example values are "en-US", "en-GB", "de", or "de-AT".

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedBody.translatedValues[].value string The UTF-8 encoded translated string.

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedBody.defaultValue nested object Contains the string to be displayed if no appropriate translation is available.

Required for each nested object of kind walletobjects#localizedString.
writable
message.localizedBody.defaultValue.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#translatedString".
message.localizedBody.defaultValue.language string Represents the BCP 47 language tag. Example values are "en-US", "en-GB", "de", or "de-AT".

Required for each nested object of kind walletobjects#translatedString.
writable
message.localizedBody.defaultValue.value string The UTF-8 encoded translated string.

Required for each nested object of kind walletobjects#translatedString.
writable
message.displayInterval nested object The period of time that the message will be displayed to users. You can define both a startTime and endTime for each message. A message is displayed immediately after a Wallet Object is inserted unless a startTime is set. The message will appear in a list of messages indefinitely if endTime is not provided. writable
message.displayInterval.kind string Identifies what kind of resource this is. Value: the fixed string "walletobjects#timeInterval".
message.displayInterval.start nested object Start time of the interval.

Offset is not required. If an offset is provided and end time is set, end must also include an offset.
writable
message.displayInterval.start.date string An ISO 8601 extended format date/time. Offset may or may not be required (refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601).

For example:

1985-04-12T23:20:50.52Z would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.

1985-04-12T19:20:50.52-04:00 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year.

1985-04-12T19:20:50.52 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information.

Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of 2018-06-19T18:30:00-04:00 will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles.

Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of 2018-06-19T18:30:00 will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones.
writable
message.displayInterval.end nested object End time of the interval.

Offset is not required. If an offset is provided and start time is set, start must also include an offset.
writable
message.displayInterval.end.date string An ISO 8601 extended format date/time. Offset may or may not be required (refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601).

For example:

1985-04-12T23:20:50.52Z would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.

1985-04-12T19:20:50.52-04:00 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year.

1985-04-12T19:20:50.52 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information.

Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of 2018-06-19T18:30:00-04:00 will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles.

Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of 2018-06-19T18:30:00 will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones.
writable
message.id string The ID associated with a message. This field is here to enable ease of management of messages. Notice ID values could possibly duplicate across multiple messages in the same class/instance, and care must be taken to select a reasonable ID for each message. writable
message.messageType string The type of the message. Currently, this can only be set for offers.

Acceptable values are:
  • "expirationNotification": Notification to display for an offer expiration. The displayInterval.start.date sets the time the notification will appear. It can be set up to 30 days prior to the expiration date. If a time span greater than this is specified, then the notification will trigger at the 30 day mark.
  • "text": Renders the message as text on the card details screen. This is the default message type.
writable

Response

If successful, this method returns a response body with the following structure:

{
  "resource": eventticketobject Resource
}
Property name Value Description Notes
resource nested object A REST resource.

Envoyer des commentaires concernant…

Google Pay for Passes