zuora_api 1.7.40 → 1.7.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_api/login.rb +36 -20
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 214e86bb52eddc6ab01627e7ea987c4c8371d6b0fb18ee67b248ee27fa493883
|
4
|
+
data.tar.gz: 8653b4b8dea2b4d891aad5d9702fae8331ed086b7d33c819f72393bdb9b025f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea2f8114229f2eb9cdbc3fc483e372aa4b9cd7fee055411e212eb47d3915583d0a0c94c50c5a4dc4ec70476fcc6fc90855bd83507146c26a1ad58aba9cf4904a
|
7
|
+
data.tar.gz: 743a34ae3864c9c907ee23d7689fe12218b9ef621a235851bd7633e2bfce58e50e2bf1ffb4fceb301f4756e0257a7115c0df966c4420cec4bf9fbecc5d13daa4
|
data/lib/zuora_api/login.rb
CHANGED
@@ -508,24 +508,29 @@ module ZuoraAPI
|
|
508
508
|
return output_xml, input_xml, response
|
509
509
|
end
|
510
510
|
rescue *CONNECTION_EXCEPTIONS => ex
|
511
|
-
|
511
|
+
if tries.zero?
|
512
|
+
Rails.logger.info("SOAP Call - #{ex.class} Timed out will retry after 5 seconds")
|
513
|
+
raise ex
|
514
|
+
end
|
512
515
|
|
513
516
|
tries -= 1
|
514
|
-
Rails.logger.info("SOAP Call - #{ex.class} Timed out will retry after 5 seconds")
|
515
517
|
sleep(self.timeout_sleep)
|
516
518
|
retry
|
517
519
|
rescue *CONNECTION_READ_EXCEPTIONS => ex
|
518
|
-
|
520
|
+
if tries.zero?
|
521
|
+
Rails.logger.info("SOAP Call - #{ex.class} Timed out will retry after 5 seconds")
|
522
|
+
raise ex
|
523
|
+
end
|
519
524
|
|
520
525
|
tries -= 1
|
521
526
|
|
522
527
|
if ex.is_a?(Errno::ECONNRESET) && ex.message.include?('SSL_connect')
|
523
528
|
retry
|
524
529
|
elsif timeout_retry
|
525
|
-
Rails.logger.info("SOAP Call - #{ex.class} Timed out will retry after 5 seconds")
|
526
530
|
sleep(self.timeout_sleep)
|
527
531
|
retry
|
528
532
|
else
|
533
|
+
Rails.logger.info("SOAP Call - #{ex.class} Timed out will retry after 5 seconds")
|
529
534
|
raise ex
|
530
535
|
end
|
531
536
|
rescue => ex
|
@@ -641,15 +646,19 @@ module ZuoraAPI
|
|
641
646
|
if body["faultcode"].present?
|
642
647
|
case body["faultcode"]
|
643
648
|
when "fns:MALFORMED_QUERY"
|
644
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(
|
649
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body["faultstring"], response)
|
645
650
|
when "fns:REQUEST_EXCEEDED_LIMIT"
|
646
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIRequestLimit.new(
|
651
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIRequestLimit.new(body["faultstring"], response)
|
647
652
|
when "fns:LOCK_COMPETITION"
|
648
|
-
raise ZuoraAPI::Exceptions::ZuoraAPILockCompetition.new(
|
653
|
+
raise ZuoraAPI::Exceptions::ZuoraAPILockCompetition.new(body["faultstring"], response)
|
649
654
|
when "INVALID_SESSION"
|
650
|
-
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(
|
655
|
+
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(body["faultstring"], response)
|
656
|
+
when /fns:INVALID_TYPE/
|
657
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body["faultstring"], response)
|
658
|
+
when /.*soapenv:Server.*/
|
659
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(body["faultstring"], response)
|
651
660
|
else
|
652
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("
|
661
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("Z:#{body["faultcode"]}::#{body["faultstring"]}", response)
|
653
662
|
end
|
654
663
|
end
|
655
664
|
|
@@ -753,7 +762,7 @@ module ZuoraAPI
|
|
753
762
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
754
763
|
end
|
755
764
|
when /.*TEMPORARY_ERROR/
|
756
|
-
raise ZuoraAPI::Exceptions::ZuoraAPITemporaryError.new(
|
765
|
+
raise ZuoraAPI::Exceptions::ZuoraAPITemporaryError.new(message, response, errors, success)
|
757
766
|
when /.*INVALID_VALUE/
|
758
767
|
if message.include?("data integrity violation")
|
759
768
|
raise ZuoraAPI::Exceptions::ZuoraDataIntegrity.new("Data Integrity Violation", response, errors), success
|
@@ -766,23 +775,23 @@ module ZuoraAPI
|
|
766
775
|
else
|
767
776
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
768
777
|
end
|
769
|
-
when /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/
|
778
|
+
when /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/, /CANNOT_DELETE/, /ACCOUNTING_PERIOD_CLOSED/
|
770
779
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
771
780
|
when /.*soapenv:Server.*/
|
772
781
|
if /Invalid value.*for type|Id is invalid/.match(message).present?
|
773
782
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
774
783
|
end
|
775
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(
|
784
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
|
776
785
|
end
|
777
786
|
|
778
787
|
if response.code == 500
|
779
788
|
if message.present?
|
780
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("
|
789
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("Z:#{error}::#{message}", response, errors, success)
|
781
790
|
else
|
782
791
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(response.body, response, errors, success)
|
783
792
|
end
|
784
793
|
else
|
785
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("
|
794
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new("Z:#{error}::#{message}", response, errors, success) if error.present?
|
786
795
|
end
|
787
796
|
end
|
788
797
|
|
@@ -864,10 +873,12 @@ module ZuoraAPI
|
|
864
873
|
des_hash[:related_objects] = output_xml.xpath(".//related-objects").xpath(".//object").map{ |x| [x.xpath(".//name").text.to_sym, [ [:url, x.attributes["href"].value], [:label, x.xpath(".//name").text ] ].to_h] }.to_h
|
865
874
|
end
|
866
875
|
rescue *(CONNECTION_EXCEPTIONS + CONNECTION_READ_EXCEPTIONS) => ex
|
867
|
-
|
876
|
+
if tries.zero?
|
877
|
+
Rails.logger.info("Describe - #{ex.class} Timed out will retry after 5 seconds")
|
878
|
+
raise ex
|
879
|
+
end
|
868
880
|
|
869
881
|
tries -= 1
|
870
|
-
Rails.logger.info("Describe - #{ex.class} Timed out will retry after 5 seconds")
|
871
882
|
sleep(self.timeout_sleep)
|
872
883
|
retry
|
873
884
|
rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
|
@@ -969,24 +980,29 @@ module ZuoraAPI
|
|
969
980
|
rescue ZuoraAPI::Exceptions::BadEntityError => ex
|
970
981
|
raise ex
|
971
982
|
rescue *CONNECTION_EXCEPTIONS => ex
|
972
|
-
|
983
|
+
if tries.zero?
|
984
|
+
Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
|
985
|
+
raise ex
|
986
|
+
end
|
973
987
|
|
974
988
|
tries -= 1
|
975
|
-
Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
|
976
989
|
sleep(self.timeout_sleep)
|
977
990
|
retry
|
978
991
|
rescue *CONNECTION_READ_EXCEPTIONS => ex
|
979
|
-
|
992
|
+
if tries.zero?
|
993
|
+
Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
|
994
|
+
raise ex
|
995
|
+
end
|
980
996
|
|
981
997
|
tries -= 1
|
982
998
|
|
983
999
|
if ex.is_a?(Errno::ECONNRESET) && ex.message.include?('SSL_connect')
|
984
1000
|
retry
|
985
1001
|
elsif timeout_retry
|
986
|
-
Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
|
987
1002
|
sleep(self.timeout_sleep)
|
988
1003
|
retry
|
989
1004
|
else
|
1005
|
+
Rails.logger.info("Rest Call - #{ex.class} Timed out will retry after 5 seconds")
|
990
1006
|
raise ex
|
991
1007
|
end
|
992
1008
|
rescue => ex
|
data/lib/zuora_api/version.rb
CHANGED
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.
|
4
|
+
version: 1.7.41
|
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-01-
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|