Class: PrintfulAPI::Webhook
Instance Attribute Summary
Attributes inherited from APIResource
#raw_data
Class Method Summary
collapse
Instance Method Summary
collapse
included
Methods inherited from APIResource
api_attributes, belongs_to, camelize, has_many, #load_data, singularize, #to_h
Class Method Details
.delete(opts = {}) ⇒ Object
19
20
21
22
23
|
# File 'lib/printful_api/webhooks.rb', line 19
def self.delete( opts={} )
PrintfulAPI.request( :DELETE, self.resource_path )
end
|
.get(opts = {}) ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/printful_api/webhooks.rb', line 8
def self.get( opts={} )
data = PrintfulAPI.request( :GET, self.resource_path )
model = self.new
model.load_data( data )
model
end
|
.resource_path ⇒ Object
29
30
31
|
# File 'lib/printful_api/webhooks.rb', line 29
def self.resource_path
'/webhooks'
end
|
Instance Method Details
#delete ⇒ Object
25
26
27
|
# File 'lib/printful_api/webhooks.rb', line 25
def delete
self.class.delete()
end
|