zuora_api 1.7.43 → 1.7.44

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: b11a677647c5905a4fdde8bee799732e93fa8c1b327a090b3d17adbbf8955058
4
- data.tar.gz: a44d3a07added97058792c164f453dc2e57670c58b2596c5b4285071b79b0ae2
3
+ metadata.gz: 5c41d6dd1dbd9a4295b5bc51d4fce6d12f3f754d6078c2e07cf2da30da7c0968
4
+ data.tar.gz: eb505fe8a19eaa9f62f0ffad34fc00b3da4a12fbc8d61a030c24aebbc4a604cd
5
5
  SHA512:
6
- metadata.gz: f400385cbb040ca5bc61db231dc31a2431f6edfb473b67a7eb55352446f8d214906621c1c033d1aad9e489fbba96510b51f97f6b01b10af7ef920ce9456b5c74
7
- data.tar.gz: 51c145638fd18d09b3cd84f06e67cc95946ef6833e322c8ccb5dacfe1c3e0bcfb2d0b396326aa327407dee0d60f6e9b839bdf6c44a57e72cb3207bbf70c0cebd
6
+ metadata.gz: e8d139d75ee71fe6e3aedc9cac00744530b991e1c413f45102abdb8ac2d2eba48e462e9cf243b8a1994cba08c66efae147182d4fd05a547344c08cd88b890b23
7
+ data.tar.gz: e33f029050a4b8b91f5b076b1e509d4f7a5cb2edb8751b17cc639ae0a0ee4c5034250fa280b63e514c043cc4e9caecfc511fdf51ce7a5a3da2ecde48531279b2
@@ -926,15 +926,20 @@ module ZuoraAPI
926
926
  authentication_headers = z_session ? {"Authorization" => self.get_session(prefix: true, auth_type: session_type) } : {}
927
927
  modified_headers = {'Content-Type' => "application/json; charset=utf-8"}.merge(authentication_headers).merge(headers)
928
928
 
929
- response = HTTParty::Request.new(
930
- "Net::HTTP::#{method.to_s.capitalize}".constantize,
931
- url,
932
- body: body,
933
- headers: modified_headers,
934
- timeout: timeout,
935
- multipart: multipart,
936
- stream_body: stream_body
937
- ).perform(&block)
929
+ begin
930
+ response = HTTParty::Request.new(
931
+ "Net::HTTP::#{method.to_s.capitalize}".constantize,
932
+ url,
933
+ body: body,
934
+ headers: modified_headers,
935
+ timeout: timeout,
936
+ multipart: multipart,
937
+ stream_body: stream_body
938
+ ).perform(&block)
939
+ rescue
940
+ rewind_files(body) if multipart
941
+ raise
942
+ end
938
943
 
939
944
  Rails.logger.debug("Response Code: #{response.code}") if debug
940
945
  begin
@@ -947,7 +952,8 @@ module ZuoraAPI
947
952
  raise_errors(type: :JSON, body: output_json, response: response)
948
953
  rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
949
954
  if self.class.to_s == 'ZuoraAPI::Oauth' && ex.message.include?("Authentication type is not supported by this Login")
950
- self.rest_call(method: method.to_sym, url: url, body: body, debug: debug, errors: errors, z_session: z_session, session_type: :bearer, timeout_retry: timeout_retry, timeout: timeout)
955
+ session_type = :bearer
956
+ retry
951
957
  else
952
958
  Rails.logger.debug("Rest Call - Session Bad Auth type")
953
959
  raise ex
@@ -963,8 +969,6 @@ module ZuoraAPI
963
969
  return [output_json, ex.response]
964
970
  end
965
971
 
966
- rewind_files(body) if multipart
967
-
968
972
  retry
969
973
  else
970
974
  if errors.include?(ex.class)
@@ -990,7 +994,6 @@ module ZuoraAPI
990
994
 
991
995
  tries -= 1
992
996
  sleep(self.timeout_sleep)
993
- rewind_files(body) if multipart
994
997
  retry
995
998
  rescue *CONNECTION_READ_EXCEPTIONS => ex
996
999
  if tries.zero?
@@ -1001,11 +1004,9 @@ module ZuoraAPI
1001
1004
  tries -= 1
1002
1005
 
1003
1006
  if ex.is_a?(Errno::ECONNRESET) && ex.message.include?('SSL_connect')
1004
- rewind_files(body) if multipart
1005
1007
  retry
1006
1008
  elsif timeout_retry
1007
1009
  sleep(self.timeout_sleep)
1008
- rewind_files(body) if multipart
1009
1010
  retry
1010
1011
  else
1011
1012
  Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.43"
2
+ VERSION = "1.7.44"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.43
4
+ version: 1.7.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group