From 193aa881eeffc392288356b3bbc7778dbf3925c2 Mon Sep 17 00:00:00 2001 From: Jeremy Sik Date: Mon, 28 Nov 2016 18:05:35 +1100 Subject: [PATCH] Adding function to create validation rule. --- VoucherifyClient.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VoucherifyClient.php b/VoucherifyClient.php index e1a283f..1d8b2c0 100644 --- a/VoucherifyClient.php +++ b/VoucherifyClient.php @@ -208,5 +208,16 @@ public function vouchers($filter) { public function redemptions($filter) { return $this->apiRequest("GET", "/redemptions/", $filter, NULL); } + + /** + * @param array|stdClass $data + * + * Create a validation rule + * + * @throws Voucherify\ClientException + */ + public function createValidationRule($data) { + return $this->apiRequest("POST", "/validation-rules/", NULL, $data); + } } }