Skip to content

Commit

Permalink
Merge pull request #87 from TourCMS/release/4.6.0
Browse files Browse the repository at this point in the history
Release/4.6.0
  • Loading branch information
paulslugocki committed Feb 19, 2024
2 parents 1484209 + 6e8b1ea commit 6601e4b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/TourCMS.php
Expand Up @@ -22,7 +22,7 @@
*/

# TourCMS: PHP wrapper class for TourCMS Rest API
# Version: 4.5.0
# Version: 4.6.0

namespace TourCMS\Utils;

Expand All @@ -40,6 +40,9 @@ class TourCMS {
const PATH_API_TOUR_PICKUP_ROUTES_UPDATE_PICKUP = "/api/tours/pickup/routes/pickup_update.xml";
const PATH_API_TOUR_PICKUP_ROUTES_DELETE_PICKUP = "/api/tours/pickup/routes/pickup_delete.xml";
const PATH_API_ACCOUNT_CUSTOM_FIELDS_GET = "/api/account/custom_fields/get.xml";
const PATH_API_TOUR_FACETS_GET = "/api/tours/importer/get_tour_facets.xml";
const PATH_API_LIST_TOURS_GET = "/api/tours/importer/get_tour_list.xml";
const PATH_API_IMPORT_TOURS_STATUS = "/api/tours/importer/get_import_tours_status.xml";

// HTTP VERBS CONST
const HTTP_VERB_POST = 'POST';
Expand Down Expand Up @@ -849,6 +852,22 @@ public function get_custom_fields($channel)
return $this->request(self::PATH_API_ACCOUNT_CUSTOM_FIELDS_GET, $channel, self::HTTP_VERB_GET);
}

public function get_tour_facets($channel)
{
return $this->request(self::PATH_API_TOUR_FACETS_GET, $channel, self::HTTP_VERB_GET);
}

public function get_list_tours($channel, $query_string)
{
$query_string = $this->validateParams($query_string);
return $this->request(self::PATH_API_LIST_TOURS_GET.$query_string, $channel, self::HTTP_VERB_GET);
}

public function get_import_tours_status($channel, $codes)
{
return $this->request(self::PATH_API_IMPORT_TOURS_STATUS, $channel, self::HTTP_VERB_POST, $codes);
}

// Internal Functions

protected function validateParams($params)
Expand Down

0 comments on commit 6601e4b

Please sign in to comment.