zuora_api 1.11.9 → 1.11.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32591a1ee931c290b8e4f8db9f5c9b6531f5e11bff393eb1f7789b78be231ae6
4
- data.tar.gz: adc6e839f47d670cc3cd7b30f491fd418dd12b8d4342319ccfb6ace47ebf6558
3
+ metadata.gz: a15b43fd8561de7cfc9699d3f3923cd1758bc46f06ff918c2f7030d9d75fc4d5
4
+ data.tar.gz: ef25da53baff7762986b5844a8623792522984678e41886a291858f18213a989
5
5
  SHA512:
6
- metadata.gz: 0bc7ebeee44e9775250989c6a53af10a95b7d4c908e7a1c3c613d6f2c89f3a5e06c922dbf5623c8d1540b89579c229878dc3be7c65016294637d2fa5d39e9669
7
- data.tar.gz: 55c77daad5f115fa7cdc1504e5dc89bca7f0643a8b4879927edec974cfc2d3a5879fd237245cd3f18c3cbd83ef05cdab9f6b47fbe889e45ae602d59faee1d3df
6
+ metadata.gz: 708ae3b0d9b923379a88c2d8ee833a671c69bbc82094c17f4cefd2b643d1901c748ab7fd8267874b8b78b3a733a5d4f3a59370a8fec587aca5db8923ef412339
7
+ data.tar.gz: f7f637c972628952de61f9d95b27518e0e53b83ecad618a3f031a69d5a7a64bf13669ade60e7100bc1acbc4244c27c19d18ee1dcc9217af6ac3aae0a1f8f2619
@@ -6,8 +6,8 @@ require 'zuora_api/exceptions'
6
6
  module ZuoraAPI
7
7
  class Login
8
8
  ENVIRONMENTS = [TEST = 'Test', SANDBOX = 'Sandbox', PRODUCTION = 'Production', PREFORMANCE = 'Preformance', SERVICES = 'Services', UNKNOWN = 'Unknown', STAGING = 'Staging' ]
9
- REGIONS = [EU = 'EU', US = 'US', NA = 'NA' ]
10
- MIN_Endpoints = {'Test': '133.0', 'Sandbox': '133.0', 'Production': '133.0', 'Performance': '133.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '133.0'}.freeze
9
+ REGIONS = [EU = 'EU', US = 'US', NA = 'NA', JP = 'JP' ]
10
+ MIN_Endpoints = {'Test': '140.0', 'Sandbox': '140.0', 'Production': '140.0', 'Performance': '140.0', 'Services': '96.0', 'Unknown': '96.0', 'Staging': '140.0'}.freeze
11
11
  XML_SAVE_OPTIONS = Nokogiri::XML::Node::SaveOptions::AS_XML | Nokogiri::XML::Node::SaveOptions::NO_DECLARATION
12
12
  USER_AGENT = "Zuora#{ENV['Z_APPLICATION_NAME']&.capitalize}/#{ENV['Z_APPLICATION_VERSION']&.delete('v')}"
13
13
 
@@ -152,6 +152,9 @@ module ZuoraAPI
152
152
  "Test" => "https://zconnect-services0002.test.eu.zuora.com/api/rest/v1/"},
153
153
  "NA" => {"Sandbox" => "https://zconnect.sandbox.na.zuora.com/api/rest/v1/",
154
154
  "Production" => "https://zconnect.na.zuora.com/api/rest/v1/",
155
+ "Services"=> ""},
156
+ "JP" => {"Sandbox" => "https://zconnect.sandbox.ap.zuora.com/api/rest/v1/",
157
+ "Production" => "https://zconnect.ap.zuora.com/api/rest/v1/",
155
158
  "Services"=> ""}
156
159
  }
157
160
  return map[self.region][self.environment].insert(-1, path)
@@ -208,7 +211,7 @@ module ZuoraAPI
208
211
  end
209
212
 
210
213
  def self.regions
211
- %w(US EU NA)
214
+ %w(US EU NA JP)
212
215
  end
213
216
 
214
217
  def self.endpoints
@@ -227,7 +230,10 @@ module ZuoraAPI
227
230
  "Production" => "https://na.zuora.com/apps/services/a/",
228
231
  "Performance" => "https://pt1.na.zuora.com/apps/services/a/",
229
232
  "Services" => "https://services347.na.zuora.com/apps/services/a/",
230
- "Test" => "https://test.zuora.com/apps/services/a/"}
233
+ "Test" => "https://test.zuora.com/apps/services/a/"},
234
+ "JP" => {"Sandbox" => "https://sandbox.ap.zuora.com/apps/services/a/",
235
+ "Production" => "https://ap.zuora.com/apps/services/a/",
236
+ "Test" => "https://test.ap.zuora.com/apps/services/a/"}
231
237
  }
232
238
  end
233
239
 
@@ -249,6 +255,8 @@ module ZuoraAPI
249
255
  self.region = "EU"
250
256
  elsif /(?<=\.|\/|^)(na)(?=\.|\/|$)/ === self.hostname
251
257
  self.region = "NA"
258
+ elsif /(?<=\.|\/|^)(ap)(?=\.|\/|$)/ === self.hostname
259
+ self.region = "JP"
252
260
  else
253
261
  self.region = "US"
254
262
  end
@@ -271,7 +279,7 @@ module ZuoraAPI
271
279
  self.environment = 'Staging'
272
280
  when /(?<=\.|\/|^)(test)(?=\.|\/|$)/
273
281
  self.environment = 'Test'
274
- when /(?<=\.|\/|^)(www|api)(?=\.|\/|$)/, /(^|tls10\.|origin-www\.|zforsf\.|eu\.|na\.)(zuora\.com)/
282
+ when /(?<=\.|\/|^)(www|api)(?=\.|\/|$)/, /(^|tls10\.|origin-www\.|zforsf\.|eu\.|na\.|ap\.)(zuora\.com)/
275
283
  self.environment = 'Production'
276
284
  else
277
285
  self.environment = 'Unknown'
@@ -287,6 +295,7 @@ module ZuoraAPI
287
295
  mappings = {"US" => {"Sandbox" => "ZConnectSbx", "Services" => "ZConnectSvcUS", "Production" => "ZConnectProd", "Performance" => "ZConnectPT1", "Test" => "ZConnectTest", "Staging" => "ZConnectQA", "KubeSTG" => "ZConnectDev", "KubeDEV" => "ZConnectDev", "KubePROD" => "ZConnectDev"},
288
296
  "NA" => {"Sandbox" => "ZConnectSbxNA", "Services" => "ZConnectSvcNA", "Production" => "ZConnectProdNA", "Performance" => "ZConnectPT1NA"},
289
297
  "EU" => {"Sandbox" => "ZConnectSbxEU", "Services" => "ZConnectSvcEU", "Production" => "ZConnectProdEU", "Performance" => "ZConnectPT1EU", "Test" => "ZConnectTest"},
298
+ "JP" => {"Sandbox" => "ZConnectSbxAP", "Services" => "ZConnectSvcAP", "Production" => "ZConnectProdAP", "Performance" => "ZConnectPT1AP", "Test" => "ZConnectTest"},
290
299
  "Unknown" => {"Unknown" => "Unknown"}}
291
300
  self.zconnect_provider = mappings[self.region][self.environment]
292
301
  end
@@ -304,7 +313,7 @@ module ZuoraAPI
304
313
  def rest_endpoint(url="", domain=true, prefix='/v1/')
305
314
  update_environment
306
315
  endpoint = url
307
- url_postfix = {"US" => ".", "EU" => ".eu.", "NA" => ".na."}[self.region]
316
+ url_postfix = {"US" => ".", "EU" => ".eu.", "NA" => ".na.", "JP" => ".ap."}[self.region]
308
317
 
309
318
  case self.environment
310
319
  when 'Test'
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.11.9"
2
+ VERSION = "1.11.11"
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.11.9
4
+ version: 1.11.11
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: 2023-10-08 00:00:00.000000000 Z
11
+ date: 2024-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler