Class: Xplenty::Kensa::ApiCheck
- Inherits:
-
Check
- Object
- Check
- Xplenty::Kensa::ApiCheck
show all
- Defined in:
- lib/xplenty/kensa/check.rb
Instance Attribute Summary
Attributes inherited from Check
#data, #screen
Instance Method Summary
collapse
Methods inherited from Check
#call, #check, #env, #error, #initialize, #run, #test, #to_proc, #url
Instance Method Details
#base_path ⇒ Object
231
232
233
234
235
236
237
|
# File 'lib/xplenty/kensa/check.rb', line 231
def base_path
if data['api'][env].is_a? Hash
URI.parse(data['api'][env]['base_url']).path
else
'/xplenty/resources'
end
end
|
#credentials ⇒ Object
243
244
245
|
# File 'lib/xplenty/kensa/check.rb', line 243
def credentials
[ data['id'], data['api']['password'] ]
end
|
#xplenty_id ⇒ Object
239
240
241
|
# File 'lib/xplenty/kensa/check.rb', line 239
def xplenty_id
"app#{rand(10000)}@kensa.xplenty.com"
end
|