Class: Clicksign::Resources::Notarial::SignatureWatcher
Instance Attribute Summary
#id, #relationships
Class Method Summary
collapse
Instance Method Summary
collapse
#[], auto_paging_each, client, #delete, each_page, fields, filter, filter_params, include, list, #method_missing, nested_list, order, page, per, #reload, #respond_to_missing?, validate_jsonapi_include_types!, with_includes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Clicksign::Resource
Class Method Details
.create(envelope_id:, **attributes) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/clicksign/resources/notarial/signature_watcher.rb', line 15
def self.create(envelope_id:, **attributes)
raw = client.post(
"/envelopes/#{envelope_id}/signature_watchers",
body: JsonApi::Serializer.dump(type: resource_type, attributes: attributes),
)
parsed = JsonApi::Parser.parse(raw)
build_instance(parsed[:data].first, parent_id: envelope_id)
end
|
.retrieve(id, envelope_id:) ⇒ Object
9
10
11
12
13
|
# File 'lib/clicksign/resources/notarial/signature_watcher.rb', line 9
def self.retrieve(id, envelope_id:)
raw = client.get("/envelopes/#{envelope_id}/signature_watchers/#{id}")
parsed = JsonApi::Parser.parse(raw)
build_instance(parsed[:data].first, parent_id: envelope_id)
end
|
Instance Method Details
#base_path ⇒ Object
24
25
26
|
# File 'lib/clicksign/resources/notarial/signature_watcher.rb', line 24
def base_path
"/envelopes/#{@_parent_id || envelope_id}/signature_watchers"
end
|
#envelope_id ⇒ Object
33
34
35
|
# File 'lib/clicksign/resources/notarial/signature_watcher.rb', line 33
def envelope_id
@_parent_id || relationships.dig('envelope', 'data', 'id')
end
|
#update ⇒ Object
28
29
30
31
|
# File 'lib/clicksign/resources/notarial/signature_watcher.rb', line 28
def update(**)
raise NotImplementedError,
'SignatureWatcher does not support update (route: except: [:update])'
end
|