Class: Signnow::Document

Inherits:
Base
  • Object
show all
Includes:
Operations::All, Operations::DownloadLink, Operations::Show
Defined in:
lib/signnow/document.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Operations::DownloadLink

included

Methods included from Operations::All

included

Methods included from Operations::Show

included

Methods inherited from Base

#errors, #initialize, #set_attributes, #valid?

Methods included from Operations::Find

included

Methods included from Operations::Create

included

Constructor Details

This class inherits a constructor from Signnow::Base

Instance Attribute Details

#createdObject

Returns the value of attribute created.



7
8
9
# File 'lib/signnow/document.rb', line 7

def created
  @created
end

#document_nameObject

Returns the value of attribute document_name.



7
8
9
# File 'lib/signnow/document.rb', line 7

def document_name
  @document_name
end

#fieldsObject

Returns the value of attribute fields.



7
8
9
# File 'lib/signnow/document.rb', line 7

def fields
  @fields
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/signnow/document.rb', line 7

def id
  @id
end

#insertsObject

Returns the value of attribute inserts.



7
8
9
# File 'lib/signnow/document.rb', line 7

def inserts
  @inserts
end

#notary_invitesObject

Returns the value of attribute notary_invites.



7
8
9
# File 'lib/signnow/document.rb', line 7

def notary_invites
  @notary_invites
end

#original_filenameObject

Returns the value of attribute original_filename.



7
8
9
# File 'lib/signnow/document.rb', line 7

def original_filename
  @original_filename
end

#page_countObject

Returns the value of attribute page_count.



7
8
9
# File 'lib/signnow/document.rb', line 7

def page_count
  @page_count
end

#pagesObject

Returns the value of attribute pages.



7
8
9
# File 'lib/signnow/document.rb', line 7

def pages
  @pages
end

#requestsObject

Returns the value of attribute requests.



7
8
9
# File 'lib/signnow/document.rb', line 7

def requests
  @requests
end

#sealsObject

Returns the value of attribute seals.



7
8
9
# File 'lib/signnow/document.rb', line 7

def seals
  @seals
end

#signaturesObject

Returns the value of attribute signatures.



7
8
9
# File 'lib/signnow/document.rb', line 7

def signatures
  @signatures
end

#tagsObject

Returns the value of attribute tags.



7
8
9
# File 'lib/signnow/document.rb', line 7

def tags
  @tags
end

#textsObject

Returns the value of attribute texts.



7
8
9
# File 'lib/signnow/document.rb', line 7

def texts
  @texts
end

#thumbnailObject

Returns the value of attribute thumbnail.



7
8
9
# File 'lib/signnow/document.rb', line 7

def thumbnail
  @thumbnail
end

#updatedObject

Returns the value of attribute updated.



7
8
9
# File 'lib/signnow/document.rb', line 7

def updated
  @updated
end

#user_idObject

Returns the value of attribute user_id.



7
8
9
# File 'lib/signnow/document.rb', line 7

def user_id
  @user_id
end

#version_timeObject

Returns the value of attribute version_time.



7
8
9
# File 'lib/signnow/document.rb', line 7

def version_time
  @version_time
end

Class Method Details

.api_all_urlObject

Redefining the documents api endpoint



21
22
23
# File 'lib/signnow/document.rb', line 21

def api_all_url
    "user/documentsv2"
end

Instance Method Details

#parse_timestampsObject

Parses UNIX timestamps and creates Time objects.



12
13
14
15
16
# File 'lib/signnow/document.rb', line 12

def parse_timestamps
  super
  @updated = updated.to_i if updated.is_a? String
  @updated = Time.at(updated) if updated
end