zuora_api 1.8.00 → 1.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e79d63055902d66670dad6abed776b5c02ccb422b886bad2e632624e43eb16ba
4
- data.tar.gz: 8abaee55dad2d4c3636bcbd08159a26dc403a8041aecb7d2ce2f6d84bd9f3917
3
+ metadata.gz: b331dbd16a302e01b8cf4dc918343eb3c3bc62e809c15e4020eb2463b0b725ac
4
+ data.tar.gz: c8f2f3f7c3153280e0624e38658b51f2cdd2e3ded90ad916701c2392c21223d1
5
5
  SHA512:
6
- metadata.gz: 72165d5892a404b6e25c6f32e83e52065a23837eeb7f4d72a40f13e7c642c460362a3c4ed83b51760e5efac650c5eaffc4d4baa1b97b6c980818273af3fa9af1
7
- data.tar.gz: 271b546b700d026e9ac12a22418eb90fc45a2a2b1bd66f872586a5552a4dfe703cb95f9f7dd78cb38960d4885a65e20acab0095ab0a2b5c5b3339295b129b995
6
+ metadata.gz: 29be5568ae328fe982f8c25f25d802f9ab941c2e0a4aa247d12ba1ef33afb25a77e7d738a1509e96a1e28ef8b07c68a205a9c3140dcc83f36a36536cc5d6c42e
7
+ data.tar.gz: b450c458b5402843f9fdf57789cfaf28216c14d74505fe031c95bee79505f6273164f299c78dc73e4848c0ed9c620b41f3cb7ef219774e74d216d12c8a26f0c3
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.8.00"
2
+ VERSION = "1.8.1"
3
3
  end
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.00
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-16 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler