Skip to content

Commit

Permalink
Proper composer include and object changes (APPSPEED-107) (#8)
Browse files Browse the repository at this point in the history
* composer autoload and invoice change
* use classmap
* add some missing classes
* allow null bankAccount for entity
* non-mandatory supplier and customer
* add previously missing methods and missing project attribute
  • Loading branch information
peter-horvath authored and Adrian Clay committed Apr 20, 2016
1 parent bfa6869 commit d0d153d
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 8 deletions.
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"name": "clearbooks/clearbooks-soap-php"
}
"name": "clearbooks/clearbooks-soap-php",
"autoload": {
"classmap": [ "src/" ]
}
}
18 changes: 18 additions & 0 deletions src/Clearbooks/Soap/1/0.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ public function createAccountCode( \Clearbooks_Soap_1_0_AccountCodeRequest $code
return $this->_call( 'createAccountCode', $code );
}

/**
* @param string $bankAccount
* @param string $statementName
* @param \Clearbooks_Soap_1_0_BankStatementLine[] $statementLines
*/
public function addBankStatementLines( $bankAccount, $statementName, $statementLines )
{
$this->_call( 'addBankStatementLines', $bankAccount, $statementName, $statementLines );
}

/**
* @param \Clearbooks_Soap_1_0_CreditPartialQuery $query
*/
public function writeOffPartial( $query )
{
$this->_call( 'writeOffPartial', $query );
}

/**
* @param \Clearbooks_Soap_1_0_Entity $entity
* @return int
Expand Down
17 changes: 17 additions & 0 deletions src/Clearbooks/Soap/1/0/Bank/BankAccount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* @author Clear Books <[email protected]>
* @version 1.0
*/
class Clearbooks_Soap_1_0_Bank_BankAccount
{
/** @var string */
public $name;

/** @var string */
public $accountNumber;

/** @var string */
public $sortCode;
}
//EOF BankAccount.php
19 changes: 19 additions & 0 deletions src/Clearbooks/Soap/1/0/BankStatementLine.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* @author Clear Books <[email protected]>
* @version 1.0
* @package Clearbooks
* @subpackage Soap/1/0
*/
class Clearbooks_Soap_1_0_BankStatementLine
{
/** @var string */
public $description;

/** @var string */
public $date;

/** @var float */
public $amount;
}
//EOF BankStatementLine.php
23 changes: 23 additions & 0 deletions src/Clearbooks/Soap/1/0/CreditPartialQuery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* @author Clear Books <[email protected]>
* @version 1.0
* @package Clearbooks
* @subpackage Soap/1/0
*/
class Clearbooks_Soap_1_0_CreditPartialQuery
{
/** @var int */
public $invoiceId;

/** @var int */
public $creditId;

/** @var float */
public $amountToAllocate;

/** @var string */
public $ledger;

}
//EOF CreditPartialQuery.php
6 changes: 3 additions & 3 deletions src/Clearbooks/Soap/1/0/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
class Clearbooks_Soap_1_0_Entity
{
/** @var \Clearbooks_Soap_1_0_EntityExtra */
public $supplier;
public $supplier = null;

/** @var \Clearbooks_Soap_1_0_EntityExtra */
public $customer;
public $customer = null;

/** @var \Clearbooks_Soap_1_0_BankAccount */
public $bankAccount;
public $bankAccount = null;

/** @var int */
public $id = 0;
Expand Down
6 changes: 6 additions & 0 deletions src/Clearbooks/Soap/1/0/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class Clearbooks_Soap_1_0_Invoice
/** @var \DateTime */
public $dateDue = '';

/** @var \DateTime */
public $dateModified = '';

/** @var \DateTime */
public $dateAccrual = '';

Expand Down Expand Up @@ -76,6 +79,9 @@ class Clearbooks_Soap_1_0_Invoice
/** @var int */
public $multicurrency = '';

/** @var float */
public $fxrate = 0;

/** @var float */
public $gross = 0;

Expand Down
5 changes: 4 additions & 1 deletion src/Clearbooks/Soap/1/0/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ class Clearbooks_Soap_1_0_Item

/** @var string */
public $vatRate = '0';

/** @var int */
public $project = 0;
}
//EOF Item.php
//EOF Item.php
5 changes: 4 additions & 1 deletion src/Clearbooks/Soap/1/0/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ class Clearbooks_Soap_1_0_Payment

/** @var int */
public $bsAccount = 0;

/** @var int */
public $fxrate;
}
//EOF Payment.php
//EOF Payment.php
2 changes: 1 addition & 1 deletion src/Clearbooks/Soap/1/0/ResponseStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class Clearbooks_Soap_1_0_ResponseStatus
public $success;

/** @var string */
public $msg = 'Test';
public $msg = '';
}
//EOF ResponseStatus.php

0 comments on commit d0d153d

Please sign in to comment.