Skip to content

Commit b5cd582

Browse files
committedJun 1, 2016
Updated phpdocs and old method outbound classes
1 parent 6be162a commit b5cd582

File tree

3 files changed

+14
-37
lines changed

3 files changed

+14
-37
lines changed
 

‎includes/classes/AmazonFulfillmentOrderCreator.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function setDisplayableOrderId($s){
7474
}
7575

7676
/**
77-
* Sets the shipping action that the shipment should use. (Optional)
77+
* Sets the fulfillment action that the shipment should use. (Optional)
7878
*
7979
* This method indicates whether the order should ship now or be put on hold.
8080
* If this option is not sent, Amazon will assume that the order will ship now.
@@ -83,9 +83,9 @@ public function setDisplayableOrderId($s){
8383
*/
8484
public function setFulfillmentAction($s){
8585
if ($s === 'Ship' || $s === 'Hold'){
86-
$this->options['ShippingSpeedCategory'] = $s;
86+
$this->options['FulfillmentAction'] = $s;
8787
} else {
88-
$this->log("Tried to set shipping action to invalid value", 'Warning');
88+
$this->log("Tried to set fulfillment action to invalid value", 'Warning');
8989
return false;
9090
}
9191
}
@@ -402,6 +402,8 @@ public function resetDeliveryWindow(){
402402
* <li><b>CurrencyCode</b> - ISO 4217 currency code</li>
403403
* <li><b>Value</b> - number</li>
404404
* </ul>
405+
* <li><b>PerUnitPrice</b> (optional array) - same structure as PerUnitDeclaredValue</li>
406+
* <li><b>PerUnitTax</b> (optional array) - same structure as PerUnitDeclaredValue</li>
405407
* </ul>
406408
* @param array $a <p>See above.</p>
407409
* @return boolean <b>FALSE</b> if improper input
@@ -585,18 +587,18 @@ public function updateOrder(){
585587
}
586588

587589
/**
588-
* Sets up options for using <i>CreateFulfillmentOrder</i>.
590+
* Sets up options for using <i>createOrder</i>.
589591
*
590-
* This changes key options for using <i>CreateFulfillmentOrder</i>.
592+
* This changes key options for using <i>createOrder</i>.
591593
*/
592594
protected function prepareCreate() {
593595
$this->options['Action'] = 'CreateFulfillmentOrder';
594596
}
595597

596598
/**
597-
* Sets up options for using <i>UpdateFulfillmentOrder</i>.
599+
* Sets up options for using <i>updateOrder</i>.
598600
*
599-
* This changes key options for using <i>UpdateFulfillmentOrder</i>. Please note: because the
601+
* This changes key options for using <i>updateOrder</i>. Please note: because the
600602
* operation for updating the order does not use all of the parameters, some of the
601603
* parameters will be removed. The following parameters are removed:
602604
* COD settings and delivery window.

‎includes/classes/AmazonFulfillmentOrderList.php

+5-19
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,13 @@ public function setStartTime($s){
7171
}
7272

7373
/**
74-
* Sets the fulfillment method filter. (Optional)
75-
*
76-
* This method sets the Fulfillment Method to be sent in the next request.
77-
* If this parameter is set, Amazon will return fulfillment orders using the given method.
78-
* If this parameter is not set, Amazon will only return fulfillment orders
79-
* with a <i>Consumer</i> method.
80-
* Here is a quick description of the methods:
81-
* <ul>
82-
* <li><b>Consumer</b> - customer order</li>
83-
* <li><b>Removal</b> - inventory will be returned to the given address</li>
84-
* </ul>
85-
* @param string $s <p>"Consumer" or "Removal"</p>
86-
* @return boolean <b>FALSE</b> if improper input
74+
* The "FulfillmentMethod" option is no longer used.
75+
* @return boolean <b>FALSE</b>
76+
* @deprecated since 1.3.0
8777
*/
8878
public function setMethodFilter($s){
89-
if ($s == 'Consumer' || $s == 'Removal'){
90-
$this->options['FulfillmentMethod'] = $s;
91-
} else {
92-
return false;
93-
}
79+
$this->log("The FulfillmentMethod option is no longer used for getting fulfillment orders.", 'Warning');
80+
return FALSE;
9481
}
9582

9683
/**
@@ -176,7 +163,6 @@ protected function prepareToken(){
176163
if ($this->tokenFlag && $this->tokenUseFlag){
177164
$this->options['Action'] = 'ListAllFulfillmentOrdersByNextToken';
178165
unset($this->options['QueryStartDateTime']);
179-
unset($this->options['FulfillmentMethod']);
180166
} else {
181167
$this->options['Action'] = 'ListAllFulfillmentOrders';
182168
unset($this->options['NextToken']);

‎test-cases/includes/classes/AmazonFulfillmentOrderListTest.php

-11
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@ public function testSetStartTime(){
3636
$this->assertNotEquals('1969-12-31T18:58:00-0500',$o['QueryStartDateTime']);
3737
}
3838

39-
public function testSetMethodFilter(){
40-
$this->assertFalse($this->object->setMethodFilter(null)); //can't be nothing
41-
$this->assertFalse($this->object->setMethodFilter(5)); //can't be an int
42-
$this->assertFalse($this->object->setMethodFilter('wrong')); //not a valid value
43-
$this->assertNull($this->object->setMethodFilter('Consumer'));
44-
$this->assertNull($this->object->setMethodFilter('Removal'));
45-
$o = $this->object->getOptions();
46-
$this->assertArrayHasKey('FulfillmentMethod',$o);
47-
$this->assertEquals('Removal',$o['FulfillmentMethod']);
48-
}
49-
5039
public function testSetUseToken(){
5140
$this->assertNull($this->object->setUseToken());
5241
$this->assertNull($this->object->setUseToken(true));

0 commit comments

Comments
 (0)