@@ -158,9 +158,10 @@ def report(*transactions)
158
158
#
159
159
# Hash with options:
160
160
#
161
- # app_id:: id of the application to authorize. This is required.
162
- # app_key:: secret key assigned to the application. Required only if application has
163
- # a key defined.
161
+ # app_id:: id of the application to authorize. This is required.
162
+ # app_key:: secret key assigned to the application. Required only if application has
163
+ # a key defined.
164
+ # service_id:: id of the service (required if you have more than one service)
164
165
#
165
166
# == Return
166
167
#
@@ -186,6 +187,7 @@ def authorize(options)
186
187
"?provider_key=#{ CGI . escape ( provider_key ) } " +
187
188
"&app_id=#{ CGI . escape ( options [ :app_id ] . to_s ) } "
188
189
path += "&app_key=#{ CGI . escape ( options [ :app_key ] ) } " if options [ :app_key ]
190
+ path += "&service_id=#{ CGI . escape ( options [ :service_id ] ) } " if options [ :service_id ]
189
191
190
192
uri = URI . parse ( "http://#{ host } #{ path } " )
191
193
http_response = Net ::HTTP . get_response ( uri )
@@ -207,6 +209,7 @@ def authorize(options)
207
209
# Hash with options:
208
210
#
209
211
# app_id:: id of the application to authorize. This is required.
212
+ # service_id:: id of the service (required if you have more than one service)
210
213
#
211
214
# == Return
212
215
#
@@ -235,6 +238,7 @@ def oauth_authorize(options)
235
238
"?provider_key=#{ CGI . escape ( provider_key ) } " +
236
239
"&app_id=#{ CGI . escape ( options [ :app_id ] . to_s ) } "
237
240
path += "&app_key=#{ CGI . escape ( options [ :app_key ] ) } " if options [ :app_key ]
241
+ path += "&service_id=#{ CGI . escape ( options [ :service_id ] ) } " if options [ :service_id ]
238
242
path += "&redirect_url=#{ CGI . escape ( options [ :redirect_url ] ) } " if options [ :redirect_url ]
239
243
240
244
uri = URI . parse ( "http://#{ host } #{ path } " )
@@ -316,4 +320,4 @@ def build_error_response(body)
316
320
response
317
321
end
318
322
end
319
- end
323
+ end
0 commit comments