zuora_api 1.11.7 → 1.11.8

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: 96d51c04ec6e65ee390a9f143f069966d12e5d3204159946a1bf2c295105153d
4
- data.tar.gz: 9c13b7d6715eaaa6f9c1c2ca18129ebec8bf8df638928d8370b219af6864317c
3
+ metadata.gz: 38e28f2bd7870815c491123e4802f8b88db525ecf65264ea8d4e9dd20f502800
4
+ data.tar.gz: da319cc2164cbd486f31e726877199a445dcad0311c25b220e139119d6163c8b
5
5
  SHA512:
6
- metadata.gz: ee14b715f13a7e6c428b962cd0626d8f04f516a5a917e47e720088d0ccf7b9843bc8836f6fc4a4bba518af0871e52979e65c0447983b0cb5edf6af25241fa768
7
- data.tar.gz: 48a58a517294070a1c8ef0175c578d83a107bc765faddfdd85233b93e15909d3e6ad63ee39bf08ac4874fa843f301d9e20c739c2628882f56374f270ddb8a03e
6
+ metadata.gz: e9181450aead9432c27611750f205042329f3ad2dee61f79d1bb2c0743e3ffb19898c705216392511b90aa115780f6fb3726d63e180df64104b800b0c13a563b
7
+ data.tar.gz: e9e578de9dd6be5916c35cbed90f436d4875714ee0b7bad11431a95bae3522c0f74eee53d820cdd33b09929b2cf297225e6484af998d51f201b28313c822bfea
@@ -876,6 +876,11 @@ module ZuoraAPI
876
876
  end
877
877
 
878
878
  if body.class == Hash && body['message'].present?
879
+
880
+ if body['message'] && body['code'].present?
881
+ raise_errors_helper(error: body['code'], message: body['message'], raise_final: false)
882
+ end
883
+
879
884
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(body['message'], response) if response.code == 500
880
885
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body['message'], response) if ![200,201,202].include?(response.code)
881
886
  end
@@ -965,7 +970,7 @@ module ZuoraAPI
965
970
  return error, success, message
966
971
  end
967
972
 
968
- def raise_errors_helper(error: nil, message: nil, response: nil, errors: [], success: [])
973
+ def raise_errors_helper(error: nil, message: nil, response: nil, errors: [], success: [], raise_final: true)
969
974
  case error
970
975
  when /.*INVALID_SESSION/
971
976
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(message, response, errors, success)
@@ -1009,7 +1014,7 @@ module ZuoraAPI
1009
1014
  end
1010
1015
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
1011
1016
  else
1012
- raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success)
1017
+ raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success) if raise_final
1013
1018
  end
1014
1019
  end
1015
1020
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.11.7"
2
+ VERSION = "1.11.8"
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.11.7
4
+ version: 1.11.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group