Code Monkey home page Code Monkey logo

xero's People

Contributors

daursu avatar webdevbren avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xero's Issues

Add a way to perform batch inserts

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.

Extend the library

Hi,
I've created a new model file in models directory called Employee as described on readme file.
The content of the file is:

There's no possible way to include tracking categories on LineItem elements

Per the docs at http://developer.xero.com/documentation/api/invoices/, a <LineItem> can contain a <Tracking> element which is a collection of <TrackingCategory> elements, like this:

<LineItem>
  <Description>Consulting services as agreed</Description>
  <Quantity>5.0000</Quantity>
  <UnitAmount>99</UnitAmount>
  <AccountCode>200</AccountCode>
  <Tracking>
      <TrackingCategory>
        <Name>Activity/Workstream</Name>
        <Option>Onsite consultancy</Option>
      </TrackingCategory>
  </Tracking>
</LineItem>

As far as I can see, there's no way to create that <LineItem> as a Daursu/xero model at present. If we pass in an array or collection of TrackingCategory models as a property of the LineItem, the model property (and the name of element representing the collection in the XML representation of the model) automatically gets called TrackingCategories, which is wrong - it should be Tracking. We need a way to override the tag names Pluralizer automatically comes up with for elements representing collections, and insist that no, Tracking is the plural of TrackingCategory, not TrackingCategories.

Organisation Info

Hi there,

I can't see any classes for getting info about Organisation like the name and address. Do I have to extend the functionality myself or is there already a way to do this?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.