0

出了什么问题 我正在尝试在exactonline和autotask之间创建一个api。我已经链接到它们之间的数据库,但现在我不再进一步在这两者之间传输数据。

脚本

脚本1(精确在线)

try {
    $result = array();
    $journals = new \Picqer\Financials\Exact\Journal($connection);
    $result   = $journals->get();
    foreach ($result as $journal) {
       $result[]= $journal->Description;
    }
    echo json_encode($result);
} catch (\Exception $e) {
    json_encode(array(get_class($e) . ' : ' . $e->getMessage()));
}

脚本2(精确在线)

namespace Picqer\Financials\Exact;

/**
 * Class Journal
 *
 * @package Picqer\Financials\Exact
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=financialJournals
 *
 * @property String $Code BIC code of the bank where the bank account is held
 * @property Int32 $Division Division code
 * @property String $Description Description of BankAccount
 * @property Guid $ID Primary Key
 * @property String $Type Bank account number. Is mandatory for Journals that have Type = Bank
 */
class Journal extends Model
{
    use Query\Findable;
    use Persistance\Storable;

    protected $fillable = [
        'Code',
        'Division',
        'Description',
        'ID',
        'Type',
    ];

    protected $url = 'financial/Journals';
}

输出

[{"Code":"10","Description":"Kasboek","Division":1741496,"ID":"846af4e2-209d-44aa-84f2-068ae65b69b5","Type":10},{"Code":"90","Description":"Memoriaal","Division":1741496,"ID":"91fc95a4-765e-4d8b-8271-63884be5e480","Type":90},{"Code":"95","Description":"Activamutaties","Division":1741496,"ID":"8ec1491e-51a4-46b8-87f0-a3134c83af4c","Type":90},{"Code":"60","Description":"Inkoopboek","Division":1741496,"ID":"11b1d819-4cdc-4f8c-9d60-aac2359c230b","Type":22},{"Code":"20","Description":"Bank","Division":1741496,"ID":"f8afe3cc-bcf1-4932-9fe0-b761ad48618f","Type":12},{"Code":"70","Description":"Verkoopboek","Division":1741496,"ID":"b4afe081-7f6b-46c7-9742-ea22302a4d55","Type":20},"Kasboek","Memoriaal","Activamutaties","Inkoopboek","Bank","Verkoopboek"]

问题 我的问题是我怎样才能得到例如 Kasboek 作为我的 Autotask 脚本输入中的输入,这样我就可以发布它>

$ticket->AccountID = 'Kasboek';
$ticket->DueDateTime = '2015-12-17';
4

0 回答 0