Class: Google::Apis::WalletobjectsV1::Message
- Inherits:
-
Object
- Object
- Google::Apis::WalletobjectsV1::Message
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/walletobjects_v1/classes.rb,
lib/google/apis/walletobjects_v1/representations.rb,
lib/google/apis/walletobjects_v1/representations.rb
Overview
A message that will be displayed with a Valuable
Instance Attribute Summary collapse
-
#body ⇒ String
The message body.
-
#display_interval ⇒ Google::Apis::WalletobjectsV1::TimeInterval
The period of time that the message will be displayed to users.
-
#header ⇒ String
The message header.
-
#id ⇒ String
The ID associated with a message.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#localized_body ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message body.
-
#localized_header ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message header.
-
#message_type ⇒ String
The message type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Message
constructor
A new instance of Message.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Message
Returns a new instance of Message.
5723 5724 5725 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5723 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ String
The message body.
Corresponds to the JSON property body
5678 5679 5680 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5678 def body @body end |
#display_interval ⇒ Google::Apis::WalletobjectsV1::TimeInterval
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.
Corresponds to the JSON property displayInterval
5687 5688 5689 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5687 def display_interval @display_interval end |
#header ⇒ String
The message header.
Corresponds to the JSON property header
5692 5693 5694 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5692 def header @header end |
#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.
Corresponds to the JSON property id
5700 5701 5702 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5700 def id @id end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "
walletobjects#walletObjectMessage"
.
Corresponds to the JSON property kind
5706 5707 5708 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5706 def kind @kind end |
#localized_body ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message body.
Corresponds to the JSON property localizedBody
5711 5712 5713 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5711 def localized_body @localized_body end |
#localized_header ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message header.
Corresponds to the JSON property localizedHeader
5716 5717 5718 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5716 def localized_header @localized_header end |
#message_type ⇒ String
The message type.
Corresponds to the JSON property messageType
5721 5722 5723 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5721 def @message_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5728 def update!(**args) @body = args[:body] if args.key?(:body) @display_interval = args[:display_interval] if args.key?(:display_interval) @header = args[:header] if args.key?(:header) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @localized_body = args[:localized_body] if args.key?(:localized_body) @localized_header = args[:localized_header] if args.key?(:localized_header) @message_type = args[:message_type] if args.key?(:message_type) end |