Skip to content

Commit

Permalink
Merge pull request #243 from leoneparise/ownid
Browse files Browse the repository at this point in the history
Definir ownId para transferências
  • Loading branch information
mbnakaya committed Jan 12, 2018
2 parents e6f14e9 + 80b403e commit 1c297d1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Resource/Transfers.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ protected function initialize()
protected function populate(stdClass $response)
{
$transfers = clone $this;

$transfers->data->id = $this->getIfSet('id', $response);
$transfers->data->ownId = $this->getIfSet('ownId', $response);
$transfers->data->amount = $this->getIfSet('amount', $response);

$transfer_instrument = $this->getIfSet('transferInstrument', $response);
Expand Down Expand Up @@ -140,6 +142,20 @@ public function getTransfers()
return $this->data;
}

/**
* Get own request id. external reference.
*
* @param mixed $ownId id
*
* @return $this
*/
public function setOwnId($ownId)
{
$this->data->ownId = $ownId;

return $this;
}

/**
* Set info of holder.
*
Expand Down Expand Up @@ -230,4 +246,14 @@ public function getId()
{
return $this->getIfSet('id');
}

/**
* Get own request id. external reference.
*
* @return mixed
*/
public function getOwnId()
{
return $this->getIfSet('ownId');
}
}

0 comments on commit 1c297d1

Please sign in to comment.