Module: Iugu::APIDelete

Included in:
Customer, Invoice, PaymentMethod, Plan, Subscription
Defined in:
lib/iugu/api_delete.rb

Instance Method Summary collapse

Instance Method Details

#deleteObject



5
6
7
8
9
10
11
12
# File 'lib/iugu/api_delete.rb', line 5

def delete
  APIRequest.request("DELETE", self.class.url(attributes))
  self.errors = nil
  true
rescue Iugu::RequestWithErrors => e
  self.errors = e.errors
  false
end