Class: Inkdit::Signature
- Inherits:
-
Object
- Object
- Inkdit::Signature
- Defined in:
- lib/inkdit/signature.rb
Overview
Represents a signed signature placeholder.
Instance Method Summary collapse
-
#contract ⇒ Contract
The contract this field is part of.
-
#initialize(client, params) ⇒ Signature
constructor
A new instance of Signature.
- #inspect ⇒ Object
-
#on_behalf_of ⇒ Entity
The entity this field was signed on behalf of.
-
#signed_at ⇒ Time
When this field was signed.
-
#signed_by ⇒ Entity
The individual who signed this field.
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
#contract ⇒ Contract
Returns 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 |
#inspect ⇒ Object
32 33 34 |
# File 'lib/inkdit/signature.rb', line 32 def inspect "#<#{self.class.inspect} params=#{@params}>" end |
#on_behalf_of ⇒ Entity
Returns 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_at ⇒ Time
Returns when this field was signed.
22 23 24 |
# File 'lib/inkdit/signature.rb', line 22 def signed_at Time.parse(params['signed_at']) end |