Created
October 24, 2012 00:51
-
-
Save NullVoxPopuli/3943045 to your computer and use it in GitHub Desktop.
Proposal Object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
@api public | |
@api public | |
@!attribute account_id [r] | |
@return [Integer] the id of the {Account} this {Proposal} is tied to. Can't be changed. | |
@api public | |
@!attribute allow_accept | |
@return [Boolean] allow the proposal to be accepted | |
@api public | |
@!attribute allow_decline | |
@return [Boolean] allow the proposal to be declined | |
@api public | |
@!attribute allow_downloads | |
@return [Boolean] allow the pdf of this proposal to be downloaded | |
@api public | |
@!attribute archived | |
@return [Boolean] the state of archival | |
@api public | |
@!attribute category_id | |
@return [Integer] the id of the associated {Category} | |
@api public | |
@!attribute client | |
@return [String] the name of the client that this proposal is intended for | |
@!attribute closed_at [r] | |
@return [DateTime] the date and time that the proposal was closed | |
@!attribute closed_comment_id | |
@return [Integer] if the proposal is closed with the standard TinderBox esignature process, there will be an | |
associated object containing the name, email, and ip address of the signer | |
@!attribute created_at [r] | |
@return [DateTime] the date and time that the proposal was created | |
@!attribute deleted_at [r] | |
@return [DateTime] the date and time that the proposal was soft deleted | |
@!attribute description | |
@return [String] Short description of what the proposal is for | |
@!attribute downloads | |
@return [Integer] number of times that the PDF of this proposal has been downloaded from the view URL | |
@!attribute enable_access_code | |
@return [Boolean] enable a password for viewing the proposal once published | |
@!attribute enable_cover_page | |
@return [Boolean] display a cover page | |
@!attribute enable_public_redlining | |
@return [Boolean] enable redlining from the public view once published | |
@!attribute enable_redlining | |
@return [Boolean] enable redlining internally | |
@!attribute esignable | |
@return [Boolean] let this proposal use the {Account}'s current esignature provider | |
@!attribute expires_at | |
@return [DateTime] the date and time that the proposal expires (no longer is viewable to the public) | |
only matters if the proposal is publish, as the URL to this proposal becomes dead | |
@!attribute ext_integration_id | |
@return [String] Could be used for storing an external id for keeping track of this proposal within | |
some external system | |
@!attribute id [r] | |
@return [Integer] identification for this {Proposal}. Can't be changed | |
@!attribute last_viewed_at | |
@return [DateTime] the date and time that the proposal was last viewed (only valid after publish) | |
@!attribute name | |
@return [String] the name of the proposal | |
@!attribute metadata [r] | |
@return [Hash] metadata | |
@!attribute password | |
@return [String] the code used for accessing the public view of this proposal | |
@!attribute proposal_template_id | |
@return [Integer] the id of the {Proposal::Template} that was used to populate content and attributes of this proposal | |
@!attribute published_at [r] | |
@return [DateTime] the date and time that this proposal was published | |
@!attribute status | |
@return [Integer] status of this proposal. see statuses below | |
@!attribute updated_at [r] | |
@return [DateTime] the date and time that the proposal was last updated | |
@!attribute user_id | |
@return [Integer] the id of the owner of this proposal | |
@!attribute value | |
@return [Decimal] the monetary value of this proposal | |
@!attribute variable_data | |
@return [Hash] variable definitions. To safely add / remove variables, see {ProposalController} | |
@!attribute views [r] | |
@return [Integer] the number of public views (post publish) | |
@!attribute visibility | |
@return [Integer] see visibility in {Shared} | |
@association account [Account] | |
@association attachments [Array<Proposal::Attachment>] | |
@association category [Category] | |
@association contents [Array<Proposal::Content>] | |
@association hard_copies [Array<Proposal::PDF>] | |
@association sections [Array<Proposal::Section>] | |
@association user [User] | |
=end | |
class Proposal < LibraryItem | |
# @!group status | |
# @api public | |
UNPUBLISHED = 0 | |
# @api public | |
PUBLISHED = 1 | |
# @api public | |
# final - accepted | |
ACCEPTED = 2 | |
# @api public | |
# straight up declined | |
# @api public | |
DECLINED = 3 | |
# @api public | |
# waiting for more information | |
ACCEPTED_PENDING = 4 | |
# @api public | |
# errors are less than 0 | |
# esign document generation failed - proposal publishing cancelled | |
ESIGN_FAILURE = -1 | |
# @api public | |
# waiting for esignature service to finish before publishing | |
ESIGN_DOCUMENT_IN_PROGRESS = 5 | |
# @!endgroup status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment