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.



5685
5686
5687
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5685

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

Instance Attribute Details

#bodyString

The message body. Corresponds to the JSON property body

Returns:

  • (String)


5640
5641
5642
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5640

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



5649
5650
5651
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5649

def display_interval
  @display_interval
end

#headerString

The message header. Corresponds to the JSON property header

Returns:

  • (String)


5654
5655
5656
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5654

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)


5662
5663
5664
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5662

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)


5668
5669
5670
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5668

def kind
  @kind
end

#localized_bodyGoogle::Apis::WalletobjectsV1::LocalizedString

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



5673
5674
5675
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5673

def localized_body
  @localized_body
end

#localized_headerGoogle::Apis::WalletobjectsV1::LocalizedString

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



5678
5679
5680
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5678

def localized_header
  @localized_header
end

#message_typeString

The message type. Corresponds to the JSON property messageType

Returns:

  • (String)


5683
5684
5685
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5683

def message_type
  @message_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5690

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