├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CREDITS ├── INSTALL.md ├── LICENSE ├── NOTICE ├── README.md ├── amazon-config.default.php ├── composer.json ├── environment.php ├── examples ├── feed_examples.php ├── inventory_examples.php └── order_examples.php ├── includes ├── classes.php ├── classes │ ├── AmazonCore.php │ ├── AmazonFeed.php │ ├── AmazonFeedList.php │ ├── AmazonFeedResult.php │ ├── AmazonFeedsCore.php │ ├── AmazonFinanceCore.php │ ├── AmazonFinancialEventList.php │ ├── AmazonFinancialGroupList.php │ ├── AmazonFulfillmentOrder.php │ ├── AmazonFulfillmentOrderCreator.php │ ├── AmazonFulfillmentOrderList.php │ ├── AmazonFulfillmentPreview.php │ ├── AmazonInboundCore.php │ ├── AmazonInventoryCore.php │ ├── AmazonInventoryList.php │ ├── AmazonMerchantCore.php │ ├── AmazonMerchantServiceList.php │ ├── AmazonMerchantShipment.php │ ├── AmazonMerchantShipmentCreator.php │ ├── AmazonOrder.php │ ├── AmazonOrderCore.php │ ├── AmazonOrderItemList.php │ ├── AmazonOrderList.php │ ├── AmazonOrderSet.php │ ├── AmazonOutboundCore.php │ ├── AmazonPackageTracker.php │ ├── AmazonParticipationList.php │ ├── AmazonPreorder.php │ ├── AmazonPrepInfo.php │ ├── AmazonProduct.php │ ├── AmazonProductFeeEstimate.php │ ├── AmazonProductInfo.php │ ├── AmazonProductList.php │ ├── AmazonProductSearch.php │ ├── AmazonProductsCore.php │ ├── AmazonRecommendationCore.php │ ├── AmazonRecommendationList.php │ ├── AmazonReport.php │ ├── AmazonReportAcknowledger.php │ ├── AmazonReportList.php │ ├── AmazonReportRequest.php │ ├── AmazonReportRequestList.php │ ├── AmazonReportScheduleList.php │ ├── AmazonReportScheduleManager.php │ ├── AmazonReportsCore.php │ ├── AmazonSellersCore.php │ ├── AmazonServiceStatus.php │ ├── AmazonShipment.php │ ├── AmazonShipmentItemList.php │ ├── AmazonShipmentList.php │ ├── AmazonShipmentPlanner.php │ ├── AmazonSubscription.php │ ├── AmazonSubscriptionCore.php │ ├── AmazonSubscriptionDestinationList.php │ ├── AmazonSubscriptionList.php │ ├── AmazonTransport.php │ └── AmazonTransportDocument.php └── includes.php ├── mock └── .gitignore ├── nbproject ├── project.properties └── project.xml └── test-cases ├── bootstrap.php ├── helperFunctions.php ├── includes └── classes │ ├── AmazonCoreTest.php │ ├── AmazonFeedListTest.php │ ├── AmazonFeedResultTest.php │ ├── AmazonFeedTest.php │ ├── AmazonFinancialEventListTest.php │ ├── AmazonFinancialGroupListTest.php │ ├── AmazonFulfillmentOrderCreatorTest.php │ ├── AmazonFulfillmentOrderListTest.php │ ├── AmazonFulfillmentOrderTest.php │ ├── AmazonFulfillmentPreviewTest.php │ ├── AmazonInventoryListTest.php │ ├── AmazonMerchantServiceListTest.php │ ├── AmazonMerchantShipmentTest.php │ ├── AmazonOrderItemListTest.php │ ├── AmazonOrderListTest.php │ ├── AmazonOrderSetTest.php │ ├── AmazonOrderTest.php │ ├── AmazonPackageTrackerTest.php │ ├── AmazonParticipationListTest.php │ ├── AmazonPreorderTest.php │ ├── AmazonPrepInfoTest.php │ ├── AmazonProductFeeEstimateTest.php │ ├── AmazonProductInfoTest.php │ ├── AmazonProductListTest.php │ ├── AmazonProductSearchTest.php │ ├── AmazonProductTest.php │ ├── AmazonRecommendationListTest.php │ ├── AmazonReportAcknowledgerTest.php │ ├── AmazonReportListTest.php │ ├── AmazonReportRequestListTest.php │ ├── AmazonReportRequestTest.php │ ├── AmazonReportScheduleListTest.php │ ├── AmazonReportScheduleManagerTest.php │ ├── AmazonReportTest.php │ ├── AmazonServiceStatusTest.php │ ├── AmazonShipmentItemListTest.php │ ├── AmazonShipmentListTest.php │ ├── AmazonShipmentPlannerTest.php │ ├── AmazonShipmentTest.php │ ├── AmazonSubscriptionDestinationListTest.php │ ├── AmazonSubscriptionListTest.php │ ├── AmazonSubscriptionTest.php │ ├── AmazonTransportDocumentTest.php │ └── AmazonTransportTest.php ├── mock ├── acknowledgeReports.xml ├── cancelFeeds.xml ├── cancelRequests.xml ├── confirmPreorder.xml ├── confirmTransport.xml ├── countFeeds.xml ├── createMerchantShipment.xml ├── createShipment.xml ├── createSubscription.xml ├── deleteSubscription.xml ├── deregisterDestination.xml ├── estimateTransport.xml ├── fetchBillOfLading.xml ├── fetchCategories.xml ├── fetchCompetitivePricing.xml ├── fetchDestinations.xml ├── fetchEstimates.xml ├── fetchFeedResult.xml ├── fetchFeedSubmissions.xml ├── fetchFeedSubmissionsToken.xml ├── fetchFeedSubmissionsToken2.xml ├── fetchFinancialEvents.xml ├── fetchFinancialEventsToken.xml ├── fetchFinancialEventsToken2.xml ├── fetchFinancialGroups.xml ├── fetchFinancialGroupsToken.xml ├── fetchFinancialGroupsToken2.xml ├── fetchFulfillmentOrder.xml ├── fetchFulfillmentOrderList.xml ├── fetchFulfillmentOrderListToken.xml ├── fetchFulfillmentOrderListToken2.xml ├── fetchInventoryList.xml ├── fetchInventoryListToken.xml ├── fetchInventoryListToken2.xml ├── fetchLowestOffer.xml ├── fetchLowestPricedOffers.xml ├── fetchMerchantServiceList.xml ├── fetchMerchantShipment.xml ├── fetchMyPrice.xml ├── fetchOrder.xml ├── fetchOrderItems.xml ├── fetchOrderItemsToken.xml ├── fetchOrderItemsToken2.xml ├── fetchOrderList.xml ├── fetchOrderListToken.xml ├── fetchOrderListToken2.xml ├── fetchPackageLabels.xml ├── fetchPalletLabels.xml ├── fetchParticipationList.xml ├── fetchParticipationListToken.xml ├── fetchParticipationListToken2.xml ├── fetchPlan.xml ├── fetchPreorderInfo.xml ├── fetchPrepInstructionsAsin.xml ├── fetchPrepInstructionsSku.xml ├── fetchPreview.xml ├── fetchProductList.xml ├── fetchRecommendationTimes.xml ├── fetchRecommendations.xml ├── fetchRecommendationsToken.xml ├── fetchRecommendationsToken2.xml ├── fetchReport.xml ├── fetchReportCount.xml ├── fetchReportList.xml ├── fetchReportListToken.xml ├── fetchReportListToken2.xml ├── fetchReportRequestCount.xml ├── fetchReportRequestList.xml ├── fetchReportRequestListToken.xml ├── fetchReportRequestListToken2.xml ├── fetchReportScheduleCount.xml ├── fetchReportScheduleList.xml ├── fetchReportScheduleListToken.xml ├── fetchReportScheduleListToken2.xml ├── fetchServiceStatus.xml ├── fetchShipmentItems.xml ├── fetchShipmentItemsToken.xml ├── fetchShipmentItemsToken2.xml ├── fetchShipments.xml ├── fetchShipmentsToken.xml ├── fetchShipmentsToken2.xml ├── fetchSubscription.xml ├── fetchSubscriptionList.xml ├── fetchTrackingDetails.xml ├── fetchTransportContentLtlNonPartnered.xml ├── fetchTransportContentLtlPartnered.xml ├── fetchTransportContentSpNonPartnered.xml ├── fetchTransportContentSpPartnered.xml ├── manageReportSchedule.xml ├── pingDestination.xml ├── registerDestination.xml ├── requestReport.xml ├── saveFeed.xml ├── saveReport.xml ├── searchProducts.xml ├── sendTransportContents.xml ├── submitFeed.xml ├── updateShipment.xml ├── updateSubscription.xml └── voidTransport.xml ├── phpunit.xml └── test-config.php /.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject/private/ 2 | amazon-config.php 3 | test.php 4 | log.txt 5 | /test-cases/log.txt 6 | composer.lock 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - 5.4 4 | - 5.5 5 | - 5.6 6 | - 7 7 | - 7.1 8 | - 7.2 9 | 10 | matrix: 11 | allow_failures: 12 | php: 7.1 13 | php: 7.2 14 | 15 | # install packages explicitly 16 | install: 17 | - composer self-update && composer install 18 | 19 | # show me what phpunit version we are running 20 | before_script: 21 | - vendor/bin/phpunit --version 22 | 23 | # run the test suite 24 | script: cd test-cases && php ../vendor/bin/phpunit --bootstrap bootstrap.php 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | ##General 3 | All pull requests should target the master branch. Commits should not have different code changes mixed together and should have descriptive messages. 4 | 5 | ##Project Scope 6 | The goal of this project is to provide a library with which the average merchant can communicate with Amazon's MWS services without needing to learn the complex language of the API. When contributing, think about whether or not the contribution is something that the average Amazon merchant would need to intract with Amazon. 7 | 8 | Code for handling the merchant's data, such as for generating feeds or data crunching, falls outside of the library's intended scope and, while useful, is best left to separate projects. 9 | 10 | ##Code Guidelines 11 | The library is written using a custom style and does not follow any particular standard. For the sake of cohesion, changes to the code should be written in this same style. Please do not make changes to the style of the code. 12 | 13 | Any new changes should fit within the previously-mentioned goal of the project. New public methods and classes should have names that are easy to understand and use without needing to consult the API's documentation. Try to follow the trend of similar existing functions, such as how methods that send requests to get information from Amazon usually have names that start with "fetch." 14 | 15 | New methods should have phpdocs explaining how to use them and how they will affect the options sent in the next request. New classes should have phpdocs explaining their purpose and the workflow for using them. If the class is one that sends requests to Amazon, the documentation should indicate which Amazon actions it can perform and which of its methods are required before a request can be sent. Check the phpdocs on existing classes for examples. 16 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | The phpAmazonMWS library was designed and written by Thomas Hernandez (peardian at gmail) for the CPI Group. 2 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | ## Installing 2 | To install, simply add the library to your project. Composer is the default installation tool for this library. 3 | If you do not use Composer for your project, you can still auto-load classes by including the file **includes/classes.php** in the page or function. 4 | 5 | Before you use any commands, you need to create an **amazon-config.php** file with your account credentials. Start by copying the template provided (*amazon-config.default.php*) and renaming the file. 6 | 7 | If you are operating outside of the United States, be sure to change the Amazon Service URL to the one matching your region. 8 | 9 | You can also link the built-in logging system to your own system by putting the logging function's name in the *$logfunction* parameter. 10 | 11 | The default location for the built-in log file is in the library's main directory. In the event that PHP does not have the correct permissions to create a file in there, you will have to create the log file as "log.txt" and give PHP permission to edit it. 12 | 13 | ## Usage 14 | All of the technical details required by the API are handled behind the scenes, 15 | so users can easily build code for sending requests to Amazon 16 | without having to jump hurdles such as parameter URL formatting and token management. 17 | The general work flow for using one of the objects is this: 18 | 19 | 1. Create an object for the task you need to perform. 20 | 2. Load it up with parameters, depending on the object, using *set____* methods. 21 | 3. Submit the request to Amazon. The methods to do this are usually named *fetch____* or *submit____* and have no parameters. 22 | 4. Reference the returned data, whether as single values or in bulk, using *get____* methods. 23 | 5. Monitor the performance of the library using the built-in logging system. 24 | 25 | Note that if you want to act on more than one Amazon store, you will need a separate object for each store. 26 | 27 | Also note that the objects perform best when they are not treated as reusable. Otherwise, you may end up grabbing old response data if a new request fails. 28 | 29 | ## Examples 30 | Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours: 31 | ```php 32 | function getAmazonOrders() { 33 | $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file 34 | $amz->setLimits('Modified', "- 24 hours"); 35 | $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders 36 | $amz->setOrderStatusFilter( 37 | array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable") 38 | ); //no shipped or pending 39 | $amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all 40 | $amz->fetchOrders(); 41 | return $amz->getList(); 42 | } 43 | ``` 44 | This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers: 45 | ```php 46 | function sendInventoryFeed($feed) { 47 | $amz=new AmazonFeed(); //if there is only one store in config, it can be omitted 48 | $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation 49 | $amz->setFeedContent($feed); 50 | $amz->submitFeed(); 51 | return $amz->getResponse(); 52 | } 53 | ``` 54 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CPIGroup/phpAmazonMWS/bf594dcb60e3176ec69148e90bd9e618f41a85d3/NOTICE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | phpAmazonMWS 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/CPIGroup/phpAmazonMWS.svg?branch=stable)](https://travis-ci.org/CPIGroup/phpAmazonMWS) 5 | 6 | A library to connect to Amazon's Merchant Web Services (MWS) in an object-oriented manner, with a focus on intuitive usage. 7 | 8 | This is __NOT__ for Amazon Web Services (AWS) - Cloud Computing Services. 9 | 10 | 11 | ## Example Usage 12 | Here are a couple of examples of the library in use. 13 | All of the technical details required by the API are handled behind the scenes, 14 | so users can easily build code for sending requests to Amazon 15 | without having to jump hurdles such as parameter URL formatting and token management. 16 | 17 | Here is an example of a function used to get all warehouse-fulfilled orders from Amazon updated in the past 24 hours: 18 | ```php 19 | function getAmazonOrders() { 20 | $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file 21 | $amz->setLimits('Modified', "- 24 hours"); 22 | $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders 23 | $amz->setOrderStatusFilter( 24 | array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable") 25 | ); //no shipped or pending 26 | $amz->setUseToken(); //Amazon sends orders 100 at a time, but we want them all 27 | $amz->fetchOrders(); 28 | return $amz->getList(); 29 | } 30 | ``` 31 | This example shows a function used to send a previously-created XML feed to Amazon to update Inventory numbers: 32 | ```php 33 | function sendInventoryFeed($feed) { 34 | $amz=new AmazonFeed(); //if there is only one store in config, it can be omitted 35 | $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation 36 | $amz->setFeedContent($feed); 37 | $amz->submitFeed(); 38 | return $amz->getResponse(); 39 | } 40 | ``` 41 | -------------------------------------------------------------------------------- /amazon-config.default.php: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cpigroup/php-amazon-mws", 3 | "type": "library", 4 | "description": "An open-source library to connect to Amazon's MWS web services in an object-oriented manner, with a focus on intuitive usage.", 5 | "license": "Apache-2.0", 6 | "keywords": [ 7 | "API", 8 | "Amazon", 9 | "PHP" 10 | ], 11 | "require": { 12 | "php": ">=5.4", 13 | "ext-curl": "*" 14 | }, 15 | "require-dev": { 16 | "phpunit/phpunit": ">=4.0.0, <6.0.0" 17 | }, 18 | "autoload": { 19 | "classmap": [ 20 | "includes/classes/" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /environment.php: -------------------------------------------------------------------------------- 1 | 110 | -------------------------------------------------------------------------------- /examples/feed_examples.php: -------------------------------------------------------------------------------- 1 | '; 10 | foreach ($list as $feed) { 11 | //these are arrays 12 | echo 'Feed ID: '.$feed['FeedSubmissionId']; 13 | echo '
Type: '.$feed['FeedType']; 14 | echo '
Date Sent: '.$feed['SubmittedDate']; 15 | echo '
Status: '.$feed['FeedProcessingStatus']; 16 | echo '

'; 17 | } 18 | } 19 | 20 | /** 21 | * This function will retrieve a list of all items with quantity that was adjusted within the past 24 hours. 22 | * The entire list of items is returned, with each item contained in an array. 23 | * Note that this does not relay whether or not the feed had any errors. 24 | * To get this information, the feed's results must be retrieved. 25 | */ 26 | function getAmazonFeedStatus(){ 27 | require('../includes/classes.php'); //autoload classes, not needed if composer is being used 28 | try { 29 | $amz=new AmazonFeedList("myStore"); 30 | $amz->setTimeLimits('- 24 hours'); //limit time frame for feeds to any updated since the given time 31 | $amz->setFeedStatuses(array("_SUBMITTED_", "_IN_PROGRESS_", "_DONE_")); //exclude cancelled feeds 32 | $amz->fetchFeedSubmissions(); //this is what actually sends the request 33 | return $amz->getFeedList(); 34 | } catch (Exception $ex) { 35 | echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage(); 36 | } 37 | } 38 | 39 | /** 40 | * This function will send a provided Inventory feed to Amazon. 41 | * Amazon's response to the feed is returned as an array. 42 | * This function is not actively used on this example page as a safety precaution. 43 | */ 44 | function sendInventoryFeed($feed) { 45 | try { 46 | $amz=new AmazonFeed(); //if there is only one store in config, it can be omitted 47 | $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); //feed types listed in documentation 48 | $amz->setFeedContent($feed); //can be either XML or CSV data; a file upload method is available as well 49 | $amz->submitFeed(); //this is what actually sends the request 50 | return $amz->getResponse(); 51 | } catch (Exception $ex) { 52 | echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage(); 53 | } 54 | } 55 | 56 | /** 57 | * This function will get the processing results of a feed previously sent to Amazon and give the data. 58 | * In order to do this, a feed ID is required. The response is in XML. 59 | */ 60 | function getFeedResult($feedId) { 61 | try { 62 | $amz=new AmazonFeedResult("myStore", $feedId); //feed ID can be quickly set by passing it to the constructor 63 | $amz->setFeedId($feedId); //otherwise, it must be set this way 64 | $amz->fetchFeedResult(); 65 | return $amz->getRawFeed(); 66 | } catch (Exception $ex) { 67 | echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage(); 68 | } 69 | } 70 | 71 | 72 | ?> 73 | -------------------------------------------------------------------------------- /examples/inventory_examples.php: -------------------------------------------------------------------------------- 1 | '; 10 | foreach ($list as $item) { 11 | //these are arrays 12 | echo 'Item SKU: '.$item['SellerSKU']; 13 | echo '
Condition: '.$item['Condition']; 14 | echo '
In Stock: '.$item['InStockSupplyQuantity']; 15 | echo '

'; 16 | } 17 | } 18 | 19 | /** 20 | * This function will retrieve a list of all items with quantity that was adjusted within the past 24 hours. 21 | * The entire list of items is returned, with each item contained in an array. 22 | */ 23 | function getAmazonSupply(){ 24 | require('../includes/classes.php'); //autoload classes, not needed if composer is being used 25 | try { 26 | $obj = new AmazonInventoryList("myStore"); //store name matches the array key in the config file 27 | $obj->setUseToken(); //tells the object to automatically use tokens right away 28 | $obj->setStartTime("- 24 hours"); 29 | $obj->fetchInventoryList(); //this is what actually sends the request 30 | return $obj->getSupply(); 31 | } catch (Exception $ex) { 32 | echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage(); 33 | } 34 | } 35 | 36 | 37 | ?> 38 | -------------------------------------------------------------------------------- /examples/order_examples.php: -------------------------------------------------------------------------------- 1 | '; 10 | foreach ($list as $order) { 11 | //these are AmazonOrder objects 12 | echo 'Order Number: '.$order->getAmazonOrderId(); 13 | echo '
Purchase Date: '.$order->getPurchaseDate(); 14 | echo '
Status: '.$order->getOrderStatus(); 15 | echo '
Customer: '.$order->getBuyerName(); 16 | $address=$order->getShippingAddress(); //address is an array 17 | echo '
City: '.$address['City']; 18 | echo '

'; 19 | } 20 | } 21 | 22 | /** 23 | * This function will retrieve a list of all unshipped MFN orders made within the past 24 hours. 24 | * The entire list of orders is returned, with each order contained in an AmazonOrder object. 25 | * Note that the items in the order are not included in the data. 26 | * To get the order's items, the "fetchItems" method must be used by the specific order object. 27 | */ 28 | function getAmazonOrders() { 29 | require('../includes/classes.php'); //autoload classes, not needed if composer is being used 30 | try { 31 | $amz = new AmazonOrderList("myStore"); //store name matches the array key in the config file 32 | $amz->setLimits('Modified', "- 24 hours"); //accepts either specific timestamps or relative times 33 | $amz->setFulfillmentChannelFilter("MFN"); //no Amazon-fulfilled orders 34 | $amz->setOrderStatusFilter( 35 | array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable") 36 | ); //no shipped or pending orders 37 | $amz->setUseToken(); //tells the object to automatically use tokens right away 38 | $amz->fetchOrders(); //this is what actually sends the request 39 | return $amz->getList(); 40 | } catch (Exception $ex) { 41 | echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage(); 42 | } 43 | } 44 | 45 | ?> 46 | -------------------------------------------------------------------------------- /includes/classes.php: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /includes/classes/AmazonFeedsCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | $this->urlbranch = ''; 45 | if(isset($AMAZON_VERSION_FEEDS)) { 46 | $this->options['Version'] = $AMAZON_VERSION_FEEDS; 47 | } 48 | } 49 | } 50 | ?> 51 | -------------------------------------------------------------------------------- /includes/classes/AmazonFinanceCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_FINANCE)){ 45 | $this->urlbranch = 'Finances/'.$AMAZON_VERSION_FINANCE; 46 | $this->options['Version'] = $AMAZON_VERSION_FINANCE; 47 | } 48 | 49 | if(isset($THROTTLE_LIMIT_FINANCE)) { 50 | $this->throttleLimit = $THROTTLE_LIMIT_FINANCE; 51 | } 52 | if(isset($THROTTLE_TIME_FINANCE)) { 53 | $this->throttleTime = $THROTTLE_TIME_FINANCE; 54 | } 55 | $this->throttleGroup = 'Finance'; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /includes/classes/AmazonInboundCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_INBOUND)){ 45 | $this->urlbranch = 'FulfillmentInboundShipment/'.$AMAZON_VERSION_INBOUND; 46 | $this->options['Version'] = $AMAZON_VERSION_INBOUND; 47 | } 48 | 49 | 50 | if(isset($THROTTLE_LIMIT_INVENTORY)) { 51 | $this->throttleLimit = $THROTTLE_LIMIT_INVENTORY; 52 | } 53 | if(isset($THROTTLE_TIME_INVENTORY)) { 54 | $this->throttleTime = $THROTTLE_TIME_INVENTORY; 55 | } 56 | $this->throttleGroup = 'Inventory'; 57 | } 58 | } 59 | ?> 60 | -------------------------------------------------------------------------------- /includes/classes/AmazonInventoryCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_INVENTORY)){ 45 | $this->urlbranch = 'FulfillmentInventory/'.$AMAZON_VERSION_INVENTORY; 46 | $this->options['Version'] = $AMAZON_VERSION_INVENTORY; 47 | } 48 | 49 | if(isset($THROTTLE_LIMIT_INVENTORY)) { 50 | $this->throttleLimit = $THROTTLE_LIMIT_INVENTORY; 51 | } 52 | if(isset($THROTTLE_TIME_INVENTORY)) { 53 | $this->throttleTime = $THROTTLE_TIME_INVENTORY; 54 | } 55 | $this->throttleGroup = 'Inventory'; 56 | } 57 | } 58 | ?> 59 | -------------------------------------------------------------------------------- /includes/classes/AmazonMerchantCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_MERCHANT)){ 45 | $this->urlbranch = 'MerchantFulfillment/'.$AMAZON_VERSION_MERCHANT; 46 | $this->options['Version'] = $AMAZON_VERSION_MERCHANT; 47 | } 48 | 49 | if(isset($THROTTLE_LIMIT_MERCHANT)) { 50 | $this->throttleLimit = $THROTTLE_LIMIT_MERCHANT; 51 | } 52 | if(isset($THROTTLE_TIME_MERCHANT)) { 53 | $this->throttleTime = $THROTTLE_TIME_MERCHANT; 54 | } 55 | $this->throttleGroup = 'MerchantFulfillment'; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /includes/classes/AmazonOrderCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_ORDERS)){ 45 | $this->urlbranch = 'Orders/'.$AMAZON_VERSION_ORDERS; 46 | $this->options['Version'] = $AMAZON_VERSION_ORDERS; 47 | } 48 | } 49 | } 50 | ?> 51 | -------------------------------------------------------------------------------- /includes/classes/AmazonOutboundCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_OUTBOUND)){ 45 | $this->urlbranch = 'FulfillmentOutboundShipment/'.$AMAZON_VERSION_OUTBOUND; 46 | $this->options['Version'] = $AMAZON_VERSION_OUTBOUND; 47 | } 48 | 49 | 50 | if(isset($THROTTLE_LIMIT_INVENTORY)) { 51 | $this->throttleLimit = $THROTTLE_LIMIT_INVENTORY; 52 | } 53 | if(isset($THROTTLE_TIME_INVENTORY)) { 54 | $this->throttleTime = $THROTTLE_TIME_INVENTORY; 55 | } 56 | $this->throttleGroup = 'Inventory'; 57 | } 58 | } 59 | ?> 60 | -------------------------------------------------------------------------------- /includes/classes/AmazonRecommendationCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 36 | * This parameter is optional if only one store is defined in the config file.

37 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 38 | * This defaults to FALSE.

39 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

40 | * @param string $config [optional]

An alternate config file to set. Used for testing.

41 | */ 42 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 43 | parent::__construct($s, $mock, $m, $config); 44 | include($this->env); 45 | if (file_exists($this->config)){ 46 | include($this->config); 47 | } else { 48 | throw new Exception('Config file does not exist!'); 49 | } 50 | 51 | if (isset($AMAZON_VERSION_RECOMMEND)){ 52 | $this->urlbranch = 'Recommendations/' . $AMAZON_VERSION_RECOMMEND; 53 | $this->options['Version'] = $AMAZON_VERSION_RECOMMEND; 54 | } 55 | 56 | if(isset($THROTTLE_LIMIT_RECOMMEND)) { 57 | $this->throttleLimit = $THROTTLE_LIMIT_RECOMMEND; 58 | } 59 | if(isset($THROTTLE_TIME_RECOMMEND)) { 60 | $this->throttleTime = $THROTTLE_TIME_RECOMMEND; 61 | } 62 | 63 | if (isset($store[$this->storeName]['marketplaceId'])){ 64 | $this->setMarketplace($store[$this->storeName]['marketplaceId']); 65 | } else { 66 | $this->log("Marketplace ID is missing", 'Urgent'); 67 | } 68 | } 69 | 70 | /** 71 | * Sets the marketplace associated with the recommendations. (Optional) 72 | * 73 | * The current store's configured marketplace is used by default. 74 | * @param string $m

Marketplace ID

75 | * @return boolean FALSE if improper input 76 | */ 77 | public function setMarketplace($m){ 78 | if (is_string($m)){ 79 | $this->options['MarketplaceId'] = $m; 80 | } else { 81 | return false; 82 | } 83 | } 84 | 85 | } 86 | 87 | -------------------------------------------------------------------------------- /includes/classes/AmazonReportsCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | $this->urlbranch = ''; 45 | if(isset($AMAZON_VERSION_REPORTS)) { 46 | $this->options['Version'] = $AMAZON_VERSION_REPORTS; 47 | } 48 | } 49 | } 50 | ?> 51 | -------------------------------------------------------------------------------- /includes/classes/AmazonSellersCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 34 | * This parameter is optional if only one store is defined in the config file.

35 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 36 | * This defaults to FALSE.

37 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

38 | * @param string $config [optional]

An alternate config file to set. Used for testing.

39 | */ 40 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 41 | parent::__construct($s, $mock, $m, $config); 42 | include($this->env); 43 | 44 | if(isset($AMAZON_VERSION_SELLERS)){ 45 | $this->urlbranch = 'Sellers/'.$AMAZON_VERSION_SELLERS; 46 | $this->options['Version'] = $AMAZON_VERSION_SELLERS; 47 | } 48 | } 49 | } 50 | ?> 51 | -------------------------------------------------------------------------------- /includes/classes/AmazonSubscriptionCore.php: -------------------------------------------------------------------------------- 1 | Name for the store you want to use. 36 | * This parameter is optional if only one store is defined in the config file.

37 | * @param boolean $mock [optional]

This is a flag for enabling Mock Mode. 38 | * This defaults to FALSE.

39 | * @param array|string $m [optional]

The files (or file) to use in Mock Mode.

40 | * @param string $config [optional]

An alternate config file to set. Used for testing.

41 | */ 42 | public function __construct($s = null, $mock = false, $m = null, $config = null){ 43 | parent::__construct($s, $mock, $m, $config); 44 | include($this->env); 45 | if (file_exists($this->config)){ 46 | include($this->config); 47 | } else { 48 | throw new Exception('Config file does not exist!'); 49 | } 50 | 51 | if (isset($AMAZON_VERSION_SUBSCRIBE)){ 52 | $this->urlbranch = 'Subscriptions/' . $AMAZON_VERSION_SUBSCRIBE; 53 | $this->options['Version'] = $AMAZON_VERSION_SUBSCRIBE; 54 | } 55 | 56 | if(isset($THROTTLE_LIMIT_SUBSCRIBE)) { 57 | $this->throttleLimit = $THROTTLE_LIMIT_SUBSCRIBE; 58 | } 59 | if(isset($THROTTLE_TIME_SUBSCRIBE)) { 60 | $this->throttleTime = $THROTTLE_TIME_SUBSCRIBE; 61 | } 62 | 63 | if (isset($store[$this->storeName]['marketplaceId'])){ 64 | $this->setMarketplace($store[$this->storeName]['marketplaceId']); 65 | } else { 66 | $this->log("Marketplace ID is missing", 'Urgent'); 67 | } 68 | } 69 | 70 | /** 71 | * Sets the marketplace associated with the subscription or destination. (Optional) 72 | * 73 | * The current store's configured marketplace is used by default. 74 | * @param string $m

Marketplace ID

75 | * @return boolean FALSE if improper input 76 | */ 77 | public function setMarketplace($m){ 78 | if (is_string($m)){ 79 | $this->options['MarketplaceId'] = $m; 80 | } else { 81 | return false; 82 | } 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /includes/includes.php: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /mock/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_create_2e_tests=false 2 | auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_enabled=true 3 | auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_path=test-cases/bootstrap.php 4 | auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path= 5 | auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path= 6 | auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_path= 7 | auxiliary.org-netbeans-modules-php-phpunit.test_2e_groups_2e_ask=false 8 | auxiliary.org-netbeans-modules-php-phpunit.test_2e_run_2e_all=false 9 | ignore.path= 10 | include.path=\ 11 | ${php.global.include.path} 12 | php.version=PHP_54 13 | source.encoding=UTF-8 14 | src.dir=. 15 | tags.asp=false 16 | tags.short=true 17 | test.src.dir=test-cases 18 | testing.providers=PhpUnit 19 | web.root=. 20 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.php.project 4 | 5 | 6 | newAmazon 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test-cases/bootstrap.php: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /test-cases/helperFunctions.php: -------------------------------------------------------------------------------- 1 | 43 | -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonCoreTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonServiceStatus('testStore', 'Inbound', true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | $fileName = 'no-file.log'; 28 | 29 | if (file_exists($fileName)){ 30 | @unlink($fileName); 31 | } 32 | } 33 | 34 | /** 35 | * @return array 36 | */ 37 | public function mockProvider() { 38 | return array( 39 | array(true,null, 'Mock Mode set to ON'), 40 | array(false,null, null), 41 | array(true,'test', 'Mock Mode set to ON','Single Mock File set: test'), 42 | array(true,array('test'), 'Mock Mode set to ON','Mock files array set.'), 43 | array(false,'test', 'Single Mock File set: test'), 44 | array(false,array('test'), 'Mock files array set.'), 45 | array('no',null, null), 46 | ); 47 | } 48 | 49 | /** 50 | * @covers AmazonCore::setMock 51 | * @dataProvider mockProvider 52 | */ 53 | public function testSetMock($a, $b, $c, $d = null) { 54 | resetLog(); 55 | $this->object->setMock($a, $b); 56 | $check = parseLog(); 57 | if ((is_bool($a) && $a) || $b){ 58 | $this->assertEquals($c,$check[0]); 59 | } 60 | if ($d){ 61 | $this->assertEquals($d,$check[1]); 62 | } 63 | } 64 | 65 | /** 66 | * @covers AmazonCore::setConfig 67 | * @expectedException Exception 68 | * @expectedExceptionMessage Config file does not exist or cannot be read! (no) 69 | */ 70 | public function testSetConfig() { 71 | $this->object->setConfig('no'); 72 | } 73 | 74 | /** 75 | * @covers AmazonCore::setLogPath 76 | */ 77 | public function testSetLogPath() { 78 | $fileName = 'no-file.log'; 79 | 80 | $this->object->setLogPath($fileName); 81 | 82 | $this->assertFileExists($fileName); 83 | } 84 | 85 | /** 86 | * @covers AmazonCore::setLogPath 87 | * @expectedException Exception 88 | * @expectedExceptionMessage Log file does not exist or cannot be read! () 89 | */ 90 | public function testSetLogPathThrowsException() { 91 | $this->object->setLogPath(false); 92 | } 93 | 94 | /** 95 | * @covers AmazonCore::setStore 96 | * @todo Implement testSetStore(). 97 | */ 98 | public function testSetStore() { 99 | $this->object->setStore('no'); 100 | $check = parseLog(); 101 | $this->assertEquals('Mock Mode set to ON',$check[0]); 102 | $this->assertEquals('Store no does not exist!',$check[1]); 103 | resetLog(); 104 | $this->object->setStore('bad'); 105 | $bad = parseLog(); 106 | $this->assertEquals('Merchant ID is missing!',$bad[0]); 107 | $this->assertEquals('Access Key ID is missing!',$bad[1]); 108 | $this->assertEquals('Secret Key is missing!',$bad[2]); 109 | } 110 | 111 | public function testGetOptions(){ 112 | $o = $this->object->getOptions(); 113 | $this->assertInternalType('array',$o); 114 | $this->assertArrayHasKey('SellerId',$o); 115 | $this->assertArrayHasKey('AWSAccessKeyId',$o); 116 | $this->assertArrayHasKey('MWSAuthToken',$o); 117 | $this->assertArrayHasKey('SignatureVersion',$o); 118 | $this->assertArrayHasKey('SignatureMethod',$o); 119 | $this->assertArrayHasKey('Version',$o); 120 | } 121 | 122 | } 123 | 124 | require_once('helperFunctions.php'); 125 | -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonFeedResultTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonFeedResult('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonFeedResult('testStore', 77, true, null, __DIR__.'/../../test-config.php'); 32 | 33 | $o = $obj->getOptions(); 34 | $this->assertArrayHasKey('FeedSubmissionId',$o); 35 | $this->assertEquals(77, $o['FeedSubmissionId']); 36 | } 37 | 38 | public function testSetFeedId(){ 39 | $ok = $this->object->setFeedId(77); 40 | $this->assertNull($ok); 41 | $o = $this->object->getOptions(); 42 | $this->assertArrayHasKey('FeedSubmissionId',$o); 43 | $this->assertEquals(77, $o['FeedSubmissionId']); 44 | $this->assertFalse($this->object->setFeedId('string')); 45 | } 46 | 47 | public function testFetchFeedResult(){ 48 | resetLog(); 49 | $this->object->setMock(true,'fetchFeedResult.xml'); 50 | $this->assertFalse($this->object->fetchFeedResult()); //no ID set yet 51 | $this->object->setFeedId(77); 52 | $ok = $this->object->fetchFeedResult(); 53 | $this->assertNull($ok); 54 | 55 | $check = parseLog(); 56 | $this->assertEquals('Single Mock File set: fetchFeedResult.xml',$check[1]); 57 | $this->assertEquals('Feed Submission ID must be set in order to fetch it!',$check[2]); 58 | $this->assertEquals('Fetched Mock File: mock/fetchFeedResult.xml',$check[3]); 59 | 60 | return $this->object; 61 | } 62 | 63 | /** 64 | * @depends testFetchFeedResult 65 | */ 66 | public function testSaveFeed($o){ 67 | resetLog(); 68 | $this->assertFalse($this->object->saveFeed('mock/saveFeed.xml')); //nothing yet 69 | $o->saveFeed(__DIR__.'/../../mock/saveFeed.xml'); 70 | $check = parseLog(); 71 | $this->assertEquals('Successfully saved feed #77 at '.__DIR__.'/../../mock/saveFeed.xml',$check[0]); 72 | } 73 | 74 | } 75 | 76 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonOrderSetTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonOrderSet('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonOrderSet('testStore', '77', true, null, __DIR__.'/../../test-config.php'); 32 | 33 | $o = $obj->getOptions(); 34 | $this->assertArrayHasKey('AmazonOrderId.Id.1',$o); 35 | $this->assertEquals('77', $o['AmazonOrderId.Id.1']); 36 | } 37 | 38 | public function testSetOrderId(){ 39 | $this->assertNull($this->object->setOrderIds(array('123','456'))); 40 | $o = $this->object->getOptions(); 41 | $this->assertArrayHasKey('AmazonOrderId.Id.1',$o); 42 | $this->assertEquals('123',$o['AmazonOrderId.Id.1']); 43 | $this->assertArrayHasKey('AmazonOrderId.Id.2',$o); 44 | $this->assertEquals('456',$o['AmazonOrderId.Id.2']); 45 | $this->assertNull($this->object->setOrderIds('123456')); 46 | $o2 = $this->object->getOptions(); 47 | $this->assertArrayHasKey('AmazonOrderId.Id.1',$o2); 48 | $this->assertEquals('123456',$o2['AmazonOrderId.Id.1']); 49 | $this->assertArrayNotHasKey('AmazonOrderId.Id.2',$o2); 50 | $this->assertFalse($this->object->setOrderIds(array())); //won't work for this 51 | $this->assertFalse($this->object->setOrderIds(77)); //won't work for this 52 | $this->assertFalse($this->object->setOrderIds(null)); //won't work for other things 53 | } 54 | 55 | public function testFetchOrders(){ 56 | resetLog(); 57 | $this->object->setMock(true,'fetchOrder.xml'); 58 | 59 | $this->assertFalse($this->object->fetchOrders()); //no order IDs set yet 60 | 61 | $this->object->setOrderIds('058-1233752-8214740'); 62 | $this->assertNull($this->object->fetchOrders()); //now it is good 63 | 64 | $o = $this->object->getOptions(); 65 | $this->assertEquals('GetOrder',$o['Action']); 66 | 67 | $check = parseLog(); 68 | $this->assertEquals('Single Mock File set: fetchOrder.xml',$check[1]); 69 | $this->assertEquals('Order IDs must be set in order to fetch them!',$check[2]); 70 | $this->assertEquals('Fetched Mock File: mock/fetchOrder.xml',$check[3]); 71 | 72 | $get = $this->object->getOrders(); 73 | $this->assertInternalType('array',$get); 74 | 75 | return $this->object; 76 | 77 | } 78 | 79 | /** 80 | * @depends testFetchOrders 81 | */ 82 | public function testGetOrders($o){ 83 | $get = $o->getOrders(); 84 | $this->assertInternalType('array',$get); 85 | $this->assertInternalType('object',$get[0]); 86 | 87 | $this->assertFalse($this->object->getOrders()); //not fetched yet for this object 88 | } 89 | 90 | public function testFetchItems(){ 91 | $this->object->setMock(true,array('fetchOrder.xml','fetchOrderItems.xml')); 92 | $this->object->setOrderIds('058-1233752-8214740'); 93 | $this->object->fetchOrders(); 94 | resetLog(); 95 | $get = $this->object->fetchItems(); 96 | 97 | $this->assertInternalType('array',$get); 98 | $this->assertEquals(1,count($get)); 99 | $this->assertInternalType('object',$get[0]); 100 | 101 | $getOne = $this->object->fetchItems('string', 0); //$token will be set to false 102 | $this->assertInternalType('object',$getOne); 103 | 104 | $o = new AmazonOrderList('testStore', true, null, __DIR__.'/../../test-config.php'); 105 | $this->assertFalse($o->fetchItems()); //not fetched yet for this object 106 | } 107 | 108 | } 109 | 110 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonPackageTrackerTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonPackageTracker('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonPackageTracker('testStore', '77', true, null, __DIR__.'/../../test-config.php'); 32 | 33 | $o = $obj->getOptions(); 34 | $this->assertArrayHasKey('PackageNumber',$o); 35 | $this->assertEquals('77', $o['PackageNumber']); 36 | } 37 | 38 | public function testSetPackageNumber(){ 39 | $this->assertNull($this->object->setPackageNumber(777)); 40 | $o = $this->object->getOptions(); 41 | $this->assertArrayHasKey('PackageNumber',$o); 42 | $this->assertEquals(777,$o['PackageNumber']); 43 | $this->assertNull($this->object->setPackageNumber('777')); //works for number strings 44 | $this->assertFalse($this->object->setPackageNumber('five')); //but not other strings 45 | $this->assertFalse($this->object->setPackageNumber(null)); //won't work for other things 46 | } 47 | 48 | public function testFetchTrackingDetails(){ 49 | resetLog(); 50 | $this->object->setMock(true,'fetchTrackingDetails.xml'); 51 | 52 | $this->assertFalse($this->object->fetchTrackingDetails()); //no package ID set yet 53 | 54 | $this->object->setPackageNumber('777'); 55 | $ok = $this->object->fetchTrackingDetails(); //now it is good 56 | $this->assertNull($ok); 57 | 58 | $o = $this->object->getOptions(); 59 | $this->assertEquals('GetPackageTrackingDetails',$o['Action']); 60 | 61 | $check = parseLog(); 62 | $this->assertEquals('Single Mock File set: fetchTrackingDetails.xml',$check[1]); 63 | $this->assertEquals('Package Number must be set in order to fetch it!',$check[2]); 64 | $this->assertEquals('Fetched Mock File: mock/fetchTrackingDetails.xml',$check[3]); 65 | 66 | return $this->object; 67 | 68 | } 69 | 70 | /** 71 | * @depends testFetchTrackingDetails 72 | */ 73 | public function testGetDetails($o){ 74 | $get = $o->getDetails(); 75 | $this->assertInternalType('array',$get); 76 | 77 | $x = array(); 78 | $x['PackageNumber'] = '42343'; 79 | $x['TrackingNumber'] = '3A18351E0390447173'; 80 | $x['CarrierCode'] = 'UPS'; 81 | $x['CarrierPhoneNumber'] = '206-000-0000'; 82 | $x['CarrierURL'] = 'http://www.ups.com/'; 83 | $x['ShipDate'] = '2012-03-09T10:27:10Z'; 84 | $x['ShipToAddress']['City'] = 'Seattle'; 85 | $x['ShipToAddress']['State'] = 'WA'; 86 | $x['ShipToAddress']['Country'] = 'US'; 87 | $x['CurrentStatus'] = 'DELIVERED'; 88 | $x['SignedForBy'] = 'John'; 89 | $x['EstimatedArrivalDate'] = '2012-03-09T10:00:00Z'; 90 | $x['TrackingEvents'][0]['EventDate'] = '2012-03-09T08:48:53Z'; 91 | $x['TrackingEvents'][0]['EventAddress']['City'] = 'Reno'; 92 | $x['TrackingEvents'][0]['EventAddress']['State'] = 'NV'; 93 | $x['TrackingEvents'][0]['EventAddress']['Country'] = 'US'; 94 | $x['TrackingEvents'][0]['EventCode'] = 'EVENT_202'; 95 | $x['TrackingEvents'][1]['EventDate'] = '2012-03-10T10:27:10Z'; 96 | $x['TrackingEvents'][1]['EventAddress']['City'] = 'Seattle'; 97 | $x['TrackingEvents'][1]['EventAddress']['State'] = 'WA'; 98 | $x['TrackingEvents'][1]['EventAddress']['Country'] = 'US'; 99 | $x['TrackingEvents'][1]['EventCode'] = 'EVENT_301'; 100 | $x['AdditionalLocationInfo'] = 'FRONT_DESK'; 101 | 102 | $this->assertEquals($x,$get); 103 | 104 | $this->assertFalse($this->object->getDetails()); //not fetched yet for this object 105 | } 106 | 107 | } 108 | 109 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonProductSearchTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonProductSearch('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonProductSearch('testStore', 'platinum', true, null, __DIR__.'/../../test-config.php'); 32 | 33 | $o = $obj->getOptions(); 34 | $this->assertArrayHasKey('Query',$o); 35 | $this->assertEquals('platinum', $o['Query']); 36 | } 37 | 38 | public function testSetMarketplace() { 39 | $this->assertNull($this->object->setMarketplace('ATVPDKIKX0DER2')); 40 | $o = $this->object->getOptions(); 41 | $this->assertArrayHasKey('MarketplaceId', $o); 42 | $this->assertEquals('ATVPDKIKX0DER2', $o['MarketplaceId']); 43 | $this->assertFalse($this->object->setMarketplace(77)); //won't work for numbers 44 | $this->assertFalse($this->object->setMarketplace(array())); //won't work for this 45 | $this->assertFalse($this->object->setMarketplace(null)); //won't work for other things 46 | } 47 | 48 | public function testSetQuery(){ 49 | $this->assertFalse($this->object->setQuery(null)); //can't be nothing 50 | $this->assertFalse($this->object->setQuery(5)); //can't be an int 51 | $this->assertNull($this->object->setQuery('platinum')); 52 | $o = $this->object->getOptions(); 53 | $this->assertArrayHasKey('Query',$o); 54 | $this->assertEquals('platinum',$o['Query']); 55 | } 56 | 57 | public function testSetContextId(){ 58 | $this->assertFalse($this->object->setContextId(null)); //can't be nothing 59 | $this->assertFalse($this->object->setContextId(5)); //can't be an int 60 | $this->assertNull($this->object->setContextId('Kitchen')); 61 | $o = $this->object->getOptions(); 62 | $this->assertArrayHasKey('QueryContextId',$o); 63 | $this->assertEquals('Kitchen',$o['QueryContextId']); 64 | } 65 | 66 | public function testSearchProducts(){ 67 | resetLog(); 68 | $this->object->setMock(true,'searchProducts.xml'); 69 | $this->assertFalse($this->object->searchProducts()); //no query yet 70 | $this->object->setQuery('platinum'); 71 | 72 | $this->assertNull($this->object->searchProducts()); 73 | 74 | $o = $this->object->getOptions(); 75 | $this->assertEquals('ListMatchingProducts',$o['Action']); 76 | 77 | $check = parseLog(); 78 | $this->assertEquals('Single Mock File set: searchProducts.xml',$check[1]); 79 | $this->assertEquals('Search Query must be set in order to search for a query!',$check[2]); 80 | $this->assertEquals('Fetched Mock File: mock/searchProducts.xml',$check[3]); 81 | 82 | return $this->object; 83 | } 84 | 85 | /** 86 | * @depends testSearchProducts 87 | */ 88 | public function testGetProduct($o){ 89 | $product = $o->getProduct(0); 90 | $this->assertInternalType('object',$product); 91 | 92 | $list = $o->getProduct(null); 93 | $this->assertInternalType('array',$list); 94 | $this->assertArrayHasKey(0,$list); 95 | $this->assertEquals($product,$list[0]); 96 | 97 | $default = $o->getProduct(); 98 | $this->assertEquals($list,$default); 99 | 100 | $check = $product->getData(); 101 | $this->assertArrayHasKey('Identifiers',$check); 102 | $this->assertArrayHasKey('AttributeSets',$check); 103 | $this->assertArrayHasKey('Relationships',$check); 104 | $this->assertArrayHasKey('SalesRankings',$check); 105 | 106 | $this->assertFalse($this->object->getProduct()); //not fetched yet for this object 107 | } 108 | 109 | } 110 | 111 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonProductTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonProduct('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testProduct(){ 31 | $data = simplexml_load_file(__DIR__.'/../../mock/searchProducts.xml'); 32 | $p = $data->ListMatchingProductsResult->Products->Product; 33 | $obj = new AmazonProduct('testStore', $p, true, null, __DIR__.'/../../test-config.php'); 34 | $o = $obj->getData(); 35 | $this->assertInternalType('array',$o); 36 | $this->assertFalse($this->object->getData()); 37 | 38 | $same = $obj->getProduct(); 39 | $this->assertEquals($o,$same); 40 | } 41 | 42 | } 43 | 44 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonReportTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonReport('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonReport('testStore', '77', true, null, __DIR__.'/../../test-config.php'); 32 | 33 | $o = $obj->getOptions(); 34 | $this->assertArrayHasKey('ReportId',$o); 35 | $this->assertEquals('77', $o['ReportId']); 36 | } 37 | 38 | public function testSetReportId(){ 39 | $this->assertNull($this->object->setReportId(777)); 40 | $o = $this->object->getOptions(); 41 | $this->assertArrayHasKey('ReportId',$o); 42 | $this->assertEquals(777,$o['ReportId']); 43 | $this->assertNull($this->object->setReportId('777')); //works for number strings 44 | $this->assertFalse($this->object->setReportId('five')); //but not other strings 45 | $this->assertFalse($this->object->setReportId(null)); //won't work for other things 46 | } 47 | 48 | public function testFetchReport(){ 49 | resetLog(); 50 | $this->object->setMock(true,'fetchReport.xml'); 51 | 52 | $this->assertFalse($this->object->fetchReport()); //no report ID set yet 53 | 54 | $this->object->setReportId('777'); 55 | $ok = $this->object->fetchReport(); //now it is good 56 | $this->assertNull($ok); 57 | 58 | $o = $this->object->getOptions(); 59 | $this->assertEquals('GetReport',$o['Action']); 60 | 61 | $check = parseLog(); 62 | $this->assertEquals('Single Mock File set: fetchReport.xml',$check[1]); 63 | $this->assertEquals('Report ID must be set in order to fetch it!',$check[2]); 64 | $this->assertEquals('Fetched Mock File: mock/fetchReport.xml',$check[3]); 65 | 66 | return $this->object; 67 | 68 | } 69 | 70 | /** 71 | * @depends testFetchReport 72 | */ 73 | public function testSaveReport($o){ 74 | $path = __DIR__.'/../../mock/saveReport.xml'; 75 | $path2 = __DIR__.'/../../mock/fetchReport.xml'; 76 | $o->saveReport($path); 77 | $check = parseLog(); 78 | $this->assertEquals("Successfully saved report #777 at $path",$check[1]); 79 | $this->assertFileEquals($path2, $path); 80 | $this->assertFalse($this->object->saveReport('here')); //not fetched yet for this object 81 | } 82 | 83 | /** 84 | * @depends testFetchReport 85 | * @param AmazonReport $o 86 | */ 87 | public function testGetRawReport($o) { 88 | $this->assertEquals('This is a report.', $o->getRawReport()); 89 | 90 | $this->assertFalse($this->object->getRawReport()); //not fetched yet for this object 91 | } 92 | 93 | } 94 | 95 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonServiceStatusTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonServiceStatus('testStore', null, true, null, __DIR__.'/../../test-config.php'); 20 | } 21 | 22 | /** 23 | * Tears down the fixture, for example, closes a network connection. 24 | * This method is called after a test is executed. 25 | */ 26 | protected function tearDown() { 27 | 28 | } 29 | 30 | public function testSetUp(){ 31 | $obj = new AmazonServiceStatus('testStore', 'Inbound', true, null, __DIR__.'/../../test-config.php'); 32 | $this->assertTrue($obj->isReady()); 33 | } 34 | 35 | /** 36 | * @return array 37 | */ 38 | public function serviceProvider() { 39 | return array( 40 | array(true, false, 'A boolean is not a service'), 41 | array(null, false, 'Service cannot be null'), 42 | array('Banana', false, 'Banana is not a valid service'), 43 | array('Inbound', true), 44 | array('Inventory', true), 45 | array('Orders', true), 46 | array('Outbound', true), 47 | array('Products', true), 48 | array('Sellers', true), 49 | ); 50 | } 51 | 52 | /** 53 | * @dataProvider serviceProvider 54 | */ 55 | public function testSetService($a, $b, $c = null){ 56 | $this->assertEquals($b, $this->object->setService($a)); 57 | $this->assertEquals($b, $this->object->isReady()); 58 | if ($c){ 59 | $log = parseLog(); 60 | $this->assertEquals($c,$log[1]); 61 | } 62 | $this->assertFalse($this->object->setService('bloop')); 63 | $this->assertEquals($b, $this->object->isReady()); //already set, so no change 64 | } 65 | 66 | public function testFetchServiceStatus(){ 67 | resetLog(); 68 | $this->object->setMock(true,'fetchServiceStatus.xml'); 69 | 70 | $this->assertFalse($this->object->fetchServiceStatus()); //no service set yet 71 | 72 | $this->object->setService('Inbound'); 73 | $this->assertNull($this->object->fetchServiceStatus()); //now it is good 74 | 75 | $o = $this->object->getOptions(); 76 | $this->assertEquals('GetServiceStatus',$o['Action']); 77 | 78 | $check = parseLog(); 79 | $this->assertEquals('Single Mock File set: fetchServiceStatus.xml',$check[1]); 80 | $this->assertEquals('Service must be set in order to retrieve status',$check[2]); 81 | $this->assertEquals('Fetched Mock File: mock/fetchServiceStatus.xml',$check[3]); 82 | 83 | return $this->object; 84 | 85 | } 86 | 87 | /** 88 | * @depends testFetchServiceStatus 89 | */ 90 | public function testgGetStatus($o){ 91 | $get = $o->getStatus(); 92 | $this->assertEquals('GREEN_I',$get); 93 | 94 | $this->assertFalse($this->object->getStatus()); //not fetched yet for this object 95 | } 96 | 97 | /** 98 | * @depends testFetchServiceStatus 99 | */ 100 | public function testgGetTimestamp($o){ 101 | $get = $o->getTimestamp(); 102 | $this->assertEquals('2010-11-01T21:38:09.676Z',$get); 103 | 104 | $this->assertFalse($this->object->getTimestamp()); //not fetched yet for this object 105 | } 106 | 107 | /** 108 | * @depends testFetchServiceStatus 109 | */ 110 | public function testgGetMessageId($o){ 111 | $get = $o->getMessageId(); 112 | $this->assertEquals('173964729I',$get); 113 | 114 | $this->assertFalse($this->object->getMessageId()); //not fetched yet for this object 115 | } 116 | 117 | /** 118 | * @depends testFetchServiceStatus 119 | */ 120 | public function testGetMessageList($o){ 121 | $x = array(); 122 | $x[0] = 'We are experiencing high latency in UK because of heavy traffic.'; 123 | $this->assertEquals($x,$o->getMessageList()); 124 | 125 | $this->assertFalse($this->object->getMessageList()); //not fetched yet for this object 126 | } 127 | 128 | } 129 | 130 | require_once('helperFunctions.php'); -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonSubscriptionDestinationListTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonSubscriptionDestinationList('testStore', true, null, __DIR__.'/../../test-config.php'); 17 | } 18 | 19 | public function testFetchDestinations() { 20 | resetLog(); 21 | $this->object->setMock(true, 'fetchDestinations.xml'); 22 | $this->assertNull($this->object->fetchDestinations()); 23 | $o = $this->object->getOptions(); 24 | $this->assertEquals('ListRegisteredDestinations', $o['Action']); 25 | 26 | $check = parseLog(); 27 | $this->assertEquals('Single Mock File set: fetchDestinations.xml',$check[1]); 28 | $this->assertEquals('Fetched Mock File: mock/fetchDestinations.xml',$check[2]); 29 | 30 | return $this->object; 31 | } 32 | 33 | /** 34 | * @param AmazonSubscriptionDestinationList $o 35 | * @depends testFetchDestinations 36 | */ 37 | public function testGetDeliveryChannel($o) { 38 | $this->assertEquals('SQS', $o->getDeliveryChannel(0)); 39 | $this->assertEquals('SQS2', $o->getDeliveryChannel(1)); 40 | $this->assertEquals($o->getDeliveryChannel(0), $o->getDeliveryChannel()); 41 | //invalid keys 42 | $this->assertFalse($o->getDeliveryChannel(4)); 43 | $this->assertFalse($o->getDeliveryChannel('no')); 44 | //not fetched yet for this object 45 | $this->assertFalse($this->object->getDeliveryChannel()); 46 | } 47 | 48 | /** 49 | * @param AmazonSubscriptionDestinationList $o 50 | * @depends testFetchDestinations 51 | */ 52 | public function testGetAttributes($o) { 53 | $data1 = array( 54 | 'sqsQueueUrl' => 'https://sqs.us-east-1.amazonaws.com/51471EXAMPLE/mws_notifications', 55 | ); 56 | $data2 = array( 57 | 'url' => 'https://sqs.us-west-1.amazonaws.com/51471EXAMPLE/mws_notifications', 58 | 'something' => '5', 59 | ); 60 | $this->assertEquals($data1, $o->getAttributes(0)); 61 | $this->assertEquals($data2, $o->getAttributes(1)); 62 | $this->assertEquals($o->getAttributes(0), $o->getAttributes()); 63 | //invalid keys 64 | $this->assertFalse($o->getAttributes(4)); 65 | $this->assertFalse($o->getAttributes('no')); 66 | //not fetched yet for this object 67 | $this->assertFalse($this->object->getAttributes()); 68 | } 69 | 70 | } 71 | 72 | require_once('helperFunctions.php'); 73 | -------------------------------------------------------------------------------- /test-cases/includes/classes/AmazonSubscriptionListTest.php: -------------------------------------------------------------------------------- 1 | object = new AmazonSubscriptionList('testStore', true, null, __DIR__.'/../../test-config.php'); 17 | } 18 | 19 | public function testFetchSubscriptions() { 20 | resetLog(); 21 | $this->object->setMock(true, 'fetchSubscriptionList.xml'); 22 | $this->assertNull($this->object->fetchSubscriptions()); 23 | $o = $this->object->getOptions(); 24 | $this->assertEquals('ListSubscriptions', $o['Action']); 25 | 26 | $check = parseLog(); 27 | $this->assertEquals('Single Mock File set: fetchSubscriptionList.xml',$check[1]); 28 | $this->assertEquals('Fetched Mock File: mock/fetchSubscriptionList.xml',$check[2]); 29 | 30 | return $this->object; 31 | } 32 | 33 | /** 34 | * @param AmazonSubscriptionList $o 35 | * @depends testFetchSubscriptions 36 | */ 37 | public function testGetList($o) { 38 | $list = $o->getList(); 39 | $this->assertInternalType('array', $list); 40 | $this->assertCount(2, $list); 41 | $this->assertEquals($o->getList(0), $list[0]); 42 | $this->assertEquals($o->getList(1), $list[1]); 43 | $this->assertInternalType('array', $list[0]); 44 | $this->assertInternalType('array', $list[1]); 45 | } 46 | 47 | /** 48 | * @param AmazonSubscriptionList $o 49 | * @depends testFetchSubscriptions 50 | */ 51 | public function testGetNotificationType($o) { 52 | $this->assertEquals('AnyOfferChanged', $o->getNotificationType(0)); 53 | $this->assertEquals('FulfillmentOrderStatus', $o->getNotificationType(1)); 54 | $this->assertEquals($o->getNotificationType(0), $o->getNotificationType()); 55 | //invalid keys 56 | $this->assertFalse($o->getNotificationType(4)); 57 | $this->assertFalse($o->getNotificationType('no')); 58 | //not fetched yet for this object 59 | $this->assertFalse($this->object->getNotificationType()); 60 | } 61 | 62 | /** 63 | * @param AmazonSubscriptionList $o 64 | * @depends testFetchSubscriptions 65 | */ 66 | public function testGetIsEnabled($o) { 67 | $this->assertEquals('true', $o->getIsEnabled(0)); 68 | $this->assertEquals('false', $o->getIsEnabled(1)); 69 | $this->assertEquals($o->getIsEnabled(0), $o->getIsEnabled()); 70 | //invalid keys 71 | $this->assertFalse($o->getIsEnabled(4)); 72 | $this->assertFalse($o->getIsEnabled('no')); 73 | //not fetched yet for this object 74 | $this->assertFalse($this->object->getIsEnabled()); 75 | } 76 | 77 | /** 78 | * @param AmazonSubscriptionList $o 79 | * @depends testFetchSubscriptions 80 | */ 81 | public function testGetDeliveryChannel($o) { 82 | $this->assertEquals('SQS', $o->getDeliveryChannel(0)); 83 | $this->assertEquals('SQS2', $o->getDeliveryChannel(1)); 84 | $this->assertEquals($o->getDeliveryChannel(0), $o->getDeliveryChannel()); 85 | //invalid keys 86 | $this->assertFalse($o->getDeliveryChannel(4)); 87 | $this->assertFalse($o->getDeliveryChannel('no')); 88 | //not fetched yet for this object 89 | $this->assertFalse($this->object->getDeliveryChannel()); 90 | } 91 | 92 | /** 93 | * @param AmazonSubscriptionList $o 94 | * @depends testFetchSubscriptions 95 | */ 96 | public function testGetAttributes($o) { 97 | $data1 = array( 98 | 'sqsQueueUrl' => 'https://sqs.us-east-1.amazonaws.com/51471EXAMPLE/mws_notifications', 99 | ); 100 | $data2 = array( 101 | 'url' => 'https://sqs.us-west-1.amazonaws.com/51471EXAMPLE/mws_notifications', 102 | 'something' => '7', 103 | ); 104 | $this->assertEquals($data1, $o->getAttributes(0)); 105 | $this->assertEquals($data2, $o->getAttributes(1)); 106 | $this->assertEquals($o->getAttributes(0), $o->getAttributes()); 107 | //invalid keys 108 | $this->assertFalse($o->getAttributes(4)); 109 | $this->assertFalse($o->getAttributes('no')); 110 | //not fetched yet for this object 111 | $this->assertFalse($this->object->getAttributes()); 112 | } 113 | 114 | } 115 | 116 | require_once('helperFunctions.php'); 117 | -------------------------------------------------------------------------------- /test-cases/mock/acknowledgeReports.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 841997483 7 | _GET_MERCHANT_LISTINGS_DATA_ 8 | 2234038326 9 | 2009-01-06T03:48:36+00:00 10 | true 11 | 2009-02-20T02:10:41+00:00 12 | 13 | 14 | 15 | 42a578a7-ed92-486b-ac67-5de7464fcdfa 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/cancelFeeds.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 2291326430 7 | _POST_PRODUCT_DATA_ 8 | 2009-02-20T02:10:35+00:00 9 | _CANCELLED_ 10 | 11 | 12 | 13 | 18e78983-bbf9-43aa-a661-ae7696cb49d4 14 | 15 | -------------------------------------------------------------------------------- /test-cases/mock/cancelRequests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 5 | 6 | 2291326454 7 | _GET_MERCHANT_LISTINGS_DATA_ 8 | 2009-01-21T02:10:39+00:00 9 | 2009-02-13T02:10:39+00:00 10 | false 11 | 2009-02-20T02:10:39+00:00 12 | _CANCELLED_ 13 | 14 | 15 | 16 | a720f9d6-83e9-4684-bc35-065b41ed5ca4 17 | 18 | -------------------------------------------------------------------------------- /test-cases/mock/confirmPreorder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2015-12-28 5 | 2015-12-30 6 | 7 | 8 | 4a1a7029-462b-4a27-a04c-4cbe0fd107e3 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-cases/mock/confirmTransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CONFIRMING 6 | 7 | 8 | 9 | 27bdc3df-d41b-4cf5-a96d-047815797bbf 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-cases/mock/countFeeds.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 463 5 | 6 | 7 | 21e482a8-15c7-4da3-91a4-424995ed0756 8 | 9 | -------------------------------------------------------------------------------- /test-cases/mock/createMerchantShipment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | USD 7 | 10.00 8 | 9 | 10 | Seattle 11 | 12 | US 13 | 98121-2778 14 | Jane Smith 15 | 321 Main St 16 | WA 17 | 18 | 19 | 903-1713775-3598252 20 | 21 | 10 22 | oz 23 | 24 | 39 | 40 | FEDEX 41 | 42 | false 43 | 44 | USD 45 | 10.00 46 | 47 | DELIVERY_CONFIRMATION 48 | 49 | FEDEX_PTP_PRIORITY_OVERNIGHT 50 | 51 | USD 52 | 27.81 53 | 54 | 2015-09-24T10:30:00Z 55 | 2015-09-24T10:30:00Z 56 | HDDUKqtQVFetpNRMgVERYLONGefNLP8t5RyLXa4ZOjc= 57 | 2015-09-23T20:10:56.829Z 58 | FedEx Priority Overnight® 59 | 60 | 61 | 5 62 | 5 63 | inches 64 | 5 65 | 66 | 2015-09-23T20:11:12.908Z 67 | 68 | Seattle 69 | 2061234567 70 | US 71 | 98121 72 | John Doe 73 | 1234 Westlake Ave 74 | WA 75 | 76 | 6f77095e-9f75-47eb-aaab-a42d5428fa1a 77 | 78 | 79 | 40525960574974 80 | 1 81 | 82 | 83 | Purchased 84 | 794657111237 85 | 86 | 87 | 88 | adb18f0d-2076-48d4-99ef-fb4b9f892a4e 89 | 90 | 91 | -------------------------------------------------------------------------------- /test-cases/mock/createShipment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FBA63JX44 5 | 6 | 7 | 4a1a7029-462b-4a27-a04c-4cbe0fd107e3 8 | 9 | -------------------------------------------------------------------------------- /test-cases/mock/createSubscription.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | c9bb2e77-2425-4e1a-9c85-36d00EXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/deleteSubscription.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2d7db8a1-8974-4541-9c9b-f882dEXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/deregisterDestination.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | f662dae6-bde0-4e75-a53b-741abEXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/estimateTransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ESTIMATING 6 | 7 | 8 | 9 | 827e673d-8399-492f-bfb6-4fdf26d146ba 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-cases/mock/fetchBillOfLading.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | YmlsbCBvZiBsYWRpbmc= 6 | dGhpcyBpcyBhIGNoZWNrc3Vt 7 | 8 | 9 | 10 | 985a3fa9-3ce2-46fb-a1c7-321439269d2b 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-cases/mock/fetchCategories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15709131 6 | Tire Gauges 7 | 8 | 15709111 9 | Tire & Wheel Tools 10 | 11 | 15706941 12 | Tools & Equipment 13 | 14 | 15690151 15 | Categories 16 | 17 | 15684181 18 | Categories 19 | 20 | 21 | 22 | 23 | 24 | 25 | 15709141 26 | Tire Repair Tools 27 | 28 | 15709111 29 | Tire & Wheel Tools 30 | 31 | 15706941 32 | Tools & Equipment 33 | 34 | 15690151 35 | Categories 36 | 37 | 15684181 38 | Categories 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | a515a798-a277-4831-9cf4-b4e04016fc87 47 | 48 | -------------------------------------------------------------------------------- /test-cases/mock/fetchCompetitivePricing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ATVPDKIKX0DER 8 | 1933890517 9 | 10 | 11 | ATVPDKIKX0DER 12 | A2NKEXAMPLEF53 13 | SKU1357 14 | 15 | 16 | 17 | 18 | 19 | 1 20 | 21 | 22 | USD 23 | 38.93 24 | 25 | 26 | USD 27 | 38.93 28 | 29 | 30 | USD 31 | 0.00 32 | 33 | 34 | 35 | 36 | 2 37 | 38 | 39 | USD 40 | 41.68 41 | 42 | 43 | USD 44 | 37.69 45 | 46 | 47 | USD 48 | 3.99 49 | 50 | 51 | 52 | 53 | 54 | 173 55 | 82 56 | 91 57 | 58 | 59 | USD 60 | 25.11 61 | 62 | 63 | 64 | 65 | book_display_on_website 66 | 161 67 | 68 | 69 | 271578011 70 | 1 71 | 72 | 73 | 355562011 74 | 2 75 | 76 | 77 | 173516 78 | 12 79 | 80 | 81 | 82 | 83 | 84 | 3f51ceaf-2dab-49bd-b982-193015fae1a8 85 | 86 | -------------------------------------------------------------------------------- /test-cases/mock/fetchDestinations.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | SQS 7 | 8 | 9 | https://sqs.us-east-1.amazonaws.com/51471EXAMPLE/mws_notifications 10 | sqsQueueUrl 11 | 12 | 13 | 14 | 15 | SQS2 16 | 17 | 18 | https://sqs.us-west-1.amazonaws.com/51471EXAMPLE/mws_notifications 19 | url 20 | 21 | 22 | 5 23 | something 24 | 25 | 26 | 27 | 28 | 29 | 30 | 8329b2a1-4249-43fa-b2d3-da563EXAMPLE 31 | 32 | 33 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFeedResult.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 1.02 5 | T_M_GOOD_83835495 6 |
7 | ProcessingReport 8 | 9 | 1 10 | 11 | 4319742521 12 | 13 | 14 |
-------------------------------------------------------------------------------- /test-cases/mock/fetchFeedSubmissions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | 1234567890 7 | _MOCK_FEED_ 8 | 2012-12-12T12:12:12+00:00 9 | _SUBMITTED_ 10 | false 11 | 12 | 2012-12-15T12:12:12+00:00 13 | 2012-12-16T12:12:12+00:00 14 | 15 | 16 | 17 | 1105b931-6f1c-4480-8e97-f3b467840a9e 18 | 19 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFeedSubmissionsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2YgYW55IGNhcm5hbCBwbGVhc3VyZS4= 5 | true 6 | 7 | 9876543210 8 | _MOCK_FEED_ 9 | 2012-12-12T12:12:12+00:00 10 | _SUBMITTED_ 11 | false 12 | 13 | 14 | 15 | 16 | 1105b931-6f1c-4480-8e97-f3b467840a9e 17 | 18 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFeedSubmissionsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | 1234567890 7 | _MOCK_FEED_ 8 | 2012-12-12T12:12:12+00:00 9 | _SUBMITTED_ 10 | false 11 | 12 | 13 | 14 | 15 | 1105b931-6f1c-4480-8e97-f3b467840a9e 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFinancialGroups.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22YgYW55IGNhcm5hbCBwbGVhEXAMPLE 7 | Closed 8 | Successful 9 | 10 | USD 11 | 19.00 12 | 13 | 14 | USD 15 | 19.50 16 | 17 | 2014-09-09T01:30:00.000-06:00 18 | 128311029381HSADJEXAMPLE 19 | 1212 20 | 21 | USD 22 | 0.00 23 | 24 | 2014-09-01T01:30:00.000-06:00 25 | 2014-09-09T01:30:00.000-06:00 26 | 27 | 28 | 22Y99995IGNhcm5hbANOTHEREXAMPLE 29 | Closed2 30 | Successful2 31 | 32 | USD 33 | 42.00 34 | 35 | 36 | USD 37 | 42.50 38 | 39 | 2014-10-09T01:30:00.000-06:00 40 | 128999929381HADJEXAMPLE2 41 | 1313 42 | 43 | USD 44 | 20.00 45 | 46 | 2014-10-01T01:30:00.000-06:00 47 | 2014-10-09T01:30:00.000-06:00 48 | 49 | 50 | 51 | 52 | 1105b931-6f1c-4480-8e97-f3b46EXAMPLE 53 | 54 | 55 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFinancialGroupsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | 22YgYW55IGNhcm5hbCBwbGVhEXAMPLE 8 | Closed 9 | Successful 10 | 11 | USD 12 | 19.00 13 | 14 | 15 | USD 16 | 19.00 17 | 18 | 2014-09-09T01:30:00.000-06:00 19 | 128311029381HSADJEXAMPLE 20 | 1212 21 | 22 | USD 23 | 0.00 24 | 25 | 2014-09-01T01:30:00.000-06:00 26 | 2014-09-09T01:30:00.000-06:00 27 | 28 | 29 | 30 | 31 | 1105b931-6f1c-4480-8e97-f3b46EXAMPLE 32 | 33 | 34 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFinancialGroupsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22Y99995IGNhcm5hbANOTHEREXAMPLE 7 | Closed2 8 | Successful2 9 | 10 | USD 11 | 42.00 12 | 13 | 14 | USD 15 | 42.00 16 | 17 | 2014-05-09T01:30:00.000-06:00 18 | 128311029381HSADJEXAMPLE 19 | 1212 20 | 21 | USD 22 | 20.00 23 | 24 | 2014-05-01T01:30:00.000-06:00 25 | 2014-05-09T01:30:00.000-06:00 26 | 27 | 28 | 29 | 30 | 1105b931-6f1c-4480-8e97-f3b46EXAMPLE 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFulfillmentOrderList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Standard 7 | 2011-01-28T23:48:48Z 8 | 9 | o8c2EXAMPLsfr7o@marketplace.amazon.com 10 | 11 | extern_id_1154539615776 12 | ATVPDKIKX0DER 13 | 14 | 98101 15 | 321-098-7654 16 | Jane Adams 17 | US 18 | 123 Oak St. 19 | WA 20 | Seattle 21 | Apt. 321 22 | Suite 16 23 | 9 24 | 25 | Ship 26 | FillOrKill 27 | 2011-02-05T17:26:56Z 28 | FillOrKill 29 | 2011-02-06T17:26:56Z 30 | test_displayable_id 31 | Sample comment text. 32 | PROCESSING 33 | 34 | 35 | Standard 36 | 2011-03-05T18:48:53Z 37 | external-order-ebaytime1154557376014 38 | 39 | 98104 40 | 123-123-4567 41 | George Jones 42 | US 43 | 2345 5th Ave 44 | WA 45 | Seattle 46 | 47 | Consumer 48 | 2011-03-11T18:48:52Z 49 | FillAllAvailable 50 | 2011-03-03T18:48:53Z 51 | test-order-test-1159210132812 52 | Sample order comment. 53 | PLANNING 54 | 55 | false 56 | 57 | 5.00 58 | USD 59 | 60 | 61 | 1.00 62 | USD 63 | 64 | 65 | 2.50 66 | USD 67 | 68 | 69 | 0.50 70 | USD 71 | 72 | 73 | 74 | 75 | 76 | 77 | 7e9c8d48-8e79-11df-929f-87c80302f8f6 78 | 79 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFulfillmentOrderListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | Standard 8 | 2011-01-28T23:48:48Z 9 | 10 | o8c2EXAMPLsfr7o@marketplace.amazon.com 11 | 12 | extern_id_1154539615776 13 | 14 | 98101 15 | 321-098-7654 16 | Jane Adams 17 | US 18 | 123 Oak St. 19 | WA 20 | Seattle 21 | Apt. 321 22 | 23 | Consumer 24 | 2011-02-05T17:26:56Z 25 | FillOrKill 26 | 2011-02-06T17:26:56Z 27 | test_displayable_id 28 | Sample comment text. 29 | PROCESSING 30 | 31 | 32 | 33 | 34 | 7e9c8d48-8e79-11df-929f-87c80302f8f6 35 | 36 | -------------------------------------------------------------------------------- /test-cases/mock/fetchFulfillmentOrderListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Standard 7 | 2011-03-05T18:48:53Z 8 | external-order-ebaytime1154557376014 9 | 10 | 98104 11 | 123-123-4567 12 | George Jones 13 | US 14 | 2345 5th Ave 15 | WA 16 | Seattle 17 | 18 | Consumer 19 | 2011-03-11T18:48:52Z 20 | FillAllAvailable 21 | 2011-03-03T18:48:53Z 22 | test-order-test-1159210132812 23 | Sample order comment. 24 | PLANNING 25 | 26 | 27 | 28 | 29 | 7e9c8d48-8e79-11df-929f-87c80302f8f6 30 | 31 | -------------------------------------------------------------------------------- /test-cases/mock/fetchInventoryList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SampleSKU1 7 | B00000K3CQ 8 | 20 9 | X0000000FM 10 | NewItem 11 | 12 | 13 | 14 | Immediately 15 | 16 | 17 | Immediately 18 | 19 | 1 20 | Normal 21 | 22 | 23 | 24 | DateTime 25 | today 26 | 27 | 28 | DateTime 29 | tomorrow 30 | 31 | 1 32 | Normal 33 | 34 | 35 | 15 36 | 37 | Immediately 38 | 39 | 40 | 41 | SampleSKU2 42 | B00004RWQR 43 | 0 44 | X00008FZR1 45 | UsedLikeNew 46 | 47 | 0 48 | 49 | 50 | 51 | 52 | e8698ffa-8e59-11df-9acb-230ae7a8b736 53 | 54 | -------------------------------------------------------------------------------- /test-cases/mock/fetchInventoryListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | SampleSKU1 8 | B00000K3CQ 9 | 20 10 | X0000000FM 11 | NewItem 12 | 13 | 14 | 15 | Immediately 16 | 17 | 18 | Immediately 19 | 20 | 1 21 | Normal 22 | 23 | 24 | 25 | DateTime 26 | today 27 | 28 | 29 | DateTime 30 | tomorrow 31 | 32 | 1 33 | Normal 34 | 35 | 36 | 15 37 | 38 | DateTime 39 | tomorrow 40 | 41 | 42 | 43 | 44 | 45 | e8698ffa-8e59-11df-9acb-230ae7a8b736 46 | 47 | -------------------------------------------------------------------------------- /test-cases/mock/fetchInventoryListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SampleSKU2 7 | B00004RWQR 8 | 0 9 | X00008FZR1 10 | UsedLikeNew 11 | 12 | 0 13 | 14 | 15 | 16 | 17 | e8698ffa-8e59-11df-9acb-230ae7a8b736 18 | 19 | -------------------------------------------------------------------------------- /test-cases/mock/fetchLowestOffer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 | ATVPDKIKX0DER 9 | B000O15GSG 10 | 11 | 12 | ATVPDKIKX0DER 13 | A2NKEXAMPLEF53 14 | SKU2468 15 | 16 | 17 | 18 | 19 | 20 | New 21 | New 22 | Merchant 23 | True 24 | 25 | 0-2 days 26 | 27 | 95-97% 28 | 29 | 2 30 | 3779 31 | 32 | 33 | USD 34 | 34.00 35 | 36 | 37 | USD 38 | 34.00 39 | 40 | 41 | USD 42 | 0.00 43 | 44 | 45 | False 46 | 47 | 48 | 49 | New 50 | New 51 | Amazon 52 | True 53 | 54 | 0-2 days 55 | 56 | 98-100% 57 | 58 | 3 59 | 481366 60 | 61 | 62 | USD 63 | 34.66 64 | 65 | 66 | USD 67 | 34.66 68 | 69 | 70 | USD 71 | 0.00 72 | 73 | 74 | False 75 | 76 | 77 | 78 | New 79 | New 80 | Merchant 81 | Unknown 82 | 83 | 0-2 days 84 | 85 | 98-100% 86 | 87 | 1 88 | 35924 89 | 90 | 91 | USD 92 | 43.88 93 | 94 | 95 | USD 96 | 36.07 97 | 98 | 99 | USD 100 | 7.81 101 | 102 | 103 | False 104 | 105 | 106 | 107 | 108 | 109 | ae5e46ea-978d-4b49-a7cf-3fe71236d946 110 | 111 | -------------------------------------------------------------------------------- /test-cases/mock/fetchLowestPricedOffers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ATVPDKIKX0DER 6 | Test Product 7 | New 8 | 2015-07-19T23:15:11.859Z 9 | 10 | 11 | 1 12 | 13 | 1 14 | 15 | 16 | 17 | 18 | USD 19 | 32.99 20 | 21 | 22 | USD 23 | 32.99 24 | 25 | 26 | USD 27 | 0.00 28 | 29 | 30 | 31 | 32 | 33 | 34 | USD 35 | 32.99 36 | 37 | 38 | USD 39 | 32.99 40 | 41 | 42 | USD 43 | 0.00 44 | 45 | 46 | 47 | 48 | USD 49 | 58.34 50 | 51 | 52 | USD 53 | 32.99 54 | 55 | 56 | 1 57 | 58 | 59 | 60 | 61 | false 62 | new 63 | 64 | 100.0 65 | 1 66 | 67 | 68 | 69 | USD 70 | 32.99 71 | 72 | 73 | USD 74 | 0.00 75 | 76 | true 77 | true 78 | true 79 | 80 | 81 | 82 | 83 | fd2e6c6d-0b6d-499b-9fea-074175c0547a 84 | 85 | 86 | -------------------------------------------------------------------------------- /test-cases/mock/fetchMerchantShipment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | USD 7 | 10.00 8 | 9 | 10 | Seattle 11 | 12 | US 13 | 98121-2778 14 | Jane Smith 15 | 321 Main St 16 | WA 17 | 18 | 19 | 903-1713775-3598252 20 | 21 | 10 22 | oz 23 | 24 | 36 | 37 | FEDEX 38 | 39 | false 40 | 41 | USD 42 | 10.00 43 | 44 | DELIVERY_CONFIRMATION 45 | 46 | 47 | FEDEX_PTP_PRIORITY_OVERNIGHT 48 | 49 | 50 | USD 51 | 27.81 52 | 53 | 2015-09-24T10:30:00Z 54 | 55 | 2015-09-24T10:30:00Z 56 | 57 | HDDUKqtQVFetpBZAqx5c1yaCZ9vuFfND0kudyw3lLWCa 58 | 3mN2+zUOsRCAZS2oYt0ey6fXKdOAucmYVXR9LAkU9O9eys9V3FJCgvQ+vAqm4bSAzHVH04vD8oLy 59 | oUPKqxa8Otbek97Z85LFUSsfcUf8frNRMEfNLP8t5RyLXa4ZOjc= 60 | 2015-09-23T20:10:56.829Z 61 | FedEx Priority Overnight® 62 | 63 | 64 | 5 65 | 5 66 | inches 67 | 5 68 | 69 | 2015-09-23T20:11:12.908Z 70 | 71 | Seattle 72 | 2061234567 73 | US 74 | 98121 75 | John Doe 76 | 1234 Westlake Ave 77 | WA 78 | 79 | 6f77095e-9f75-47eb-aaab-a42d5428fa1a 80 | 81 | 82 | 40525960574974 83 | 1 84 | 85 | 86 | Purchased 87 | 794657111237 88 | 89 | 90 | 91 | adb18f0d-2076-48d4-99ef-fb4b9f892a4e 92 | 93 | 94 | -------------------------------------------------------------------------------- /test-cases/mock/fetchMyPrice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ATVPDKIKX0DER 7 | B00080QHMM 8 | 9 | 10 | 11 | 12 | 13 | 14 | USD 15 | 22.50 16 | 17 | 18 | USD 19 | 4.57 20 | 21 | 22 | USD 23 | 27.07 24 | 25 | 26 | 27 | USD 28 | 22.50 29 | 30 | Merchant 31 | New 32 | New 33 | A3F1LGRLCQDI4D 34 | 12345 35 | 36 | 37 | 38 | 39 | 40 | 5dff0a4a-4462-462c-9cdf-7f07f9c2492b 41 | 42 | -------------------------------------------------------------------------------- /test-cases/mock/fetchOrderItems.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 058-1233752-8214740 5 | 6 | 7 | BT0093TELA 8 | 68828574383266 9 | CBA_OTF_1 10 | Example item name 11 | 1 12 | 1 13 | 14 | http://www.amazon.com 15 | 16 | 17 | 5 18 | 19 | USD 20 | 2.50 21 | 22 | 23 | BusinessPrice 24 | 25 | USD 26 | 25.99 27 | 28 | 29 | USD 30 | 1.26 31 | 32 | 33 | USD 34 | 10.00 35 | 36 | 37 | USD 38 | 1.00 39 | 40 | 41 | USD 42 | 1.00 43 | 44 | 45 | USD 46 | 1.00 47 | 48 | 49 | USD 50 | 1.00 51 | 52 | 53 | USD 54 | 1.00 55 | 56 | 57 | USD 58 | 1.00 59 | 60 | For you! 61 | 62 | USD 63 | 1.99 64 | 65 | Classic 66 | 67 | 68 | BCTU1104UEFB 69 | 79039765272157 70 | CBA_OTF_5 71 | Example item name 72 | 2 73 | 74 | USD 75 | 17.95 76 | 77 | 78 | FREESHIP 79 | 80 | 81 | 82 | 83 | 84 | 88faca76-b600-46d2-b53c-0c8c4533e43a 85 | 86 | -------------------------------------------------------------------------------- /test-cases/mock/fetchOrderItemsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 058-1233752-8214740 6 | 7 | 8 | BT0093TELA 9 | 68828574383266 10 | CBA_OTF_1 11 | Example item name 12 | 1 13 | 1 14 | 15 | USD 16 | 25.99 17 | 18 | 19 | USD 20 | 1.26 21 | 22 | 23 | USD 24 | 10.00 25 | 26 | 27 | USD 28 | 1.00 29 | 30 | For you! 31 | 32 | USD 33 | 1.99 34 | 35 | Classic 36 | 37 | 38 | 39 | 40 | 88faca76-b600-46d2-b53c-0c8c4533e43a 41 | 42 | -------------------------------------------------------------------------------- /test-cases/mock/fetchOrderItemsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 058-1233752-8214740 5 | 6 | 7 | BCTU1104UEFB 8 | 79039765272157 9 | CBA_OTF_5 10 | Example item name 11 | 2 12 | 13 | USD 14 | 17.95 15 | 16 | 17 | FREESHIP 18 | 19 | 20 | 21 | 22 | 23 | 88faca76-b600-46d2-b53c-0c8c4533e43a 24 | 25 | -------------------------------------------------------------------------------- /test-cases/mock/fetchOrderListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 2010-10-05T18%3A12%3A20.687Z 6 | 7 | 8 | 058-1233752-8214740 9 | 2010-10-05T00%3A06%3A07.000Z 10 | 2010-10-05T12%3A43%3A16.000Z 11 | Unshipped 12 | Checkout by Amazon 13 | Std DE Dom 14 | MFN 15 | 16 | USD 17 | 4.78 18 | 19 | 20 | John Smith 21 | 2700 First Avenue 22 | Seattle 23 | WA 24 | 98102 25 | US 26 | 27 | 0 28 | 1 29 | 30 | 31 | 32 | USD 33 | 101.01 34 | 35 | COD 36 | 37 | 38 | 39 | USD 40 | 10.00 41 | 42 | GC 43 | 44 | 45 | COD 46 | ATVPDKIKX0DER 47 | Amazon User 48 | 5vlh04mgfmjh9h5@marketplace.amazon.com 49 | Standard 50 | 51 | 52 | Standard 53 | 54 | 10.87 55 | USD 56 | 57 | MFN 58 | 1x3v628skdi34u2@marketplace.amazon.com 59 | Shipped 60 | Example Name 61 | Std US Dom 62 | 2012-10-11T15:53:37Z 63 | 2012-10-11T14:15:55Z 64 | 0 65 | ATVPDKIKX0DER 66 | Amazon.com 67 | 68 | 111 222 1234 69 | 48823 70 | Example Name 71 | US 72 | WA 73 | 1234 Ridge Rd 74 | Seattle 75 | 76 | 1 77 | 123-1234567-4567890 78 | Other 79 | 80 | 81 | 82 | 83 | 88faca76-b600-46d2-b53c-0c8c4533e43a 84 | 85 | -------------------------------------------------------------------------------- /test-cases/mock/fetchOrderListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2010-10-05T18%3A12%3A20.687Z 5 | 6 | 7 | Standard 8 | MFN 9 | Pending 10 | Std US Dom 11 | 2012-10-12T20:34:00Z 12 | 2012-10-12T20:33:16Z 13 | 0 14 | ATVPDKIKX0DER 15 | Amazon.com 16 | 0 17 | 123-9876543-6543212 18 | Other 19 | 20 | 21 | 22 | 23 | 88faca76-b600-46d2-b53c-0c8c4533e43a 24 | 25 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPackageLabels.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | cGFja2FnZSB0ZXN0 6 | dGhpcyBpcyBhIGNoZWNrc3Vt 7 | 8 | 9 | 10 | 985a3fa9-3ce2-46fb-a1c7-321439269d2b 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPalletLabels.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | cGFsbGV0IHRlc3Q= 6 | dGhpcyBpcyBhIGNoZWNrc3Vt 7 | 8 | 9 | 10 | 985a3fa9-3ce2-46fb-a1c7-321439269d2b 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-cases/mock/fetchParticipationList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ATVPDKIKX0DER 7 | A135KKEKJAIBJ56 8 | No 9 | 10 | 11 | 12 | 13 | ATVPDKIKX0DER 14 | Amazon.com 15 | US 16 | USD 17 | en_US 18 | www.amazon.com 19 | 20 | 21 | 22 | 23 | efeab958-74e2-45d4-9018-2323084413b5 24 | 25 | -------------------------------------------------------------------------------- /test-cases/mock/fetchParticipationListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | ATVPDKIKX0DER 8 | A135KKEKJAIBJ56 9 | No 10 | 11 | 12 | 13 | 14 | ATVPDKIKX0DER 15 | Amazon.com 16 | US 17 | USD 18 | en_US 19 | www.amazon.com 20 | 21 | 22 | 23 | 24 | efeab958-74e2-45d4-9018-2323084413b5 25 | 26 | -------------------------------------------------------------------------------- /test-cases/mock/fetchParticipationListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ATVPDKIKX0DER 7 | A135KKEKWF1JAI6 8 | No 9 | 10 | 11 | 12 | 13 | ATVPDKIKX0DER 14 | Amazon.com 15 | US 16 | USD 17 | en_US 18 | www.amazon.com 19 | 20 | 21 | 22 | 23 | efeab958-74e2-45d4-9018-2323084413b5 24 | 25 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPlan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 85043 8 | Amazon.com 9 | US 10 | AZ 11 | 4750 West Mohave St 12 | Phoenix 13 | 14 | FBA63J76R 15 | 16 | 17 | Football2415 18 | 3 19 | B000FADVPQ 20 | 21 | 22 | TeeballBall3251 23 | 5 24 | B0011VECH4 25 | 26 | 27 | PHX6 28 | NO_LABEL 29 | 30 | 31 | 32 | 85043 33 | Amazon.com 34 | US 35 | AZ 36 | 6835 West Buckeye Road 37 | Phoenix 38 | 39 | FBA63HGKJ 40 | 41 | 42 | DVD2468 43 | 2 44 | X000579L45 45 | 46 | 47 | PHX3 48 | SELLER_LABEL 49 | 50 | 51 | 52 | 53 | 171a23ca-12f9-4599-bbdf-47bc5701d955 54 | 55 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPreorderInfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 2015-12-27 6 | 2015-12-31 7 | true 8 | 9 | 10 | 4a1a7029-462b-4a27-a04c-4cbe0fd107e3 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPrepInstructionsAsin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | B00005N5PF 7 | RequiresFNSKULabel 8 | SeePrepInstructionsList 9 | 10 | Polybagging 11 | Taping 12 | 13 | 14 | 15 | 16 | 17 | B0INVALIDF 18 | InvalidASIN 19 | 20 | 21 | B0INVALIDF2 22 | InvalidASIN2 23 | 24 | 25 | 26 | 27 | 171a23ca-12f9-4599-bbdf-47bc5701d955 28 | 29 | 30 | -------------------------------------------------------------------------------- /test-cases/mock/fetchPrepInstructionsSku.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ca_001 7 | B00EXAMPLE 8 | RequiresFNSKULabel 9 | SeePrepInstructionsList 10 | 11 | Polybagging 12 | Taping 13 | Labeling 14 | 15 | 16 | 17 | Polybagging 18 | 19 | USD 20 | 0.2 21 | 22 | 23 | 24 | Taping 25 | 26 | USD 27 | 0.2 28 | 29 | 30 | 31 | Labeling 32 | 33 | USD 34 | 0.2 35 | 36 | 37 | 38 | 39 | 40 | ca_002 41 | B00EXAMPLE2 42 | CanUseOriginalBarcode 43 | ConsultHelpDocuments 44 | 45 | Taping 46 | 47 | 48 | 49 | Taping 50 | 51 | USD 52 | 0.4 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | ca_007 61 | DoesNotExist 62 | 63 | 64 | ca_009 65 | DoesNotExist2 66 | 67 | 68 | 69 | 70 | 171a23ca-12f9-4599-bbdf-47bc5701d955 71 | 72 | 73 | -------------------------------------------------------------------------------- /test-cases/mock/fetchRecommendationTimes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2013-03-04T02:10:32+00:00 4 | 2013-03-03T03:11:34+00:00 5 | 2013-03-05T03:11:33+00:00 6 | 2013-03-02T03:11:32+00:00 7 | 2013-03-02T04:31:32+00:00 8 | 2013-03-03T17:45:11+00:00 9 | 10 | 88faca76-b600-46d2-b53c-0c8c4EXAMPLE 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-cases/mock/fetchRecommendationsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | token! 5 | 6 | 7 | Description is important. 8 | Nike II 9 | product_description 10 | DEFECT 11 | 123-token1a 12 | Missing Description and Bullets 13 | 14 | BT00I3X7F0 15 | ldr-core 16 | 17 | 18 | 19 | Brand name is important. 20 | Nike II 21 | brand 22 | DEFECT 23 | 123-token1b 24 | Missing Brand Name 25 | 26 | BT00I3X7F0 27 | ldr-core 28 | 29 | 30 | 31 | 32 | 33 | d0305dfc-b83e-11e2-8aeb-c93b3EXAMPLE 34 | 35 | 36 | -------------------------------------------------------------------------------- /test-cases/mock/fetchRecommendationsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | PopularOutOfStock 7 | 186020 8 | Factory-Reconditioned 9 | Home Improvement 10 | 2013-03-05T00:00:00Z 11 | 0 12 | 13 | B008YFV5P2 14 | EZ 15 | 885911242721 16 | 17 | DEWALT 18 | 0.0 19 | 20 | 245.5 21 | USD 22 | 23 | 123-token2a 24 | 2 25 | 26 | 27 | PopularOutOfStock 28 | 56439 29 | DEWALT Ratcheting Screwdriv 30 | Home Improvement 31 | 2013-03-05T00:00:00Z 32 | 0 33 | 34 | B006TVOX98 35 | ER 36 | 076174692334 37 | 38 | DEWALT 39 | 0.0 40 | 41 | 15.99 42 | USD 43 | 44 | 123-token2b 45 | 2 46 | 47 | 48 | 49 | 50 | b106b175-85ca-11e2-8826-c31d9EXAMPLE 51 | 52 | 53 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReport.xml: -------------------------------------------------------------------------------- 1 | This is a report. -------------------------------------------------------------------------------- /test-cases/mock/fetchReportCount.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 166 5 | 6 | 7 | a497aadb-5ea1-49bf-aa14-dabe914465e3 8 | 9 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | 898899473 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2278662938 10 | 2009-02-10T09:22:33+00:00 11 | false 12 | 2009-02-11T09:22:33+00:00 13 | 14 | 15 | 16 | fbf677c1-dcee-4110-bc88-2ba3702e331b 17 | 18 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | true 6 | 7 | 898899473 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2278662938 10 | 2009-02-10T09:22:33+00:00 11 | false 12 | 13 | 14 | 15 | fbf677c1-dcee-4110-bc88-2ba3702e331b 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | 898899474 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2278662938 10 | 2009-02-10T09:22:33+00:00 11 | false 12 | 13 | 14 | 15 | fbf677c1-dcee-4110-bc88-2ba3702e331b 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportRequestCount.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1276 4 | 5 | 6 | 7e155027-3741-4422-95a7-1de12703c13e 7 | 8 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportRequestList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | 2291326454 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2011-01-21T02:10:39+00:00 10 | 2011-02-13T02:10:39+00:00 11 | false 12 | 2011-02-17T23:44:09+00:00 13 | _DONE_ 14 | 3538561173 15 | 2011-02-17T23:44:43+00:00 16 | 2011-02-17T23:44:48+00:00 17 | 18 | 19 | 20 | 732480cb-84a8-4c15-9084-a46bd9a0889b 21 | 22 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportRequestListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2YgYW55IPQhcm5hbCBwbGVhc3VyZS4= 5 | true 6 | 7 | 2291326454 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2011-01-21T02:10:39+00:00 10 | 2011-02-13T02:10:39+00:00 11 | false 12 | 2011-02-17T23:44:09+00:00 13 | _DONE_ 14 | 3538561173 15 | 2011-02-17T23:44:43+00:00 16 | 2011-02-17T23:44:48+00:00 17 | 18 | 19 | 20 | 732480cb-84a8-4c15-9084-a46bd9a0889b 21 | 22 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportRequestListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | 2291326454 8 | _GET_MERCHANT_LISTINGS_DATA_ 9 | 2009-01-21T02:10:39+00:00 10 | 2009-02-13T02:10:39+00:00 11 | false 12 | 2009-02-20T02:10:39+00:00 13 | _SUBMITTED_ 14 | 15 | 16 | 17 | 732480cb-84a8-4c15-9084-a46bd9a0889b 18 | 19 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportScheduleCount.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 5 | 6 | 7 | 21e482a8-15c7-4da3-91a4-424995ed0756 8 | 9 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportScheduleList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | _GET_ORDERS_DATA_ 8 | _30_DAYS_ 9 | 2009-02-20T02:10:42+00:00 10 | 11 | 12 | 13 | c0464157-b74f-4e52-bd1a-4ebf4bc7e5aa 14 | 15 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportScheduleListToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | true 6 | 7 | _GET_ORDERS_DATA_ 8 | _30_DAYS_ 9 | 2009-02-20T02:10:42+00:00 10 | 11 | 12 | 13 | c0464157-b74f-4e52-bd1a-4ebf4bc7e5aa 14 | 15 | -------------------------------------------------------------------------------- /test-cases/mock/fetchReportScheduleListToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | none 5 | false 6 | 7 | _GET_ORDERS_DATA_ 8 | _30_DAYS_ 9 | 2009-02-21T02:10:42+00:00 10 | 11 | 12 | 13 | c0464157-b74f-4e52-bd1a-4ebf4bc7e5aa 14 | 15 | -------------------------------------------------------------------------------- /test-cases/mock/fetchServiceStatus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GREEN_I 5 | 2010-11-01T21:38:09.676Z 6 | 173964729I 7 | 8 | 9 | en_US 10 | We are experiencing high latency in UK because of heavy traffic. 11 | 12 | 13 | 14 | 15 | d80c6c7b-f7c7-4fa7-bdd7-854711cb3bcc 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipmentItems.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SSF85DGIZZ3OF1 7 | SampleSKU1 8 | 3 9 | 0 10 | 0 11 | B000FADVPQ 12 | 13 | 14 | BubbleWrapping 15 | AMAZON 16 | 17 | 18 | Taping 19 | SELLER 20 | 21 | 22 | 2012-12-21 23 | 24 | 25 | SSF85DGIZZ3OF1 26 | SampleSKU2 27 | 10 28 | 0 29 | 0 30 | B0011VECH4 31 | 32 | 33 | 34 | 35 | ffce8932-8e69-11df-8af1-5bf2881764d8 36 | 37 | 38 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipmentItemsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | SSF85DGIZZ3OF1 8 | SampleSKU1 9 | 3 10 | 0 11 | 0 12 | B000FADVPQ 13 | 14 | 15 | 16 | 17 | ffce8932-8e69-11df-8af1-5bf2881764d8 18 | 19 | 20 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipmentItemsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SampleSKU202 7 | 48 8 | 24 9 | 0 10 | B0011VECH4 11 | 12 | 13 | 14 | 15 | ffce8932-8e69-11df-8af1-5bf2881764d8 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipments.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 98109 8 | John Smith 9 | US 10 | WA 11 | 2345 3rd Ave 12 | Seattle 13 | 14 | false 15 | FBA44JV8R 16 | CLOSED 17 | FBA (11/8/10 5:34 PM) 18 | PHX3 19 | AMAZON_LABEL 20 | 2012-12-21 21 | 22 | 23 | 24 | 98109 25 | John Smith 26 | US 27 | WA 28 | Box 29 | Apt 401 30 | 2345 3rd Ave 31 | Seattle 32 | 33 | true 34 | FBA4X8YLS 35 | WORKING 36 | FBA (1/19/11 4:08 PM) 37 | PHX6 38 | AMAZON_LABEL 39 | 40 | 41 | 42 | 43 | 06097697-41c3-4120-b952-bce655ae1690 44 | 45 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipmentsToken.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Token! 5 | 6 | 7 | 8 | 98109 9 | John Smith 10 | US 11 | WA 12 | Apt 401 13 | 2345 3rd Ave 14 | Seattle 15 | 16 | false 17 | FBA44JV8R 18 | CLOSED 19 | FBA (11/8/10 5:34 PM) 20 | PHX3 21 | AMAZON_LABEL 22 | 23 | 24 | 25 | 26 | 06097697-41c3-4120-b952-bce655ae1690 27 | 28 | -------------------------------------------------------------------------------- /test-cases/mock/fetchShipmentsToken2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 98101 8 | Joan Doe 9 | US 10 | WA 11 | Apt 2 12 | 876 Elm St 13 | Seattle 14 | 15 | true 16 | SSF85DGIZZ7PL3 17 | SHIPPED 18 | CreateShipmentTestCase 19 | RNO2 20 | SELLER_LABEL 21 | 22 | 23 | 24 | 25 | 8547a35c-8e70-11df-8af1-5bf2881764d8 26 | 27 | -------------------------------------------------------------------------------- /test-cases/mock/fetchSubscription.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AnyOfferChanged 5 | true 6 | 7 | SQS 8 | 9 | 10 | https://sqs.us-east-1.amazonaws.com/51471EXAMPLE/mws_notifications 11 | sqsQueueUrl 12 | 13 | 14 | 15 | 16 | 17 | 18 | 4012b1ae-3f31-4627-83c3-1757aEXAMPLE 19 | 20 | 21 | -------------------------------------------------------------------------------- /test-cases/mock/fetchSubscriptionList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AnyOfferChanged 6 | true 7 | 8 | SQS 9 | 10 | 11 | https://sqs.us-east-1.amazonaws.com/51471EXAMPLE/mws_notifications 12 | sqsQueueUrl 13 | 14 | 15 | 16 | 17 | 18 | FulfillmentOrderStatus 19 | false 20 | 21 | SQS2 22 | 23 | 24 | https://sqs.us-west-1.amazonaws.com/51471EXAMPLE/mws_notifications 25 | url 26 | 27 | 28 | 7 29 | something 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | bf251d30-1409-4855-93cc-52943EXAMPLE 38 | 39 | 40 | -------------------------------------------------------------------------------- /test-cases/mock/fetchTrackingDetails.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 42343 5 | 3A18351E0390447173 6 | UPS 7 | 206-000-0000 8 | http://www.ups.com/ 9 | 2012-03-09T10:27:10Z 10 | 11 | Seattle 12 | WA 13 | US 14 | 15 | DELIVERED 16 | John 17 | 2012-03-09T10:00:00Z 18 | 19 | 20 | 2012-03-09T08:48:53Z 21 | 22 | Reno 23 | NV 24 | US 25 | 26 | EVENT_202 27 | 28 | 29 | 2012-03-10T10:27:10Z 30 | 31 | Seattle 32 | WA 33 | US 34 | 35 | EVENT_301 36 | 37 | 38 | FRONT_DESK 39 | 40 | 41 | 5e5e5694-8e76-11df-929f-87c80302f8f6 42 | 43 | -------------------------------------------------------------------------------- /test-cases/mock/fetchTransportContentLtlNonPartnered.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ABF FREIGHT SYSTEM INC 8 | 123456 9 | 10 | 11 | 12 | WORKING 13 | 14 | 15 | LTL 16 | FBAQFGQZ 17 | A170GGEKWF1J56 18 | false 19 | 20 | 21 | 22 | 23 | 5e2ca38a-9f96-4ef7-ae82-3afb8dc224d4 24 | 25 | 26 | -------------------------------------------------------------------------------- /test-cases/mock/fetchTransportContentLtlPartnered.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Bob 9 | 555-1234 10 | test@email.com 11 | 555-6789 12 | 13 | 12 14 | 55 15 | 2012-12-21 16 | 17 | 18 | true 19 | 20 | 40 21 | 30 22 | 25 23 | inches 24 | 25 | 26 | 500 27 | pounds 28 | 29 | 30 | 31 | false 32 | 33 | 15 34 | 12 35 | 10 36 | inches 37 | 38 | 39 | 40 | 41 | 2000 42 | pounds 43 | 44 | 45 | 200 46 | USD 47 | 48 | 49 | 40 50 | USD 51 | 52 | 2013-08-10T00:25:05.650Z 53 | 2013-08-15T00:25:05.650Z 54 | 50 55 | 123ABC789 56 | false 57 | ABF FREIGHT SYSTEM INC 58 | 59 | 60 | 61 | ERROR_ON_ESTIMATING 62 | 63 | 64 | LTL 65 | FBAQFCQC 66 | A123KKEKWF1J56 67 | true 68 | 69 | 70 | 71 | 72 | 5e2ca38a-9f96-4ef7-ae82-3afb8dc224d4 73 | 74 | 75 | -------------------------------------------------------------------------------- /test-cases/mock/fetchTransportContentSpNonPartnered.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 1Z6Y68W00342402864 10 | UNITED_PARCEL_SERVICE_INC 11 | SHIPPED 12 | 13 | 14 | 15 | 16 | 17 | ESTIMATED 18 | 19 | 20 | SP 21 | FBAQ6QBP 22 | A995KKEKWF1J56 23 | false 24 | 25 | 26 | 27 | 28 | 89a965c3-1af7-41e3-9152-44cf0affd34b 29 | 30 | 31 | -------------------------------------------------------------------------------- /test-cases/mock/fetchTransportContentSpPartnered.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | USD 10 | 38.22 11 | 12 | 2013-08-09T00:25:05.650Z 13 | 2013-08-10T00:25:05.650Z 14 | 15 | 16 | 17 | 18 | pounds 19 | 5.5 20 | 21 | 1Z8V016A0377769652 22 | UNITED_PARCEL_SERVICE_INC 23 | 24 | inches 25 | 15 26 | 14 27 | 13 28 | 29 | SHIPPED 30 | 31 | 32 | 33 | pounds 34 | 5.6 35 | 36 | 1Z8V016A0371928464 37 | UNITED_PARCEL_SERVICE_INC 38 | SHIPPED 39 | 40 | 41 | 42 | pounds 43 | 5.7 44 | 45 | 1Z8V016A0360430477 46 | UNITED_PARCEL_SERVICE_INC 47 | SHIPPED 48 | 49 | 50 | 51 | 52 | 53 | CONFIRMED 54 | 55 | 56 | SP 57 | FBAQF72K 58 | A135KKEKWF1J56 59 | true 60 | 61 | 62 | 63 | 64 | 9708430a-4010-478e-aafc-053979329978 65 | 66 | 67 | -------------------------------------------------------------------------------- /test-cases/mock/manageReportSchedule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | _GET_ORDERS_DATA_ 7 | _30_DAYS_ 8 | 2009-02-20T02:10:42+00:00 9 | 10 | 11 | 12 | 7ee1bc50-5a13-4db1-afd7-1386e481984e 13 | 14 | 15 | -------------------------------------------------------------------------------- /test-cases/mock/pingDestination.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | f662dae6-bde0-4e75-a53b-741abEXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/registerDestination.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | b120e610-9cf0-48d7-b615-ca869EXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/requestReport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 2291326454 6 | _GET_MERCHANT_LISTINGS_DATA_ 7 | 2009-01-21T02:10:39+00:00 8 | 2009-02-13T02:10:39+00:00 9 | false 10 | 2009-02-20T02:10:39+00:00 11 | _SUBMITTED_ 12 | 13 | 14 | 15 | 88faca76-b600-46d2-b53c-0c8c4533e43a 16 | 17 | -------------------------------------------------------------------------------- /test-cases/mock/saveFeed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 1.02 5 | T_M_GOOD_83835495 6 |
7 | ProcessingReport 8 | 9 | 1 10 | 11 | 4319742521 12 | 13 | 14 |
-------------------------------------------------------------------------------- /test-cases/mock/saveReport.xml: -------------------------------------------------------------------------------- 1 | This is a report. -------------------------------------------------------------------------------- /test-cases/mock/sendTransportContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WORKING 6 | 7 | 8 | 9 | 616f4f53-973e-4bb3-8dd3-0b46978a45c5 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-cases/mock/submitFeed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1234567890 6 | _MOCK_FEED_ 7 | 2012-12-12T12:12:12+00:00 8 | _SUBMITTED_ 9 | 10 | 11 | 12 | 75424a38-f333-4105-98f0-2aa9592d665c 13 | 14 | -------------------------------------------------------------------------------- /test-cases/mock/updateShipment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FBA63J76R 5 | 6 | 7 | 4a1a7029-462b-4a27-a04c-4cbe0fd107e3 8 | 9 | -------------------------------------------------------------------------------- /test-cases/mock/updateSubscription.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3263ad38-d15b-4043-b48c-cbfa2EXAMPLE 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-cases/mock/voidTransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VOIDING 6 | 7 | 8 | 9 | c5818219-de93-4b3e-8f9b-b172fbacd010 10 | 11 | 12 | -------------------------------------------------------------------------------- /test-cases/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | includes/classes/ 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test-cases/test-config.php: -------------------------------------------------------------------------------- 1 | 31 | --------------------------------------------------------------------------------