Skip to content

Access data in AutoPagingIterator Object? #48

Description

@ursbraem

I get all our active clients with

    $harvest = new \Required\Harvest\Client();
    $harvest->authenticate( config('services.harvest.account_id'), config('services.harvest.token') );
    $clients = $harvest->clients()->allWithAutoPagingIterator(['is_active'=>true]);

When I foreach through the $clients, I can access all data in an array for each client.
But how to get the entire data out of the AutoPagingIterator object into an array of all clients (invoices, contacts etc)?

Seems ->data is a protected property, I also tried ->getData(). What do you recommend?


PS huge thanks for this library! Good to see we're not the only swiss company using harvest. We now make our QR-BESR via api...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions