Fix comments on DAO files
[civicrm-core.git] / CRM / Financial / DAO / PaymentProcessor.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
7+--------------------------------------------------------------------+
8| This file is a part of CiviCRM. |
9| |
10| CiviCRM is free software; you can copy, modify, and distribute it |
11| under the terms of the GNU Affero General Public License |
12| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13| |
14| CiviCRM is distributed in the hope that it will be useful, but |
15| WITHOUT ANY WARRANTY; without even the implied warranty of |
16| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17| See the GNU Affero General Public License for more details. |
18| |
19| You should have received a copy of the GNU Affero General Public |
20| License and the CiviCRM Licensing Exception along |
21| with this program; if not, contact CiviCRM LLC |
22| at info[AT]civicrm[DOT]org. If you have questions about the |
23| GNU Affero General Public License or the licensing of CiviCRM, |
24| see the CiviCRM license FAQ at http://civicrm.org/licensing |
25+--------------------------------------------------------------------+
26*/
27/**
28 * @package CRM
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
cb5962bd 33 * (GenCodeChecksum:562f15d08243acea7e0fe53e2affe9ff)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Financial_DAO_PaymentProcessor constructor.
39 */
e501603b
TO
40class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_payment_processor';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
49 *
50 * @var boolean
51 */
52 static $_log = false;
53 /**
54 * Payment Processor ID
55 *
56 * @var int unsigned
57 */
58 public $id;
59 /**
60 * Which Domain is this match entry for
61 *
62 * @var int unsigned
63 */
64 public $domain_id;
65 /**
66 * Payment Processor Name.
67 *
68 * @var string
69 */
70 public $name;
71 /**
72 * Payment Processor Description.
73 *
74 * @var string
75 */
76 public $description;
77 /**
78 *
79 * @var int unsigned
80 */
81 public $payment_processor_type_id;
82 /**
83 * Is this processor active?
84 *
85 * @var boolean
86 */
87 public $is_active;
88 /**
89 * Is this processor the default?
90 *
91 * @var boolean
92 */
93 public $is_default;
94 /**
95 * Is this processor for a test site?
96 *
97 * @var boolean
98 */
99 public $is_test;
100 /**
101 *
102 * @var string
103 */
104 public $user_name;
105 /**
106 *
107 * @var string
108 */
109 public $password;
110 /**
111 *
112 * @var text
113 */
114 public $signature;
115 /**
116 *
117 * @var string
118 */
119 public $url_site;
120 /**
121 *
122 * @var string
123 */
124 public $url_api;
125 /**
126 *
127 * @var string
128 */
129 public $url_recur;
130 /**
131 *
132 * @var string
133 */
134 public $url_button;
135 /**
136 *
137 * @var string
138 */
139 public $subject;
140 /**
141 *
142 * @var string
143 */
144 public $class_name;
145 /**
146 * Billing Mode (deprecated)
147 *
148 * @var int unsigned
149 */
150 public $billing_mode;
151 /**
152 * Can process recurring contributions
153 *
154 * @var boolean
155 */
156 public $is_recur;
157 /**
158 * Payment Type: Credit or Debit (deprecated)
159 *
160 * @var int unsigned
161 */
162 public $payment_type;
163 /**
164 * Payment Instrument ID
165 *
166 * @var int unsigned
167 */
168 public $payment_instrument_id;
cb5962bd
SL
169 /**
170 * array of accepted credit card types
171 *
172 * @var text
173 */
174 public $accepted_credit_cards;
e501603b 175 /**
f41f0342 176 * Class constructor.
e501603b
TO
177 */
178 function __construct() {
179 $this->__table = 'civicrm_payment_processor';
180 parent::__construct();
181 }
182 /**
f41f0342 183 * Returns foreign keys and entity references.
e501603b
TO
184 *
185 * @return array
186 * [CRM_Core_Reference_Interface]
187 */
188 static function getReferenceColumns() {
346aaaba
TO
189 if (!isset(Civi::$statics[__CLASS__]['links'])) {
190 Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
191 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
192 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
193 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 194 }
346aaaba 195 return Civi::$statics[__CLASS__]['links'];
e501603b
TO
196 }
197 /**
198 * Returns all the column names of this table
199 *
200 * @return array
201 */
202 static function &fields() {
346aaaba
TO
203 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
204 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
205 'id' => array(
206 'name' => 'id',
207 'type' => CRM_Utils_Type::T_INT,
208 'title' => ts('Payment Processor ID') ,
209 'description' => 'Payment Processor ID',
210 'required' => true,
211 ) ,
212 'domain_id' => array(
213 'name' => 'domain_id',
214 'type' => CRM_Utils_Type::T_INT,
215 'title' => ts('Payment Processor Domain') ,
216 'description' => 'Which Domain is this match entry for',
217 'required' => true,
218 'FKClassName' => 'CRM_Core_DAO_Domain',
219 'pseudoconstant' => array(
220 'table' => 'civicrm_domain',
221 'keyColumn' => 'id',
222 'labelColumn' => 'name',
223 )
224 ) ,
225 'name' => array(
226 'name' => 'name',
227 'type' => CRM_Utils_Type::T_STRING,
228 'title' => ts('Payment Processor') ,
229 'description' => 'Payment Processor Name.',
230 'maxlength' => 64,
231 'size' => CRM_Utils_Type::BIG,
232 ) ,
233 'description' => array(
234 'name' => 'description',
235 'type' => CRM_Utils_Type::T_STRING,
236 'title' => ts('Processor Description') ,
237 'description' => 'Payment Processor Description.',
238 'maxlength' => 255,
239 'size' => CRM_Utils_Type::HUGE,
240 ) ,
241 'payment_processor_type_id' => array(
242 'name' => 'payment_processor_type_id',
243 'type' => CRM_Utils_Type::T_INT,
244 'title' => ts('Payment Processor Type ID') ,
245 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
246 'pseudoconstant' => array(
247 'table' => 'civicrm_payment_processor_type',
248 'keyColumn' => 'id',
249 'labelColumn' => 'title',
250 )
251 ) ,
252 'is_active' => array(
253 'name' => 'is_active',
254 'type' => CRM_Utils_Type::T_BOOLEAN,
255 'title' => ts('Processor is Active?') ,
256 'description' => 'Is this processor active?',
257 ) ,
258 'is_default' => array(
259 'name' => 'is_default',
260 'type' => CRM_Utils_Type::T_BOOLEAN,
261 'title' => ts('Processor Is Default?') ,
262 'description' => 'Is this processor the default?',
263 ) ,
264 'is_test' => array(
265 'name' => 'is_test',
266 'type' => CRM_Utils_Type::T_BOOLEAN,
267 'title' => ts('Is Test Processor?') ,
268 'description' => 'Is this processor for a test site?',
269 ) ,
270 'user_name' => array(
271 'name' => 'user_name',
272 'type' => CRM_Utils_Type::T_STRING,
273 'title' => ts('User Name') ,
274 'maxlength' => 255,
275 'size' => CRM_Utils_Type::HUGE,
276 ) ,
277 'password' => array(
278 'name' => 'password',
279 'type' => CRM_Utils_Type::T_STRING,
280 'title' => ts('Password') ,
281 'maxlength' => 255,
282 'size' => CRM_Utils_Type::HUGE,
283 ) ,
284 'signature' => array(
285 'name' => 'signature',
286 'type' => CRM_Utils_Type::T_TEXT,
287 'title' => ts('Signature') ,
288 ) ,
289 'url_site' => array(
290 'name' => 'url_site',
291 'type' => CRM_Utils_Type::T_STRING,
292 'title' => ts('Site URL') ,
293 'maxlength' => 255,
294 'size' => CRM_Utils_Type::HUGE,
295 ) ,
296 'url_api' => array(
297 'name' => 'url_api',
298 'type' => CRM_Utils_Type::T_STRING,
299 'title' => ts('API URL') ,
300 'maxlength' => 255,
301 'size' => CRM_Utils_Type::HUGE,
302 ) ,
303 'url_recur' => array(
304 'name' => 'url_recur',
305 'type' => CRM_Utils_Type::T_STRING,
306 'title' => ts('Recurring Payments URL') ,
307 'maxlength' => 255,
308 'size' => CRM_Utils_Type::HUGE,
309 ) ,
310 'url_button' => array(
311 'name' => 'url_button',
312 'type' => CRM_Utils_Type::T_STRING,
313 'title' => ts('Button URL') ,
314 'maxlength' => 255,
315 'size' => CRM_Utils_Type::HUGE,
316 ) ,
317 'subject' => array(
318 'name' => 'subject',
319 'type' => CRM_Utils_Type::T_STRING,
320 'title' => ts('Subject') ,
321 'maxlength' => 255,
322 'size' => CRM_Utils_Type::HUGE,
323 ) ,
324 'class_name' => array(
325 'name' => 'class_name',
326 'type' => CRM_Utils_Type::T_STRING,
327 'title' => ts('Suffix for PHP class name implementation') ,
328 'maxlength' => 255,
329 'size' => CRM_Utils_Type::HUGE,
330 ) ,
331 'billing_mode' => array(
332 'name' => 'billing_mode',
333 'type' => CRM_Utils_Type::T_INT,
334 'title' => ts('Processor Billing Mode') ,
335 'description' => 'Billing Mode (deprecated)',
336 'required' => true,
337 ) ,
338 'is_recur' => array(
339 'name' => 'is_recur',
340 'type' => CRM_Utils_Type::T_BOOLEAN,
341 'title' => ts('Processor Supports Recurring?') ,
342 'description' => 'Can process recurring contributions',
343 ) ,
344 'payment_type' => array(
345 'name' => 'payment_type',
346 'type' => CRM_Utils_Type::T_INT,
347 'title' => ts('Payment Type') ,
348 'description' => 'Payment Type: Credit or Debit (deprecated)',
349 'default' => '1',
350 ) ,
351 'payment_instrument_id' => array(
352 'name' => 'payment_instrument_id',
353 'type' => CRM_Utils_Type::T_INT,
354 'title' => ts('Payment Method') ,
355 'description' => 'Payment Instrument ID',
356 'default' => '1',
357 'pseudoconstant' => array(
358 'optionGroupName' => 'payment_instrument',
359 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
360 )
361 ) ,
cb5962bd
SL
362 'accepted_credit_cards' => array(
363 'name' => 'accepted_credit_cards',
364 'type' => CRM_Utils_Type::T_TEXT,
365 'title' => ts('Accepted Credit Cards') ,
366 'description' => 'array of accepted credit card types',
367 'default' => 'NULL',
368 ) ,
e501603b 369 );
346aaaba 370 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 371 }
346aaaba 372 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
373 }
374 /**
bd8e0b14 375 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
376 *
377 * @return array
bd8e0b14 378 * Array(string $name => string $uniqueName).
e501603b
TO
379 */
380 static function &fieldKeys() {
bd8e0b14
TO
381 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
382 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 383 }
bd8e0b14 384 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
385 }
386 /**
387 * Returns the names of this table
388 *
389 * @return string
390 */
391 static function getTableName() {
392 return self::$_tableName;
393 }
394 /**
395 * Returns if this table needs to be logged
396 *
397 * @return boolean
398 */
399 function getLog() {
400 return self::$_log;
401 }
402 /**
403 * Returns the list of fields that can be imported
404 *
405 * @param bool $prefix
406 *
407 * @return array
408 */
409 static function &import($prefix = false) {
60808919
TO
410 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, array());
411 return $r;
e501603b
TO
412 }
413 /**
414 * Returns the list of fields that can be exported
415 *
416 * @param bool $prefix
417 *
418 * @return array
419 */
420 static function &export($prefix = false) {
60808919
TO
421 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, array());
422 return $r;
e501603b
TO
423 }
424}