Class: Universign::Sign::Client

Inherits:
XMLRPC::Client
  • Object
show all
Defined in:
lib/universign.rb

Instance Method Summary collapse

Instance Method Details

#get_documents(transaction_id) ⇒ Object



117
118
119
# File 'lib/universign.rb', line 117

def get_documents(transaction_id)
  call('requester.getDocuments', transaction_id)
end

#get_transaction_info(transaction_id) ⇒ Object



113
114
115
# File 'lib/universign.rb', line 113

def get_transaction_info(transaction_id)
  call('requester.getTransactionInfo', transaction_id)
end

#request_transaction(signers, docs, options = {}) ⇒ Object

Request signature (Client side)



101
102
103
104
105
106
107
108
109
110
111
# File 'lib/universign.rb', line 101

def request_transaction(signers, docs, options = {})
  options[:documents] = (docs.is_a? Array) ? docs : [docs]
  options[:signers] = (signers.is_a? Array) ? signers : [signers]
  request = options.reverse_merge(
      handwrittenSignatureMode: \
      Universign.configuration.handwritten_signature_mode,
      profile: Universign.configuration.profile,
      language: Universign.configuration.language
  )
  call('requester.requestTransaction', request)
end

#set_debugObject



121
122
123
# File 'lib/universign.rb', line 121

def set_debug
  @http.set_debug_output($stderr)
end