zuora_api 1.7.7b → 1.7.7d
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +15 -16
- data/gemfiles/Gemfile-rails.5.0.x +5 -0
- data/gemfiles/Gemfile-rails.5.1.x +5 -0
- data/gemfiles/Gemfile-rails.5.2.x +5 -0
- data/gemfiles/Gemfile-rails.6.0.x +5 -0
- data/lib/zuora_api/login.rb +14 -2
- data/lib/zuora_api/version.rb +1 -1
- data/zuora_api.gemspec +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06ea9e3edcec3fe4fdd4f8f77a0b393dc7b7008c1ad8122daf7b4979a2a30f91
|
4
|
+
data.tar.gz: d18b6753bb06443cdf7ad915ff03c54e069900a40568313c79a31a4c2947ba1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48da927e43428795532797726669d5d911506cb4cf53ad4f927623135a436a49ba2efb00a1c017ba097fb7dd89848f72e28329983a48b57c316b4422658dd31
|
7
|
+
data.tar.gz: 99097cd17e7954fa5a05ae96b3479344be576146b909575b066aa14634e7afe295f057762aaf230387e809db4ce406305e7e1c2a273d08d5bf73db09bbef0071
|
data/.gitlab-ci.yml
CHANGED
@@ -1,21 +1,8 @@
|
|
1
1
|
image: ruby:2.7
|
2
2
|
stages:
|
3
|
-
- setup
|
4
3
|
- test
|
5
4
|
- deploy
|
6
5
|
|
7
|
-
setup:
|
8
|
-
stage: setup
|
9
|
-
allow_failure: true
|
10
|
-
cache:
|
11
|
-
key: gems
|
12
|
-
paths:
|
13
|
-
- vendor/bundle
|
14
|
-
script:
|
15
|
-
- apt-get update -qy
|
16
|
-
- apt-get install -y nodejs
|
17
|
-
- bundle install
|
18
|
-
|
19
6
|
rubocop-testing:
|
20
7
|
stage: test
|
21
8
|
allow_failure: true
|
@@ -30,11 +17,23 @@ security-testing:
|
|
30
17
|
- gem install brakeman
|
31
18
|
- brakeman
|
32
19
|
|
33
|
-
|
20
|
+
ruby:test:
|
34
21
|
stage: test
|
22
|
+
cache:
|
23
|
+
key: ruby:$RUBY_VERSION-rails:$RAILS_VERSION
|
24
|
+
paths:
|
25
|
+
- vendor/ruby
|
26
|
+
parallel:
|
27
|
+
matrix:
|
28
|
+
- RUBY_VERSION: "2.7"
|
29
|
+
RAILS_VERSION: ["5.0", "5.1", "5.2", "6.0"]
|
30
|
+
before_script:
|
31
|
+
- bundle config set path 'vendor/ruby'
|
32
|
+
- bundle config --global gemfile "gemfiles/Gemfile-rails.$RAILS_VERSION.x"
|
33
|
+
- bundle install
|
35
34
|
script:
|
36
|
-
|
37
|
-
|
35
|
+
- bundle exec rails -v
|
36
|
+
- bundle exec rspec
|
38
37
|
coverage: '/\(\d+.\d+\%\) covered/'
|
39
38
|
|
40
39
|
rubygems-deploy:
|
data/lib/zuora_api/login.rb
CHANGED
@@ -703,6 +703,8 @@ module ZuoraAPI
|
|
703
703
|
if body['code'].present? && /61$/.match(body['code'].to_s).present? # if last 2 digits of code are 61
|
704
704
|
raise ZuoraAPI::Exceptions::ZuoraAPITemporaryError.new(body['message'], nil, body['details'])
|
705
705
|
end
|
706
|
+
when /^\/api\/v1\/payment_plans.*/
|
707
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body['error'], response) if body['error']
|
706
708
|
end
|
707
709
|
|
708
710
|
body = body.dig("results").present? ? body["results"] : body if body.class == Hash
|
@@ -853,7 +855,7 @@ module ZuoraAPI
|
|
853
855
|
output_json = JSON.parse(response.body)
|
854
856
|
self.raise_errors(type: :JSON, body: output_json, response: response)
|
855
857
|
|
856
|
-
elsif (response_content_types.include?('application/xml') || response_content_types.include?('text/xml')) and type != :xml
|
858
|
+
elsif (response_content_types.include?('application/xml') || response_content_types.include?('text/xml') || response_content_types.include?('application/soap+xml')) and type != :xml
|
857
859
|
output_xml = Nokogiri::XML(response.body)
|
858
860
|
self.raise_errors(type: :SOAP, body: output_xml, response: response)
|
859
861
|
|
@@ -901,6 +903,11 @@ module ZuoraAPI
|
|
901
903
|
message = body.xpath('//ns1:Message', 'ns1' =>'http://api.zuora.com/').text
|
902
904
|
end
|
903
905
|
|
906
|
+
if error.blank? || message.blank?
|
907
|
+
error = body.xpath('//soapenv:Value', 'soapenv'=>'http://www.w3.org/2003/05/soap-envelope').text
|
908
|
+
message = body.xpath('//soapenv:Text', 'soapenv'=>'http://www.w3.org/2003/05/soap-envelope').text
|
909
|
+
end
|
910
|
+
|
904
911
|
#Update/Create/Delete Calls with multiple requests and responses
|
905
912
|
if body.xpath('//ns1:result', 'ns1' =>'http://api.zuora.com/').size > 0 && body.xpath('//ns1:Errors', 'ns1' =>'http://api.zuora.com/').size > 0
|
906
913
|
error = []
|
@@ -951,10 +958,15 @@ module ZuoraAPI
|
|
951
958
|
when /.*soapenv:Server.*/
|
952
959
|
if /^Invalid value.*for type.*|^Id is invalid|^date string can not be less than 19 charactors$/.match(message).present?
|
953
960
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
954
|
-
elsif /^Invalid white space character \(.*\) in text to output$|^Invalid null character in text to output$/.match(message).present?
|
961
|
+
elsif /^unknown$|^Invalid white space character \(.*\) in text to output$|^Invalid null character in text to output$/.match(message).present?
|
955
962
|
raise ZuoraAPI::Exceptions::ZuoraAPIUnkownError.new(message, response, errors, success)
|
956
963
|
end
|
957
964
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
|
965
|
+
when /soapenv:Receiver/
|
966
|
+
if /^com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character.*$/.match(message).present?
|
967
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
|
968
|
+
end
|
969
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
|
958
970
|
else
|
959
971
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success)
|
960
972
|
end
|
data/lib/zuora_api/version.rb
CHANGED
data/zuora_api.gemspec
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.7d
|
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-09-
|
11
|
+
date: 2020-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ dependencies:
|
|
145
145
|
version: 4.1.0
|
146
146
|
- - "<"
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: '6'
|
148
|
+
version: '6.1'
|
149
149
|
type: :runtime
|
150
150
|
prerelease: false
|
151
151
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -155,7 +155,7 @@ dependencies:
|
|
155
155
|
version: 4.1.0
|
156
156
|
- - "<"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '6'
|
158
|
+
version: '6.1'
|
159
159
|
description: Gem that provides easy integration to Zuora
|
160
160
|
email:
|
161
161
|
- connect@zuora.com
|
@@ -174,6 +174,10 @@ files:
|
|
174
174
|
- Rakefile
|
175
175
|
- bin/console
|
176
176
|
- bin/setup
|
177
|
+
- gemfiles/Gemfile-rails.5.0.x
|
178
|
+
- gemfiles/Gemfile-rails.5.1.x
|
179
|
+
- gemfiles/Gemfile-rails.5.2.x
|
180
|
+
- gemfiles/Gemfile-rails.6.0.x
|
177
181
|
- lib/insights_api/login.rb
|
178
182
|
- lib/zuora_api.rb
|
179
183
|
- lib/zuora_api/exceptions.rb
|