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.



5873
5874
5875
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5873

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

Instance Attribute Details

#bodyString

The message body. Corresponds to the JSON property body

Returns:

  • (String)


5828
5829
5830
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5828

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



5837
5838
5839
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5837

def display_interval
  @display_interval
end

#headerString

The message header. Corresponds to the JSON property header

Returns:

  • (String)


5842
5843
5844
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5842

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)


5850
5851
5852
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5850

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)


5856
5857
5858
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5856

def kind
  @kind
end

#localized_bodyGoogle::Apis::WalletobjectsV1::LocalizedString

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



5861
5862
5863
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5861

def localized_body
  @localized_body
end

#localized_headerGoogle::Apis::WalletobjectsV1::LocalizedString

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



5866
5867
5868
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5866

def localized_header
  @localized_header
end

#message_typeString

The message type. Corresponds to the JSON property messageType

Returns:

  • (String)


5871
5872
5873
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5871

def message_type
  @message_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5878

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