class Universign::Transaction
Attributes
Public Class Methods
# File lib/universign/transaction.rb, line 9 def initialize(transaction_id = nil, url = nil) @transaction_id = transaction_id @url = url @data = {} self.get end
Public Instance Methods
The creation date or last relaunch date of this transaction
@return [Date]
# File lib/universign/transaction.rb, line 67 def created_at data['creationDate'].to_date end
The index of current signer if the status of transaction is ready or who ended the transactions for other status
@return [Integer]
# File lib/universign/transaction.rb, line 60 def current_signer data['currentSigner'] end
The description of the Transaction
@return [String]
# File lib/universign/transaction.rb, line 74 def description data['description'] end
Whether the transaction was requested with requesting handwritten signature for each signature field or not.
@return [Boolean]
# File lib/universign/transaction.rb, line 82 def each_field data['eachField'] end
# File lib/universign/transaction.rb, line 17 def from_data(data) @data = data end
A bean containing information about the requester of a transaction @return
# File lib/universign/transaction.rb, line 52 def initiator data['initiatorInfo'] end
Whether the transaction is signed… or not !
@return [Boolean]
# File lib/universign/transaction.rb, line 89 def signed? status == 'completed' end
A list of bean containing information about the signers and their progression in the signature process
@return [Array<Universign::Signer]
# File lib/universign/transaction.rb, line 45 def signers raise 'NotImplementedYet' end
@return [String]
The status of the transaction. The existing statuses are:
| Status | Description | |————-|————————————————————————————————–| | `ready` | Signers can connect and sign | | `expired` | The transaction has been requested more than 7 days ago. It will no more be available to signers | | `canceled` | A signer has canceled the transaction. Signers will no more be able to connect to the service | | `failed` | An error occured during a signature. The signers won’t be able to connect to the service | | `completed` | All signers have successfuly sign, the requester can retrieve the documents |
# File lib/universign/transaction.rb, line 32 def status data['status'] end
Private Instance Methods
# File lib/universign/transaction.rb, line 97 def client Universign::Client.new.client end