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

Returns a new instance of Message.



5965
5966
5967
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5965

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

Instance Attribute Details

#bodyString

The message body. Corresponds to the JSON property body

Returns:

  • (String)


5920
5921
5922
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5920

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



5929
5930
5931
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5929

def display_interval
  @display_interval
end

#headerString

The message header. Corresponds to the JSON property header

Returns:

  • (String)


5934
5935
5936
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5934

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

Returns:

  • (String)


5942
5943
5944
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5942

def id
  @id
end

#kindString

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

Returns:

  • (String)


5948
5949
5950
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5948

def kind
  @kind
end

#localized_bodyGoogle::Apis::WalletobjectsV1::LocalizedString

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



5953
5954
5955
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5953

def localized_body
  @localized_body
end

#localized_headerGoogle::Apis::WalletobjectsV1::LocalizedString

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



5958
5959
5960
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5958

def localized_header
  @localized_header
end

#message_typeString

The message type. Corresponds to the JSON property messageType

Returns:

  • (String)


5963
5964
5965
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5963

def message_type
  @message_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5970

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