Skip to content

Commit

Permalink
Merge pull request #320 from Ubiquiti-App/feature/revert-fio
Browse files Browse the repository at this point in the history
revert FIO plugin back to 1.2.8
  • Loading branch information
keksa authored Jan 10, 2024
2 parents 16a78d8 + 2fd98c7 commit bdb676e
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 31 deletions.
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

0 comments on commit bdb676e

Please sign in to comment.