Class: Ey::Core::Client::Backup

Inherits:
Model
  • Object
show all
Extended by:
Associations
Defined in:
lib/vendor/core/ey-core/models/backup.rb

Instance Method Summary collapse

Methods included from Associations

assoc_accessor, assoc_coverage, assoc_reader, assoc_writer, associations, collection_reader

Methods inherited from Model

#destroy, range_parser, #save, #update!, #url

Instance Method Details

#finish!Object



31
32
33
34
35
# File 'lib/vendor/core/ey-core/models/backup.rb', line 31

def finish!
  requires :id

  merge_attributes(self.connection.finish_backup("id" => self.identity).body["backup"])
end

#save!Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/vendor/core/ey-core/models/backup.rb', line 15

def save!
  requires :collection

  params = {
    "url"    => self.collection.url,
    "backup" => {
      "metadata" => self.,
    },
  }

  if new_record?
    merge_attributes(self.connection.create_backup(params).body["backup"])
  else raise NotImplementedError # update
  end
end