zuora_api 1.7.60 → 1.7.61a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50ecb83259da9f58c2dbad9a679cbb411f37d8ef23ebea2cffd9405b68f959e9
4
- data.tar.gz: fa497edac6fa08fb7ca2a1303d41cc495f0be03d1fef006a837c75d3f64fdd93
3
+ metadata.gz: 61febe9fbe7f75491e385756ea35ddb507ae2ac97f63545b2c7e8a989daf97ec
4
+ data.tar.gz: 1ecbdd5b89eddd1d6e3e4fe8fe3696577f85fb0ccb173519035ec68e7b3ce3e5
5
5
  SHA512:
6
- metadata.gz: 3f3001fbf45414d069597957dd0d4cee7bf89d32cf66113b2bb241cf449cd6e00c99d8e7a5766cb95152c6a36477f6beddad5548b37b6327ccdf3474d8bbe22c
7
- data.tar.gz: 55ebf58e10e4e813a64e47988d8b6e75dd7bb76f5fc26cf63800c83449585e4c154b4509f9ddcac97915e7f43b570f35cd92303fbe80516a4b0ca7905b2676fd
6
+ metadata.gz: 2c93d65aabc407f4116f83c3eda1fa61a2fbb6a903b7a81889092645863596b8e932ea1829c9a28c73838cbca93036682ca3a6be69194929ba7cdf30bfcf1f9a
7
+ data.tar.gz: 698f044f7484dbcd831ea3a05ed3e867f6b72b22269354571565ab0b995a56c11479bac45cd5640295a251e91c50e1406b7148cecf9ebfe205789054e2c5b44b
@@ -435,6 +435,7 @@ module ZuoraAPI
435
435
  z_session: true,
436
436
  timeout_retry: false,
437
437
  timeout: 120,
438
+ timeout_sleep_interval: self.timeout_sleep,
438
439
  output_exception_messages: true,
439
440
  **keyword_args)
440
441
  tries ||= 2
@@ -512,24 +513,24 @@ module ZuoraAPI
512
513
  if tries.zero?
513
514
  if output_exception_messages
514
515
  if Rails.logger.class.to_s == "Ougai::Logger"
515
- Rails.logger.error("SOAP Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
516
+ Rails.logger.error("SOAP Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
516
517
  else
517
- Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
518
+ Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
518
519
  end
519
520
  end
520
521
  raise ex
521
522
  end
522
523
 
523
524
  tries -= 1
524
- sleep(self.timeout_sleep)
525
+ sleep(timeout_sleep_interval)
525
526
  retry
526
527
  rescue *CONNECTION_READ_EXCEPTIONS => ex
527
528
  if tries.zero?
528
529
  if output_exception_messages
529
530
  if Rails.logger.class.to_s == "Ougai::Logger"
530
- Rails.logger.error("SOAP Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
531
+ Rails.logger.error("SOAP Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
531
532
  else
532
- Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
533
+ Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
533
534
  end
534
535
  end
535
536
  raise ex
@@ -540,14 +541,14 @@ module ZuoraAPI
540
541
  if ex.is_a?(Errno::ECONNRESET) && ex.message.include?('SSL_connect')
541
542
  retry
542
543
  elsif timeout_retry
543
- sleep(self.timeout_sleep)
544
+ sleep(timeout_sleep_interval)
544
545
  retry
545
546
  else
546
547
  if output_exception_messages
547
548
  if Rails.logger.class.to_s == "Ougai::Logger"
548
- Rails.logger.error("SOAP Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
549
+ Rails.logger.error("SOAP Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
549
550
  else
550
- Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
551
+ Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
551
552
  end
552
553
  end
553
554
  raise ex
@@ -994,6 +995,7 @@ module ZuoraAPI
994
995
  session_type: :basic,
995
996
  timeout_retry: false,
996
997
  timeout: 120,
998
+ timeout_sleep_interval: self.timeout_sleep,
997
999
  multipart: false,
998
1000
  stream_body: false,
999
1001
  output_exception_messages: true,
@@ -1022,20 +1024,20 @@ module ZuoraAPI
1022
1024
  multipart: multipart,
1023
1025
  stream_body: stream_body
1024
1026
  ).perform(&block)
1025
-
1026
- Rails.logger.debug("Response Code: #{response.code}") if debug
1027
- begin
1028
- output_json = JSON.parse(response.body)
1029
- rescue JSON::ParserError => ex
1030
- output_json = {}
1031
- end
1032
- Rails.logger.debug("Response JSON: #{output_json}") if debug && output_json.present?
1033
-
1034
- raise_errors(type: :JSON, body: output_json, response: response)
1035
1027
  rescue
1036
1028
  reset_files(body) if multipart
1037
1029
  raise
1038
1030
  end
1031
+
1032
+ Rails.logger.debug("Response Code: #{response.code}") if debug
1033
+ begin
1034
+ output_json = JSON.parse(response.body)
1035
+ rescue JSON::ParserError => ex
1036
+ output_json = {}
1037
+ end
1038
+ Rails.logger.debug("Response JSON: #{output_json}") if debug && output_json.present?
1039
+
1040
+ raise_errors(type: :JSON, body: output_json, response: response)
1039
1041
  rescue ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError => ex
1040
1042
  if self.class.to_s == 'ZuoraAPI::Oauth' && ex.message.include?("Authentication type is not supported by this Login")
1041
1043
  session_type = :bearer
@@ -1076,24 +1078,24 @@ module ZuoraAPI
1076
1078
  if tries.zero?
1077
1079
  if output_exception_messages
1078
1080
  if Rails.logger.class.to_s == "Ougai::Logger"
1079
- Rails.logger.error("Rest Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
1081
+ Rails.logger.error("Rest Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
1080
1082
  else
1081
- Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
1083
+ Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1082
1084
  end
1083
1085
  end
1084
1086
  raise ex
1085
1087
  end
1086
1088
 
1087
1089
  tries -= 1
1088
- sleep(self.timeout_sleep)
1090
+ sleep(timeout_sleep_interval)
1089
1091
  retry
1090
1092
  rescue *CONNECTION_READ_EXCEPTIONS => ex
1091
1093
  if tries.zero?
1092
1094
  if output_exception_messages
1093
1095
  if Rails.logger.class.to_s == "Ougai::Logger"
1094
- Rails.logger.error("Rest Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
1096
+ Rails.logger.error("Rest Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
1095
1097
  else
1096
- Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
1098
+ Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1097
1099
  end
1098
1100
  end
1099
1101
  raise ex
@@ -1104,14 +1106,14 @@ module ZuoraAPI
1104
1106
  if ex.is_a?(Errno::ECONNRESET) && ex.message.include?('SSL_connect')
1105
1107
  retry
1106
1108
  elsif timeout_retry
1107
- sleep(self.timeout_sleep)
1109
+ sleep(timeout_sleep_interval)
1108
1110
  retry
1109
1111
  else
1110
1112
  if output_exception_messages
1111
1113
  if Rails.logger.class.to_s == "Ougai::Logger"
1112
- Rails.logger.error("Rest Call - Timed out will retry after #{self.timeout_sleep} seconds", ex)
1114
+ Rails.logger.error("Rest Call - Timed out will retry after #{timeout_sleep_interval} seconds", ex)
1113
1115
  else
1114
- Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{self.timeout_sleep} seconds")
1116
+ Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1115
1117
  end
1116
1118
  end
1117
1119
  raise ex
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.60"
2
+ VERSION = "1.7.61a"
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.60
4
+ version: 1.7.61a
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-08 00:00:00.000000000 Z
11
+ date: 2020-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -182,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - ">"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: 1.3.1
188
188
  requirements: []
189
189
  rubygems_version: 3.0.3
190
190
  signing_key: