Class: Anvil::SignatureSigner
- Inherits:
-
Resources::Base
- Object
- Resources::Base
- Anvil::SignatureSigner
- Defined in:
- lib/anvil/resources/signature.rb
Overview
Helper class for signature signers
Instance Attribute Summary collapse
-
#packet ⇒ Object
readonly
Returns the value of attribute packet.
Attributes inherited from Resources::Base
Instance Method Summary collapse
- #complete? ⇒ Boolean
- #completed_at ⇒ Object
- #eid ⇒ Object
- #email ⇒ Object
-
#initialize(attributes, packet: nil) ⇒ SignatureSigner
constructor
A new instance of SignatureSigner.
- #name ⇒ Object
-
#send_reminder! ⇒ Object
Send a reminder to this signer.
-
#signing_url(client_user_id: nil) ⇒ Object
Get signing URL for this signer.
-
#skip! ⇒ Object
Skip this signer.
- #status ⇒ Object
Methods inherited from Resources::Base
#==, build_from_response, create, find, #inspect, list, #method_missing, #respond_to_missing?, #to_h, #to_json, with_client
Constructor Details
#initialize(attributes, packet: nil) ⇒ SignatureSigner
Returns a new instance of SignatureSigner.
462 463 464 465 |
# File 'lib/anvil/resources/signature.rb', line 462 def initialize(attributes, packet: nil) super(attributes, client: nil) @packet = packet end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Anvil::Resources::Base
Instance Attribute Details
#packet ⇒ Object (readonly)
Returns the value of attribute packet.
460 461 462 |
# File 'lib/anvil/resources/signature.rb', line 460 def packet @packet end |
Instance Method Details
#complete? ⇒ Boolean
483 484 485 |
# File 'lib/anvil/resources/signature.rb', line 483 def complete? status == 'complete' end |
#completed_at ⇒ Object
487 488 489 490 491 |
# File 'lib/anvil/resources/signature.rb', line 487 def completed_at return unless attributes[:completed_at] Time.parse(attributes[:completed_at]) end |
#eid ⇒ Object
467 468 469 |
# File 'lib/anvil/resources/signature.rb', line 467 def eid attributes[:eid] end |
#email ⇒ Object
475 476 477 |
# File 'lib/anvil/resources/signature.rb', line 475 def email attributes[:email] end |
#name ⇒ Object
471 472 473 |
# File 'lib/anvil/resources/signature.rb', line 471 def name attributes[:name] end |
#send_reminder! ⇒ Object
Send a reminder to this signer
511 512 513 514 515 |
# File 'lib/anvil/resources/signature.rb', line 511 def send_reminder! raise Error, 'No packet associated with this signer' unless packet packet.notify_signer(eid) end |
#signing_url(client_user_id: nil) ⇒ Object
Get signing URL for this signer
494 495 496 497 498 499 500 501 |
# File 'lib/anvil/resources/signature.rb', line 494 def signing_url(client_user_id: nil) return nil unless packet packet.signing_url( signer_id: eid, client_user_id: client_user_id ) end |
#skip! ⇒ Object
Skip this signer
504 505 506 507 508 |
# File 'lib/anvil/resources/signature.rb', line 504 def skip! raise Error, 'No packet associated with this signer' unless packet packet.skip_signer(eid) end |
#status ⇒ Object
479 480 481 |
# File 'lib/anvil/resources/signature.rb', line 479 def status attributes[:status] end |