Skip to content

Commit

Permalink
Merge pull request #366 from HubSpot/feature/reviewProducts2
Browse files Browse the repository at this point in the history
Refactor Products (rename parameter for createBatch)
  • Loading branch information
ksvirkou-hubspot authored Dec 15, 2021
2 parents 8448177 + 33078c0 commit 1226978
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Resources/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public function all(array $params = [])
/**
* Get a product by ID.
*
* @param int $id
*
* @see https://developers.hubspot.com/docs/methods/products/get_product_by_id
*
* @param mixed $id
*
* @return \SevenShores\Hubspot\Http\Response
*/
public function getById($id, array $params = [])
Expand Down Expand Up @@ -91,24 +91,24 @@ public function create(array $properties)
*
* @return \SevenShores\Hubspot\Http\Response
*/
public function createBatch(array $contacts)
public function createBatch(array $products)
{
$endpoint = 'https://api.hubapi.com/crm-objects/v1/objects/products/batch-create';

return $this->client->request(
'post',
$endpoint,
['json' => $contacts]
['json' => $products]
);
}

/**
* Update a product.
*
* @param int $id
*
* @see https://developers.hubspot.com/docs/methods/products/update-products
*
* @param mixed $id
*
* @return \SevenShores\Hubspot\Http\Response
*/
public function update($id, array $properties)
Expand Down Expand Up @@ -143,10 +143,10 @@ public function updateBatch(array $products)
/**
* Delete a product.
*
* @param int $id
*
* @see https://developers.hubspot.com/docs/methods/products/delete-product
*
* @param mixed $id
*
* @return \SevenShores\Hubspot\Http\Response
*/
public function delete($id)
Expand Down

0 comments on commit 1226978

Please sign in to comment.