Class: Pabx::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/pabx/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, response) ⇒ Response

Returns a new instance of Response.



5
6
7
8
9
10
11
# File 'lib/pabx/response.rb', line 5

def initialize(type,response)
  self.type = type
  self.success = self._parse_successfull(response)
  self.action_id = self._parse_action_id(response)
  self.message = self._parse_message(response)
  self.data = self._parse_data(response)
end

Instance Attribute Details

#action_idObject

Returns the value of attribute action_id.



3
4
5
# File 'lib/pabx/response.rb', line 3

def action_id
  @action_id
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/pabx/response.rb', line 3

def data
  @data
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/pabx/response.rb', line 3

def message
  @message
end

#successObject

Returns the value of attribute success.



3
4
5
# File 'lib/pabx/response.rb', line 3

def success
  @success
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/pabx/response.rb', line 3

def type
  @type
end