Daursu/xero

Add a way to perform batch inserts

Opened this issue · 2 comments

The Xero API allows batch inserts by doing a PUT or POST request with a body like

<?xml version='1.0'?>
<FooBars>
    <FooBar>
        <Stuff>bla</Stuff>
    <FooBar>
    <FooBar>
        <Stuff>moo</Stuff>
    <FooBar>
</FooBars>

These batch uploads are important for lots of people (me included) to work around the API limits.

As far as I can tell, there's no (non-hacky) way to perform them with this library at present.

Perhaps collections should offer a ->save() method?

Yes a save() method on the collection should do the trick. I will have a look at implementing it.