Skip to content

Commit

Permalink
Merge pull request #135 from HubSpot/fix/getAll
Browse files Browse the repository at this point in the history
fix get all methods
  • Loading branch information
ksvirkou-hubspot authored May 12, 2022
2 parents a363ed8 + 25fdb8e commit 2b134f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/HubSpot/hubspot-api-php/compare/8.1.0...HEAD)
## [Unreleased](https://github.com/HubSpot/hubspot-api-php/compare/8.1.1...HEAD)

## [8.1.1](https://github.com/HubSpot/hubspot-api-php/releases/tag/8.1.1) - 2022-05-12

### Fixed

- add $properties_with_history to `crm->*object's apis*->getAll` methods

## [8.1.0](https://github.com/HubSpot/hubspot-api-php/releases/tag/8.1.0) - 2022-04-14

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubspot/api-client",
"version": "8.1.0",
"version": "8.1.1",
"description": "Hubspot API client",
"keywords": [
"hubspot",
Expand Down
4 changes: 2 additions & 2 deletions lib/Discovery/Crm/ObjectDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

class ObjectDiscovery extends DiscoveryBase
{
public function getAll($properties = null, $associations = null, $archived = false): array
public function getAll($properties = null, $properties_with_history = null, $associations = null, $archived = false): array
{
$objects = [];
$after = null;

do {
$page = $this->basicApi()
->getPage(100, $after, $properties, $associations, $archived)
->getPage(100, $after, $properties, $properties_with_history, $associations, $archived)
;

$objects = array_merge($objects, $page->getResults());
Expand Down

0 comments on commit 2b134f2

Please sign in to comment.