loco_bill 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/loco_bill/request.rb +9 -2
  2. metadata +4 -4
@@ -86,13 +86,15 @@ module LocoBill
86
86
  }
87
87
  case resp
88
88
  when Net::HTTPSuccess
89
- resp.body
89
+ [xml_body, resp.body]
90
90
  else
91
91
  resp.error!
92
92
  end
93
93
  end
94
94
 
95
- def process_response(raw_response)
95
+ def process_response(arr)
96
+ original_request, raw_response = arr
97
+
96
98
  puts "RAW RESPONSE: #{raw_response}" if LocoBill::Configuration.debug
97
99
  res = Hash.from_xml(raw_response)['response']
98
100
  res = res["#{@action}result"] || res["operationresult"]
@@ -101,6 +103,11 @@ module LocoBill
101
103
  if res[:status] == 'OK'
102
104
  RequestResult.new(res)
103
105
  else
106
+ HoptoadNotifier.notify(
107
+ :error_class => "LocoBill::RequestErrorExpanded",
108
+ :parameters => {:raw_response => raw_response, :original_request => original_request}
109
+ ) if Object.const_defined?(:HoptoadNotifier)
110
+
104
111
  raise RequestError.new "#{res[:errorcode]}: #{res[:errormessage]}"
105
112
  end
106
113
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - chris mcc
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-16 00:00:00 -04:00
17
+ date: 2010-07-08 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -77,6 +77,6 @@ rubyforge_project: loco_bill
77
77
  rubygems_version: 1.3.6
78
78
  signing_key:
79
79
  specification_version: 3
80
- summary: A ruby wrapper for interacting with Bill.com's developer API
80
+ summary: A ruby wrapper for interacting with Bill.com's developer API!
81
81
  test_files: []
82
82