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.



5808
5809
5810
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5808

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

Instance Attribute Details

#bodyString

The message body. Corresponds to the JSON property body

Returns:

  • (String)


5763
5764
5765
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5763

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



5772
5773
5774
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5772

def display_interval
  @display_interval
end

#headerString

The message header. Corresponds to the JSON property header

Returns:

  • (String)


5777
5778
5779
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5777

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)


5785
5786
5787
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5785

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)


5791
5792
5793
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5791

def kind
  @kind
end

#localized_bodyGoogle::Apis::WalletobjectsV1::LocalizedString

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



5796
5797
5798
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5796

def localized_body
  @localized_body
end

#localized_headerGoogle::Apis::WalletobjectsV1::LocalizedString

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



5801
5802
5803
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5801

def localized_header
  @localized_header
end

#message_typeString

The message type. Corresponds to the JSON property messageType

Returns:

  • (String)


5806
5807
5808
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5806

def message_type
  @message_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5813

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