Class: Wajub::GlobalResource

Inherits:
BaseClient show all
Defined in:
lib/wajub/resources.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#api_key, #base_url, #idempotency_key_prefix, #last_request, #transport

Instance Method Summary collapse

Methods inherited from BaseClient

#delete, #get, #initialize, #post, #put, #request

Constructor Details

This class inherits a constructor from Wajub::BaseClient

Instance Method Details

#channels(params = nil) ⇒ Object



95
96
97
98
# File 'lib/wajub/resources.rb', line 95

def channels(params = nil)
  list = HttpUtils.pick_list(get('/channels', params), 'channels')
  [list[:data], list[:meta]]
end

#countries(params = nil) ⇒ Object



100
101
102
103
# File 'lib/wajub/resources.rb', line 100

def countries(params = nil)
  list = HttpUtils.pick_list(get('/countries', params), 'countries')
  [list[:data], list[:meta]]
end

#currencies(params = nil) ⇒ Object



105
106
107
108
# File 'lib/wajub/resources.rb', line 105

def currencies(params = nil)
  list = HttpUtils.pick_list(get('/currencies', params), 'currencies')
  [list[:data], list[:meta]]
end

#pingObject



91
92
93
# File 'lib/wajub/resources.rb', line 91

def ping
  get('/')
end