Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add XML attribute to custom control function name, e.g. <reverse_arpayment key="1234"> #14

Closed
arjunshukla opened this issue Aug 18, 2017 · 1 comment
Labels

Comments

@arjunshukla
Copy link

arjunshukla commented Aug 18, 2017

https://developer.intacct.com/api/accounts-receivable/ar-payments/#reverse-ar-payment-legacy

@mrlannigan
Copy link
Contributor

mrlannigan commented Oct 16, 2017

Hello @arjunshukla,

Sorry for the delay in responding, but to create this request see the following:

import { ControlFunction } from 'intacct-api';

const theFunction = new ControlFunction('reverse_arpayment', {
    '@key': 1234,
    datereversed: {
        year: 2017,
        month: 10,
        day: 16
    }
});

produces

<function controlid="e4b20cd0-b2b8-11e7-bf55-7dfa198e5d41">
    <reverse_arpayment key="1234">
        <datereversed>
            <year>2017</year>
            <month>10</month>
            <day>16</day>
        </datereversed>
    </reverse_arpayment>
</function>

This module uses xmlbuilder to create the requests that are sent to Intacct. Please see this documentation on how it converts your JS objects into XML.

I'm going to close this for now. We can reopen if needed.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants