Skip to content

Commit

Permalink
Issue #3 remove payment batch "details" length validation
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Nov 13, 2020
1 parent 8d85509 commit f03a104
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions apis/accounting/src/Model/BatchPaymentDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (! is_null($this->container['details']) && (mb_strlen($this->container['details']) > 18)) {
$invalidProperties[] = sprintf(
'invalid value for "%s", the character length must be smaller than or equal to %d.',
'details',
18
);
}

if (! is_null($this->container['code']) && (mb_strlen($this->container['code']) > 12)) {
$invalidProperties[] = sprintf(
'invalid value for "%s", the character length must be smaller than or equal to %d.',
Expand Down Expand Up @@ -315,16 +307,12 @@ public function getDetails()
/**
* Sets details
*
* @param string|null $details (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
* @param string|null $details (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero.
*
* @return $this
*/
public function setDetails($details)
{
if (! is_null($details) && (mb_strlen($details) > 18)) {
throw new \InvalidArgumentException('invalid length for $details when calling BatchPaymentDetails., must be smaller than or equal to 18.');
}

$this->container['details'] = $details;

return $this;
Expand Down

0 comments on commit f03a104

Please sign in to comment.