class Universign::TransactionSigner

Attributes

callbacks[RW]
phone_number[RW]
signature[RW]

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method Universign::Signer::new
# File lib/universign/transaction_signer.rb, line 5
def initialize(options = {})
  super(options)

  options.each do |key, value|
    send("#{key}=", value)
  end
end

Public Instance Methods

birtdate=(data) click to toggle source

This signer’s birth date. This is an option for the certified signature

@params [Date] data

# File lib/universign/transaction_signer.rb, line 71
def birtdate=(data)
  @birthdate         = data
  params[:birthDate] = data
end
cancel_url=(data) click to toggle source
# File lib/universign/transaction_signer.rb, line 84
def cancel_url=(data)
  @cancel_url        = data
  params[:cancelURL] = data
end
email=(data) click to toggle source

This signer’s e-mail address

@params [String] data

# File lib/universign/transaction_signer.rb, line 24
def email=(data)
  @email                = data
  params[:emailAddress] = data
end
fail_url=(data) click to toggle source
# File lib/universign/transaction_signer.rb, line 89
def fail_url=(data)
  @fail_url        = data
  params[:failURL] = data
end
identification_type=(data) click to toggle source

Which authentication type will be used when a signer will attempt to sign.

The available values are : | Type | Description | |:——-:|:——————————————————————————————————————————————————————————–:| | `none` | The signer won’t be asked an authentication code when signing | | `email` | The signer will be sent a authentication code by e-mail. Using this option implies that this signer has a valid email property set, otherwise, an exception is thrown | | `sms` | The signer will be sent a authentication code by sms. Using this option implies that this signer has a valid `phone_number` property set, in other cases, an exception is thrown |

# File lib/universign/transaction_signer.rb, line 102
def identification_type=(data)
  @identification_type        = data
  params[:identificationType] = data
end
organization=(data) click to toggle source

This signer’s organization

@params [String] data

# File lib/universign/transaction_signer.rb, line 16
def organization=(data)
  @organization         = data
  params[:organisation] = data
end
phone_number=(data) click to toggle source

This signer’s mobile phone number that should be written in the international format

Mandatory if the authentication by sms is activated

@params [String] data

# File lib/universign/transaction_signer.rb, line 35
def phone_number=(data)
  @phone_number     = data
  params[:phoneNum] = data
end
role=(data) click to toggle source

The role of this transaction actor

| Role | Description | |:———-:|:—————————————————————————————-:| | `signer` | (default) This actor is a signer and he will be able to view the documents and sign them | | `observer` | This actor is an observer and he will be able only to view the documents |

@params [String] data

# File lib/universign/transaction_signer.rb, line 48
def role=(data)
  @role         = data
  params[:role] = data
end
signature_field=(data) click to toggle source

A description of a visible PDF signature field. If none provided, no signature field will be produced on the signed document

@params [Universign::SignatureField] data

# File lib/universign/transaction_signer.rb, line 58
def signature_field=(data)
  if !data.instance_of?(Universign::SignatureField)
    raise 'BadSignatureFieldType' # TODO: create custom Exception
  end

  @signature_field        = data
  params[:signatureField] = data.params
end
success_url=(data) click to toggle source

The url to where the signer will be redirected, after the signatures are completed. If it is null it takes the value of {Universign::Transaction#success_url} If it is also null, it takes the default Universign success URL

# File lib/universign/transaction_signer.rb, line 79
def success_url=(data)
  @success_url        = data
  params[:successURL] = data
end