Class: WassengerClient::Webhook
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- WassengerClient::Webhook
- Defined in:
- app/models/wassenger_client/webhook.rb
Class Method Summary collapse
- .base_url ⇒ Object
- .delete(id = '0') ⇒ Object
- .enable(id = '0') ⇒ Object
- .get(query = {}) ⇒ Object
- .get_details(id = '0') ⇒ Object
- .register(params = {}) ⇒ Object
- .update(id = '0', params = {}) ⇒ Object
Class Method Details
.base_url ⇒ Object
6 7 8 |
# File 'app/models/wassenger_client/webhook.rb', line 6 def base_url WassengerClient::Client.base_url + 'webhooks' end |
.delete(id = '0') ⇒ Object
30 31 32 |
# File 'app/models/wassenger_client/webhook.rb', line 30 def delete(id = '0') WassengerClient::Client.delete(base_url, id) end |
.enable(id = '0') ⇒ Object
18 19 20 |
# File 'app/models/wassenger_client/webhook.rb', line 18 def enable(id = '0') WassengerClient::Client.post(base_url, id, {}, '/enable') end |
.get(query = {}) ⇒ Object
10 11 12 |
# File 'app/models/wassenger_client/webhook.rb', line 10 def get(query = {}) WassengerClient::Client.get(base_url, '', {}, '', query) end |
.get_details(id = '0') ⇒ Object
22 23 24 |
# File 'app/models/wassenger_client/webhook.rb', line 22 def get_details(id = '0') WassengerClient::Client.get(base_url, id) end |
.register(params = {}) ⇒ Object
14 15 16 |
# File 'app/models/wassenger_client/webhook.rb', line 14 def register(params = {}) WassengerClient::Client.post(base_url, '', params) end |
.update(id = '0', params = {}) ⇒ Object
26 27 28 |
# File 'app/models/wassenger_client/webhook.rb', line 26 def update(id = '0', params = {}) WassengerClient::Client.patch(base_url, id, params) end |