Skip to content

Commit

Permalink
Adiciona método para pegar assinaturas do usuário
Browse files Browse the repository at this point in the history
  • Loading branch information
jprodrigues70 committed Feb 16, 2022
1 parent 4aa2782 commit c57c9ce
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/GuPaymentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,20 @@ public function getIuguSubscription($subscriptionId)

return IuguSubscription::fetch($subscriptionId);
}

/**
* Get user's Iugu Subscriptions
*
* @param array $params
* @return void
*/
public function getIuguSubscriptions($params = [])
{
Iugu::setApiKey($this->getApiKey());

$customer = $this->asIuguCustomer();
return IuguSubscription::search(array_merge(['customer_id' => $customer->id], $params));
}


/**
Expand Down

0 comments on commit c57c9ce

Please sign in to comment.