Skip to content

Commit ad7f3f5

Browse files
committed
GRAL-3316 added shortened updateTheProductAttachedToADeal alias for the /PUT method
1 parent d0c9d73 commit ad7f3f5

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ $result = $deals->addAProductToTheDealEventuallyCreatingANewItemCalledADealProdu
21712171
```
21722172

21732173

2174-
### <a name="update_product_attachment_details_of_the_deal_product_a_product_already_attached_to_a_deal"></a>![Method: ](https://apidocs.io/img/method.png ".DealsController.updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal") updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal
2174+
### <a name="update_product_attachment_details_of_the_deal_product_a_product_already_attached_to_a_deal"></a>![Method: ](https://apidocs.io/img/method.png ".DealsController.updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal") updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal <br>_alias_ `updateTheProductAttachedToADeal`
21752175

21762176
> Updates product attachment details.
21772177
@@ -2185,9 +2185,10 @@ function updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedTo
21852185
| Parameter | Tags | Description |
21862186
|-----------|------|-------------|
21872187
| id | ``` Required ``` | ID of the deal |
2188-
| productAttachmentId | ``` Required ``` | ID of the deal-product (the ID of the product attached to the deal) |
2189-
| itemPrice | ``` Optional ``` | Price at which this product will be added to the deal |
2190-
| quantity | ``` Optional ``` | Quantity – e.g. how many items of this product will be added to the deal |
2188+
| productAttachmentId | ``` Required ``` | The ID of the deal-product (the ID of the product attached to the deal) |
2189+
| productId | ``` Required ``` | The ID of the product to use |
2190+
| itemPrice | ``` Required ``` | Price at which this product will be added to the deal |
2191+
| quantity | ``` Required ``` | Quantity – e.g. how many items of this product will be added to the deal |
21912192
| discountPercentage | ``` Optional ``` | Discount %. If omitted, will be set to 0 |
21922193
| duration | ``` Optional ``` | Duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1) |
21932194
| productVariationId | ``` Optional ``` | ID of the product variation to use. When omitted, no variation will be used. |
@@ -2205,6 +2206,9 @@ $collect['id'] = $id;
22052206
$productAttachmentId = 27;
22062207
$collect['productAttachmentId'] = $productAttachmentId;
22072208

2209+
$productId = 2;
2210+
$collect['productId'] = $productId;
2211+
22082212
$itemPrice = 27.9633801840075;
22092213
$collect['itemPrice'] = $itemPrice;
22102214

src/Controllers/DealsController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,9 @@ public function addAProductToTheDealEventuallyCreatingANewItemCalledADealProduct
16081608
* @return mixed response from the API call
16091609
* @throws APIException Thrown if API call fails
16101610
*/
1611+
public function updateTheProductAttachedToADeal($options) {
1612+
return $this->updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal($options);
1613+
}
16111614
public function updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAttachedToADeal(
16121615
$options
16131616
) {
@@ -1635,6 +1638,7 @@ public function updateProductAttachmentDetailsOfTheDealProductAProductAlreadyAtt
16351638

16361639
//prepare parameters
16371640
$_parameters = array (
1641+
'product_id' => $this->val($options, 'productId'),
16381642
'item_price' => $this->val($options, 'itemPrice'),
16391643
'quantity' => $this->val($options, 'quantity'),
16401644
'discount_percentage' => $this->val($options, 'discountPercentage'),

0 commit comments

Comments
 (0)