Class: Apps::Outlook::Schema::MessageCard

Inherits:
Base
  • Object
show all
Includes:
Concerns::Sections, Concerns::SortedPotentialActions, Schema::Concerns::PotentialAction
Defined in:
lib/apps/outlook/schema/message_card.rb

Overview

Constant Summary collapse

HEADER_NAMES =
%w[Card-Correlation-Id Action-Request-Id]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::SortedPotentialActions

#serialize_actions

Methods included from Concerns::Sections

#add_section, #sections

Instance Attribute Details

#correlation_idObject

UUID to track actions originating in email message



14
15
16
# File 'lib/apps/outlook/schema/message_card.rb', line 14

def correlation_id
  @correlation_id
end

#hide_original_bodyObject

For email only (hide email content if message card is duplicate)



16
17
18
# File 'lib/apps/outlook/schema/message_card.rb', line 16

def hide_original_body
  @hide_original_body
end

#originatorObject

provider ID (required for actionable emails)



15
16
17
# File 'lib/apps/outlook/schema/message_card.rb', line 15

def originator
  @originator
end

#summaryObject

Returns the value of attribute summary.



17
18
19
# File 'lib/apps/outlook/schema/message_card.rb', line 17

def summary
  @summary
end

#textObject

Returns the value of attribute text.



17
18
19
# File 'lib/apps/outlook/schema/message_card.rb', line 17

def text
  @text
end

#theme_colorObject

Returns the value of attribute theme_color.



19
20
21
# File 'lib/apps/outlook/schema/message_card.rb', line 19

def theme_color
  @theme_color
end

#titleObject

Returns the value of attribute title.



17
18
19
# File 'lib/apps/outlook/schema/message_card.rb', line 17

def title
  @title
end

Instance Method Details

#contextObject



21
22
23
# File 'lib/apps/outlook/schema/message_card.rb', line 21

def context
  'http://schema.org/extensions'
end

#serializeObject



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/apps/outlook/schema/message_card.rb', line 25

def serialize
  super.merge(
    "summary" => summary,
    "themeColor" => theme_color,
    "correlationId" => correlation_id,
    "originator" => originator,
    "hideOriginalBody" => hide_original_body,
    "title" => title,
    "text" => text
  )
end