Sha256: dd302f0e33082873e30822a0d68b6e96842cf82a669929e2aebeaa4d11dcb6f6

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

module GroupDocs
  class Signature::Recipient < Api::Entity

    STATUSES = {
      none:     -1,
      waiting:   0,
      notified:  1,
      delegated: 2,
      rejected:  3,
      signed:    4,
    }

    # @attr [String] id
    attr_accessor :id
    # @attr [String] email
    attr_accessor :email
    # @attr [String] firstName
    attr_accessor :firstName
    # @attr [String] lastName
    attr_accessor :lastName
    # @attr [String] nickname
    attr_accessor :nickname
    # @attr [String] roleId
    attr_accessor :roleId
    # @attr [String] order
    attr_accessor :order
    # @attr [Symbol] status
    attr_accessor :status

    # Human-readable accessors
    alias_method :first_name,  :firstName
    alias_method :first_name=, :firstName=
    alias_method :last_name,   :lastName
    alias_method :last_name=,  :lastName=
    alias_method :role_id,     :roleId
    alias_method :role_id=,    :roleId=

    #
    # Converts status to human-readable format.
    # @return [Symbol]
    #
    def status
      STATUSES.invert[@status]
    end

  end # Signature::Recipient
end # GroupDocs

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
groupdocs-1.1.0 lib/groupdocs/signature/recipient.rb
groupdocs-1.0.0 lib/groupdocs/signature/recipient.rb