zuora_api 1.7.01 → 1.7.03
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 +24 -3
- 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: 0fe1f740bb001aa14dbd92c6d4e40f12d7444bc93f6b7629453687bffc725a8a
|
4
|
+
data.tar.gz: 7cde2faa394443a5d243311fd3c2e289104910d23fe069d64ccf0031e51c9d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2c5dc988d2329b255f2d315ad9c3e0c9ce7a827185e055382b7a274162a6be979c6cf92afa9cfccf5267a1d4632398dc4f4434e06d140c3f79b2b0fb6dcfaaa
|
7
|
+
data.tar.gz: 2355124490081c1c1c7b4f144516e20e23b95104e2fa015d12eb0ca6e2d69acace7edee8f499dd0263f2edebd28720655711d5bdc81b72c1479322d00b1661db
|
data/lib/zuora_api/login.rb
CHANGED
@@ -342,7 +342,7 @@ module ZuoraAPI
|
|
342
342
|
when 'Services'
|
343
343
|
https = /https:\/\/|http:\/\//.match(self.url)[0]
|
344
344
|
host = self.hostname
|
345
|
-
endpoint = "#{https}
|
345
|
+
endpoint = "#{https}#{host}/apps/v1/#{url}"
|
346
346
|
when 'Staging'
|
347
347
|
endpoint = "https://rest-staging2.zuora.com/v1/".concat(url)
|
348
348
|
when 'Unknown'
|
@@ -765,7 +765,20 @@ module ZuoraAPI
|
|
765
765
|
return des_hash
|
766
766
|
end
|
767
767
|
|
768
|
-
def rest_call(
|
768
|
+
def rest_call(
|
769
|
+
method: :get,
|
770
|
+
body: nil,
|
771
|
+
headers: {},
|
772
|
+
url: rest_endpoint("catalog/products?pageSize=4"),
|
773
|
+
debug: false,
|
774
|
+
errors: [ZuoraAPI::Exceptions::ZuoraAPISessionError].concat(ZUORA_API_ERRORS),
|
775
|
+
z_session: true,
|
776
|
+
session_type: :basic,
|
777
|
+
timeout_retry: false,
|
778
|
+
timeout: 120,
|
779
|
+
multipart: false,
|
780
|
+
**keyword_args
|
781
|
+
)
|
769
782
|
tries ||= 2
|
770
783
|
|
771
784
|
if self.entity_id.present?
|
@@ -778,7 +791,15 @@ module ZuoraAPI
|
|
778
791
|
authentication_headers = z_session ? {"Authorization" => self.get_session(prefix: true, auth_type: session_type) } : {}
|
779
792
|
modified_headers = {'Content-Type' => "application/json; charset=utf-8"}.merge(authentication_headers).merge(headers)
|
780
793
|
|
781
|
-
response = HTTParty::Request.new(
|
794
|
+
response = HTTParty::Request.new(
|
795
|
+
"Net::HTTP::#{method.to_s.capitalize}".constantize,
|
796
|
+
url,
|
797
|
+
body: body,
|
798
|
+
headers: modified_headers,
|
799
|
+
timeout: timeout,
|
800
|
+
multipart: multipart,
|
801
|
+
).perform
|
802
|
+
|
782
803
|
Rails.logger.debug("Response Code: #{response.code}") if debug
|
783
804
|
begin
|
784
805
|
output_json = JSON.parse(response.body)
|
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.03
|
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: 2019-08-
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|