Class: Gupshup::REST::WhatsApp

Inherits:
Object
  • Object
show all
Defined in:
lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb

Direct Known Subclasses

OutboundMessage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, apikey, version = '1', phone = "917384811114") ⇒ WhatsApp

Returns a new instance of WhatsApp.



7
8
9
10
11
12
13
14
15
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 7

def initialize(app, apikey, version = '1', phone="917384811114")
  @app = app
  @apikey = apikey
  @version = version
  @content_type = 'application/x-www-form-urlencoded'
  @base_uri = 'https://api.gupshup.io'
  @path = '/sm/api/v1/msg'
  @phone = phone
end

Instance Attribute Details

#apikeyObject (readonly)

Returns the value of attribute apikey.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def apikey
  @apikey
end

#appObject (readonly)

Returns the value of attribute app.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def app
  @app
end

#base_uriObject (readonly)

Returns the value of attribute base_uri.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def base_uri
  @base_uri
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def content_type
  @content_type
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def path
  @path
end

#phoneObject (readonly)

Returns the value of attribute phone.



5
6
7
# File 'lib/gupshup_whatsapp/rest/whatsapp/whatsapp.rb', line 5

def phone
  @phone
end