Module: Paymill::Operations::Update

Included in:
Client, Paymill::Offer, Subscription, Webhook
Defined in:
lib/paymill/operations/update.rb

Instance Method Summary collapse

Instance Method Details

#update_attributes(attributes) ⇒ Object

Updates a object

Parameters:

  • attributes (Hash)

    The attributes that should be updated



7
8
9
10
# File 'lib/paymill/operations/update.rb', line 7

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