Class: Beanie::Document
Constant Summary collapse
- CATEGORY_UNFILED =
0- CATEGORY_DEBIT_CARD_EXPENSES =
1- CATEGORY_CASH_EXPENSES =
2- CATEGORY_PURCHASE_INVOICES =
3- CATEGORY_SALES_INVOICES =
4- CATEGORY_BANK_STATEMENTS =
5- CATEGORY_CONTRACTS =
6- CATEGORY_MISCELLANEOUS =
7- CATEGORIES =
[ ["Unfiled", CATEGORY_UNFILED], ["Debit Card Expenses", CATEGORY_DEBIT_CARD_EXPENSES], ["Cash Expenses", CATEGORY_CASH_EXPENSES], ["Purchase Invoices", CATEGORY_PURCHASE_INVOICES], ["Sales Invoices", CATEGORY_SALES_INVOICES], ["Bank Statements", CATEGORY_BANK_STATEMENTS], ["Contracts", CATEGORY_CONTRACTS], ["Miscellaneous", CATEGORY_MISCELLANEOUS] ].freeze
Instance Attribute Summary collapse
-
#bxref ⇒ Object
Returns the value of attribute bxref.
-
#category ⇒ Object
Returns the value of attribute category.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#size ⇒ Object
Returns the value of attribute size.
-
#src_file ⇒ Object
Returns the value of attribute src_file.
Instance Method Summary collapse
-
#category_name ⇒ Object
Display a name for the document category.
-
#initialize ⇒ Document
constructor
Initialize instance variables.
Methods inherited from Api
all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers
Constructor Details
#initialize ⇒ Document
Initialize instance variables
56 57 58 59 60 61 62 63 |
# File 'lib/beanie/document.rb', line 56 def initialize @id = nil @bxref = nil @mime_type = nil @size = nil @src_file = nil @category = nil end |
Instance Attribute Details
#bxref ⇒ Object
Returns the value of attribute bxref.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def bxref @bxref end |
#category ⇒ Object
Returns the value of attribute category.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def category @category end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def id @id end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def mime_type @mime_type end |
#size ⇒ Object
Returns the value of attribute size.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def size @size end |
#src_file ⇒ Object
Returns the value of attribute src_file.
32 33 34 |
# File 'lib/beanie/document.rb', line 32 def src_file @src_file end |
Instance Method Details
#category_name ⇒ Object
Display a name for the document category
67 68 69 |
# File 'lib/beanie/document.rb', line 67 def category_name CATEGORIES[self.category][0] end |