Class: Line::Bot::Message::Sticker

Inherits:
Base
  • Object
show all
Defined in:
lib/line/bot/message/sticker.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], #event_type, #initialize

Constructor Details

This class inherits a constructor from Line::Bot::Message::Base

Instance Method Details

#contentObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/line/bot/message/sticker.rb', line 8

def content
  {
    contentType: ContentType::STICKER,
    toType: 1,
    contentMetadata: {
      STKPKGID: attrs[:stkpkgid].to_s,
      STKID: attrs[:stkid].to_s,
      STKVER: attrs[:stkver].to_s,
    },
  }
end

#valid?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/line/bot/message/sticker.rb', line 20

def valid?
  attrs[:stkpkgid] && attrs[:stkid] && attrs[:stkver]
end