App-WHMCSUtils
view release on metacpan or search on metacpan
* date_end => *date*
End at this date (based on invoice payment date).
* date_old_limit => *date*
Set what date will be considered too old to recognize item as
revenue.
Default is 2008-01-01.
* date_start => *date*
Start from this date (based on invoice payment date).
* db_host => *str* (default: "localhost")
* db_name* => *str*
* db_pass => *str*
* db_port => *net::port* (default: 3306)
* db_user => *str*
* extra_rules => *array[hash]*
Example (in JSON):
[
{
"type": "^$",
"description": "^SEWA",
"category": "rent"
}
]
* full => *true*
* output_file => *filename*
Returns an enveloped result (an array).
First element ($status_code) is an integer containing HTTP-like status
code (200 means OK, 4xx caller error, 5xx function error). Second
element ($reason) is a string containing error message, or something
like "OK" if status is 200. Third element ($payload) is the actual
result, but usually not present when enveloped result is an error
response ($status_code is not 2xx). Fourth element (%result_meta) is
called result metadata and is optional, a hash that contains extra
information, much like how HTTP response headers provide additional
metadata.
Return value: (any)
restore_whmcs_client
Usage:
restore_whmcs_client(%args) -> [$status_code, $reason, $payload, \%result_meta]
Restore a missing client from SQL database backup.
This function is not exported.
This function supports dry-run operation.
Arguments ('*' denotes required arguments):
* client_email => *str*
* client_id => *posint*
* restore_domains => *bool* (default: 1)
* restore_hostings => *bool* (default: 1)
* restore_invoices => *bool* (default: 1)
* sql_backup_dir => *dirname*
Directory containing per-table SQL files.
* sql_backup_file => *filename*
Can accept either ".sql" or ".sql.gz".
Will be converted first to a directory where the SQL file will be
extracted to separate files on a per-table basis.
Special arguments:
* -dry_run => *bool*
Pass -dry_run=>1 to enable simulation mode.
Returns an enveloped result (an array).
First element ($status_code) is an integer containing HTTP-like status
code (200 means OK, 4xx caller error, 5xx function error). Second
element ($reason) is a string containing error message, or something
like "OK" if status is 200. Third element ($payload) is the actual
result, but usually not present when enveloped result is an error
response ($status_code is not 2xx). Fourth element (%result_meta) is
called result metadata and is optional, a hash that contains extra
information, much like how HTTP response headers provide additional
metadata.
Return value: (any)
send_verification_emails
Usage:
send_verification_emails(%args) -> [$status_code, $reason, $payload, \%result_meta]
Send verification emails for clients who have not had their email
verified.
WHMCS does not yet provide an API for this, so we do this via a headless
browser.
This function is not exported.
This function supports dry-run operation.
Arguments ('*' denotes required arguments):
* action => *str* (default: "send-verification-emails")
The default action is to send verification emails. You can also just
list the clients who haven't got their email verified yet.
* admin_password* => *str*
* admin_username* => *str*
* db_host => *str* (default: "localhost")
* db_name* => *str*
* db_pass => *str*
* db_port => *net::port* (default: 3306)
( run in 0.665 second using v1.01-cache-2.11-cpan-39bf76dae61 )