/** * Construct a openTrans payment cash * * @param string term_type * @param string term_value */ public function __construct($term_type = NULL, $term_value = NULL) { if (!is_string($term_type)) { throw new rs_opentrans_exception('$term_type must be a string.'); } if (!is_string($term_value)) { throw new rs_opentrans_exception('$term_value must be a string.'); } parent::__construct(self::TYPE_CASH, $term_type, $term_value); }
/** * Construct a openTrans payment account * * @param string term_type * @param string term_value * @param string holder * @param string bank_name * @param string bank_country * @param string bank_code * @param string bank_code_type * @param string bank_account * @param string bank_account_type */ public function __construct($term_type = NULL, $term_value = NULL, $holder = NULL, $bank_name = NULL, $bank_country = NULL, $bank_code = NULL, $bank_code_type = self::BANK_CODE_TYPE_STANDARD, $bank_account = NULL, $bank_account_type = self::BANK_ACCOUNT_TYPE_STANDARD) { if ($term_type !== NULL && !is_string($term_type)) { throw new rs_opentrans_exception('$term_type must be a string.'); } if ($term_value !== NULL && !is_string($term_value)) { throw new rs_opentrans_exception('$term_value must be a string.'); } if ($holder !== NULL && !is_string($holder)) { throw new rs_opentrans_exception('$holder must be a string.'); } if ($bank_name !== NULL && !is_string($bank_name)) { throw new rs_opentrans_exception('$bank_name must be a string.'); } if ($bank_country !== NULL && !is_string($bank_country)) { throw new rs_opentrans_exception('$bank_country must be a string.'); } if ($bank_code !== NULL && !is_string($bank_code)) { throw new rs_opentrans_exception('$bank_code must be a string.'); } if ($bank_code_type !== NULL && !is_string($bank_code_type)) { throw new rs_opentrans_exception('$bank_code_type must be a string.'); } if ($bank_account !== NULL && !is_string($bank_account)) { throw new rs_opentrans_exception('$bank_account must be a string.'); } if ($bank_account_type !== NULL && !is_string($bank_account_type)) { throw new rs_opentrans_exception('$bank_account_type must be a string.'); } parent::__construct(self::TYPE_ACCOUNT, $term_type, $term_value); $this->holder = $holder; $this->bank_name = $bank_name; $this->bank_country = $bank_country; $this->bank_code = $bank_code; $this->bank_code_type = $bank_code_type; $this->bank_account = $bank_account; $this->bank_account_type = $bank_account_type; }