-
Notifications
You must be signed in to change notification settings - Fork 347
Expand file tree
/
Copy pathDeposit.php
More file actions
248 lines (209 loc) · 4.46 KB
/
Copy pathDeposit.php
File metadata and controls
248 lines (209 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?php
/**
* Deposit class for QuickBooks
*
* @author Keith Palmer Jr. <keith@ConsoliBYTE.com>
* @license LICENSE.txt
*
* @package QuickBooks
* @subpackage Object
*/
/**
* QuickBooks object base class
*/
QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php');
/**
*
*/
QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Deposit/DepositLine.php');
/**
*
*/
class QuickBooks_QBXML_Object_Deposit extends QuickBooks_QBXML_Object
{
public function __construct($arr = array())
{
parent::__construct($arr);
}
/**
* Set the AccountRef ListID for the Check
*
* @param string $ListID The ListID of the record to reference
* @return boolean
*/
public function setDepositToAccountListID($ListID)
{
return $this->set('DepositToAccountRef ListID', $ListID);
}
/**
* Get the AccountRef ListID for the Check
*
* @return string
*/
public function getDepositToAccountListID()
{
return $this->get('DepositToAccountRef ListID');
}
/**
* Set the primary key for the related record within your own application for the Check
*
* @param mixed $value The primary key within your own application
* @return string
*/
public function setDepositToAccountApplicationID($value)
{
return $this->set('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value));
}
public function getDepositToAccountApplicationID()
{
return $this->get('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID);
}
// Path: AccountRef FullName, datatype:
/**
* Set the AccountRef FullName for the Check
*
* @param string $FullName The FullName of the record to reference
* @return boolean
*/
public function setDepositToAccountFullName($FullName)
{
return $this->set('DepositToAccountRef FullName', $FullName);
}
/**
* Get the AccountRef FullName for the Check
*
* @return string
*/
public function getDepositToAccountFullName()
{
return $this->get('DepositToAccountRef FullName');
}
// Path: TxnDate, datatype: DATETYPE
/**
* Set the TxnDate for the Check
*
* @param string $date
* @return boolean
*/
public function setTxnDate($date)
{
return $this->setDateType('TxnDate', $date);
}
/**
* Get the TxnDate for the Check
*
* @param ? $format = null
* @return string
*/
public function getTxnDate($format = null)
{
return $this->getDateType('TxnDate', $format);
}
/**
* @see QuickBooks_Object_Check::setTxnDate()
*/
public function setTransactionDate($date)
{
return $this->setTxnDate($date);
}
/**
* @see QuickBooks_Object_Check::getTxnDate()
*/
public function getTransactionDate($format = null)
{
return $this->getTxnDate($format = null);
}
// Path: Memo, datatype: STRTYPE
/**
* Set the Memo for the Check
*
* @param string $value
* @return boolean
*/
public function setMemo($value)
{
return $this->set('Memo', $value);
}
/**
* Get the Memo for the Check
*
* @return string
*/
public function getMemo()
{
return $this->get('Memo');
}
public function setAmount($amount)
{
return $this->setAmountType('Amount', $amount);
}
public function getAmount()
{
return $this->getAmountType('Amount');
}
public function addDepositLine($obj)
{
return $this->addListItem('DepositLine', $obj);
}
public function asList($request)
{
switch ($request)
{
case 'DepositAddRq':
if (isset($this->_object['DepositLine']))
{
$this->_object['DepositLineAdd'] = $this->_object['DepositLine'];
}
break;
case 'DepositModRq':
break;
}
return parent::asList($request);
}
public function asXML($root = null, $parent = null, $object = null)
{
if (is_null($object))
{
$object = $this->_object;
}
switch ($root)
{
case QUICKBOOKS_ADD_DEPOSIT:
foreach ($object['DepositLineAdd'] as $key => $obj)
{
$obj->setOverride('DepositLineAdd');
}
break;
case QUICKBOOKS_MOD_DEPOSIT:
foreach ($object['DepositLineMod'] as $key => $obj)
{
$obj->setOverride('DepositLineMod');
}
break;
}
return parent::asXML($root, $parent, $object);
}
/**
*
*/
public function asArray($request, $nest = true)
{
$this->_cleanup();
return parent::asArray($request, $nest);
}
/**
*
*/
protected function _cleanup()
{
}
/**
* Tell what type of object this is
*
* @return string
*/
public function object()
{
return QUICKBOOKS_OBJECT_DEPOSIT;
}
}