Class: Google::Apis::WalletobjectsV1::Message

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Message



6131
6132
6133
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6131

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bodyString

The message body. Corresponds to the JSON property body



6086
6087
6088
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6086

def body
  @body
end

#display_intervalGoogle::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



6095
6096
6097
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6095

def display_interval
  @display_interval
end

#headerString

The message header. Corresponds to the JSON property header



6100
6101
6102
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6100

def header
  @header
end

#idString

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



6108
6109
6110
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6108

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " walletobjects#walletObjectMessage". Corresponds to the JSON property kind



6114
6115
6116
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6114

def kind
  @kind
end

#localized_bodyGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the message body. Corresponds to the JSON property localizedBody



6119
6120
6121
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6119

def localized_body
  @localized_body
end

#localized_headerGoogle::Apis::WalletobjectsV1::LocalizedString

Translated strings for the message header. Corresponds to the JSON property localizedHeader



6124
6125
6126
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6124

def localized_header
  @localized_header
end

#message_typeString

The message type. Corresponds to the JSON property messageType



6129
6130
6131
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6129

def message_type
  @message_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6136

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