zuora_api 1.1.8 → 1.1.9
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 +4 -4
- data/lib/zuora_api/login.rb +2 -2
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39053d321d2e3a9b1f16ff7932470a409d2f0cc4
|
|
4
|
+
data.tar.gz: 50dfd97be5e7934f767e43f8278d4c1e3c2d30ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c2d65938ac3b48b80c766e172ef0b828ff133842bf07a8c9013b17371e8b10c19e51d8b253fd47399e0b44b1987515add543c89e2c3b5542f3da8f40446d88b
|
|
7
|
+
data.tar.gz: 9f5d83aa624c387a4ddc7396c55afbcf2ef46179b1e3f5d831fd8325c78c0633acbc887f3b42c979100c36725df6b28bc4b8c3861e475d119a3a8653f7afaa64
|
data/lib/zuora_api/login.rb
CHANGED
|
@@ -279,7 +279,7 @@ module ZuoraAPI
|
|
|
279
279
|
self.get_session
|
|
280
280
|
base = self.url.include?(".com") ? self.url.split(".com")[0] : self.url.split(".eu")[0]
|
|
281
281
|
url = object ? "#{base}.com/apps/api/describe/#{object}" : "#{base}.com/apps/api/describe/"
|
|
282
|
-
headers = !self.entity_id.
|
|
282
|
+
headers = !self.entity_id.blank? ? {"entityId" => self.entity_id, 'Content-Type' => "text/xml; charset=utf-8"} : {'Content-Type' => "text/xml; charset=utf-8"}
|
|
283
283
|
response = HTTParty.get(url, :headers => headers , basic_auth: {:username => self.username, :password => self.password})
|
|
284
284
|
output_xml = Nokogiri::XML(response.body)
|
|
285
285
|
des_hash = Hash.new
|
|
@@ -308,7 +308,7 @@ module ZuoraAPI
|
|
|
308
308
|
|
|
309
309
|
def rest_call(method: :get, body: {},headers: {}, url: rest_endpoint("catalog/products?pageSize=4") , debug: true, **keyword_args)
|
|
310
310
|
tries ||= 2
|
|
311
|
-
headers["entityId"] = self.entity_id if !self.entity_id.
|
|
311
|
+
headers["entityId"] = self.entity_id if !self.entity_id.blank?
|
|
312
312
|
raise "Method not supported, supported methods include: :get, :post, :put, :delete, :patch, :head, :options" if ![:get, :post, :put, :delete, :patch, :head, :options].include?(method)
|
|
313
313
|
response = HTTParty::Request.new("Net::HTTP::#{method.to_s.capitalize}".constantize, url, body: body, headers: {'Content-Type' => "application/json; charset=utf-8", "Authorization" => "ZSession #{self.get_session}"}.merge(headers)).perform
|
|
314
314
|
Rails.logger.debug('Connect') { response.code} if debug
|
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.1.
|
|
4
|
+
version: 1.1.9
|
|
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: 2017-03-
|
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|