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 type of the message.
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.
5585 5586 5587 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5585 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ String
The message body.
Corresponds to the JSON property body
5540 5541 5542 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5540 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
5549 5550 5551 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5549 def display_interval @display_interval end |
#header ⇒ String
The message header.
Corresponds to the JSON property header
5554 5555 5556 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5554 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
5562 5563 5564 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5562 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
5568 5569 5570 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5568 def kind @kind end |
#localized_body ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message body.
Corresponds to the JSON property localizedBody
5573 5574 5575 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5573 def localized_body @localized_body end |
#localized_header ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Translated strings for the message header.
Corresponds to the JSON property localizedHeader
5578 5579 5580 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5578 def localized_header @localized_header end |
#message_type ⇒ String
The type of the message. Currently, this can only be set for offers.
Corresponds to the JSON property messageType
5583 5584 5585 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5583 def @message_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5590 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 |