Changeset 764 for trunk/phpbms/modules/api/apiwrapper.php
- Timestamp:
- 01/15/10 15:01:40 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/api/apiwrapper.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/api/apiwrapper.php
r762 r764 263 263 * function getDefaults 264 264 * 265 */ 266 267 function getDefaults($tabledefuuid){ 265 * @param string $tabledefuuid The uuid of the tabledefinition that you wish to get defaults. 266 * 267 * @return array An associative array response for the get 268 * @returnf string type The result of the procedure (either 'retrieved' if successful, or 'error' if not). 269 * @returnf string message The detailed message describing the result 270 * @returnf array extras The associative array containing the default record. <em>Note:</em> This field only exists if type is not 'error'. 271 */ 272 273 public function getDefaults($tabledefuuid){ 268 274 269 275 $params["request"][0]["command"] = "getDefaults"; … … 383 389 * function searchClientByEmail 384 390 * @param string $email The email to be searched for 385 * @param bool $ useUuid Whether to return uuids or ids.391 * @param bool $returnUuid Whether to return uuids or ids. 386 392 * 387 393 * @return array An associative array response for the get 388 394 * @returnf string type The result of the get (either 'result' if successful, or 'error' if not). 389 395 * @returnf string message The detailed message describing the result 390 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the ' useUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'.391 */ 392 393 public function searchClientByEmail($email, $ useUuid = true) {396 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the 'returnUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'. 397 */ 398 399 public function searchClientByEmail($email, $returnUuid = true) { 394 400 395 401 $method = "api_searchByEmail"; … … 397 403 $data["email"] = (string)$email; 398 404 399 if($ useUuid !== true)400 $ useUuid = false;405 if($returnUuid !== true) 406 $returnUuid = false; 401 407 402 408 $options = array( 403 "useUuid" => $ useUuid409 "useUuid" => $returnUuid 404 410 ); 405 411 … … 418 424 * @param name $lastname The last name to search for in the client's table 419 425 * @param name $postalcode The postal code to search for in the client's table 420 * @param bool $ useUuid Whether to return uuids or ids.426 * @param bool $returnUuid Whether to return uuids or ids. 421 427 * 422 428 * @return array An associative array response for the get 423 429 * @returnf string type The result of the get (either 'result' if successful, or 'error' if not). 424 430 * @returnf string message The detailed message describing the result 425 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the ' useUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'.426 */ 427 428 public function searchClientByNameAndPostalcode($firstname, $lastname, $postalcode, $ useUuid = true) {431 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the 'returnUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'. 432 */ 433 434 public function searchClientByNameAndPostalcode($firstname, $lastname, $postalcode, $returnUuid = true) { 429 435 430 436 $method = "api_searchByNameAndPostalcode"; … … 434 440 $data["postalcode"] = (string)$postalcode; 435 441 436 if($ useUuid !== true)437 $ useUuid = false;442 if($returnUuid !== true) 443 $returnUuid = false; 438 444 439 445 $options = array( 440 "useUuid" => $ useUuid446 "useUuid" => $returnUuid 441 447 ); 442 448 … … 455 461 * @param string $username The username to search for in the client's table 456 462 * @param string $password The password to search for in the client's table 457 * @param bool $ useUuid Whether to return uuids or ids.463 * @param bool $returnUuid Whether to return uuids or ids. 458 464 * 459 465 * @return array An associative array response for the get 460 466 * @returnf string type The result of the get (either 'result' if successful, or 'error' if not). 461 467 * @returnf string message The detailed message describing the result 462 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the ' useUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'.463 */ 464 465 public function searchClientByUsernameAndPassword($username, $password, $ useUuid = true) {468 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the 'returnUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'. 469 */ 470 471 public function searchClientByUsernameAndPassword($username, $password, $returnUuid = true) { 466 472 467 473 $method = "api_searchByUsernameAndPassword"; … … 470 476 $data["password"] = (string)$password; 471 477 472 if($ useUuid !== true)473 $ useUuid = false;478 if($returnUuid !== true) 479 $returnUuid = false; 474 480 475 481 $options = array( 476 "useUuid" => $ useUuid482 "useUuid" => $returnUuid 477 483 ); 478 484 … … 493 499 * @param string $startdate The sql encoded DATETIME lower range of creation dates. 494 500 * @param string $enddate The sql encoded DATETIME upper range of creation dates. 495 * @param bool $ useUuid Whether to return uuids or ids.501 * @param bool $returnUuid Whether to return uuids or ids. 496 502 * 497 503 * @return array An associative array response for the get 498 504 * @returnf string type The result of the get (either 'result' if successful, or 'error' if not). 499 505 * @returnf string message The detailed message describing the result 500 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the ' useUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'.501 */ 502 503 function searchSalesOrdersByClientUuid($clientuuid, $ordertype = NULL, $startdate = NULL, $enddate = NULL, $ useUuid = true) {506 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the 'returnUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'. 507 */ 508 509 function searchSalesOrdersByClientUuid($clientuuid, $ordertype = NULL, $startdate = NULL, $enddate = NULL, $returnUuid = true) { 504 510 505 511 $method = "api_searchByClientUuid"; … … 513 519 $data["enddate"] = $enddate; 514 520 515 if($ useUuid !== true)516 $ useUuid = false;521 if($returnUuid !== true) 522 $returnUuid = false; 517 523 518 524 $options = array( 519 "useUuid" => $ useUuid525 "useUuid" => $returnUuid 520 526 ); 521 527 … … 527 533 return false; 528 534 535 }//end function 536 537 538 /* 539 * function searchProductsByPartnumber 540 * @param $partnumber 541 * @param $webenabled 542 * @param $inactive 543 * @param $returnUuid 544 * 545 * @return array An associative array response for the get 546 * @returnf string type The result of the get (either 'result' if successful, or 'error' if not). 547 * @returnf string message The detailed message describing the result 548 * @returnf array extras If the type is 'result', this will be a (possibly empty) array of uuids (or ids if the 'returnUuid' option is false). <em>Note:</em> This field only exists if type is not 'error'. 549 */ 550 551 public function searchProductsByPartnumber($partnumber, $webenabled = true, $inactive = false, $returnUuid = true) { 552 553 $method = "api_searchByPartNumber"; 554 $tabledefuuid = "tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34"; 555 $data["partnumber"] = (string)$partnumber; 556 $data["webenabled"] = (bool)$webenabled; 557 $data["inactive"] = (bool)$inactive; 558 559 $returnUuid = (bool)$returnUuid; 560 561 $options = array( 562 "useUuid" => $returnUuid 563 ); 564 565 $response = $this->runApiMethod($method, $tabledefuuid, $data, $options); 566 567 if($response !== false) 568 return $response[0]; 569 else 570 return false; 571 529 572 }//end function 530 573