Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variável indefinida em src/Api/Subscription.php linha 56 #5

Open
MarcoNicolodi opened this issue Jul 11, 2016 · 0 comments
Open

Variável indefinida em src/Api/Subscription.php linha 56 #5

MarcoNicolodi opened this issue Jul 11, 2016 · 0 comments

Comments

@MarcoNicolodi
Copy link

A variavel $filters é indefinida no método getByCustomer em src/Api/Subscription.php

trocar de

public function getByCustomer($customerId)
{
    $subscriptions = $this->adapter->get(sprintf('%s/customers/%s/subscriptions?%s', $this->endpoint, $customerId, http_build_query($filters)));

    $subscriptions = json_decode($subscriptions);

    $this->extractMeta($subscriptions);

    return array_map(function($subscription)
    {
        return new SubscriptionEntity($subscription);
    }, $subscriptions->data);
}

para

public function getByCustomer($customerId,$filters = [])
{
    $subscriptions = $this->adapter->get(sprintf('%s/customers/%s/subscriptions?%s', $this->endpoint, $customerId, http_build_query($filters)));

    $subscriptions = json_decode($subscriptions);

    $this->extractMeta($subscriptions);

    return array_map(function($subscription)
    {
        return new SubscriptionEntity($subscription);
    }, $subscriptions->data);
}
@MarcoNicolodi MarcoNicolodi changed the title Variável indefinita em src/Api/Subscription.php linha 56 Variável indefinida em src/Api/Subscription.php linha 56 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant