| @@ 74-84 (lines=11) @@ | ||
| 71 | * @param $args | |
| 72 | * @return bool | |
| 73 | */ | |
| 74 | private function callCreateOnObject($method, $args) | |
| 75 |     { | |
| 76 | $type = substr($method, 6); | |
| 77 | $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; | |
| 78 | ||
| 79 |         if (class_exists($class)) { | |
| 80 | return (new $class($this))->create($args[0]); | |
| 81 | } | |
| 82 | ||
| 83 | return (new BaseObject($this, $type))->create($args[0]); | |
| 84 | } | |
| 85 | ||
| 86 | private function callUpdateOnObject($method, $args) | |
| 87 |     { | |
| @@ 98-108 (lines=11) @@ | ||
| 95 | return (new BaseObject($this, $type))->update($type, $args[0]); | |
| 96 | } | |
| 97 | ||
| 98 | private function callDeleteOnObject($method, $args) | |
| 99 |     { | |
| 100 | $type = substr($method, 6); | |
| 101 | $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; | |
| 102 | ||
| 103 |         if (class_exists($class)) { | |
| 104 | return (new $class($this))->delete($args[0]); | |
| 105 | } | |
| 106 | ||
| 107 | return (new BaseObject($this, $type))->delete($args[0]); | |
| 108 | } | |
| 109 | ||
| 110 | private function callGetOnObject($method, $args) | |
| 111 |     { | |