Class: Fishbowl::Objects::BaseObject

Inherits:
Object
  • Object
show all
Defined in:
lib/fishbowl/objects/base_object.rb

Constant Summary collapse

@@ticket =
nil

Instance Method Summary collapse

Instance Method Details

#send_request(request, expected_response = 'FbiMsgsRs') ⇒ Object



4
5
6
7
8
9
10
# File 'lib/fishbowl/objects/base_object.rb', line 4

def send_request(request, expected_response = 'FbiMsgsRs')
  code, response = Fishbowl::Connection.send(build_request(request), expected_response)
  Fishbowl::Errors.confirm_success_or_raise(code)
  puts "Response successful" if Fishbowl.configuration.debug.eql? true
  @@ticket = response.xpath("/FbiXml/Ticket/Key").text
  [code, response]
end