zuora_api 1.8.00 → 1.8.1
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 +2 -2
- 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: b331dbd16a302e01b8cf4dc918343eb3c3bc62e809c15e4020eb2463b0b725ac
|
4
|
+
data.tar.gz: c8f2f3f7c3153280e0624e38658b51f2cdd2e3ded90ad916701c2392c21223d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29be5568ae328fe982f8c25f25d802f9ab941c2e0a4aa247d12ba1ef33afb25a77e7d738a1509e96a1e28ef8b07c68a205a9c3140dcc83f36a36536cc5d6c42e
|
7
|
+
data.tar.gz: b450c458b5402843f9fdf57789cfaf28216c14d74505fe031c95bee79505f6273164f299c78dc73e4848c0ed9c620b41f3cb7ef219774e74d216d12c8a26f0c3
|
data/lib/zuora_api/login.rb
CHANGED
@@ -155,7 +155,7 @@ module ZuoraAPI
|
|
155
155
|
# 1. Pass in cookies and optionally custom_authorities, name, and description
|
156
156
|
# 2. Pass in user_id, entity_ids, client_id, client_secret, and optionally custom_authorities, name, and description
|
157
157
|
# https://intranet.zuora.com/confluence/display/Sunburst/Create+an+OAuth+Client+through+API+Gateway#CreateanOAuthClientthroughAPIGateway-ZSession
|
158
|
-
def get_oauth_client (custom_authorities = [], info_name: "No Name", info_desc: "This client was created without a description.", user_id: nil, entity_ids: nil, client_id: nil, client_secret: nil, new_client_id: nil, new_client_secret: nil, cookies: nil, chomp_v1_from_genesis_endpoint: false)
|
158
|
+
def get_oauth_client (custom_authorities = [], info_name: "No Name", info_desc: "This client was created without a description.", user_id: nil, entity_ids: nil, client_id: nil, client_secret: nil, new_client_id: nil, new_client_secret: nil, cookies: nil, chomp_v1_from_genesis_endpoint: false, use_api_generated_client_secret: false)
|
159
159
|
authorization = ""
|
160
160
|
new_client_id = SecureRandom.uuid if new_client_id.blank?
|
161
161
|
new_client_secret = SecureRandom.hex(10) if new_client_secret.blank?
|
@@ -185,7 +185,7 @@ module ZuoraAPI
|
|
185
185
|
oauth_response = HTTParty.post(endpoint, :headers => {'authorization' => authorization, 'Content-Type' => 'application/json'}, :body => {'clientId' => new_client_id, 'clientSecret' => new_client_secret, 'userId' => user_id, 'entityIds' => entity_ids, 'customAuthorities' => custom_authorities, 'additionalInformation' => {'description' => info_desc, 'name' => info_name}}.to_json)
|
186
186
|
output_json = JSON.parse(oauth_response.body)
|
187
187
|
if oauth_response.code == 201
|
188
|
-
output_json["clientSecret"] = new_client_secret
|
188
|
+
output_json["clientSecret"] = new_client_secret if !use_api_generated_client_secret
|
189
189
|
return output_json
|
190
190
|
elsif oauth_response.code == 401 && !oauth_response.message.blank?
|
191
191
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(output_json["message"], oauth_response)
|
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.8.
|
4
|
+
version: 1.8.1
|
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-10
|
11
|
+
date: 2020-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|