quickbooks_web_connector 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a491cb9f0549304c2e08c21c13aa9e868229df2
4
- data.tar.gz: 6e4caa2e3cf018b81afeff3dbe436ca10ad30dbd
3
+ metadata.gz: b2e912797e3e57c180ac2352fd6af413756477b6
4
+ data.tar.gz: 69a2215d9cfd9cfaec81791f45bcf0e0e1d40073
5
5
  SHA512:
6
- metadata.gz: 85328aefc3f6c40d314a3cab1759803bd8a74e6227a74d91b9fc6141ffa45c394bc2f0282ca96a9c9ca7d189c2ff96913226c31c434078f20a76eedd6b579cc2
7
- data.tar.gz: f945ddb296107d75d70af862cf55c86723722b5c09be3b39d9ec17976919e68165f0e5a86f99d4b50c97f73cf20220457cfe84be69634be8c2de46d20ee823fe
6
+ metadata.gz: 41a8cc565adfe6f49e9faba2cae56efef59d819366a3bc77af8bc573ee96a81bf323923ac20a11a182c5d1f73903bd4038bfe4c0bfac3c7a2155acc8465a2687
7
+ data.tar.gz: e328d02a1a61d429c35c0fbb551b80f66134dd0a4d69de319599ff846ee5b6c4dc8f7bf7f1144707458fe4503f063b8366166a2423d26c9689e83cb702f57252
@@ -0,0 +1,6 @@
1
+ module QuickbooksWebConnector
2
+
3
+ class RequestXMLError < StandardError
4
+ end
5
+
6
+ end
@@ -78,7 +78,7 @@ module QuickbooksWebConnector
78
78
  request_builder_class.perform(*job_args)
79
79
  rescue Object => ex
80
80
  fail(ex)
81
- nil
81
+ :failed
82
82
  end
83
83
  end
84
84
 
@@ -74,10 +74,20 @@ module QuickbooksWebConnector
74
74
  # parameters SendRequestXMLResponse - {http://developer.intuit.com/}sendRequestXMLResponse
75
75
  #
76
76
  def sendRequestXML(parameters)
77
- job = QuickbooksWebConnector::Job.peek
78
- request_xml = job ? job.request_xml : nil
79
-
80
- SendRequestXMLResponse.new request_xml
77
+ if (job = QuickbooksWebConnector::Job.peek)
78
+ case (request_xml = job.request_xml)
79
+ when :failed
80
+ raise RequestXMLError
81
+ else
82
+ SendRequestXMLResponse.new request_xml
83
+ end
84
+ else
85
+ SendRequestXMLResponse.new nil
86
+ end
87
+ rescue RequestXMLError
88
+ # Remove the job from the queue since it fails to build. The job should have already created a failure.
89
+ QuickbooksWebConnector.pop
90
+ retry
81
91
  end
82
92
 
83
93
  # SYNOPSIS
@@ -1,3 +1,3 @@
1
1
  module QuickbooksWebConnector
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -3,6 +3,7 @@ require 'securerandom'
3
3
  require 'soap/rpc/standaloneServer'
4
4
 
5
5
  require 'quickbooks_web_connector/config'
6
+ require 'quickbooks_web_connector/errors'
6
7
  require 'quickbooks_web_connector/failure'
7
8
  require 'quickbooks_web_connector/job'
8
9
  require 'quickbooks_web_connector/json_coder'