From d65d5839718315227980978bf4625fa978b586a2 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Fri, 21 Feb 2025 17:11:22 +0300 Subject: [PATCH] [ERP-325] api2 /marketplace/status --- .../controllers/MarketplaceController.php | 13 ++++++ erp24/records/AmoStatus.php | 46 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 erp24/api2/controllers/MarketplaceController.php create mode 100644 erp24/records/AmoStatus.php diff --git a/erp24/api2/controllers/MarketplaceController.php b/erp24/api2/controllers/MarketplaceController.php new file mode 100644 index 00000000..3436c460 --- /dev/null +++ b/erp24/api2/controllers/MarketplaceController.php @@ -0,0 +1,13 @@ +response->format = \yii\web\Response::FORMAT_JSON; + return ['response' => AmoStatus::find()->asArray()->all()]; + } +} \ No newline at end of file diff --git a/erp24/records/AmoStatus.php b/erp24/records/AmoStatus.php new file mode 100644 index 00000000..37219a75 --- /dev/null +++ b/erp24/records/AmoStatus.php @@ -0,0 +1,46 @@ + 100], + ]; + } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'alias' => 'Alias', + 'name' => 'Name', + ]; + } +} -- 2.39.5