shqear93 / zoho-inventory-api

Zoho Inventory Api
9 stars 10 forks source link

composer install fails #1

Closed torian257x closed 5 years ago

torian257x commented 7 years ago

i have installed a lot with composer... but your lib does not work

myuser@osboxes:~/plum$ sudo composer require --prefer-dist shqear/zoho-inventory-api "*" You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug Do not run Composer as root/super user! See https://getcomposer.org/root for details ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1

  • The requested package shqear/zoho-inventory-api * is satisfiable by shqear/zoho-inventory-api[dev-master] but these conflict with your requirements or minimum-stability.
shqear93 commented 7 years ago

Hi bro, The package is still in development stage Please try to install development version dev-master (without the parameter prefer-dist)

torian257x commented 7 years ago

well thanks for the work mate! you are the only one out there with something. So i am sure people will come to you in the future for sure.

i just copy pasted your file to my project because I seem to be forced to do manual changes anyway (the exception import for example)

i am getting

Zoho Error (1038) : JSON is not well formed.

my request was


  $zohoClient = new ZohoClient(['accessToken' => 'myActualRealToken']);
  $zohoClient->createSalesOrder([
    'salesorder_number' => 1,
    'customer_id' => 1,
    'notes' => 'LUKAS TEST',
    'line_items' => [
      'item_id' => 1,
      'name' => 'LUKAS TEST',
      'quantity' => 1,
    ]
  ]);

i validated the json string, it is well formed for sure. Probably the error is bad, and my request is wrong (i have no customer with ID).

torian257x commented 7 years ago

for completeness, line items needs to be array in array i think, e.g.:

'line_items' => [[ 'item_id' => 1, 'name' => 'LUKAS TEST', 'quantity' => 1, ]]

not sure though, this is what i received from support

{"customer_id":"XXXXXXXXXXXXXXXXXX","salesorder_number":"SO-0002", reference_number":"SO-00092", "date":"2017-02-07","line_items":[{"item_id":"XXXXXXXXXXXXXXXXXX""rate":200,"name":"Bags","description":"","quantity":"1.00", "unit":"pcs"}],"notes":"notes","terms":"terms"}

shqear93 commented 7 years ago

Maybe you should to set organization ID also

$zohoClient = new ZohoClient([
'accessToken' => 'myActualRealToken',
'organizationId'=>'yourOrganizationId'
]);

did you tried it once again?

shqear93 commented 5 years ago

Hi @Jossnaz I released the first beta version of the library, now it should work you can use "minimum-stability": "dev", in your composer.json to solve such issues with other libraries this task is resolved by creating tag 0.1.7 I'm closing this issue