Class: Elmas::TimeTransaction

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/elmas/resources/time_transaction.rb

Instance Attribute Summary

Attributes included from Resource

#attributes, #response, #url

Instance Method Summary collapse

Methods included from Resource

#delete, #find, #find_all, #find_by, #get, #id, #id?, #initialize, #method_missing, #save, #valid?

Methods included from Resource::Sanitizer

#sanitize, #sanitize_date_time, #sanitize_has_many, #sanitize_relationship

Methods included from Resource::UriMethods

#apply_filters, #apply_order, #apply_select, #base_filter, #basic_identifier_uri, #query_attribute, #sanitize_value, #uri

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Elmas::Resource

Instance Method Details

#base_pathObject



5
6
7
# File 'lib/elmas/resources/time_transaction.rb', line 5

def base_path
  "project/TimeTransactions"
end

#mandatory_attributesObject



9
10
11
# File 'lib/elmas/resources/time_transaction.rb', line 9

def mandatory_attributes
  [:account, :item, :quantity]
end

#other_attributesObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/elmas/resources/time_transaction.rb', line 14

def other_attributes
  [
    :account, :account_name, :activity, :activity_description, :amount, :amount_fc,
    :attachment, :created, :creator, :creator_full_name, :currency, :date,
    :division, :division_description, :employee, :end_time, :entry_number,
    :error_text, :hour_status, :item, :item_description, :item_divisable,
    :modified, :modifier, :modifier_full_name, :notes, :price, :price_fc, :project,
    :project_account, :project_account_code, :project_account_name,
    :project_description, :quantity, :start_time, :subscription,
    :subscription_account, :subscription_account_code, :subscription_account_name,
    :subscription_description, :subscription_number, :type
  ]
end