discourse-subscriptions/assets/javascripts/discourse/models/invoice.js.es6

14 lines
289 B
Plaintext
Raw Normal View History

2019-10-27 23:05:58 -04:00
import { ajax } from "discourse/lib/ajax";
2019-10-31 21:30:19 -04:00
const Invoice = Discourse.Model.extend({});
2019-10-27 23:05:58 -04:00
Invoice.reopenClass({
findAll() {
return ajax("/patrons/invoices", { method: "get" }).then(result =>
result.map(invoice => Invoice.create(invoice))
);
}
});
export default Invoice;