Class: Myob::Api::Model::Timesheet
- Defined in:
- lib/myob/api/models/timesheet.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #model_route ⇒ Object
-
#new_record?(object) ⇒ Boolean
developer.myob.com/api/accountright/v2/payroll/timesheet/ we always want to PUT timesheets, so they are never a “new” record.
-
#url(object = nil) ⇒ Object
a timesheet is identified based on an employee UID as well as its start and end date it does not have a UID of its own.
Methods inherited from Base
#all, #first, #get, #initialize, #save
Constructor Details
This class inherits a constructor from Myob::Api::Model::Base
Instance Method Details
#model_route ⇒ Object
5 6 7 |
# File 'lib/myob/api/models/timesheet.rb', line 5 def model_route 'Payroll/Timesheet' end |
#new_record?(object) ⇒ Boolean
developer.myob.com/api/accountright/v2/payroll/timesheet/ we always want to PUT timesheets, so they are never a “new” record
11 12 13 |
# File 'lib/myob/api/models/timesheet.rb', line 11 def new_record?(object) false end |
#url(object = nil) ⇒ Object
a timesheet is identified based on an employee UID as well as its start and end date it does not have a UID of its own
17 18 19 20 21 22 23 |
# File 'lib/myob/api/models/timesheet.rb', line 17 def url(object = nil) if object "#{super()}/#{object['Employee']['UID']}?StartDate=#{object['StartDate']}&EndDate=#{object['EndDate']}" else super end end |