Class: SmswayApi::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/smsway_api/method.rb

Direct Known Subclasses

Balance, SendMessage

Defined Under Namespace

Classes: Balance, SendMessage

Instance Method Summary collapse

Instance Method Details

#build_xmlObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/smsway_api/method.rb', line 4

def build_xml
  xml = Builder::XmlMarkup.new
  xml.instruct!
  xml.request do
    yield(xml) if block_given?
    xml.security do
      xml.(value: SmswayApi.)
      xml.password(value:  SmswayApi.password)
    end
  end
  xml.target!
end

#http_verbObject



25
26
27
# File 'lib/smsway_api/method.rb', line 25

def http_verb
  :post
end

#parse_response(response) ⇒ Object



17
18
19
# File 'lib/smsway_api/method.rb', line 17

def parse_response response
  raise 'not implemented'
end

#uriObject



21
22
23
# File 'lib/smsway_api/method.rb', line 21

def uri
  ''
end