DHL-PHP-SDK  v0.4
A wrapper for the DHL-XML-API Version 2
BankData.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Petschko\DHL;
4 
16 use stdClass;
17 
23 class BankData {
32  private $accountOwnerName = '';
33 
42  private $bankName = '';
43 
52  private $iban = '';
53 
63  private $note1 = null;
64 
74  private $note2 = null;
75 
85  private $bic = null;
86 
96  private $accountReference = null;
97 
101  public function __construct() {
102  // VOID
103  }
104 
108  public function __destruct() {
109  unset($this->accountOwnerName);
110  unset($this->bankName);
111  unset($this->iban);
112  unset($this->note1);
113  unset($this->note2);
114  unset($this->bic);
115  unset($this->accountReference);
116  }
117 
123  public function getAccountOwnerName() {
124  return $this->accountOwnerName;
125  }
126 
132  public function setAccountOwnerName($accountOwnerName) {
133  $this->accountOwnerName = $accountOwnerName;
134  }
135 
141  public function getBankName() {
142  return $this->bankName;
143  }
144 
150  public function setBankName($bankName) {
151  $this->bankName = $bankName;
152  }
153 
159  public function getIban() {
160  return $this->iban;
161  }
162 
168  public function setIban($iban) {
169  $this->iban = $iban;
170  }
171 
177  public function getNote1() {
178  return $this->note1;
179  }
180 
186  public function setNote1($note1) {
187  $this->note1 = $note1;
188  }
189 
195  public function getNote2() {
196  return $this->note2;
197  }
198 
204  public function setNote2($note2) {
205  $this->note2 = $note2;
206  }
207 
213  public function getBic() {
214  return $this->bic;
215  }
216 
222  public function setBic($bic) {
223  $this->bic = $bic;
224  }
225 
231  public function getAccountReference() {
232  return $this->accountReference;
233  }
234 
240  public function setAccountReference($accountReference) {
241  $this->accountReference = $accountReference;
242  }
243 
251  public function getBankClass_v1() {
252  trigger_error('[DHL-PHP-SDK]: Version 1 Methods are deprecated and will removed soon (Called method ' . __METHOD__ . ')!', E_USER_DEPRECATED);
253  trigger_error('[DHL-PHP-SDK]: Called Version 1 Method: ' . __METHOD__ . ' is incomplete (does nothing)!', E_USER_WARNING);
254 
255  return new StdClass;
256  }
257 
263  public function getBankClass_v2() {
264  $class = new StdClass;
265 
266  $class->accountOwner = $this->getAccountOwnerName();
267  $class->bankName = $this->getBankName();
268  $class->iban = $this->getIban();
269  if($this->getNote1() !== null)
270  $class->note1 = $this->getNote1();
271  if($this->getNote2() !== null)
272  $class->note2 = $this->getNote2();
273  if($this->getBic() !== null)
274  $class->bic = $this->getBic();
275  if($this->getAccountReference() !== null)
276  $class->accountreference = $this->getAccountReference();
277 
278  return $class;
279  }
280 }
setAccountReference($accountReference)
Definition: BankData.php:240
setAccountOwnerName($accountOwnerName)
Definition: BankData.php:132
setBankName($bankName)
Definition: BankData.php:150