Skip to content

Commit c1448f3

Browse files
committed
Bumped to v0.7.7. Cleaned out dead code.
1 parent fd27021 commit c1448f3

File tree

5 files changed

+39
-28
lines changed

5 files changed

+39
-28
lines changed

examples/update_order_pickable.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
define('MCAPI_CONFIG_PATH', '.');
4+
require 'bootstrap.php';
5+
require 'printers.php';
6+
7+
use MyCloud\Api\Core\MCError;
8+
use MyCloud\Api\Model\Order;
9+
use MyCloud\Api\Model\OrderItem;
10+
use MyCloud\Api\Model\Product;
11+
12+
// ARGUMENTS:
13+
// [1] Order ID
14+
// [2] Pickable Flag (1 or 0, 'TRUE' or 'FALSE')
15+
16+
if ( count($argv) != 3 ) {
17+
print "Incorrect arguments. Usage:" . PHP_EOL;
18+
print " php " . $argv[0] . " orderId pickableFlag" . PHP_EOL;
19+
} else {
20+
try {
21+
$updateOrder = new Order();
22+
var_export($updateOrder);
23+
$updateOrder->setId($argv[1]);
24+
$updateOrder->can_pick =
25+
($argv[2] == '1' || strtoupper($argv[2]) == 'TRUE') ? 1 : 0;
26+
27+
$order = $updateOrder->update();
28+
29+
if ( $order instanceof MCError ) {
30+
print "ERROR updating order:" . PHP_EOL;
31+
print " " . $order->getMessage() . PHP_EOL;
32+
} else {
33+
print_order( "Updated Order", $order );
34+
}
35+
} catch ( Exception $ex ) {
36+
print "EXCEPTION: " . $ex->getMessage() . PHP_EOL;
37+
}
38+
}

lib/MyCloud/Api/Core/MCConstants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MCConstants
1212
{
1313

1414
const SDK_NAME = 'MyCloud-PHP-SDK';
15-
const SDK_VERSION = '0.7.6';
15+
const SDK_VERSION = '0.7.7';
1616

1717
const REST_TEST_ENDPOINT = "http://apitest.mycloudfulfillment.com/api";
1818
const REST_LIVE_ENDPOINT = "https://api.mycloudfulfillment.com/api";

lib/MyCloud/Api/Model/Customer.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ class Customer extends MyCloudModel
1717
{
1818
public $order = NULL;
1919

20-
/**
21-
* Default Constructor
22-
*
23-
*/
24-
// public function __construct( $order=NULL )
25-
// {
26-
// $this->order = $order;
27-
// }
28-
2920
public function getId() {
3021
return $this->id;
3122
}

lib/MyCloud/Api/Model/Order.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ class Order extends MyCloudModel
3333
const API_STATUS_UNKNOWN = 'UNKNOWN';
3434

3535
public $order_items = array();
36-
37-
// public $customer = NULL;
38-
//
39-
// public $delivery_mode = NULL;
4036

4137
public $attachments = array();
4238

lib/MyCloud/Api/Model/OrderItem.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,6 @@
2121

2222
class OrderItem extends MyCloudModel
2323
{
24-
public $order = NULL;
25-
public $product = NULL;
26-
27-
/**
28-
* Default Constructor
29-
*
30-
*/
31-
// public function __construct( $order, $product=NULL, $quantity=0, $price=0 )
32-
// {
33-
// $this->order = $order;
34-
// $this->price = $price;
35-
// $this->product = $product;
36-
// $this->quantity = $quantity;
37-
// }
3824

3925
public function getId() {
4026
return $this->id;

0 commit comments

Comments
 (0)