Skip to content

Commit

Permalink
Merge pull request #11 from tpenaranda/master
Browse files Browse the repository at this point in the history
Typo on Registrant endpoint. Use getEndpoint() instead of hardcoded value.
  • Loading branch information
colinhall17 authored Feb 6, 2020
2 parents ca238b2 + 72d2513 commit 652ad57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Registrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function make($attributes)
public function get()
{
if (in_array('get', $this->methods)) {
$this->response = $this->client->get($this->type."/{$this->relationshipID}/registarants".$this->getQueryString());
$this->response = $this->client->get("{$this->type}/{$this->relationshipID}/{$this->getEndpoint()}{$this->getQueryString()}");
if ($this->response->getStatusCode() == '200') {
return $this->collect($this->response->getBody());
} else {
Expand All @@ -104,7 +104,7 @@ public function get()
public function all()
{
if ($this->relationshipID != '') {
return $this->collect($this->get($this->type."/{$this->relationshipID}/registarants"));
return $this->collect($this->get("{$this->type}/{$this->relationshipID}/{$this->getEndpoint()}"));
} else {
throw new Exception('No Relationship set');
}
Expand Down

0 comments on commit 652ad57

Please sign in to comment.