Giter VIP home page Giter VIP logo

intacct-api's People

Contributors

mciocchi avatar mrlannigan avatar porrungroj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intacct-api's Issues

Add configurable logging

  • Create standard interface for logging to be used internally
    this.log(level, message)
  • Set default to be a null function
  • Add documentation with an example

Support '*' query on inspect static function

when following the Intacct API to query all objects (e.g. IntacctAPI.inspect({object: '*'}), the '*' does not seem to work. Is there a way to query all objects when using your module or to add support for the '*' query? Also relevant to the inspect method, can you inspect with details via this api? There is an example of this in intacct's documentation, but I am unsure how to achieve this via intacct-api module. Thanks for your work!

Return JSON

Question since I am just beginning with these API's, but why are you parsing the response XML to JSON and not just setting the returnFormat to JSON?

Unexpected readMore results

This readyByQuery call:

const projectControlFunc = IntacctApi.readByQuery({
  object: "PROJECT",
  fields: "PROJECTID,RSEGMENT,NAME",
  query: "RSEGMENT IS NOT NULL",
  pagesize: 2
});

Returns 2 projects and the projects are accessible at the locator projectControlFunc.data.project:

ControlFunction {
  name: 'readByQuery',
  parse: [Function: read],
  parameters: 
   { query: 'RSEGMENT IS NOT NULL',
     fields: 'PROJECTID,RSEGMENT,NAME',
     pagesize: 2,
     returnFormat: 'xml',
     docparid: '',
     object: 'PROJECT' },
  controlId: 'f4e487f0-0a3d-11e7-8bc2-7dc14e8dce03',
  result: 
   { status: 'success',
     function: 'readByQuery',
     controlid: 'f4e487f0-0a3d-11e7-8bc2-7dc14e8dce03' },
  data: 
   { '$': 
      { listtype: 'project',
        count: '2',
        totalcount: '3075',
        numremaining: '3073',
        resultId: '7765623338WMp6r8CoA4oAAAdYmU4AAAAC5' },
     project: [ [Object], [Object] ] } }

This subsequent readMore call:

const nextFunc = IntacctApi.readMore({object: 'PROJECT'});

Only returns 1 project (expected the same pagesize of 2) and the locator of the project data is now nested in an array like projectControlFunc.data[0].project:

ControlFunction {
  name: 'readMore',
  parse: null,
  parameters: { object: 'PROJECT' },
  controlId: 'f5c59920-0a3d-11e7-8bc2-7dc14e8dce03',
  result: 
   { status: 'success',
     function: 'readMore',
     controlid: 'f5c59920-0a3d-11e7-8bc2-7dc14e8dce03' },
  data: [ { '$': [Object], project: [Object] } ] }

Is this expected? Am I using it properly?

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.