Module: Signnow::Operations::Update

Defined in:
lib/signnow/operations/update.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



39
40
41
# File 'lib/signnow/operations/update.rb', line 39

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#update_attributes(attributes) ⇒ Object

Updates a object

Parameters:

  • attributes (Hash)

    The attributes that should be updated



46
47
48
49
# File 'lib/signnow/operations/update.rb', line 46

def update_attributes(attributes)
  response = Signnow.request(:put, nil, "#{self.class.name.split("::").last.downcase}/#{id}", attributes)
  set_attributes(response["data"])
end