zuora_rest_client 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 8688e729d34d999158bf6a54f7d81684847b419f
4
- data.tar.gz: 395af0820799b67d2d158bb6ef652b95c5ab53fe
3
+ metadata.gz: 3ffa2bba7d559335da881a023371512cefdd36e9
4
+ data.tar.gz: caa87d11bd5301ddb798aff431051e32315b1373
5
5
  SHA512:
6
- metadata.gz: f5d8fbf991658ef2e255e76061710d51328041637e7868735fb84e1c16a6ec27cf9e4bd4fe476dc6c1f47d05b32726f7508dd7c498ef3276bf6f67f1a5fac283
7
- data.tar.gz: 0c7c86429d7048cb515abde95353ede90fd046814c035897b34850c866c1cdcde206adac7bf1a5371f64a8f4fd2d9cc7af6e26d01a0d24aa2a29dc5aae10a1e9
6
+ metadata.gz: 658497f935b078480156627dd0c1461960795ffcc2cbe7fd9de079b66cd440ab513475683378c902c247fb363a45307954593c3d6f0863fcdfbcd3b1b7d3e7c1
7
+ data.tar.gz: 7d52655a35f4644b4115de1c941af6a065642e86d03de2f5c5258426f72ddc512de8df7d1a6bcb65bd30681cf1252696f3559f347452cc23ca7a2e8c91535991
@@ -174,13 +174,18 @@ module ZuoraRestClient
174
174
 
175
175
  def zuora_endpoint
176
176
  if @environment.is_a? Symbol
177
- rest_endpoint = "#{ZUORA_ENVIRONMENTS[@environment][:rest]}"
178
- app_endpoint = "#{ZUORA_ENVIRONMENTS[@environment][:app]}/apps/api"
177
+ if @environment.to_s.start_with?('services')
178
+ rest_endpoint = "https://#{@environment.to_s}.zuora.com/apps"
179
+ app_endpoint = "https://#{@environment.to_s}.zuora.com/apps/api"
180
+ else
181
+ rest_endpoint = "#{ZUORA_ENVIRONMENTS[@environment][:rest]}"
182
+ app_endpoint = "#{ZUORA_ENVIRONMENTS[@environment][:app]}/apps/api"
183
+ end
179
184
  elsif @environment.is_a? Hash
180
185
  rest_endpoint = "#{@environment[:rest]}"
181
186
  app_endpoint = "#{@environment[:app]}/apps/api"
182
187
  else
183
- raise 'Possible values for environment are: :production, :sandbox, or a hash with base URL values for :rest and :app.'
188
+ raise 'Possible values for environment are: :production, :sandbox, :servicesNNN or a hash with base URL values for :rest and :app.'
184
189
  end
185
190
  OpenStruct.new({ rest: rest_endpoint, app: app_endpoint })
186
191
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraRestClient
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_rest_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Massad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler