intacct / intacct-sdk-php

Official repository of the Sage Intacct SDK for PHP
https://developer.intacct.com/tools/sdk-php/
Apache License 2.0
25 stars 33 forks source link

is there any method to create vendor in intacct? #174

Closed manithink closed 2 years ago

manithink commented 2 years ago

Can you please provide us with the document to create vendor using PHP intacct SDK? We don't see any method to create vendor in below link https://developer.intacct.com/tools/sdk-php/

dhazelett commented 2 years ago

Here's a simple Example:

$config = new Intacct\ClientConfig();

$config->setSenderId(/* ... */);
$config->setSenderPassword(/* ... */);
// the rest of the config

$client = new Intacct\OnlineClient($config);

$fn = new Intacct\Functions\AccountsPayable\VendorCreate();
$fn->setVendorId(1);
$fn->setVendorName('Foo');
// more properties (see Intacct\Functions\AccountsPayable\AbstractVendor for all methods available)

// returns instance of Intacct\Xml\OnlineResponse
$response = $client->execute($fn);

// returns instance of Intacct\Xml\Response\Result
$result = $response->getResult();
dylan-holt-sage commented 2 years ago

@manithink , did dhazelett's solution help you in your endeavor? If so, let's close this issue :)