Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert FIO plugin back to 1.2.8 #320

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified plugins/fio_cz/fio_cz.zip
Binary file not shown.
16 changes: 5 additions & 11 deletions plugins/fio_cz/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https://www.fio.cz/bankovni-sluzby/api-bankovnictvi",
"url": "https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down Expand Up @@ -37,26 +37,20 @@
{
"key": "importUnattached",
"label": "Import all payments.",
"description": "Import all payments. Payments without match will be imported as \"Unattached payments\". When disabled, the unmatched payment will only be logged and skipped.",
"required": 0,
"description": "Import all payments. Payments without match will be imported as \"Unattached payments\". Fill 1 to enable or 0 to disable this feature (when disabled, the unmatched payment will only be logged and skipped).",
"required": 1,
"type": "checkbox"
},
{
"key": "lastProcessedPayment",
"label": "Last processed payment ID (readonly)",
"label": "Last processed payment",
"description": "Internal payment tracking to avoid duplicate processing of the same payment",
"required": 0,
"type": "text"
},
{
"key": "lastProcessedPaymentDateTime",
"label": "Last processed payment date and time (readonly)",
"required": 0,
"type": "datetime"
},
{
"key": "lastProcessedTimestamp",
"label": "Last time the payment list was requested (readonly)",
"label": "Last time the payment list was requested",
"description": "Internal timestamp tracking to politely avoid API request rate limits",
"required": 0,
"type": "text"
Expand Down
47 changes: 34 additions & 13 deletions plugins/fio_cz/src/src/Data/PluginData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,38 @@

class PluginData extends UcrmData
{
public ?string $lastProcessedPayment = null;

public ?string $paymentMatchAttribute = null;

public ?string $startDate = null;

public ?string $token = null;

public ?string $lastProcessedTimestamp = null;

public ?string $importUnattached = null;

public ?string $lastProcessedPaymentDateTime = null;
/**
* @var string
*/
public $lastProcessedPayment;

/**
* @var string
*/
public $paymentMatchAttribute;

/**
* @var string
*/
public $startDate;

/**
* @var string
*/
public $token;

/**
* @var string
*/
public $lastProcessedTimestamp;

/**
* @var string
*/
public $importUnattached;

/**
* @var string
*/
public $lastProcessedPaymentDateTime;
}
4 changes: 2 additions & 2 deletions plugins/fio_cz/src/src/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ public function import(): void
} catch (Exception\CurlException $exception) {
switch ($exception->getCode()) {
case 409:
$optionsData->lastProcessedTimestamp = (string) time();
$optionsData->lastProcessedTimestamp = time();
$this->optionsManager->updateOptions();
$this->logger->warning('HTTP Error 409 returned - usage limit exhausted, wait for 30s');
break;
case 500:
$optionsData->lastProcessedTimestamp = (string) time();
$optionsData->lastProcessedTimestamp = time();
$this->optionsManager->updateOptions();
$this->logger->error('HTTP Error 500 returned - is token valid and not expired?');
break;
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.1.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https:\/\/www.fio.cz\/bankovni-sluzby\/api-bankovnictvi",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.2.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https:\/\/www.fio.cz\/bankovni-sluzby\/api-bankovnictvi",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.3.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https:\/\/www.fio.cz\/bankovni-sluzby\/api-bankovnictvi",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.4.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https:\/\/www.fio.cz\/bankovni-sluzby\/api-bankovnictvi",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down
2 changes: 1 addition & 1 deletion plugins_2.5.x.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"displayName": "Fio bank payment import",
"description": "This plugin enables you to import payments from Fio bank to UCRM. See https:\/\/www.fio.cz\/bankovni-sluzby\/api-bankovnictvi",
"url": "https:\/\/github.com\/Ubiquiti-App\/UCRM-plugins\/tree\/master\/plugins\/fio_cz",
"version": "1.2.10",
"version": "1.2.8",
"unmsVersionCompliancy": {
"min": "2.1.0",
"max": null
Expand Down