Class: Harvesting::Models::HarvestRecord

Inherits:
Base
  • Object
show all
Defined in:
lib/harvesting/models/harvest_record.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #harvest_client

Instance Method Summary collapse

Methods inherited from Base

#delete, #fetch, get, #initialize, #to_hash

Constructor Details

This class inherits a constructor from Harvesting::Models::Base

Instance Method Details

#createObject



9
10
11
# File 'lib/harvesting/models/harvest_record.rb', line 9

def create
  harvest_client.create(self)
end

#saveObject



5
6
7
# File 'lib/harvesting/models/harvest_record.rb', line 5

def save
  id.nil? ? create : update
end

#updateObject



13
14
15
# File 'lib/harvesting/models/harvest_record.rb', line 13

def update
  harvest_client.update(self)
end