Class: ESP::CustomSignature::Definition

Inherits:
Resource
  • Object
show all
Defined in:
lib/esp/resources/custom_signature/definition.rb

Constant Summary

Constants inherited from Resource

Resource::PREDICATES

Instance Method Summary collapse

Methods inherited from Resource

arrange_options, filters, find, make_pageable, #serializable_hash, where

Instance Method Details

#activateObject



9
10
11
12
13
14
15
16
17
# File 'lib/esp/resources/custom_signature/definition.rb', line 9

def activate
  patch(:activate).tap do |response|
    load_attributes_from_response(response)
  end
rescue ActiveResource::BadRequest, ActiveResource::ResourceInvalid, ActiveResource::UnauthorizedAccess => error
  load_remote_errors(error, true)
  self.code = error.response.code
  false
end

#archiveObject



19
20
21
22
23
24
25
26
27
# File 'lib/esp/resources/custom_signature/definition.rb', line 19

def archive
  patch(:archive).tap do |response|
    load_attributes_from_response(response)
  end
rescue ActiveResource::BadRequest, ActiveResource::ResourceInvalid, ActiveResource::UnauthorizedAccess => error
  load_remote_errors(error, true)
  self.code = error.response.code
  false
end