Module: Paymill::Operations::Update::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#update_attributes(id, attributes) ⇒ Object

Updates a object

Parameters:

  • id (Integer)

    The id of the object that should be updated

  • attributes (Hash)

    The attributes that should be updated



9
10
11
12
# File 'lib/paymill/operations/update.rb', line 9

def update_attributes(id, attributes)
  response = Paymill.request(:put, "#{self.name.split("::").last.downcase}s/#{id}", attributes)
  self.new(response["data"])
end