Skip to content

Commit

Permalink
Merge pull request #2 from spira/feature/create-validation-rule
Browse files Browse the repository at this point in the history
Adding function to create validation rule.
  • Loading branch information
Jeremy Sik authored Nov 28, 2016
2 parents d369085 + 193aa88 commit 821a1cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions VoucherifyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 821a1cf

Please sign in to comment.