lib/chartmogul/customer_invoices.rb in chartmogul-ruby-1.6.4 vs lib/chartmogul/customer_invoices.rb in chartmogul-ruby-1.6.6
- old
+ new
@@ -24,9 +24,18 @@
def self.all(customer_uuid, options = {})
super(options.merge(customer_uuid: customer_uuid))
end
+ def self.destroy_all!(data_source_uuid, customer_uuid)
+ path = ChartMogul::ResourcePath.new('v1/data_sources/:data_source_uuid/customers/:customer_uuid/invoices')
+ handling_errors do
+ connection.delete(path.apply(data_source_uuid: data_source_uuid, customer_uuid: customer_uuid))
+ end
+ true
+ end
+
+
def_delegators :invoices, :each, :[], :<<, :size, :length, :empty?, :first
private
# TODO: replace with Entries concern?