aboutsummaryrefslogtreecommitdiffstats
path: root/gsxcl
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-03-15 10:02:33 +0200
committerFilipp Lepalaan <f@230.to>2013-03-15 10:02:33 +0200
commit6495c80513a9a89eb437d0dbdf12af790d5795f1 (patch)
treedd069eaa412c2bb126c03cdb97dae266577e812f /gsxcl
parentb31003541e538d499a5e1dddc250e34e5a26282c (diff)
downloadgsxlib-6495c80513a9a89eb437d0dbdf12af790d5795f1.tar.gz
gsxlib-6495c80513a9a89eb437d0dbdf12af790d5795f1.tar.bz2
gsxlib-6495c80513a9a89eb437d0dbdf12af790d5795f1.zip
Added fileData support for createCarryInRepair()
Diffstat (limited to 'gsxcl')
-rwxr-xr-xgsxcl7
1 files changed, 6 insertions, 1 deletions
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':