Class: Inkdit::Signature

Inherits:
Object
  • Object
show all
Defined in:
lib/inkdit/signature.rb

Overview

Represents a signed signature placeholder.

Instance Method Summary collapse

Constructor Details

#initialize(client, params) ⇒ Signature

Returns a new instance of Signature.



4
5
6
7
# File 'lib/inkdit/signature.rb', line 4

def initialize(client, params)
  @client = client
  @params = params
end

Instance Method Details

#contractContract

Returns the contract this field is part of.

Returns:

  • (Contract)

    the contract this field is part of



27
28
29
30
# File 'lib/inkdit/signature.rb', line 27

def contract
  return unless @params['contract']
  Inkdit::Contract.new @client, @params['contract']
end

#inspectObject



32
33
34
# File 'lib/inkdit/signature.rb', line 32

def inspect
  "#<#{self.class.inspect} params=#{@params}>"
end

#on_behalf_ofEntity

Returns the entity this field was signed on behalf of.

Returns:

  • (Entity)

    the entity this field was signed on behalf of



15
16
17
18
19
# File 'lib/inkdit/signature.rb', line 15

def on_behalf_of
  if @params['on_behalf_of']
    Inkdit::Entity.new(@client, @params['on_behalf_of'])
  end
end

#signed_atTime

Returns when this field was signed.

Returns:

  • (Time)

    when this field was signed



22
23
24
# File 'lib/inkdit/signature.rb', line 22

def signed_at
  Time.parse(params['signed_at'])
end

#signed_byEntity

Returns the individual who signed this field.

Returns:

  • (Entity)

    the individual who signed this field



10
11
12
# File 'lib/inkdit/signature.rb', line 10

def signed_by
  Inkdit::Entity.new(@client, @params['signed_by'])
end