Class: Viberroo::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/viberroo/message.rb

Class Method Summary collapse

Class Method Details

.contact(params = {}) ⇒ Object



27
28
29
# File 'lib/viberroo/message.rb', line 27

def self.contact(params = {})
  { type: :contact }.merge(params)
end

.file(params = {}) ⇒ Object



23
24
25
# File 'lib/viberroo/message.rb', line 23

def self.file(params = {})
  { type: :file }.merge(params)
end

.location(params) ⇒ Object



11
12
13
# File 'lib/viberroo/message.rb', line 11

def self.location(params)
  { type: :location }.merge(params)
end

.picture(params = {}) ⇒ Object



15
16
17
# File 'lib/viberroo/message.rb', line 15

def self.picture(params = {})
  { type: :picture, text: '' }.merge(params)
end

.plain(params) ⇒ Object



3
4
5
# File 'lib/viberroo/message.rb', line 3

def self.plain(params)
  { type: :text }.merge(params)
end

.rich(params) ⇒ Object



7
8
9
# File 'lib/viberroo/message.rb', line 7

def self.rich(params)
  { type: :rich_media, min_api_version: 2 }.merge(params)
end

.sticker(params = {}) ⇒ Object



35
36
37
# File 'lib/viberroo/message.rb', line 35

def self.sticker(params = {})
  { type: :sticker }.merge(params)
end

.url(params = {}) ⇒ Object



31
32
33
# File 'lib/viberroo/message.rb', line 31

def self.url(params = {})
  { type: :url }.merge(params)
end

.video(params = {}) ⇒ Object



19
20
21
# File 'lib/viberroo/message.rb', line 19

def self.video(params = {})
  { type: :video }.merge(params)
end