Class: Openpix::RubySdk::Resources::Webhook
- Inherits:
-
Resource
- Object
- Resource
- Openpix::RubySdk::Resources::Webhook
show all
- Defined in:
- lib/openpix/ruby_sdk/resources/webhook.rb
Overview
Make API operations on Webhook resource
Constant Summary
collapse
- ATTRS =
%w[
name
event
url
authorization
isActive
].freeze
Instance Method Summary
collapse
Methods inherited from Resource
#destroy, #destroy!, #fetch, #fetch!, #fetch_next_page!, #fetch_previous_page!, #initialize, #save, #save!, #to_collection_resource, #to_single_resource
Instance Method Details
#create_attributes ⇒ Object
26
27
28
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 26
def create_attributes
ATTRS
end
|
#find(id:, extra_headers: {}) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
41
42
43
44
45
46
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 41
def find(id:, extra_headers: {})
raise(
ActionNotImplementedError,
'webhook does not implement GET show action'
)
end
|
#find!(id:, extra_headers: {}) ⇒ Object
48
49
50
51
52
53
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 48
def find!(id:, extra_headers: {})
raise(
ActionNotImplementedError,
'webhook does not implement GET show action'
)
end
|
#init_body(params: {}, rest: {}) ⇒ Object
22
23
24
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 22
def init_body(params: {}, rest: {})
super(base_attrs: ATTRS, params: params, rest: rest)
end
|
#to_body ⇒ Object
34
35
36
37
38
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 34
def to_body
body = super
{ webhook: body }
end
|
#to_url ⇒ Object
30
31
32
|
# File 'lib/openpix/ruby_sdk/resources/webhook.rb', line 30
def to_url
'webhook'
end
|