Documentation

GetList

Description and parameters

CDBResult
CSaleUserCards::GetList(
 array arOrder = array(),
 array arFilter = array(),
 array arGroupBy = false,
 array arNavStartParams = false,
 array arSelectFields = array()
);

Method returns the result for the recent retrieved bank card entries according to its parameters. Non-static method.

Call parameters

ParameterDescription
arOrder Array, according to which resulting parameters are sorted. Array looks as follows:
array(
"field_name1" => "sort_direction1",
"field_name2" => "sort_direction2",
. . .
)
Any field can be inserted as the "field_nameN" for payment system handlers. And "sort_directionX" can have values "ASC" (by ascension) and "DESC" (by descension).

In case the sort array have several elements, the resulting set is sorted by each element (i. e. first sorts by the first element and then result is sorted by the second element, etc.). 

Default value - empty array(), in indicating that result won't be sorted.
arFilter Array, according to which the payment system entries are filtered. Array looks as follows:
array(
"[modifier1][operator1]field_name1" => "value1",
"[modifier2][operator2]field_name2" => "value2",
. . .
)
Entries that satisfy the filter are returned in the result and entries that do not satisfy the filter conditions are ignored.

The following modifiers are permissible:
  • ! - negation;
  • + - null, 0 and empty string values also satisfy the filter conditions.
The following operators are permitted:
  • >= - field value is higher or equal to value passed to filter;
  • > - field value is strict higher that value passed to filter;
  • <= - field value is lesser or equal to value passed to filter;
  • < - field value is strictly less than value passed to filter;
  • @ - field value is located in the comma-separated list with values passed to filter;
  • ~ - field value is checked for match to the value passed to template filter;
  • % - field value is checked for match to string passed to filter according to query language.
"field_name" can have any field for orders.

Filter example:
array("!PERSON_TYPE_ID" => 5)
This filter indicates "select all entries with PERSON_TYPE_ID values (payer type code) is not equal to 5".

Default value - empty array() - indicates that result won't be filtered.
arGroupBy Array with fields used to group entries of payment system handlers. Looks as follows:
array("field_name1",
      "group_function1" => " field_name2", ...)
"field_nameN" can contain any field for payment system handlers. Group function can have:
  • COUNT - count;
  • AVG - calculation of average value;
  • MIN - calculation of minimum value;
  • MAX - calculation of maximum value;
  • SUM - calculation of total.
This filter indicates "select all records with the field value LID (system site) is not en".

Default value - false - no grouping of results.
arNavStartParams Array with selection parameters. Can contain the following keys:
  • "nTopCount" - limits the number of entries/records, returned by the method;
  • any key, received by the method CDBResult::NavQuery as the third parameter.
Default value - false - indicates empty selection parameters.
arSelectFields Array with fields to be returned by the method. Can contain only the required fields. In case the array has the value for "*", returns all available fields.

Default value - array is empty array() - returns all fields of query main table.

Returned values

Returns CDBResult class object, containing set of associative arrays with bank card parameters.

  • ID - bank card code;
  • USER_ID - user code;
  • SORT - sort index;
  • PAY_SYSTEM_ACTION_ID - payment system handler code;
  • CURRENCY - currency, available for deduction from bank card
  • CARD_CODE - CVC2;
  • CARD_TYPE - card type;
  • CARD_NUM - card number;
  • CARD_EXP_MONTH - end month for card validity;
  • CARD_EXP_YEAR - end year for card validity;
  • DESCRIPTION - brief description;
  • SUM_MIN - minimum amount to be deducted from bank card at once;
  • SUM_MAX - maximum amount to be deducted from bank card at once;
  • SUM_CURRENCY - currency for minimum and maximum amount;
  • LAST_STATUS - status for last card use;
  • LAST_STATUS_CODE - status code for the last card use;
  • LAST_STATUS_DESCRIPTION - status description for the last card use;
  • LAST_STATUS_MESSAGE - payment system message;
  • LAST_SUM - last amount deducted from the card;
  • LAST_CURRENCY - currency for the last amount deducted from bank card;
  • ACTIVE - activity flag;
  • TIMESTAMP_X - timestamp;
  • LAST_DATE - date of the last card use.

In case an empty array is passed as arGroupBy parameter, method returns a number of entries, satisfying the filter.


© «Bitrix24», 2001-2024
Up