From 6495c80513a9a89eb437d0dbdf12af790d5795f1 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 15 Mar 2013 10:02:33 +0200 Subject: Added fileData support for createCarryInRepair() --- gsxcl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gsxcl') diff --git a/gsxcl b/gsxcl index 060206c..1783587 100755 --- a/gsxcl +++ b/gsxcl @@ -39,7 +39,7 @@ usage: gsxcl -s sold-to -u username -p password [-r region] [-e environment] [-f Defaults to production -f format the output format. Either print_r (default), json, xml or csv -d data data for the query (serial number, order confirmation, repair number, EEE code, etc - Defaults to this machine's serial number + Defaults to this machine's serial number. Or path to a JSON file. noun one of: {$verbs_str} verb one of: {$nouns_str} @@ -122,6 +122,11 @@ switch( $noun ) { case 'status': $result = $gsx->repairStatus( $query ); break; + case 'create': + $json = file_get_contents( $opts['d'] ); + $data = json_decode( $json, TRUE ); + $result = $gsx->createCarryInRepair( $data ); + break; } case 'model': -- cgit v1.2.3