Sha256: f679dc6558004408cacd5d914a573f24907ee0f3906889ab794974bd7d66570b

Contents?: true

Size: 899 Bytes

Versions: 1

Compression:

Stored size: 899 Bytes

Contents

module Harvesting
  module Models
    class TimeEntry < Base
      attributed :id,
                 :spent_date,
                 :hours,
                 :notes,
                 :created_at,
                 :updated_at,
                 :is_locked,
                 :locked_reason,
                 :is_closed,
                 :is_billed,
                 :timer_started_at,
                 :started_time,
                 :ended_time,
                 :is_running,
                 :invoice,
                 :external_reference,
                 :billable,
                 :budgeted,
                 :billable_rate,
                 :cost_rate,
                 :project_id,
                 :task_id

      def path
        id.nil? ? "time_entries" : "time_entries/#{id}"
      end

      def user
        Models::User.new(@attributes['user'], client: @client)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
harvesting-0.2.0 lib/harvesting/models/time_entry.rb