summaryrefslogtreecommitdiffstats
path: root/lib/SparkPost/APIResource.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SparkPost/APIResource.php')
-rw-r--r--lib/SparkPost/APIResource.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/SparkPost/APIResource.php b/lib/SparkPost/APIResource.php
index 3747f6d..a2cd5a6 100644
--- a/lib/SparkPost/APIResource.php
+++ b/lib/SparkPost/APIResource.php
@@ -48,7 +48,7 @@ class APIResource {
* @param string $mapKey a dot syntax path determining which value to set
* @param mixed $value value for the given path
*/
- protected function setMappedValue (&$model, $mapKey, $value) {
+ protected function setMappedValue(&$model, $mapKey, $value) {
//get mapping
if( empty(static::$parameterMappings) ) {
// if parameterMappings is empty we can assume that no wrapper is defined
@@ -180,10 +180,6 @@ class APIResource {
private function callResource( $action, $resourcePath=null, $options=[] ) {
$action = strtoupper($action); // normalize
- if( !in_array($action, ['POST', 'PUT', 'GET', 'DELETE'])) {
- throw new \Exception('Invalid resource action');
- }
-
$url = $this->buildUrl($resourcePath, $options);
$body = $this->buildBody($options);