zuora_api 1.7.65e → 1.7.65f

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
  SHA256:
3
- metadata.gz: abffdf9c6298ccf256b1dfdae3232d66080ae349ca16d0cc257d81671244fd60
4
- data.tar.gz: a86e9e56024321ca860e92df050407341b2c46ea07b592f604ebccc143810dc3
3
+ metadata.gz: e7d938d4f3650b7d013c75dd8331ff79d18892c3608f4a37e2709e5053203d4e
4
+ data.tar.gz: 97d6019971a7d1fe835e4dad6c58aa3768851dbd2193708811927baaafa864b8
5
5
  SHA512:
6
- metadata.gz: 24191f35512cf7a1a86fd8f807bb051bd69b6aa7ab9ca7517ede2432fec08b0e06cbe52dc64fb5c86cd58ad87275fe63b312aed3859372f2c28b64d139727db7
7
- data.tar.gz: 1c19a627ca1a287645c61078d667090ba84d185795d6d434245ab077531afca16f29b37168d4b3cab2cffc60d8e332f651842d37a5179d651c8e3942bfdff5f6
6
+ metadata.gz: f6926089bf23d4762906a3f292f42b8e66a7b6ec7c55e0fab3e38b78785f8fdb0e18e669e98227b13d0dc3e467476606e0634297ab1ca4535e8f09fa95faff9a
7
+ data.tar.gz: 6803980d193339f1eba377d6591716660cca17a21fb9b873f112d6308883314336fb308d97fd222d2009e2772a24c595dc4751428d502a900ccd3cc3f8e05e12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zuora_api (1.7.65e)
4
+ zuora_api (1.7.65f)
5
5
  httparty
6
6
  nokogiri
7
7
  railties (>= 4.1.0, < 6)
@@ -225,13 +225,14 @@ module ZuoraAPI
225
225
  end
226
226
 
227
227
  class ZuoraAPIReadTimeout < Net::ReadTimeout
228
- attr_reader :code, :response
228
+ attr_reader :code, :response, :request
229
229
  attr_writer :default_message
230
230
 
231
- def initialize(message = nil,response=nil, errors = [], successes = [], *args)
231
+ def initialize(message = nil, response = nil, request = nil, errors = [], successes = [], *args)
232
232
  @code = response.class.to_s == "HTTParty::Response" ? response.code : nil
233
233
  @message = message
234
234
  @response = response
235
+ @request = request
235
236
  @default_message = "Authentication type is not supported by this Login"
236
237
  end
237
238
 
@@ -474,12 +474,16 @@ module ZuoraAPI
474
474
  headers = { 'Content-Type' => "text/xml; charset=utf-8", 'Accept' => 'text/xml'}
475
475
  headers['Zuora-Track-Id'] = zuora_track_id if zuora_track_id.present?
476
476
 
477
- response = HTTParty.post(
477
+ request = HTTParty::Request.new(
478
+ Net::HTTP::Post,
478
479
  self.url,
479
- :body => xml.doc.to_xml(:save_with => XML_SAVE_OPTIONS).strip,
480
- :headers => headers,
481
- :timeout => timeout
480
+ body: xml.doc.to_xml(:save_with => XML_SAVE_OPTIONS).strip,
481
+ headers: headers,
482
+ timeout: timeout,
482
483
  )
484
+
485
+ response = request.perform
486
+
483
487
  output_xml = Nokogiri::XML(response.body)
484
488
  Rails.logger.debug("Response SOAP XML: #{output_xml.to_xml(:save_with => XML_SAVE_OPTIONS).strip}") if debug
485
489
 
@@ -544,7 +548,7 @@ module ZuoraAPI
544
548
  Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
545
549
  end
546
550
  end
547
- raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.instance_of?(Net::ReadTimeout)
551
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}", nil, request) if ex.instance_of?(Net::ReadTimeout)
548
552
  raise ex
549
553
  rescue => ex
550
554
  raise ex
@@ -1023,7 +1027,7 @@ module ZuoraAPI
1023
1027
  modified_headers = {'Content-Type' => "application/json; charset=utf-8"}.merge(authentication_headers).merge(headers)
1024
1028
 
1025
1029
  begin
1026
- response = HTTParty::Request.new(
1030
+ request = HTTParty::Request.new(
1027
1031
  "Net::HTTP::#{method.to_s.capitalize}".constantize,
1028
1032
  url,
1029
1033
  body: body,
@@ -1031,7 +1035,9 @@ module ZuoraAPI
1031
1035
  timeout: timeout,
1032
1036
  multipart: multipart,
1033
1037
  stream_body: stream_body
1034
- ).perform(&block)
1038
+ )
1039
+
1040
+ response = request.perform(&block)
1035
1041
 
1036
1042
  Rails.logger.debug("Response Code: #{response.code}") if debug
1037
1043
  begin
@@ -1115,7 +1121,7 @@ module ZuoraAPI
1115
1121
  Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1116
1122
  end
1117
1123
  end
1118
- raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.instance_of?(Net::ReadTimeout)
1124
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}", nil, request) if ex.instance_of?(Net::ReadTimeout)
1119
1125
  raise ex
1120
1126
  rescue => ex
1121
1127
  raise ex
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.65e"
2
+ VERSION = "1.7.65f"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.65e
4
+ version: 1.7.65f
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-28 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler