Skip to content

Commit

Permalink
Merge pull request #232 from HubSpot/10.0.0
Browse files Browse the repository at this point in the history
10.0.0
  • Loading branch information
ksvirkou-hubspot authored Apr 12, 2023
2 parents cac2b7e + 52c1b9b commit 81a29b7
Show file tree
Hide file tree
Showing 209 changed files with 9,242 additions and 30,559 deletions.
74 changes: 72 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,77 @@ 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/9.4.0...HEAD)
## [Unreleased](https://github.com/HubSpot/hubspot-api-php/compare/10.0.0-beta...HEAD)

## [10.0.0-beta](https://github.com/HubSpot/hubspot-api-php/releases/tag/10.0.0-beta0) - 2023-04-12

## Updated

- Rename `cms()->hubdb()->rowsBatchApi()->batchCloneDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->cloneDraftTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchCreateDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->createDraftTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchPurgeDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->purgeDraftTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchReadDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->readDraftTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchReadTableRows()` => `cms()->hubdb()->rowsBatchApi()->readTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchReplaceDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->replaceDraftTableRows()`.
- Rename `cms()->hubdb()->rowsBatchApi()->batchUpdateDraftTableRows()` => `cms()->hubdb()->rowsBatchApi()->updateDraftTableRows()`.
- `cms()->hubdb()->tablesApi()->getDraftTableDetailsById($table_id_or_name, $archived = null, $include_foreign_ids = null)` => `cms()->hubdb()->tablesApi()->getDraftTableDetailsById($table_id_or_name, $include_foreign_ids = null, $archived = null)`
- `cms()->hubdb()->tablesApi()->getTableDetails($table_id_or_name, $archived = null, $include_foreign_ids = null)` => `cms()->hubdb()->tablesApi()->getTableDetails($table_id_or_name, $include_foreign_ids = null, $archived = null)`
- `cms()->hubdb()->tablesApi()->updateDraftTable($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null)` => `cms()->hubdb()->tablesApi()->updateDraftTable($table_id_or_name, $hub_db_table_v3_request, $include_foreign_ids = null, $archived = null)`
- Removed `crm()->companies()->associationsApi`.
- Removed `crm()->contacts()->associationsApi`.
- Removed `crm()->deals()->associationsApi`.
- Removed `crm()->line_items()->associationsApi`.
- Removed `crm()->objects()->calls()->associationsApi`.
- Removed `crm()->objects()->emails()->associationsApi`.
- Removed `crm()->objects()->feedbackSubmissions()->associationsApi`.
- Removed `crm()->objects()->meetings()->associationsApi`.
- Removed `crm()->objects()->notes()->associationsApi`.
- Removed `crm()->objects()->postalMail()->associationsApi`.
- Removed `crm()->objects()->tasks()->associationsApi`.
- Removed `crm()->products()->associationsApi`.
- Removed `crm()->quotes()->associationsApi`.
- Removed `crm()->tickets()->associationsApi`.
- `crm()->companies()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->companies()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->contacts()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->contacts()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->deals()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->deals()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->line_items()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->line_items()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->calls()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->calls()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->emails()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->emails()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->feedbackSubmissions()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->feedbackSubmissions()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->meetings()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->meetings()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->notes()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->notes()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->postalMail()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->postalMail()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->tasks()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->tasks()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->products()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->products()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->quotes()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->quotes()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `crm()->objects()->tickets()->basicApi()->create(SimplePublicObjectInput => SimplePublicObjectInputForCreate)`
- `crm()->objects()->tickets()->batchApi()->create(BatchInputSimplePublicObjectInput => BatchInputSimplePublicObjectInputForCreate)`
- `marketing()->events()->marketingEventsExternalApi()->doSearch()` => `marketing()->events()->searchApi()->doSearch()`
- Rename `oauth()->accessTokensApi()->getAccessToken` => `oauth()->accessTokensApi()->get`.
- Rename `oauth()->refreshTokensApi()->archiveRefreshToken` => `oauth()->refreshTokensApi()->archive`.
- Rename `oauth()->refreshTokensApi()->getRefreshToken` => `oauth()->refreshTokensApi()->get`.
- Rename `oauth()->tokensApi()->createToken` => `oauth()->tokensApi()->create`.

## Added

- Added param `properties` to `crm()->properties()->coreApi()->getAll`.
- Added param `properties` to `crm()->properties()->coreApi()->getByName`.
- Added param `highValue` to all Filter's model.

## [9.4.0](https://github.com/HubSpot/hubspot-api-php/releases/tag/9.4.0) - 2023-03-02

Expand Down Expand Up @@ -55,7 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Updated

- crm.{objects}.associationApi.create($contact_id, $to_object_type, $to_object_id, string $association_type => AssociationSpec[] $association_spec)
- `crm()->{objects}()->associationApi()->create($contact_id, $to_object_type, $to_object_id, string $association_type => AssociationSpec[] $association_spec)`

## [9.0.0](https://github.com/HubSpot/hubspot-api-php/releases/tag/9.0.0) - 2022-11-21

Expand Down
30 changes: 15 additions & 15 deletions codegen/Auth/OAuth/Api/AccessTokensApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,32 +114,32 @@ public function getConfig()
}

/**
* Operation getAccessToken
* Operation get
*
* @param string $token token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \HubSpot\Client\Auth\OAuth\Model\AccessTokenInfoResponse|\HubSpot\Client\Auth\OAuth\Model\Error
*/
public function getAccessToken($token)
public function get($token)
{
list($response) = $this->getAccessTokenWithHttpInfo($token);
list($response) = $this->getWithHttpInfo($token);
return $response;
}

/**
* Operation getAccessTokenWithHttpInfo
* Operation getWithHttpInfo
*
* @param string $token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \HubSpot\Client\Auth\OAuth\Model\AccessTokenInfoResponse|\HubSpot\Client\Auth\OAuth\Model\Error, HTTP status code, HTTP response headers (array of strings)
*/
public function getAccessTokenWithHttpInfo($token)
public function getWithHttpInfo($token)
{
$request = $this->getAccessTokenRequest($token);
$request = $this->getRequest($token);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -249,16 +249,16 @@ public function getAccessTokenWithHttpInfo($token)
}

/**
* Operation getAccessTokenAsync
* Operation getAsync
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAccessTokenAsync($token)
public function getAsync($token)
{
return $this->getAccessTokenAsyncWithHttpInfo($token)
return $this->getAsyncWithHttpInfo($token)
->then(
function ($response) {
return $response[0];
Expand All @@ -267,17 +267,17 @@ function ($response) {
}

/**
* Operation getAccessTokenAsyncWithHttpInfo
* Operation getAsyncWithHttpInfo
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAccessTokenAsyncWithHttpInfo($token)
public function getAsyncWithHttpInfo($token)
{
$returnType = '\HubSpot\Client\Auth\OAuth\Model\AccessTokenInfoResponse';
$request = $this->getAccessTokenRequest($token);
$request = $this->getRequest($token);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -316,19 +316,19 @@ function ($exception) {
}

/**
* Create request for operation 'getAccessToken'
* Create request for operation 'get'
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function getAccessTokenRequest($token)
public function getRequest($token)
{
// verify the required parameter 'token' is set
if ($token === null || (is_array($token) && count($token) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $token when calling getAccessToken'
'Missing the required parameter $token when calling get'
);
}

Expand Down
60 changes: 30 additions & 30 deletions codegen/Auth/OAuth/Api/RefreshTokensApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,31 +114,31 @@ public function getConfig()
}

/**
* Operation archiveRefreshToken
* Operation archive
*
* @param string $token token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function archiveRefreshToken($token)
public function archive($token)
{
$this->archiveRefreshTokenWithHttpInfo($token);
$this->archiveWithHttpInfo($token);
}

/**
* Operation archiveRefreshTokenWithHttpInfo
* Operation archiveWithHttpInfo
*
* @param string $token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function archiveRefreshTokenWithHttpInfo($token)
public function archiveWithHttpInfo($token)
{
$request = $this->archiveRefreshTokenRequest($token);
$request = $this->archiveRequest($token);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -193,16 +193,16 @@ public function archiveRefreshTokenWithHttpInfo($token)
}

/**
* Operation archiveRefreshTokenAsync
* Operation archiveAsync
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function archiveRefreshTokenAsync($token)
public function archiveAsync($token)
{
return $this->archiveRefreshTokenAsyncWithHttpInfo($token)
return $this->archiveAsyncWithHttpInfo($token)
->then(
function ($response) {
return $response[0];
Expand All @@ -211,17 +211,17 @@ function ($response) {
}

/**
* Operation archiveRefreshTokenAsyncWithHttpInfo
* Operation archiveAsyncWithHttpInfo
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function archiveRefreshTokenAsyncWithHttpInfo($token)
public function archiveAsyncWithHttpInfo($token)
{
$returnType = '';
$request = $this->archiveRefreshTokenRequest($token);
$request = $this->archiveRequest($token);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand All @@ -247,19 +247,19 @@ function ($exception) {
}

/**
* Create request for operation 'archiveRefreshToken'
* Create request for operation 'archive'
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function archiveRefreshTokenRequest($token)
public function archiveRequest($token)
{
// verify the required parameter 'token' is set
if ($token === null || (is_array($token) && count($token) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $token when calling archiveRefreshToken'
'Missing the required parameter $token when calling archive'
);
}

Expand Down Expand Up @@ -340,32 +340,32 @@ public function archiveRefreshTokenRequest($token)
}

/**
* Operation getRefreshToken
* Operation get
*
* @param string $token token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \HubSpot\Client\Auth\OAuth\Model\RefreshTokenInfoResponse|\HubSpot\Client\Auth\OAuth\Model\Error
*/
public function getRefreshToken($token)
public function get($token)
{
list($response) = $this->getRefreshTokenWithHttpInfo($token);
list($response) = $this->getWithHttpInfo($token);
return $response;
}

/**
* Operation getRefreshTokenWithHttpInfo
* Operation getWithHttpInfo
*
* @param string $token (required)
*
* @throws \HubSpot\Client\Auth\OAuth\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \HubSpot\Client\Auth\OAuth\Model\RefreshTokenInfoResponse|\HubSpot\Client\Auth\OAuth\Model\Error, HTTP status code, HTTP response headers (array of strings)
*/
public function getRefreshTokenWithHttpInfo($token)
public function getWithHttpInfo($token)
{
$request = $this->getRefreshTokenRequest($token);
$request = $this->getRequest($token);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -475,16 +475,16 @@ public function getRefreshTokenWithHttpInfo($token)
}

/**
* Operation getRefreshTokenAsync
* Operation getAsync
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getRefreshTokenAsync($token)
public function getAsync($token)
{
return $this->getRefreshTokenAsyncWithHttpInfo($token)
return $this->getAsyncWithHttpInfo($token)
->then(
function ($response) {
return $response[0];
Expand All @@ -493,17 +493,17 @@ function ($response) {
}

/**
* Operation getRefreshTokenAsyncWithHttpInfo
* Operation getAsyncWithHttpInfo
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getRefreshTokenAsyncWithHttpInfo($token)
public function getAsyncWithHttpInfo($token)
{
$returnType = '\HubSpot\Client\Auth\OAuth\Model\RefreshTokenInfoResponse';
$request = $this->getRefreshTokenRequest($token);
$request = $this->getRequest($token);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -542,19 +542,19 @@ function ($exception) {
}

/**
* Create request for operation 'getRefreshToken'
* Create request for operation 'get'
*
* @param string $token (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function getRefreshTokenRequest($token)
public function getRequest($token)
{
// verify the required parameter 'token' is set
if ($token === null || (is_array($token) && count($token) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $token when calling getRefreshToken'
'Missing the required parameter $token when calling get'
);
}

Expand Down
Loading

0 comments on commit 81a29b7

Please sign in to comment.