Closed casconed closed 8 years ago
Thanks for reporting, will dig into that today.
How are you exactly doing this? Like this I can reproduce the exact query.
This commit should fix e37b3a9489764ba8ad47d95cc512f59130c9e3f5
Can you update and test please?
I have tested
$pipedrive->products->add([
'name' => 'Testing Product',
'prices' => [
[
'currency' => 'EUR',
'price' => 55,
'cost' => 44,
]
]
]);
This works with the new update.
Awesome thanks. I will pull in the AM and try it out!
On Thu, Apr 21, 2016 at 11:07 PM -0700, "Israel Ortuño" notifications@github.com wrote:
I have tested
$pipedrive->products->add([ 'name' => 'Testing Product', 'prices' => [ [ 'currency' => 'EUR', 'price' => 55, 'cost' => 44, ] ] ]);
This works with the new update.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub
@casconed fixed?
Fixed yes, thanks!
Setting
prices
to anything other than a string results in the following error:'Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in /vagrant/vendor/devio/pipedrive/src/Builder.php on line 72
While setting it to a string returns an error from the API:
exception 'Devio\Pipedrive\Exceptions\PipedriveException' with message 'Prices must be given as array of objects.' in /vagrant/vendor/devio/pipedrive/src/Http/Request.php:85