class Harvest::LineItem
Public Class Methods
new(args = {}, _ = nil)
click to toggle source
Calls superclass method
# File lib/harvest/line_item.rb, line 3 def initialize(args = {}, _ = nil) args = args.stringify_keys self.project = args.delete('project') if args['project'] super end
Public Instance Methods
active?()
click to toggle source
# File lib/harvest/line_item.rb, line 13 def active? !deactivated end
line_item_as_json()
click to toggle source
# File lib/harvest/line_item.rb, line 17 def line_item_as_json { 'line_item' => { 'id' => line_item_id } } end
project=(project)
click to toggle source
# File lib/harvest/line_item.rb, line 9 def project=(project) self['project_id'] = project['id'] end