Class: Shirtsio::Webhooks
- Inherits:
-
APIResource
- Object
- ShirtsioObject
- APIResource
- Shirtsio::Webhooks
- Defined in:
- lib/shirtsio/webhooks.rb
Instance Attribute Summary
Attributes inherited from ShirtsioObject
Class Method Summary collapse
- .delete(params = {}) ⇒ Object
- .list(params = {}) ⇒ Object
- .register(params = {}) ⇒ Object
- .register_payment(params = {}) ⇒ Object
Methods inherited from APIResource
class_name, #refresh, retrieve, url, #url
Methods inherited from ShirtsioObject
#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Shirtsio::ShirtsioObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Shirtsio::ShirtsioObject
Class Method Details
.delete(params = {}) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/shirtsio/webhooks.rb', line 20 def Webhooks.delete(params={}) webhooks_delete_url = @webhooks_url + 'delete/' response, api_key = Shirtsio.request(:post, webhooks_delete_url, @api_key, params) Util.convert_to_shirtsio_object(response, api_key) response end |
.list(params = {}) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/shirtsio/webhooks.rb', line 6 def Webhooks.list(params={}) webhooks_list_url = @webhooks_url + 'list/' response, api_key = Shirtsio.request(:get, webhooks_list_url, @api_key, params) Util.convert_to_shirtsio_object(response, api_key) response end |
.register(params = {}) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/shirtsio/webhooks.rb', line 13 def Webhooks.register(params={}) webhooks_register_url = @webhooks_url + 'register/' response, api_key = Shirtsio.request(:post, webhooks_register_url, @api_key, params) Util.convert_to_shirtsio_object(response, api_key) response end |
.register_payment(params = {}) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/shirtsio/webhooks.rb', line 27 def Webhooks.register_payment(params={}) webhooks_payment_url = 'payment/status' response, api_key = Shirtsio.request(:post, webhooks_payment_url, @api_key, params) Util.convert_to_shirtsio_object(response, api_key) response end |