repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.resetOrderStatusFilter | public function resetOrderStatusFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#OrderStatus#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetOrderStatusFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#OrderStatus#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetOrderStatusFilter",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#OrderStatus#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
... | Removes order status options.
Use this in case you change your mind and want to remove the Order Status
parameters you previously set. | [
"Removes",
"order",
"status",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L171-L177 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setMarketplaceFilter | public function setMarketplaceFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetMarketplaceFilter();
$this->options['MarketplaceId.Id.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetMarketplaceFilter();
$i = 1;
foreach($list as $x){
$this->options['MarketplaceId.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setMarketplaceFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetMarketplaceFilter();
$this->options['MarketplaceId.Id.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetMarketplaceFilter();
$i = 1;
foreach($list as $x){
$this->options['MarketplaceId.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setMarketplaceFilter",
"(",
"$",
"list",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"list",
")",
")",
"{",
"//if single string, set as filter",
"$",
"this",
"->",
"resetMarketplaceFilter",
"(",
")",
";",
"$",
"this",
"->",
"options",
... | Sets the marketplace(s). (Optional)
This method sets the list of Marketplaces to be sent in the next request.
Setting this parameter tells Amazon to only return Orders made in marketplaces that match
those in the list. If this parameter is not set, Amazon will return
Orders belonging to the current store's default marketplace.
@param array|string $list <p>A list of Marketplace IDs, or a single Marketplace ID.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"marketplace",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L189-L205 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.resetMarketplaceFilter | public function resetMarketplaceFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#MarketplaceId#",$op)){
unset($this->options[$op]);
}
}
//reset to store's default marketplace
if (file_exists($this->config)){
include($this->config);
} else {
throw new Exception('Config file does not exist!');
}
if(isset($store[$this->storeName]) && array_key_exists('marketplaceId', $store[$this->storeName])){
$this->options['MarketplaceId.Id.1'] = $store[$this->storeName]['marketplaceId'];
} else {
$this->log("Marketplace ID is missing",'Urgent');
}
} | php | public function resetMarketplaceFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#MarketplaceId#",$op)){
unset($this->options[$op]);
}
}
//reset to store's default marketplace
if (file_exists($this->config)){
include($this->config);
} else {
throw new Exception('Config file does not exist!');
}
if(isset($store[$this->storeName]) && array_key_exists('marketplaceId', $store[$this->storeName])){
$this->options['MarketplaceId.Id.1'] = $store[$this->storeName]['marketplaceId'];
} else {
$this->log("Marketplace ID is missing",'Urgent');
}
} | [
"public",
"function",
"resetMarketplaceFilter",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#MarketplaceId#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",... | Removes marketplace ID options and sets the current store's marketplace instead.
Use this in case you change your mind and want to remove the Marketplace ID
parameters you previously set.
@throws Exception if config file is missing | [
"Removes",
"marketplace",
"ID",
"options",
"and",
"sets",
"the",
"current",
"store",
"s",
"marketplace",
"instead",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L214-L232 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setFulfillmentChannelFilter | public function setFulfillmentChannelFilter($filter){
if ($filter == 'AFN' || $filter == 'MFN'){
$this->options['FulfillmentChannel.Channel.1'] = $filter;
} else if (is_null($filter)){
unset($this->options['FulfillmentChannel.Channel.1']);
} else {
return false;
}
} | php | public function setFulfillmentChannelFilter($filter){
if ($filter == 'AFN' || $filter == 'MFN'){
$this->options['FulfillmentChannel.Channel.1'] = $filter;
} else if (is_null($filter)){
unset($this->options['FulfillmentChannel.Channel.1']);
} else {
return false;
}
} | [
"public",
"function",
"setFulfillmentChannelFilter",
"(",
"$",
"filter",
")",
"{",
"if",
"(",
"$",
"filter",
"==",
"'AFN'",
"||",
"$",
"filter",
"==",
"'MFN'",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'FulfillmentChannel.Channel.1'",
"]",
"=",
"$",
"f... | Sets (or resets) the Fulfillment Channel Filter
@param string $filter <p>'AFN' or 'MFN' or NULL</p>
@return boolean <b>FALSE</b> on failure | [
"Sets",
"(",
"or",
"resets",
")",
"the",
"Fulfillment",
"Channel",
"Filter"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L239-L247 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setPaymentMethodFilter | public function setPaymentMethodFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetPaymentMethodFilter();
$this->options['PaymentMethod.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetPaymentMethodFilter();
$i = 1;
foreach($list as $x){
$this->options['PaymentMethod.'.$i++] = $x;
}
} else {
return false;
}
} | php | public function setPaymentMethodFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetPaymentMethodFilter();
$this->options['PaymentMethod.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetPaymentMethodFilter();
$i = 1;
foreach($list as $x){
$this->options['PaymentMethod.'.$i++] = $x;
}
} else {
return false;
}
} | [
"public",
"function",
"setPaymentMethodFilter",
"(",
"$",
"list",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"list",
")",
")",
"{",
"//if single string, set as filter",
"$",
"this",
"->",
"resetPaymentMethodFilter",
"(",
")",
";",
"$",
"this",
"->",
"options"... | Sets the payment method(s). (Optional)
This method sets the list of Payment Methods to be sent in the next request.
Setting this parameter tells Amazon to only return Orders with payment methods
that match those in the list. If this parameter is not set, Amazon will return
Orders with any payment method.
@param array|string $list <p>A list of Payment Methods, or a single method string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"payment",
"method",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L259-L274 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.resetPaymentMethodFilter | public function resetPaymentMethodFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#PaymentMethod#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetPaymentMethodFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#PaymentMethod#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetPaymentMethodFilter",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#PaymentMethod#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(... | Removes payment method options.
Use this in case you change your mind and want to remove the Payment Method
parameters you previously set. | [
"Removes",
"payment",
"method",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L282-L288 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setEmailFilter | public function setEmailFilter($filter){
if (is_string($filter)){
$this->options['BuyerEmail'] = $filter;
//these fields must be disabled
unset($this->options['SellerOrderId']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFilter();
$this->setFulfillmentChannelFilter(null);
unset($this->options['LastUpdatedAfter']);
unset($this->options['LastUpdatedBefore']);
} else if (is_null($filter)){
unset($this->options['BuyerEmail']);
} else {
return false;
}
} | php | public function setEmailFilter($filter){
if (is_string($filter)){
$this->options['BuyerEmail'] = $filter;
//these fields must be disabled
unset($this->options['SellerOrderId']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFilter();
$this->setFulfillmentChannelFilter(null);
unset($this->options['LastUpdatedAfter']);
unset($this->options['LastUpdatedBefore']);
} else if (is_null($filter)){
unset($this->options['BuyerEmail']);
} else {
return false;
}
} | [
"public",
"function",
"setEmailFilter",
"(",
"$",
"filter",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"filter",
")",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'BuyerEmail'",
"]",
"=",
"$",
"filter",
";",
"//these fields must be disabled",
"unset",
"(... | Sets (or resets) the email address. (Optional)
This method sets the email address to be sent in the next request.
Setting this parameter tells Amazon to only return Orders with email addresses
that match the email address given. If this parameter is set, the following options
will be removed: SellerOrderId, OrderStatus, PaymentMethod, FulfillmentChannel, LastUpdatedAfter, LastUpdatedBefore.
@param string $filter <p>A single email address string. Set to NULL to remove the option.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"(",
"or",
"resets",
")",
"the",
"email",
"address",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L300-L315 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setMaxResultsPerPage | public function setMaxResultsPerPage($num){
if (is_int($num) && $num <= 100 && $num >= 1){
$this->options['MaxResultsPerPage'] = $num;
} else {
return false;
}
} | php | public function setMaxResultsPerPage($num){
if (is_int($num) && $num <= 100 && $num >= 1){
$this->options['MaxResultsPerPage'] = $num;
} else {
return false;
}
} | [
"public",
"function",
"setMaxResultsPerPage",
"(",
"$",
"num",
")",
"{",
"if",
"(",
"is_int",
"(",
"$",
"num",
")",
"&&",
"$",
"num",
"<=",
"100",
"&&",
"$",
"num",
">=",
"1",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'MaxResultsPerPage'",
"]",
... | Sets the maximum response per page count. (Optional)
This method sets the maximum number of Feed Submissions for Amazon to return per page.
If this parameter is not set, Amazon will send 100 at a time.
@param array|string $num <p>Positive integer from 1 to 100.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"maximum",
"response",
"per",
"page",
"count",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L352-L358 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.setTfmShipmentStatusFilter | public function setTfmShipmentStatusFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetTfmShipmentStatusFilter();
$this->options['TFMShipmentStatus.Status.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetTfmShipmentStatusFilter();
$i = 1;
foreach($list as $x){
$this->options['TFMShipmentStatus.Status.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setTfmShipmentStatusFilter($list){
if (is_string($list)){
//if single string, set as filter
$this->resetTfmShipmentStatusFilter();
$this->options['TFMShipmentStatus.Status.1'] = $list;
} else if (is_array($list)){
//if array of strings, set all filters
$this->resetTfmShipmentStatusFilter();
$i = 1;
foreach($list as $x){
$this->options['TFMShipmentStatus.Status.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setTfmShipmentStatusFilter",
"(",
"$",
"list",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"list",
")",
")",
"{",
"//if single string, set as filter",
"$",
"this",
"->",
"resetTfmShipmentStatusFilter",
"(",
")",
";",
"$",
"this",
"->",
"... | Sets the TFM shipment status(es). (Optional)
This method sets the list of TFM Shipment Statuses to be sent in the next request.
Setting this parameter tells Amazon to only return TFM Orders with statuses that match
those in the list. If this parameter is not set, Amazon will return
Orders of any status, including non-TFM orders.
@param array|string $list <p>A list of TFM Shipment Statuses, or a single status string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"TFM",
"shipment",
"status",
"(",
"es",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L370-L386 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.resetTfmShipmentStatusFilter | public function resetTfmShipmentStatusFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#TFMShipmentStatus#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetTfmShipmentStatusFilter(){
foreach($this->options as $op=>$junk){
if(preg_match("#TFMShipmentStatus#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetTfmShipmentStatusFilter",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#TFMShipmentStatus#\"",
",",
"$",
"op",
")",
")",
"{",
"unse... | Removes order status options.
Use this in case you change your mind and want to remove the TFM Shipment Status
parameters you previously set. | [
"Removes",
"order",
"status",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L394-L400 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.prepareToken | protected function prepareToken(){
if ($this->tokenFlag && $this->tokenUseFlag){
$this->options['Action'] = 'ListOrdersByNextToken';
//When using tokens, only the NextToken option should be used
unset($this->options['SellerOrderId']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFilter();
$this->setFulfillmentChannelFilter(null);
$this->setSellerOrderIdFilter(null);
$this->setEmailFilter(null);
unset($this->options['LastUpdatedAfter']);
unset($this->options['LastUpdatedBefore']);
unset($this->options['CreatedAfter']);
unset($this->options['CreatedBefore']);
unset($this->options['MaxResultsPerPage']);
} else {
$this->options['Action'] = 'ListOrders';
unset($this->options['NextToken']);
$this->index = 0;
$this->orderList = array();
}
} | php | protected function prepareToken(){
if ($this->tokenFlag && $this->tokenUseFlag){
$this->options['Action'] = 'ListOrdersByNextToken';
//When using tokens, only the NextToken option should be used
unset($this->options['SellerOrderId']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFilter();
$this->setFulfillmentChannelFilter(null);
$this->setSellerOrderIdFilter(null);
$this->setEmailFilter(null);
unset($this->options['LastUpdatedAfter']);
unset($this->options['LastUpdatedBefore']);
unset($this->options['CreatedAfter']);
unset($this->options['CreatedBefore']);
unset($this->options['MaxResultsPerPage']);
} else {
$this->options['Action'] = 'ListOrders';
unset($this->options['NextToken']);
$this->index = 0;
$this->orderList = array();
}
} | [
"protected",
"function",
"prepareToken",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"tokenFlag",
"&&",
"$",
"this",
"->",
"tokenUseFlag",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'Action'",
"]",
"=",
"'ListOrdersByNextToken'",
";",
"//When using token... | Sets up options for using tokens.
This changes key options for switching between simply fetching a list and
fetching the rest of a list using a token. Please note: because the
operation for using tokens does not use any other parameters, all other
parameters will be removed. | [
"Sets",
"up",
"options",
"for",
"using",
"tokens",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L456-L479 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderList.php | AmazonOrderList.fetchItems | public function fetchItems($token = false, $i = null){
if (!isset($this->orderList)){
return false;
}
if (!is_bool($token)){
$token = false;
}
if (is_int($i)) {
return $this->orderList[$i]->fetchItems($token);
} else {
$a = array();
foreach($this->orderList as $x){
$a[] = $x->fetchItems($token);
}
return $a;
}
} | php | public function fetchItems($token = false, $i = null){
if (!isset($this->orderList)){
return false;
}
if (!is_bool($token)){
$token = false;
}
if (is_int($i)) {
return $this->orderList[$i]->fetchItems($token);
} else {
$a = array();
foreach($this->orderList as $x){
$a[] = $x->fetchItems($token);
}
return $a;
}
} | [
"public",
"function",
"fetchItems",
"(",
"$",
"token",
"=",
"false",
",",
"$",
"i",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"orderList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"is_bool",
"(",
... | Returns array of item lists or a single item list.
If <i>$i</i> is not specified, the method will fetch the items for every
order in the list. Please note that for lists with a high number of orders,
this operation could take a while due to throttling. (Two seconds per order when throttled.)
@param boolean $token [optional] <p>whether or not to automatically use tokens when fetching items.</p>
@param int $i [optional] <p>List index to retrieve the value from. Defaults to null.</p>
@return array|AmazonOrderItemList <i>AmazonOrderItemList</i> object or array of objects, or <b>FALSE</b> if non-numeric index | [
"Returns",
"array",
"of",
"item",
"lists",
"or",
"a",
"single",
"item",
"list",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderList.php#L515-L531 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderSet.php | AmazonOrderSet.setOrderIds | public function setOrderIds($o){
if($o){
$this->resetOrderIds();
if(is_string($o)){
$this->options['AmazonOrderId.Id.1'] = $o;
} else if(is_array($o)){
$k = 1;
foreach ($o as $id){
$this->options['AmazonOrderId.Id.'.$k] = $id;
$k++;
}
} else {
return false;
}
} else {
return false;
}
} | php | public function setOrderIds($o){
if($o){
$this->resetOrderIds();
if(is_string($o)){
$this->options['AmazonOrderId.Id.1'] = $o;
} else if(is_array($o)){
$k = 1;
foreach ($o as $id){
$this->options['AmazonOrderId.Id.'.$k] = $id;
$k++;
}
} else {
return false;
}
} else {
return false;
}
} | [
"public",
"function",
"setOrderIds",
"(",
"$",
"o",
")",
"{",
"if",
"(",
"$",
"o",
")",
"{",
"$",
"this",
"->",
"resetOrderIds",
"(",
")",
";",
"if",
"(",
"is_string",
"(",
"$",
"o",
")",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'AmazonOrder... | Sets the order ID(s). (Optional)
This method sets the list of Order IDs to be sent in the next request.
If you wish to retrieve information for only one order, please use the
<i>AmazonOrder</i> class instead.
@param array|string $o <p>A list of Amazon Order IDs, or a single ID string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"order",
"ID",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderSet.php#L76-L93 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderSet.php | AmazonOrderSet.resetOrderIds | protected function resetOrderIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#AmazonOrderId.Id.#",$op)){
unset($this->options[$op]);
}
}
} | php | protected function resetOrderIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#AmazonOrderId.Id.#",$op)){
unset($this->options[$op]);
}
}
} | [
"protected",
"function",
"resetOrderIds",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#AmazonOrderId.Id.#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
... | Resets the order ID options.
Since order ID is a required parameter, these options should not be removed
without replacing them, so this method is not public. | [
"Resets",
"the",
"order",
"ID",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderSet.php#L101-L107 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonOrderSet.php | AmazonOrderSet.parseXML | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->Orders->children() as $key => $order){
if ($key != 'Order'){
break;
}
$this->orderList[$this->index] = new AmazonOrder($this->storeName,null,$order,$this->mockMode,$this->mockFiles,$this->config);
$this->orderList[$this->index]->mockIndex = $this->mockIndex;
$this->index++;
}
} | php | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->Orders->children() as $key => $order){
if ($key != 'Order'){
break;
}
$this->orderList[$this->index] = new AmazonOrder($this->storeName,null,$order,$this->mockMode,$this->mockFiles,$this->config);
$this->orderList[$this->index]->mockIndex = $this->mockIndex;
$this->index++;
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"Orders",
"->",
"children",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"order",
")",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonOrderSet.php#L151-L163 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonProductList.php | AmazonProductList.setProductIds | public function setProductIds($s){
if (is_string($s)){
$this->resetProductIds();
$this->options['IdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetProductIds();
$i = 1;
foreach ($s as $x){
$this->options['IdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setProductIds($s){
if (is_string($s)){
$this->resetProductIds();
$this->options['IdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetProductIds();
$i = 1;
foreach ($s as $x){
$this->options['IdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setProductIds",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetProductIds",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'IdList.Id.1'",
"]",
"=",
"$",
"s",
";",
... | Sets the request ID(s). (Required)
This method sets the list of product IDs to be sent in the next request.
@param array|string $s <p>A list of product IDs, or a single type string. (max: 5)</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"request",
"ID",
"(",
"s",
")",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonProductList.php#L75-L89 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonProductList.php | AmazonProductList.resetProductIds | protected function resetProductIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#IdList#",$op)){
unset($this->options[$op]);
}
}
} | php | protected function resetProductIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#IdList#",$op)){
unset($this->options[$op]);
}
}
} | [
"protected",
"function",
"resetProductIds",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#IdList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
"$",
"... | Resets the product ID options.
Since product ID is a required parameter, these options should not be removed
without replacing them, so this method is not public. | [
"Resets",
"the",
"product",
"ID",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonProductList.php#L97-L103 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.parseXML | protected function parseXML($xml){
$this->list = array();
if (!$xml){
return false;
}
foreach ($xml->SubscriptionList->children() as $x) {
$temp = array();
$temp['NotificationType'] = (string)$x->NotificationType;
$temp['IsEnabled'] = (string)$x->IsEnabled;
$temp['Destination']['DeliveryChannel'] = (string)$x->Destination->DeliveryChannel;
foreach ($x->Destination->AttributeList->children() as $z) {
$temp['Destination']['AttributeList'][(string)$z->Key] = (string)$z->Value;
}
$this->list[] = $temp;
}
} | php | protected function parseXML($xml){
$this->list = array();
if (!$xml){
return false;
}
foreach ($xml->SubscriptionList->children() as $x) {
$temp = array();
$temp['NotificationType'] = (string)$x->NotificationType;
$temp['IsEnabled'] = (string)$x->IsEnabled;
$temp['Destination']['DeliveryChannel'] = (string)$x->Destination->DeliveryChannel;
foreach ($x->Destination->AttributeList->children() as $z) {
$temp['Destination']['AttributeList'][(string)$z->Key] = (string)$z->Value;
}
$this->list[] = $temp;
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"$",
"this",
"->",
"list",
"=",
"array",
"(",
")",
";",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"SubscriptionList",
"->",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L74-L90 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.getList | public function getList($i = null){
if (isset($this->list)){
if (is_numeric($i)){
return $this->list[$i];
} else {
return $this->list;
}
} else {
return false;
}
} | php | public function getList($i = null){
if (isset($this->list)){
if (is_numeric($i)){
return $this->list[$i];
} else {
return $this->list;
}
} else {
return false;
}
} | [
"public",
"function",
"getList",
"(",
"$",
"i",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
")",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i... | Returns the specified subscription, or all of them.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from.
If none is given, the entire list will be returned. Defaults to NULL.</p>
@return array|boolean multi-dimensional array, or <b>FALSE</b> if list not filled yet | [
"Returns",
"the",
"specified",
"subscription",
"or",
"all",
"of",
"them",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L100-L110 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.getNotificationType | public function getNotificationType($i = 0){
if (isset($this->list[$i]['NotificationType'])){
return $this->list[$i]['NotificationType'];
} else {
return false;
}
} | php | public function getNotificationType($i = 0){
if (isset($this->list[$i]['NotificationType'])){
return $this->list[$i]['NotificationType'];
} else {
return false;
}
} | [
"public",
"function",
"getNotificationType",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'NotificationType'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
... | Returns the notification type for the retrieved subscription.
See <i>setNotificationType</i> for list of possible values.
This method will return <b>FALSE</b> if the data has not been set yet.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if not set yet or invalid index
@see setNotificationType | [
"Returns",
"the",
"notification",
"type",
"for",
"the",
"retrieved",
"subscription",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L121-L127 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.getIsEnabled | public function getIsEnabled($i = 0){
if (isset($this->list[$i]['IsEnabled'])){
return $this->list[$i]['IsEnabled'];
} else {
return false;
}
} | php | public function getIsEnabled($i = 0){
if (isset($this->list[$i]['IsEnabled'])){
return $this->list[$i]['IsEnabled'];
} else {
return false;
}
} | [
"public",
"function",
"getIsEnabled",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'IsEnabled'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
... | Returns the notification type for the retrieved subscription.
Note that this method will return the string "false" if Amazon indicates
that the subscription is not enabled.
This method will return boolean <b>FALSE</b> if the date has not been set yet.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean "true" or "false", or <b>FALSE</b> if not set yet or invalid index | [
"Returns",
"the",
"notification",
"type",
"for",
"the",
"retrieved",
"subscription",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L138-L144 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.getDeliveryChannel | public function getDeliveryChannel($i = 0){
if (isset($this->list[$i]['Destination']['DeliveryChannel'])){
return $this->list[$i]['Destination']['DeliveryChannel'];
} else {
return false;
}
} | php | public function getDeliveryChannel($i = 0){
if (isset($this->list[$i]['Destination']['DeliveryChannel'])){
return $this->list[$i]['Destination']['DeliveryChannel'];
} else {
return false;
}
} | [
"public",
"function",
"getDeliveryChannel",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'Destination'",
"]",
"[",
"'DeliveryChannel'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"... | Returns the delivery channel for the retrieved subscription's destination.
See <i>setDeliveryChannel</i> for list of possible values.
This method will return <b>FALSE</b> if the data has not been set yet.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if not set yet or invalid index
@see setDeliveryChannel | [
"Returns",
"the",
"delivery",
"channel",
"for",
"the",
"retrieved",
"subscription",
"s",
"destination",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L155-L161 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonSubscriptionList.php | AmazonSubscriptionList.getAttributes | public function getAttributes($i = 0, $j = null){
if (isset($this->list[$i]['Destination']['AttributeList'])){
if (isset($this->list[$i]['Destination']['AttributeList'][$j])) {
return $this->list[$i]['Destination']['AttributeList'][$j];
} else {
return $this->list[$i]['Destination']['AttributeList'];
}
} else {
return false;
}
} | php | public function getAttributes($i = 0, $j = null){
if (isset($this->list[$i]['Destination']['AttributeList'])){
if (isset($this->list[$i]['Destination']['AttributeList'][$j])) {
return $this->list[$i]['Destination']['AttributeList'][$j];
} else {
return $this->list[$i]['Destination']['AttributeList'];
}
} else {
return false;
}
} | [
"public",
"function",
"getAttributes",
"(",
"$",
"i",
"=",
"0",
",",
"$",
"j",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'Destination'",
"]",
"[",
"'AttributeList'",
"]",
")",
")",
"{",
... | Returns the attribute list for the retrieved subscription's destination.
This method will return <b>FALSE</b> if the data has not been set yet.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@param string $j [optional] <p>Second list index to retrieve the value from. Defaults to NULL.</p>
@return array|boolean associative array, or <b>FALSE</b> if not set yet or invalid index | [
"Returns",
"the",
"attribute",
"list",
"for",
"the",
"retrieved",
"subscription",
"s",
"destination",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonSubscriptionList.php#L171-L181 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonShipment.php | AmazonShipment.usePlan | public function usePlan($x){
if (is_array($x)){
$this->options['ShipmentId'] = $x['ShipmentId'];
$this->setShipmentId($x['ShipmentId']);
$this->setDestination($x['DestinationFulfillmentCenterId']);
//label preference is not a direct match to preview results
if ($x['LabelPrepType'] == 'AMAZON_LABEL') {
$this->setLabelPrepPreference('AMAZON_LABEL_PREFERRED');
} else {
$this->setLabelPrepPreference('SELLER_LABEL');
}
$this->setItems($x['Items']);
} else {
$this->log("usePlan requires an array",'Warning');
return false;
}
} | php | public function usePlan($x){
if (is_array($x)){
$this->options['ShipmentId'] = $x['ShipmentId'];
$this->setShipmentId($x['ShipmentId']);
$this->setDestination($x['DestinationFulfillmentCenterId']);
//label preference is not a direct match to preview results
if ($x['LabelPrepType'] == 'AMAZON_LABEL') {
$this->setLabelPrepPreference('AMAZON_LABEL_PREFERRED');
} else {
$this->setLabelPrepPreference('SELLER_LABEL');
}
$this->setItems($x['Items']);
} else {
$this->log("usePlan requires an array",'Warning');
return false;
}
} | [
"public",
"function",
"usePlan",
"(",
"$",
"x",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"x",
")",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'ShipmentId'",
"]",
"=",
"$",
"x",
"[",
"'ShipmentId'",
"]",
";",
"$",
"this",
"->",
"setShipmentId",... | Automatically fills in the necessary fields using a planner array.
This is a quick way to set the shipment ID, destination, label prep type, and items.
Note that the label preperation preference will be set to "AMAZON_LABEL_PREFERRED" if the
fulfillment preview selects the label type as "AMAZON_LABEL" and "SELLER_LABEL" otherwise.
This information is required to submit a shipment, but this method is not required.
@param array $x <p>plan array from <i>AmazonShipmentPlanner</i></p>
@return boolean <b>FALSE</b> if improper input | [
"Automatically",
"fills",
"in",
"the",
"necessary",
"fields",
"using",
"a",
"planner",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonShipment.php#L59-L79 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonShipment.php | AmazonShipment.setStatus | public function setStatus($s){
if (is_string($s) && $s){
if ($s == 'WORKING' || $s == 'SHIPPED' || $s == 'CANCELLED'){
$this->options['InboundShipmentHeader.ShipmentStatus'] = $s;
} else {
return false;
}
} else {
return false;
}
} | php | public function setStatus($s){
if (is_string($s) && $s){
if ($s == 'WORKING' || $s == 'SHIPPED' || $s == 'CANCELLED'){
$this->options['InboundShipmentHeader.ShipmentStatus'] = $s;
} else {
return false;
}
} else {
return false;
}
} | [
"public",
"function",
"setStatus",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
"&&",
"$",
"s",
")",
"{",
"if",
"(",
"$",
"s",
"==",
"'WORKING'",
"||",
"$",
"s",
"==",
"'SHIPPED'",
"||",
"$",
"s",
"==",
"'CANCELLED'",
")... | Sets the shipment status. (Required)
@param string $s <p>"WORKING", "SHIPPED", or "CANCELLED" (updating only)</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"shipment",
"status",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonShipment.php#L273-L283 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonShipment.php | AmazonShipment.createShipment | public function createShipment(){
if (!isset($this->options['ShipmentId'])){
$this->log("Shipment ID must be set in order to create it",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentHeader.ShipmentName',$this->options)){
$this->log("Header must be set in order to make a shipment",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentHeader.ShipFromAddress.Name',$this->options)){
$this->log("Address must be set in order to make a shipment",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentItems.member.1.SellerSKU',$this->options)){
$this->log("Items must be set in order to make a shipment",'Warning');
return false;
}
$this->options['Action'] = 'CreateInboundShipment';
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->shipmentId = (string)$xml->ShipmentId;
if ($this->shipmentId){
$this->log("Successfully created Shipment #".$this->shipmentId);
return true;
} else {
return false;
}
} | php | public function createShipment(){
if (!isset($this->options['ShipmentId'])){
$this->log("Shipment ID must be set in order to create it",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentHeader.ShipmentName',$this->options)){
$this->log("Header must be set in order to make a shipment",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentHeader.ShipFromAddress.Name',$this->options)){
$this->log("Address must be set in order to make a shipment",'Warning');
return false;
}
if (!array_key_exists('InboundShipmentItems.member.1.SellerSKU',$this->options)){
$this->log("Items must be set in order to make a shipment",'Warning');
return false;
}
$this->options['Action'] = 'CreateInboundShipment';
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->shipmentId = (string)$xml->ShipmentId;
if ($this->shipmentId){
$this->log("Successfully created Shipment #".$this->shipmentId);
return true;
} else {
return false;
}
} | [
"public",
"function",
"createShipment",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'ShipmentId'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Shipment ID must be set in order to create it\"",
",",
"'Warning'",
... | Sends a request to Amazon to create an Inbound Shipment.
Submits a <i>CreateInboundShipment</i> request to Amazon. In order to do this,
all parameters must be set. Data for these headers can be generated using an
<i>AmazonShipmentPlanner</i> object. Amazon will send back the Shipment ID
as a response, which can be retrieved using <i>getShipmentId</i>.
@return boolean <b>TRUE</b> if success, <b>FALSE</b> if something goes wrong | [
"Sends",
"a",
"request",
"to",
"Amazon",
"to",
"create",
"an",
"Inbound",
"Shipment",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonShipment.php#L319-L362 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.setPageType | public function setPageType($s) {
if (is_string($s) && $s){
$this->options['PageType'] = $s;
} else {
$this->log('Tried to set PageType to invalid value', 'Warning');
return false;
}
/*
* Valid page types:
* PackageLabel_Plain_Paper (1 per sheet)
* PackageLabel_Letter_2 (2 per sheet)
* PackageLabel_Letter_6 (6 per sheet)
* PackageLabel_A4_2 (2 per sheet)
* PackageLabel_A4_4 (4 per sheet)
*/
} | php | public function setPageType($s) {
if (is_string($s) && $s){
$this->options['PageType'] = $s;
} else {
$this->log('Tried to set PageType to invalid value', 'Warning');
return false;
}
/*
* Valid page types:
* PackageLabel_Plain_Paper (1 per sheet)
* PackageLabel_Letter_2 (2 per sheet)
* PackageLabel_Letter_6 (6 per sheet)
* PackageLabel_A4_2 (2 per sheet)
* PackageLabel_A4_4 (4 per sheet)
*/
} | [
"public",
"function",
"setPageType",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
"&&",
"$",
"s",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'PageType'",
"]",
"=",
"$",
"s",
";",
"}",
"else",
"{",
"$",
"this",
"->",
... | Sets the page type. (Required for labels)
This parameter is required for fetching label documents from Amazon.
@param string $s <p>See the comment inside for a list of valid values.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"page",
"type",
".",
"(",
"Required",
"for",
"labels",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L76-L91 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.setPackageIds | public function setPackageIds($s) {
if (is_string($s) || is_numeric($s)) {
$s = array($s);
}
if (is_array($s)){
$this->resetPackageIds();
$i = 1;
foreach ($s as $x){
$this->options['PackageLabelsToPrint.member.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setPackageIds($s) {
if (is_string($s) || is_numeric($s)) {
$s = array($s);
}
if (is_array($s)){
$this->resetPackageIds();
$i = 1;
foreach ($s as $x){
$this->options['PackageLabelsToPrint.member.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setPackageIds",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
"||",
"is_numeric",
"(",
"$",
"s",
")",
")",
"{",
"$",
"s",
"=",
"array",
"(",
"$",
"s",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$... | Sets the package ID(s) to get labels for. (Required for getting package labels)
The package identifiers should match the <i>CartonId</i> values sent in a
previous <i>FBA Inbound Shipment Carton Information Feed</i>.
Use the <i>AmazonFeed</i> object to send a feed.
@param array|string $s <p>A list of package IDs, or a single ID string.</p>
@return boolean <b>FALSE</b> if improper input or needed parameters are not set | [
"Sets",
"the",
"package",
"ID",
"(",
"s",
")",
"to",
"get",
"labels",
"for",
".",
"(",
"Required",
"for",
"getting",
"package",
"labels",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L102-L116 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.resetPackageIds | protected function resetPackageIds() {
foreach($this->options as $op=>$junk){
if(preg_match("#PackageLabelsToPrint#",$op)){
unset($this->options[$op]);
}
}
} | php | protected function resetPackageIds() {
foreach($this->options as $op=>$junk){
if(preg_match("#PackageLabelsToPrint#",$op)){
unset($this->options[$op]);
}
}
} | [
"protected",
"function",
"resetPackageIds",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#PackageLabelsToPrint#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"... | Resets the package ID parameters.
Since package IDs are required, these parameters should not be removed
without replacing them, so this method is not public. | [
"Resets",
"the",
"package",
"ID",
"parameters",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L124-L130 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.parseXml | protected function parseXml($xml) {
if (!$xml){
return false;
}
//response from send, confirm, estimate, void
if (isset($xml->TransportDocument)) {
$this->doc = (string)$xml->TransportDocument->PdfDocument;
$this->checksum = (string)$xml->TransportDocument->Checksum;
}
} | php | protected function parseXml($xml) {
if (!$xml){
return false;
}
//response from send, confirm, estimate, void
if (isset($xml->TransportDocument)) {
$this->doc = (string)$xml->TransportDocument->PdfDocument;
$this->checksum = (string)$xml->TransportDocument->Checksum;
}
} | [
"protected",
"function",
"parseXml",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"//response from send, confirm, estimate, void",
"if",
"(",
"isset",
"(",
"$",
"xml",
"->",
"TransportDocument",
")",
")",
"{... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L315-L325 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.getDocument | public function getDocument($raw = FALSE) {
if (isset($this->doc)) {
if ($raw) {
return $this->doc;
}
try {
return base64_decode($this->doc);
} catch (Exception $ex) {
$this->log('Failed to convert transport document file, file might be corrupt: '.
$ex->getMessage(), 'Urgent');
}
}
return false;
} | php | public function getDocument($raw = FALSE) {
if (isset($this->doc)) {
if ($raw) {
return $this->doc;
}
try {
return base64_decode($this->doc);
} catch (Exception $ex) {
$this->log('Failed to convert transport document file, file might be corrupt: '.
$ex->getMessage(), 'Urgent');
}
}
return false;
} | [
"public",
"function",
"getDocument",
"(",
"$",
"raw",
"=",
"FALSE",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"doc",
")",
")",
"{",
"if",
"(",
"$",
"raw",
")",
"{",
"return",
"$",
"this",
"->",
"doc",
";",
"}",
"try",
"{",
"return",... | Returns the file contents for the transport document.
The contents of the document depends on which action was used to retrieve the document.
This method will return <b>FALSE</b> if the file has not been fetched yet.
@param boolean $raw [optional] <p>Set to TRUE to get the raw, base64-encoded file contents.</p>
@return string|boolean file contents, encoded file, or <b>FALSE</b> if file not fetched yet | [
"Returns",
"the",
"file",
"contents",
"for",
"the",
"transport",
"document",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L335-L348 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonTransportDocument.php | AmazonTransportDocument.getChecksum | public function getChecksum($raw = FALSE) {
if (isset($this->checksum)) {
if ($raw) {
return $this->checksum;
}
try {
return base64_decode($this->checksum);
} catch (Exception $ex) {
$this->log('Failed to convert transport document checksum, file might be corrupt: '.
$ex->getMessage(), 'Urgent');
}
}
return false;
} | php | public function getChecksum($raw = FALSE) {
if (isset($this->checksum)) {
if ($raw) {
return $this->checksum;
}
try {
return base64_decode($this->checksum);
} catch (Exception $ex) {
$this->log('Failed to convert transport document checksum, file might be corrupt: '.
$ex->getMessage(), 'Urgent');
}
}
return false;
} | [
"public",
"function",
"getChecksum",
"(",
"$",
"raw",
"=",
"FALSE",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"checksum",
")",
")",
"{",
"if",
"(",
"$",
"raw",
")",
"{",
"return",
"$",
"this",
"->",
"checksum",
";",
"}",
"try",
"{",
... | Returns the checksum the transport document.
This method will return <b>FALSE</b> if the file has not been fetched yet.
@param boolean $raw [optional] <p>Set to TRUE to get the raw, base64-encoded checksum.</p>
@return string|boolean checksum, or <b>FALSE</b> if file not fetched yet | [
"Returns",
"the",
"checksum",
"the",
"transport",
"document",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonTransportDocument.php#L357-L370 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrder.php | AmazonFulfillmentOrder.parseXML | protected function parseXML($xml) {
if (!$xml){
return false;
}
if (!$xml->FulfillmentOrder){
return false;
}
if (!$xml->FulfillmentOrderItem){
return false;
}
if (!$xml->FulfillmentShipment){
return false;
}
//Section 1: ShipmentOrder
$d = $xml->FulfillmentOrder;
$this->order['Details']['SellerFulfillmentOrderId'] = (string)$d->SellerFulfillmentOrderId;
$this->order['Details']['MarketplaceId'] = (string)$d->MarketplaceId;
$this->order['Details']['DisplayableOrderId'] = (string)$d->DisplayableOrderId;
$this->order['Details']['DisplayableOrderDateTime'] = (string)$d->DisplayableOrderDateTime;
$this->order['Details']['DisplayableOrderComment'] = (string)$d->DisplayableOrderComment;
$this->order['Details']['ShippingSpeedCategory'] = (string)$d->ShippingSpeedCategory;
if (isset($d->DeliveryWindow)) {
$this->order['Details']['DeliveryWindow']['StartDateTime'] = (string)$d->DeliveryWindow->StartDateTime;
$this->order['Details']['DeliveryWindow']['EndDateTime'] = (string)$d->DeliveryWindow->EndDateTime;
}
$this->order['Details']['DestinationAddress'] = $this->parseAddress($d->DestinationAddress);
if (isset($d->FulfillmentAction)){
$this->order['Details']['FulfillmentAction'] = (string)$d->FulfillmentAction;
}
if (isset($d->FulfillmentPolicy)){
$this->order['Details']['FulfillmentPolicy'] = (string)$d->FulfillmentPolicy;
}
if (isset($d->FulfillmentMethod)){
//deprecated
$this->order['Details']['FulfillmentMethod'] = (string)$d->FulfillmentMethod;
}
$this->order['Details']['ReceivedDateTime'] = (string)$d->ReceivedDateTime;
$this->order['Details']['FulfillmentOrderStatus'] = (string)$d->FulfillmentOrderStatus;
$this->order['Details']['StatusUpdatedDateTime'] = (string)$d->StatusUpdatedDateTime;
if (isset($d->NotificationEmailList)){
$i = 0;
foreach($d->NotificationEmailList->children() as $x){
$this->order['Details']['NotificationEmailList'][$i++] = (string)$x;
}
}
if (isset($d->CODSettings->IsCODRequired)){
$this->order['Details']['CODSettings']['IsCODRequired'] = (string)$d->CODSettings->IsCODRequired;
}
if (isset($d->CODSettings->CODCharge)){
$this->order['Details']['CODSettings']['CODCharge']['CurrencyCode'] = (string)$d->CODSettings->CODCharge->CurrencyCode;
$this->order['Details']['CODSettings']['CODCharge']['Value'] = (string)$d->CODSettings->CODCharge->Value;
}
if (isset($d->CODSettings->CODChargeTax)){
$this->order['Details']['CODSettings']['CODChargeTax']['CurrencyCode'] = (string)$d->CODSettings->CODChargeTax->CurrencyCode;
$this->order['Details']['CODSettings']['CODChargeTax']['Value'] = (string)$d->CODSettings->CODChargeTax->Value;
}
if (isset($d->CODSettings->ShippingCharge)){
$this->order['Details']['CODSettings']['ShippingCharge']['CurrencyCode'] = (string)$d->CODSettings->ShippingCharge->CurrencyCode;
$this->order['Details']['CODSettings']['ShippingCharge']['Value'] = (string)$d->CODSettings->ShippingCharge->Value;
}
if (isset($d->CODSettings->ShippingChargeTax)){
$this->order['Details']['CODSettings']['ShippingChargeTax']['CurrencyCode'] = (string)$d->CODSettings->ShippingChargeTax->CurrencyCode;
$this->order['Details']['CODSettings']['ShippingChargeTax']['Value'] = (string)$d->CODSettings->ShippingChargeTax->Value;
}
//Section 2: Order Items
$i = 0;
foreach($xml->FulfillmentOrderItem->children() as $x){
$this->order['Items'][$i]['SellerSKU'] = (string)$x->SellerSKU;
$this->order['Items'][$i]['SellerFulfillmentOrderItemId'] = (string)$x->SellerFulfillmentOrderItemId;
$this->order['Items'][$i]['Quantity'] = (string)$x->Quantity;
if (isset($x->GiftMessage)){
$this->order['Items'][$i]['GiftMessage'] = (string)$x->GiftMessage;
}
if (isset($x->DisplayableComment)){
$this->order['Items'][$i]['DisplayableComment'] = (string)$x->DisplayableComment;
}
if (isset($x->FulfillmentNetworkSKU)){
$this->order['Items'][$i]['FulfillmentNetworkSKU'] = (string)$x->FulfillmentNetworkSKU;
}
if (isset($x->OrderItemDisposition)){
$this->order['Items'][$i]['OrderItemDisposition'] = (string)$x->OrderItemDisposition;
}
$this->order['Items'][$i]['CancelledQuantity'] = (string)$x->CancelledQuantity;
$this->order['Items'][$i]['UnfulfillableQuantity'] = (string)$x->UnfulfillableQuantity;
if (isset($x->EstimatedShipDateTime)){
$this->order['Items'][$i]['EstimatedShipDateTime'] = (string)$x->EstimatedShipDateTime;
}
if (isset($x->EstimatedArrivalDateTime)){
$this->order['Items'][$i]['EstimatedArrivalDateTime'] = (string)$x->EstimatedArrivalDateTime;
}
if (isset($x->PerUnitDeclaredValue)){
$this->order['Items'][$i]['PerUnitDeclaredValue']['CurrencyCode'] = (string)$x->PerUnitDeclaredValue->CurrencyCode;
$this->order['Items'][$i]['PerUnitDeclaredValue']['Value'] = (string)$x->PerUnitDeclaredValue->Value;
}
if (isset($x->PerUnitPrice)){
$this->order['Items'][$i]['PerUnitPrice']['CurrencyCode'] = (string)$x->PerUnitPrice->CurrencyCode;
$this->order['Items'][$i]['PerUnitPrice']['Value'] = (string)$x->PerUnitPrice->Value;
}
if (isset($x->PerUnitTax)){
$this->order['Items'][$i]['PerUnitTax']['CurrencyCode'] = (string)$x->PerUnitTax->CurrencyCode;
$this->order['Items'][$i]['PerUnitTax']['Value'] = (string)$x->PerUnitTax->Value;
}
$i++;
}
//Section 3: Order Shipments
$i = 0;
foreach($xml->FulfillmentShipment->children() as $x){
$this->order['Shipments'][$i]['AmazonShipmentId'] = (string)$x->AmazonShipmentId;
$this->order['Shipments'][$i]['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
$this->order['Shipments'][$i]['FulfillmentShipmentStatus'] = (string)$x->FulfillmentShipmentStatus;
if (isset($x->ShippingDateTime)){
$this->order['Shipments'][$i]['ShippingDateTime'] = (string)$x->ShippingDateTime;
}
if (isset($x->EstimatedArrivalDateTime)){
$this->order['Shipments'][$i]['EstimatedArrivalDateTime'] = (string)$x->EstimatedArrivalDateTime;
}
//FulfillmentShipmentItem
$j = 0;
foreach ($x->FulfillmentShipmentItem->children() as $y){
if (isset($y->SellerSKU)){
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['SellerSKU'] = (string)$y->SellerSKU;
}
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['SellerFulfillmentOrderItemId'] = (string)$y->SellerFulfillmentOrderItemId;
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['Quantity'] = (string)$y->Quantity;
if (isset($y->PackageNumber)){
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['PackageNumber'] = (string)$y->PackageNumber;
}
$j++;
}
if (isset($x->FulfillmentShipmentPackage)){
$j = 0;
foreach ($x->FulfillmentShipmentPackage->children() as $y){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['PackageNumber'] = (string)$y->PackageNumber;
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['CarrierCode'] = (string)$y->CarrierCode;
if (isset($y->TrackingNumber)){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['TrackingNumber'] = (string)$y->TrackingNumber;
}
if (isset($y->EstimatedArrivalDateTime)){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['EstimatedArrivalDateTime'] = (string)$y->EstimatedArrivalDateTime;
}
$j++;
}
}
$i++;
}
//Section 4: Return Items
if (isset($xml->ReturnItemList)) {
foreach ($xml->ReturnItemList->children() as $x) {
$temp = array();
$temp['SellerReturnItemId'] = (string)$x->SellerReturnItemId;
$temp['SellerFulfillmentOrderItemId'] = (string)$x->SellerFulfillmentOrderItemId;
$temp['AmazonShipmentId'] = (string)$x->AmazonShipmentId;
$temp['SellerReturnReasonCode'] = (string)$x->SellerReturnReasonCode;
if (isset($x->ReturnComment)) {
$temp['ReturnComment'] = (string)$x->ReturnComment;
}
if (isset($x->AmazonReturnReasonCode)) {
$temp['AmazonReturnReasonCode'] = (string)$x->AmazonReturnReasonCode;
}
$temp['Status'] = (string)$x->Status;
$temp['StatusChangedDate'] = (string)$x->StatusChangedDate;
if (isset($x->ReturnAuthorizationId)) {
$temp['ReturnAuthorizationId'] = (string)$x->ReturnAuthorizationId;
}
if (isset($x->ReturnReceivedCondition)) {
$temp['ReturnReceivedCondition'] = (string)$x->ReturnReceivedCondition;
}
if (isset($x->FulfillmentCenterId)) {
$temp['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
}
$this->order['ReturnItems'][] = $temp;
}
}
//Section 5: Return Authorizations
if (isset($xml->ReturnAuthorizationList)) {
foreach ($xml->ReturnAuthorizationList->children() as $x) {
$temp = array();
$temp['ReturnAuthorizationId'] = (string)$x->ReturnAuthorizationId;
$temp['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
$temp['ReturnToAddress'] = $this->parseAddress($x->ReturnToAddress);
$temp['AmazonRmaId'] = (string)$x->AmazonRmaId;
$temp['RmaPageURL'] = (string)$x->RmaPageURL;
$this->order['ReturnAuthorizations'][] = $temp;
}
}
} | php | protected function parseXML($xml) {
if (!$xml){
return false;
}
if (!$xml->FulfillmentOrder){
return false;
}
if (!$xml->FulfillmentOrderItem){
return false;
}
if (!$xml->FulfillmentShipment){
return false;
}
//Section 1: ShipmentOrder
$d = $xml->FulfillmentOrder;
$this->order['Details']['SellerFulfillmentOrderId'] = (string)$d->SellerFulfillmentOrderId;
$this->order['Details']['MarketplaceId'] = (string)$d->MarketplaceId;
$this->order['Details']['DisplayableOrderId'] = (string)$d->DisplayableOrderId;
$this->order['Details']['DisplayableOrderDateTime'] = (string)$d->DisplayableOrderDateTime;
$this->order['Details']['DisplayableOrderComment'] = (string)$d->DisplayableOrderComment;
$this->order['Details']['ShippingSpeedCategory'] = (string)$d->ShippingSpeedCategory;
if (isset($d->DeliveryWindow)) {
$this->order['Details']['DeliveryWindow']['StartDateTime'] = (string)$d->DeliveryWindow->StartDateTime;
$this->order['Details']['DeliveryWindow']['EndDateTime'] = (string)$d->DeliveryWindow->EndDateTime;
}
$this->order['Details']['DestinationAddress'] = $this->parseAddress($d->DestinationAddress);
if (isset($d->FulfillmentAction)){
$this->order['Details']['FulfillmentAction'] = (string)$d->FulfillmentAction;
}
if (isset($d->FulfillmentPolicy)){
$this->order['Details']['FulfillmentPolicy'] = (string)$d->FulfillmentPolicy;
}
if (isset($d->FulfillmentMethod)){
//deprecated
$this->order['Details']['FulfillmentMethod'] = (string)$d->FulfillmentMethod;
}
$this->order['Details']['ReceivedDateTime'] = (string)$d->ReceivedDateTime;
$this->order['Details']['FulfillmentOrderStatus'] = (string)$d->FulfillmentOrderStatus;
$this->order['Details']['StatusUpdatedDateTime'] = (string)$d->StatusUpdatedDateTime;
if (isset($d->NotificationEmailList)){
$i = 0;
foreach($d->NotificationEmailList->children() as $x){
$this->order['Details']['NotificationEmailList'][$i++] = (string)$x;
}
}
if (isset($d->CODSettings->IsCODRequired)){
$this->order['Details']['CODSettings']['IsCODRequired'] = (string)$d->CODSettings->IsCODRequired;
}
if (isset($d->CODSettings->CODCharge)){
$this->order['Details']['CODSettings']['CODCharge']['CurrencyCode'] = (string)$d->CODSettings->CODCharge->CurrencyCode;
$this->order['Details']['CODSettings']['CODCharge']['Value'] = (string)$d->CODSettings->CODCharge->Value;
}
if (isset($d->CODSettings->CODChargeTax)){
$this->order['Details']['CODSettings']['CODChargeTax']['CurrencyCode'] = (string)$d->CODSettings->CODChargeTax->CurrencyCode;
$this->order['Details']['CODSettings']['CODChargeTax']['Value'] = (string)$d->CODSettings->CODChargeTax->Value;
}
if (isset($d->CODSettings->ShippingCharge)){
$this->order['Details']['CODSettings']['ShippingCharge']['CurrencyCode'] = (string)$d->CODSettings->ShippingCharge->CurrencyCode;
$this->order['Details']['CODSettings']['ShippingCharge']['Value'] = (string)$d->CODSettings->ShippingCharge->Value;
}
if (isset($d->CODSettings->ShippingChargeTax)){
$this->order['Details']['CODSettings']['ShippingChargeTax']['CurrencyCode'] = (string)$d->CODSettings->ShippingChargeTax->CurrencyCode;
$this->order['Details']['CODSettings']['ShippingChargeTax']['Value'] = (string)$d->CODSettings->ShippingChargeTax->Value;
}
//Section 2: Order Items
$i = 0;
foreach($xml->FulfillmentOrderItem->children() as $x){
$this->order['Items'][$i]['SellerSKU'] = (string)$x->SellerSKU;
$this->order['Items'][$i]['SellerFulfillmentOrderItemId'] = (string)$x->SellerFulfillmentOrderItemId;
$this->order['Items'][$i]['Quantity'] = (string)$x->Quantity;
if (isset($x->GiftMessage)){
$this->order['Items'][$i]['GiftMessage'] = (string)$x->GiftMessage;
}
if (isset($x->DisplayableComment)){
$this->order['Items'][$i]['DisplayableComment'] = (string)$x->DisplayableComment;
}
if (isset($x->FulfillmentNetworkSKU)){
$this->order['Items'][$i]['FulfillmentNetworkSKU'] = (string)$x->FulfillmentNetworkSKU;
}
if (isset($x->OrderItemDisposition)){
$this->order['Items'][$i]['OrderItemDisposition'] = (string)$x->OrderItemDisposition;
}
$this->order['Items'][$i]['CancelledQuantity'] = (string)$x->CancelledQuantity;
$this->order['Items'][$i]['UnfulfillableQuantity'] = (string)$x->UnfulfillableQuantity;
if (isset($x->EstimatedShipDateTime)){
$this->order['Items'][$i]['EstimatedShipDateTime'] = (string)$x->EstimatedShipDateTime;
}
if (isset($x->EstimatedArrivalDateTime)){
$this->order['Items'][$i]['EstimatedArrivalDateTime'] = (string)$x->EstimatedArrivalDateTime;
}
if (isset($x->PerUnitDeclaredValue)){
$this->order['Items'][$i]['PerUnitDeclaredValue']['CurrencyCode'] = (string)$x->PerUnitDeclaredValue->CurrencyCode;
$this->order['Items'][$i]['PerUnitDeclaredValue']['Value'] = (string)$x->PerUnitDeclaredValue->Value;
}
if (isset($x->PerUnitPrice)){
$this->order['Items'][$i]['PerUnitPrice']['CurrencyCode'] = (string)$x->PerUnitPrice->CurrencyCode;
$this->order['Items'][$i]['PerUnitPrice']['Value'] = (string)$x->PerUnitPrice->Value;
}
if (isset($x->PerUnitTax)){
$this->order['Items'][$i]['PerUnitTax']['CurrencyCode'] = (string)$x->PerUnitTax->CurrencyCode;
$this->order['Items'][$i]['PerUnitTax']['Value'] = (string)$x->PerUnitTax->Value;
}
$i++;
}
//Section 3: Order Shipments
$i = 0;
foreach($xml->FulfillmentShipment->children() as $x){
$this->order['Shipments'][$i]['AmazonShipmentId'] = (string)$x->AmazonShipmentId;
$this->order['Shipments'][$i]['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
$this->order['Shipments'][$i]['FulfillmentShipmentStatus'] = (string)$x->FulfillmentShipmentStatus;
if (isset($x->ShippingDateTime)){
$this->order['Shipments'][$i]['ShippingDateTime'] = (string)$x->ShippingDateTime;
}
if (isset($x->EstimatedArrivalDateTime)){
$this->order['Shipments'][$i]['EstimatedArrivalDateTime'] = (string)$x->EstimatedArrivalDateTime;
}
//FulfillmentShipmentItem
$j = 0;
foreach ($x->FulfillmentShipmentItem->children() as $y){
if (isset($y->SellerSKU)){
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['SellerSKU'] = (string)$y->SellerSKU;
}
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['SellerFulfillmentOrderItemId'] = (string)$y->SellerFulfillmentOrderItemId;
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['Quantity'] = (string)$y->Quantity;
if (isset($y->PackageNumber)){
$this->order['Shipments'][$i]['FulfillmentShipmentItem'][$j]['PackageNumber'] = (string)$y->PackageNumber;
}
$j++;
}
if (isset($x->FulfillmentShipmentPackage)){
$j = 0;
foreach ($x->FulfillmentShipmentPackage->children() as $y){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['PackageNumber'] = (string)$y->PackageNumber;
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['CarrierCode'] = (string)$y->CarrierCode;
if (isset($y->TrackingNumber)){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['TrackingNumber'] = (string)$y->TrackingNumber;
}
if (isset($y->EstimatedArrivalDateTime)){
$this->order['Shipments'][$i]['FulfillmentShipmentPackage'][$j]['EstimatedArrivalDateTime'] = (string)$y->EstimatedArrivalDateTime;
}
$j++;
}
}
$i++;
}
//Section 4: Return Items
if (isset($xml->ReturnItemList)) {
foreach ($xml->ReturnItemList->children() as $x) {
$temp = array();
$temp['SellerReturnItemId'] = (string)$x->SellerReturnItemId;
$temp['SellerFulfillmentOrderItemId'] = (string)$x->SellerFulfillmentOrderItemId;
$temp['AmazonShipmentId'] = (string)$x->AmazonShipmentId;
$temp['SellerReturnReasonCode'] = (string)$x->SellerReturnReasonCode;
if (isset($x->ReturnComment)) {
$temp['ReturnComment'] = (string)$x->ReturnComment;
}
if (isset($x->AmazonReturnReasonCode)) {
$temp['AmazonReturnReasonCode'] = (string)$x->AmazonReturnReasonCode;
}
$temp['Status'] = (string)$x->Status;
$temp['StatusChangedDate'] = (string)$x->StatusChangedDate;
if (isset($x->ReturnAuthorizationId)) {
$temp['ReturnAuthorizationId'] = (string)$x->ReturnAuthorizationId;
}
if (isset($x->ReturnReceivedCondition)) {
$temp['ReturnReceivedCondition'] = (string)$x->ReturnReceivedCondition;
}
if (isset($x->FulfillmentCenterId)) {
$temp['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
}
$this->order['ReturnItems'][] = $temp;
}
}
//Section 5: Return Authorizations
if (isset($xml->ReturnAuthorizationList)) {
foreach ($xml->ReturnAuthorizationList->children() as $x) {
$temp = array();
$temp['ReturnAuthorizationId'] = (string)$x->ReturnAuthorizationId;
$temp['FulfillmentCenterId'] = (string)$x->FulfillmentCenterId;
$temp['ReturnToAddress'] = $this->parseAddress($x->ReturnToAddress);
$temp['AmazonRmaId'] = (string)$x->AmazonRmaId;
$temp['RmaPageURL'] = (string)$x->RmaPageURL;
$this->order['ReturnAuthorizations'][] = $temp;
}
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"$",
"xml",
"->",
"FulfillmentOrder",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"$",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrder.php#L113-L303 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrder.php | AmazonFulfillmentOrder.parseAddress | public function parseAddress($xml) {
$r = array();
$r['Name'] = (string)$xml->Name;
$r['Line1'] = (string)$xml->Line1;
if (isset($xml->Line2)){
$r['Line2'] = (string)$xml->Line2;
}
if (isset($xml->Line3)){
$r['Line3'] = (string)$xml->Line3;
}
if (isset($xml->DistrictOrCounty)){
$r['DistrictOrCounty'] = (string)$xml->DistrictOrCounty;
}
$r['City'] = (string)$xml->City;
$r['StateOrProvinceCode'] = (string)$xml->StateOrProvinceCode;
$r['CountryCode'] = (string)$xml->CountryCode;
if (isset($xml->PostalCode)){
$r['PostalCode'] = (string)$xml->PostalCode;
}
if (isset($xml->PhoneNumber)){
$r['PhoneNumber'] = (string)$xml->PhoneNumber;
}
return $r;
} | php | public function parseAddress($xml) {
$r = array();
$r['Name'] = (string)$xml->Name;
$r['Line1'] = (string)$xml->Line1;
if (isset($xml->Line2)){
$r['Line2'] = (string)$xml->Line2;
}
if (isset($xml->Line3)){
$r['Line3'] = (string)$xml->Line3;
}
if (isset($xml->DistrictOrCounty)){
$r['DistrictOrCounty'] = (string)$xml->DistrictOrCounty;
}
$r['City'] = (string)$xml->City;
$r['StateOrProvinceCode'] = (string)$xml->StateOrProvinceCode;
$r['CountryCode'] = (string)$xml->CountryCode;
if (isset($xml->PostalCode)){
$r['PostalCode'] = (string)$xml->PostalCode;
}
if (isset($xml->PhoneNumber)){
$r['PhoneNumber'] = (string)$xml->PhoneNumber;
}
return $r;
} | [
"public",
"function",
"parseAddress",
"(",
"$",
"xml",
")",
"{",
"$",
"r",
"=",
"array",
"(",
")",
";",
"$",
"r",
"[",
"'Name'",
"]",
"=",
"(",
"string",
")",
"$",
"xml",
"->",
"Name",
";",
"$",
"r",
"[",
"'Line1'",
"]",
"=",
"(",
"string",
"... | Parses XML for an address into an array.
@param SimpleXMLElement $xml <p>Address node of the XML response from Amazon.</p>
@return array Parsed structure from XML | [
"Parses",
"XML",
"for",
"an",
"address",
"into",
"an",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrder.php#L310-L333 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportScheduleManager.php | AmazonReportScheduleManager.setScheduledDate | public function setScheduledDate($t = null){
try{
if ($t){
$after = $this->genTime($t);
} else {
$after = $this->genTime('- 2 min');
}
$this->options['ScheduledDate'] = $after;
} catch (Exception $e){
$this->log("Error: ".$e->getMessage(),'Warning');
}
} | php | public function setScheduledDate($t = null){
try{
if ($t){
$after = $this->genTime($t);
} else {
$after = $this->genTime('- 2 min');
}
$this->options['ScheduledDate'] = $after;
} catch (Exception $e){
$this->log("Error: ".$e->getMessage(),'Warning');
}
} | [
"public",
"function",
"setScheduledDate",
"(",
"$",
"t",
"=",
"null",
")",
"{",
"try",
"{",
"if",
"(",
"$",
"t",
")",
"{",
"$",
"after",
"=",
"$",
"this",
"->",
"genTime",
"(",
"$",
"t",
")",
";",
"}",
"else",
"{",
"$",
"after",
"=",
"$",
"th... | Sets the scheduled date. (Optional)
This method sets the scheduled date for the next request.
If this parameters is set, the scheduled report will take effect
at the given time. The value can be no more than 366 days in the future.
If this parameter is not set, the scheduled report will take effect immediately.
The parameter is passed through <i>strtotime</i>, so values such as "-1 hour" are fine.
@param string $t <p>Time string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"scheduled",
"date",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportScheduleManager.php#L132-L145 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportScheduleManager.php | AmazonReportScheduleManager.parseXML | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $key=>$x){
if ($key == 'Count'){
$this->count = (string)$x;
}
if ($key != 'ReportSchedule'){
continue;
}
$i = $this->index;
$this->scheduleList[$i]['ReportType'] = (string)$x->ReportType;
$this->scheduleList[$i]['Schedule'] = (string)$x->Schedule;
$this->scheduleList[$i]['ScheduledDate'] = (string)$x->ScheduledDate;
$this->index++;
}
} | php | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $key=>$x){
if ($key == 'Count'){
$this->count = (string)$x;
}
if ($key != 'ReportSchedule'){
continue;
}
$i = $this->index;
$this->scheduleList[$i]['ReportType'] = (string)$x->ReportType;
$this->scheduleList[$i]['Schedule'] = (string)$x->Schedule;
$this->scheduleList[$i]['ScheduledDate'] = (string)$x->ScheduledDate;
$this->index++;
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"children",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"x",
")",
"{",
"if",
"(",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportScheduleManager.php#L193-L212 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.setFeedIds | public function setFeedIds($s){
if (is_string($s)){
$this->resetFeedIds();
$this->options['FeedSubmissionIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetFeedIds();
$i = 1;
foreach ($s as $x){
$this->options['FeedSubmissionIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setFeedIds($s){
if (is_string($s)){
$this->resetFeedIds();
$this->options['FeedSubmissionIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetFeedIds();
$i = 1;
foreach ($s as $x){
$this->options['FeedSubmissionIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setFeedIds",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetFeedIds",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'FeedSubmissionIdList.Id.1'",
"]",
"=",
"$",
"s",... | Sets the feed submission ID(s). (Optional)
This method sets the list of Feed Submission IDs to be sent in the next request.
Setting this parameter tells Amazon to only return Feed Submissions that match
the IDs in the list. If this parameter is set, all other parameters will be ignored.
@param array|string $s <p>A list of Feed Submission IDs, or a single ID string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"feed",
"submission",
"ID",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L97-L111 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.resetFeedIds | public function resetFeedIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedSubmissionIdList#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetFeedIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedSubmissionIdList#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetFeedIds",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#FeedSubmissionIdList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
... | Removes feed ID options.
Use this in case you change your mind and want to remove the Submission Feed ID
parameters you previously set. | [
"Removes",
"feed",
"ID",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L119-L125 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.setFeedTypes | public function setFeedTypes($s){
if (is_string($s)){
$this->resetFeedTypes();
$this->options['FeedTypeList.Type.1'] = $s;
} else if (is_array($s)){
$this->resetFeedTypes();
$i = 1;
foreach ($s as $x){
$this->options['FeedTypeList.Type.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setFeedTypes($s){
if (is_string($s)){
$this->resetFeedTypes();
$this->options['FeedTypeList.Type.1'] = $s;
} else if (is_array($s)){
$this->resetFeedTypes();
$i = 1;
foreach ($s as $x){
$this->options['FeedTypeList.Type.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setFeedTypes",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetFeedTypes",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'FeedTypeList.Type.1'",
"]",
"=",
"$",
"s",
... | Sets the feed type(s). (Optional)
This method sets the list of Feed Types to be sent in the next request.
Setting this parameter tells Amazon to only return Feed Submissions that match
the types in the list. If this parameter is not set, Amazon will return
Feed Submissions of any type.
@param array|string $s <p>A list of Feed Types, or a single type string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"feed",
"type",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L137-L151 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.resetFeedTypes | public function resetFeedTypes(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedTypeList#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetFeedTypes(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedTypeList#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetFeedTypes",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#FeedTypeList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
"$",
... | Removes feed type options.
Use this in case you change your mind and want to remove the Feed Type
parameters you previously set. | [
"Removes",
"feed",
"type",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L159-L165 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.setFeedStatuses | public function setFeedStatuses($s){
if (is_string($s)){
$this->resetFeedStatuses();
$this->options['FeedProcessingStatusList.Status.1'] = $s;
} else if (is_array($s)){
$this->resetFeedStatuses();
$i = 1;
foreach ($s as $x){
$this->options['FeedProcessingStatusList.Status.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setFeedStatuses($s){
if (is_string($s)){
$this->resetFeedStatuses();
$this->options['FeedProcessingStatusList.Status.1'] = $s;
} else if (is_array($s)){
$this->resetFeedStatuses();
$i = 1;
foreach ($s as $x){
$this->options['FeedProcessingStatusList.Status.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setFeedStatuses",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetFeedStatuses",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'FeedProcessingStatusList.Status.1'",
"]",
... | Sets the feed status(es). (Optional)
This method sets the list of Feed Processing Statuses to be sent in the next request.
Setting this parameter tells Amazon to only return Feed Submissions that match
the statuses in the list. If this parameter is not set, Amazon will return
Feed Submissions with any status.
@param array|string $s <p>A list of Feed Statuses, or a single status string.<br />
Valid values are "_UNCONFIRMED_", "_SUBMITTED_", "_IN_PROGRESS_", "_IN_SAFETY_NET_",
"_AWAITING_ASYNCHRONOUS_REPLY_", "_CANCELLED_", and "_DONE_".</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"feed",
"status",
"(",
"es",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L179-L193 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.resetFeedStatuses | public function resetFeedStatuses(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedProcessingStatusList#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetFeedStatuses(){
foreach($this->options as $op=>$junk){
if(preg_match("#FeedProcessingStatusList#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetFeedStatuses",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#FeedProcessingStatusList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
... | Removes feed status options.
Use this in case you change your mind and want to remove the Feed Status
parameters you previously set. | [
"Removes",
"feed",
"status",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L201-L207 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.setMaxCount | public function setMaxCount($s){
if (is_numeric($s) && $s >= 1 && $s <= 100){
$this->options['MaxCount'] = $s;
} else {
return false;
}
} | php | public function setMaxCount($s){
if (is_numeric($s) && $s >= 1 && $s <= 100){
$this->options['MaxCount'] = $s;
} else {
return false;
}
} | [
"public",
"function",
"setMaxCount",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"s",
")",
"&&",
"$",
"s",
">=",
"1",
"&&",
"$",
"s",
"<=",
"100",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'MaxCount'",
"]",
"=",
"$",
"s",
... | Sets the maximum response count. (Optional)
This method sets the maximum number of Feed Submissions for Amazon to return.
If this parameter is not set, Amazon will only send ten.
@param array|string $s <p>Positive integer from 1 to 100.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"maximum",
"response",
"count",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L217-L223 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.setTimeLimits | public function setTimeLimits($s = null,$e = null){
if ($s && is_string($s)){
$times = $this->genTime($s);
$this->options['SubmittedFromDate'] = $times;
}
if ($e && is_string($e)){
$timee = $this->genTime($e);
$this->options['SubmittedToDate'] = $timee;
}
} | php | public function setTimeLimits($s = null,$e = null){
if ($s && is_string($s)){
$times = $this->genTime($s);
$this->options['SubmittedFromDate'] = $times;
}
if ($e && is_string($e)){
$timee = $this->genTime($e);
$this->options['SubmittedToDate'] = $timee;
}
} | [
"public",
"function",
"setTimeLimits",
"(",
"$",
"s",
"=",
"null",
",",
"$",
"e",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"s",
"&&",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"times",
"=",
"$",
"this",
"->",
"genTime",
"(",
"$",
"s",
")"... | Sets the time frame options. (Optional)
This method sets the start and end times for the next request. If this
parameter is set, Amazon will only return Feed Submissions that were submitted
between the two times given. If these parameters are not set, Amazon will
only return Feed Submissions that were submitted within the past 180 days.
The parameters are passed through <i>strtotime</i>, so values such as "-1 hour" are fine.
@param string $s [optional] <p>A time string for the earliest time.</p>
@param string $e [optional] <p>A time string for the latest time.</p> | [
"Sets",
"the",
"time",
"frame",
"options",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L236-L245 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.prepareToken | protected function prepareToken(){
include($this->env);
if ($this->tokenFlag && $this->tokenUseFlag){
$this->options['Action'] = 'GetFeedSubmissionListByNextToken';
if(isset($THROTTLE_LIMIT_REPORTTOKEN)) {
$this->throttleLimit = $THROTTLE_LIMIT_REPORTTOKEN;
}
if(isset($THROTTLE_TIME_REPORTTOKEN)) {
$this->throttleTime = $THROTTLE_TIME_REPORTTOKEN;
}
$this->throttleGroup = 'GetFeedSubmissionListByNextToken';
$this->resetFeedTypes();
$this->resetFeedStatuses();
$this->resetFeedIds();
$this->resetTimeLimits();
unset($this->options['MaxCount']);
} else {
$this->options['Action'] = 'GetFeedSubmissionList';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'GetFeedSubmissionList';
unset($this->options['NextToken']);
$this->feedList = array();
$this->index = 0;
}
} | php | protected function prepareToken(){
include($this->env);
if ($this->tokenFlag && $this->tokenUseFlag){
$this->options['Action'] = 'GetFeedSubmissionListByNextToken';
if(isset($THROTTLE_LIMIT_REPORTTOKEN)) {
$this->throttleLimit = $THROTTLE_LIMIT_REPORTTOKEN;
}
if(isset($THROTTLE_TIME_REPORTTOKEN)) {
$this->throttleTime = $THROTTLE_TIME_REPORTTOKEN;
}
$this->throttleGroup = 'GetFeedSubmissionListByNextToken';
$this->resetFeedTypes();
$this->resetFeedStatuses();
$this->resetFeedIds();
$this->resetTimeLimits();
unset($this->options['MaxCount']);
} else {
$this->options['Action'] = 'GetFeedSubmissionList';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'GetFeedSubmissionList';
unset($this->options['NextToken']);
$this->feedList = array();
$this->index = 0;
}
} | [
"protected",
"function",
"prepareToken",
"(",
")",
"{",
"include",
"(",
"$",
"this",
"->",
"env",
")",
";",
"if",
"(",
"$",
"this",
"->",
"tokenFlag",
"&&",
"$",
"this",
"->",
"tokenUseFlag",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'Action'",
"... | Sets up options for using tokens.
This changes key options for switching between simply fetching a list and
fetching the rest of a list using a token. Please note: because the
operation for using tokens does not use any other parameters, all other
parameters will be removed. | [
"Sets",
"up",
"options",
"for",
"using",
"tokens",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L310-L339 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.parseXML | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $key=>$x){
$i = $this->index;
if ($key == 'Count'){
$this->count = (string)$x;
$this->log("Successfully cancelled $this->count report requests.");
}
if ($key != 'FeedSubmissionInfo'){
continue;
}
$this->feedList[$i]['FeedSubmissionId'] = (string)$x->FeedSubmissionId;
$this->feedList[$i]['FeedType'] = (string)$x->FeedType;
$this->feedList[$i]['SubmittedDate'] = (string)$x->SubmittedDate;
$this->feedList[$i]['FeedProcessingStatus'] = (string)$x->FeedProcessingStatus;
//this fields are not always returned
if (isset($x->StartedProcessingDate)) {
$this->feedList[$i]['StartedProcessingDate'] = (string)$x->StartedProcessingDate;
}
if (isset($x->CompletedProcessingDate)) {
$this->feedList[$i]['CompletedProcessingDate'] = (string)$x->CompletedProcessingDate;
}
$this->index++;
}
} | php | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $key=>$x){
$i = $this->index;
if ($key == 'Count'){
$this->count = (string)$x;
$this->log("Successfully cancelled $this->count report requests.");
}
if ($key != 'FeedSubmissionInfo'){
continue;
}
$this->feedList[$i]['FeedSubmissionId'] = (string)$x->FeedSubmissionId;
$this->feedList[$i]['FeedType'] = (string)$x->FeedType;
$this->feedList[$i]['SubmittedDate'] = (string)$x->SubmittedDate;
$this->feedList[$i]['FeedProcessingStatus'] = (string)$x->FeedProcessingStatus;
//this fields are not always returned
if (isset($x->StartedProcessingDate)) {
$this->feedList[$i]['StartedProcessingDate'] = (string)$x->StartedProcessingDate;
}
if (isset($x->CompletedProcessingDate)) {
$this->feedList[$i]['CompletedProcessingDate'] = (string)$x->CompletedProcessingDate;
}
$this->index++;
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"children",
"(",
")",
"as",
"$",
"key",
"=>",
"$",
"x",
")",
"{",
"$",
"i",
"... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L348-L376 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.countFeeds | public function countFeeds(){
$this->prepareCount();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->count = (string)$xml->Count;
} | php | public function countFeeds(){
$this->prepareCount();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->count = (string)$xml->Count;
} | [
"public",
"function",
"countFeeds",
"(",
")",
"{",
"$",
"this",
"->",
"prepareCount",
"(",
")",
";",
"$",
"url",
"=",
"$",
"this",
"->",
"urlbase",
".",
"$",
"this",
"->",
"urlbranch",
";",
"$",
"query",
"=",
"$",
"this",
"->",
"genQuery",
"(",
")"... | Fetches a count of Feed Submissions from Amazon.
Submits a <i>GetFeedSubmissionCount</i> request to Amazon. Amazon will send
the number back as a response, which can be retrieved using <i>getCount</i>.
@return boolean <b>FALSE</b> if something goes wrong | [
"Fetches",
"a",
"count",
"of",
"Feed",
"Submissions",
"from",
"Amazon",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L385-L407 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.prepareCount | protected function prepareCount(){
$this->options['Action'] = 'GetFeedSubmissionCount';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'GetFeedSubmissionCount';
$this->resetFeedIds();
unset($this->options['MaxCount']);
unset($this->options['NextToken']);
} | php | protected function prepareCount(){
$this->options['Action'] = 'GetFeedSubmissionCount';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'GetFeedSubmissionCount';
$this->resetFeedIds();
unset($this->options['MaxCount']);
unset($this->options['NextToken']);
} | [
"protected",
"function",
"prepareCount",
"(",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'Action'",
"]",
"=",
"'GetFeedSubmissionCount'",
";",
"if",
"(",
"isset",
"(",
"$",
"THROTTLE_LIMIT_FEEDLIST",
")",
")",
"{",
"$",
"this",
"->",
"throttleLimit",
"=",... | Sets up options for using <i>countFeeds</i>.
This changes key options for using <i>countFeeds</i>. Please note: because the
operation for counting feeds does not use all of the parameters, some of the
parameters will be removed. The following parameters are removed:
feed IDs, max count, and token. | [
"Sets",
"up",
"options",
"for",
"using",
"<i",
">",
"countFeeds<",
"/",
"i",
">",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L417-L429 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.cancelFeeds | public function cancelFeeds(){
$this->prepareCancel();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->parseXML($xml);
} | php | public function cancelFeeds(){
$this->prepareCancel();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
$path = $this->options['Action'].'Result';
if ($this->mockMode){
$xml = $this->fetchMockFile()->$path;
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
if (!$this->checkResponse($response)){
return false;
}
$xml = simplexml_load_string($response['body'])->$path;
}
$this->parseXML($xml);
} | [
"public",
"function",
"cancelFeeds",
"(",
")",
"{",
"$",
"this",
"->",
"prepareCancel",
"(",
")",
";",
"$",
"url",
"=",
"$",
"this",
"->",
"urlbase",
".",
"$",
"this",
"->",
"urlbranch",
";",
"$",
"query",
"=",
"$",
"this",
"->",
"genQuery",
"(",
"... | Cancels the feed submissions that match the given parameters. Careful!
Submits a <i>CancelFeedSubmissions</i> request to Amazon. Amazon will send
as a response the list of feeds that were cancelled, along with the count
of the number of affected feeds. This data can be retrieved using the same
methods as with <i>fetchFeedSubmissions</i> and <i>countFeeds</i>.
@return boolean <b>FALSE</b> if something goes wrong | [
"Cancels",
"the",
"feed",
"submissions",
"that",
"match",
"the",
"given",
"parameters",
".",
"Careful!"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L440-L462 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.prepareCancel | protected function prepareCancel(){
include($this->env);
$this->options['Action'] = 'CancelFeedSubmissions';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'CancelFeedSubmissions';
unset($this->options['MaxCount']);
unset($this->options['NextToken']);
$this->resetFeedStatuses();
} | php | protected function prepareCancel(){
include($this->env);
$this->options['Action'] = 'CancelFeedSubmissions';
if(isset($THROTTLE_LIMIT_FEEDLIST)) {
$this->throttleLimit = $THROTTLE_LIMIT_FEEDLIST;
}
if(isset($THROTTLE_TIME_FEEDLIST)) {
$this->throttleTime = $THROTTLE_TIME_FEEDLIST;
}
$this->throttleGroup = 'CancelFeedSubmissions';
unset($this->options['MaxCount']);
unset($this->options['NextToken']);
$this->resetFeedStatuses();
} | [
"protected",
"function",
"prepareCancel",
"(",
")",
"{",
"include",
"(",
"$",
"this",
"->",
"env",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'Action'",
"]",
"=",
"'CancelFeedSubmissions'",
";",
"if",
"(",
"isset",
"(",
"$",
"THROTTLE_LIMIT_FEEDLIST",
"... | Sets up options for using <i>cancelFeeds</i>.
This changes key options for using <i>cancelFeeds</i>. Please note: because the
operation for cancelling feeds does not use all of the parameters, some of the
parameters will be removed. The following parameters are removed:
feed statuses, max count, and token. | [
"Sets",
"up",
"options",
"for",
"using",
"<i",
">",
"cancelFeeds<",
"/",
"i",
">",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L472-L485 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getFeedId | public function getFeedId($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedSubmissionId'];
} else {
return false;
}
} | php | public function getFeedId($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedSubmissionId'];
} else {
return false;
}
} | [
"public",
"function",
"getFeedId",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
")",
"{",
"retur... | Returns the feed submission ID for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"feed",
"submission",
"ID",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L494-L500 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getFeedType | public function getFeedType($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedType'];
} else {
return false;
}
} | php | public function getFeedType($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedType'];
} else {
return false;
}
} | [
"public",
"function",
"getFeedType",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
")",
"{",
"ret... | Returns the feed type for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"feed",
"type",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L509-L515 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getDateSubmitted | public function getDateSubmitted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['SubmittedDate'];
} else {
return false;
}
} | php | public function getDateSubmitted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['SubmittedDate'];
} else {
return false;
}
} | [
"public",
"function",
"getDateSubmitted",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
")",
"{",
... | Returns the date submitted for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
The time will be in the ISO8601 date format.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"date",
"submitted",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L525-L531 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getFeedStatus | public function getFeedStatus($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedProcessingStatus'];
} else {
return false;
}
} | php | public function getFeedStatus($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i]['FeedProcessingStatus'];
} else {
return false;
}
} | [
"public",
"function",
"getFeedStatus",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
")",
"{",
"r... | Returns the feed processing status for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
See <i>setFeedStatuses</i> for a list of possible values.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"feed",
"processing",
"status",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L541-L547 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getDateStarted | public function getDateStarted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList) && isset($this->feedList[$i]['StartedProcessingDate'])){
return $this->feedList[$i]['StartedProcessingDate'];
} else {
return false;
}
} | php | public function getDateStarted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList) && isset($this->feedList[$i]['StartedProcessingDate'])){
return $this->feedList[$i]['StartedProcessingDate'];
} else {
return false;
}
} | [
"public",
"function",
"getDateStarted",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"isset"... | Returns the date that the specified entry started being processed.
This method will return <b>FALSE</b> if the list has not yet been filled.
The time will be in the ISO8601 date format.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"date",
"that",
"the",
"specified",
"entry",
"started",
"being",
"processed",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L557-L563 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getDateCompleted | public function getDateCompleted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList) && isset($this->feedList[$i]['CompletedProcessingDate'])){
return $this->feedList[$i]['CompletedProcessingDate'];
} else {
return false;
}
} | php | public function getDateCompleted($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList) && isset($this->feedList[$i]['CompletedProcessingDate'])){
return $this->feedList[$i]['CompletedProcessingDate'];
} else {
return false;
}
} | [
"public",
"function",
"getDateCompleted",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"isse... | Returns the date that the specified entry finished being processed.
This method will return <b>FALSE</b> if the list has not yet been filled.
The time will be in the ISO8601 date format.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"date",
"that",
"the",
"specified",
"entry",
"finished",
"being",
"processed",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L573-L579 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFeedList.php | AmazonFeedList.getFeedInfo | public function getFeedInfo($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i];
} else {
return false;
}
} | php | public function getFeedInfo($i = 0){
if (is_numeric($i) && isset($this->feedList) && is_array($this->feedList)){
return $this->feedList[$i];
} else {
return false;
}
} | [
"public",
"function",
"getFeedInfo",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"i",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"feedList",
")",
"&&",
"is_array",
"(",
"$",
"this",
"->",
"feedList",
")",
")",
"{",
"ret... | Returns the full info for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
The array returned will have the following fields:
<ul>
<li><b>FeedSubmissionId</b> - unique ID for the feed submission</li>
<li><b>FeedType</b> - feed type for the feed submission</li>
<li><b>SubmittedDate</b> - time in ISO8601 date format</li>
<li><b>FeedProcessingStatus</b> - see <i>setFeedStatuses</i> for a list of possible values</li>
<li><b>StartedProcessingDate</b> - time in ISO8601 date format</li>
<li><b>CompletedProcessingDate</b> - time in ISO8601 date format</li>
</ul>
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return array|boolean array of values, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"full",
"info",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFeedList.php#L597-L603 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.setMaxResultsPerPage | public function setMaxResultsPerPage($num){
if (is_numeric($num) && $num <= 100 && $num >= 1){
$this->options['MaxResultsPerPage'] = $num;
} else {
return false;
}
} | php | public function setMaxResultsPerPage($num){
if (is_numeric($num) && $num <= 100 && $num >= 1){
$this->options['MaxResultsPerPage'] = $num;
} else {
return false;
}
} | [
"public",
"function",
"setMaxResultsPerPage",
"(",
"$",
"num",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"num",
")",
"&&",
"$",
"num",
"<=",
"100",
"&&",
"$",
"num",
">=",
"1",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'MaxResultsPerPage'",
"]... | Sets the maximum number of responses per page. (Optional)
This method sets the maximum number of Financial Event Groups for Amazon to return per page.
If this parameter is not set, Amazon will send 100 at a time.
@param int $num <p>Positive integer from 1 to 100.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"maximum",
"number",
"of",
"responses",
"per",
"page",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L67-L73 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.setTimeLimits | public function setTimeLimits($s, $e = null) {
if (empty($s)) {
return FALSE;
}
$times = $this->genTime($s);
$this->options['FinancialEventGroupStartedAfter'] = $times;
if (!empty($e)) {
$timee = $this->genTime($e);
$this->options['FinancialEventGroupStartedBefore'] = $timee;
} else {
unset($this->options['FinancialEventGroupStartedBefore']);
}
} | php | public function setTimeLimits($s, $e = null) {
if (empty($s)) {
return FALSE;
}
$times = $this->genTime($s);
$this->options['FinancialEventGroupStartedAfter'] = $times;
if (!empty($e)) {
$timee = $this->genTime($e);
$this->options['FinancialEventGroupStartedBefore'] = $timee;
} else {
unset($this->options['FinancialEventGroupStartedBefore']);
}
} | [
"public",
"function",
"setTimeLimits",
"(",
"$",
"s",
",",
"$",
"e",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"s",
")",
")",
"{",
"return",
"FALSE",
";",
"}",
"$",
"times",
"=",
"$",
"this",
"->",
"genTime",
"(",
"$",
"s",
")",
";... | Sets the time frame options. (Required*)
This method sets the start and end times for the next request. If this
parameter is set, Amazon will only return Financial Event Groups that occurred
between the two times given. Only the starting time is required to fetch financial event groups.
The parameters are passed through <i>strtotime</i>, so values such as "-1 hour" are fine.
@param string $s <p>A time string for the earliest time.</p>
@param string $e [optional] <p>A time string for the latest time.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"time",
"frame",
"options",
".",
"(",
"Required",
"*",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L86-L98 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.prepareToken | protected function prepareToken() {
if ($this->tokenFlag && $this->tokenUseFlag) {
$this->options['Action'] = 'ListFinancialEventGroupsByNextToken';
unset($this->options['MaxResultsPerPage']);
unset($this->options['FinancialEventGroupStartedAfter']);
unset($this->options['FinancialEventGroupStartedBefore']);
} else {
$this->options['Action'] = 'ListFinancialEventGroups';
unset($this->options['NextToken']);
$this->index = 0;
$this->list = array();
}
} | php | protected function prepareToken() {
if ($this->tokenFlag && $this->tokenUseFlag) {
$this->options['Action'] = 'ListFinancialEventGroupsByNextToken';
unset($this->options['MaxResultsPerPage']);
unset($this->options['FinancialEventGroupStartedAfter']);
unset($this->options['FinancialEventGroupStartedBefore']);
} else {
$this->options['Action'] = 'ListFinancialEventGroups';
unset($this->options['NextToken']);
$this->index = 0;
$this->list = array();
}
} | [
"protected",
"function",
"prepareToken",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"tokenFlag",
"&&",
"$",
"this",
"->",
"tokenUseFlag",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'Action'",
"]",
"=",
"'ListFinancialEventGroupsByNextToken'",
";",
"unse... | Sets up options for using tokens.
This changes key options for switching between simply fetching a list and
fetching the rest of a list using a token. Please note: because the
operation for using tokens does not use any other parameters, all other
parameters will be removed. | [
"Sets",
"up",
"options",
"for",
"using",
"tokens",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L157-L169 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.parseXml | protected function parseXml($xml) {
if (!$xml || !$xml->FinancialEventGroupList) {
return false;
}
foreach($xml->FinancialEventGroupList->children() as $x) {
$temp = array();
$temp['FinancialEventGroupId'] = (string)$x->FinancialEventGroupId;
$temp['ProcessingStatus'] = (string)$x->ProcessingStatus;
if (isset($x->FundTransferStatus)) {
$temp['FundTransferStatus'] = (string)$x->FundTransferStatus;
}
$temp['OriginalTotal']['Amount'] = (string)$x->OriginalTotal->CurrencyAmount;
$temp['OriginalTotal']['CurrencyCode'] = (string)$x->OriginalTotal->CurrencyCode;
if (isset($x->ConvertedTotal)) {
$temp['ConvertedTotal']['Amount'] = (string)$x->ConvertedTotal->CurrencyAmount;
$temp['ConvertedTotal']['CurrencyCode'] = (string)$x->ConvertedTotal->CurrencyCode;
}
if (isset($x->FundTransferDate)) {
$temp['FundTransferDate'] = (string)$x->FundTransferDate;
}
if (isset($x->TraceId)) {
$temp['TraceId'] = (string)$x->TraceId;
}
if (isset($x->AccountTail)) {
$temp['AccountTail'] = (string)$x->AccountTail;
}
$temp['BeginningBalance']['Amount'] = (string)$x->BeginningBalance->CurrencyAmount;
$temp['BeginningBalance']['CurrencyCode'] = (string)$x->BeginningBalance->CurrencyCode;
$temp['FinancialEventGroupStart'] = (string)$x->FinancialEventGroupStart;
if (isset($x->FinancialEventGroupEnd)) {
$temp['FinancialEventGroupEnd'] = (string)$x->FinancialEventGroupEnd;
}
$this->list[$this->index] = $temp;
$this->index++;
}
} | php | protected function parseXml($xml) {
if (!$xml || !$xml->FinancialEventGroupList) {
return false;
}
foreach($xml->FinancialEventGroupList->children() as $x) {
$temp = array();
$temp['FinancialEventGroupId'] = (string)$x->FinancialEventGroupId;
$temp['ProcessingStatus'] = (string)$x->ProcessingStatus;
if (isset($x->FundTransferStatus)) {
$temp['FundTransferStatus'] = (string)$x->FundTransferStatus;
}
$temp['OriginalTotal']['Amount'] = (string)$x->OriginalTotal->CurrencyAmount;
$temp['OriginalTotal']['CurrencyCode'] = (string)$x->OriginalTotal->CurrencyCode;
if (isset($x->ConvertedTotal)) {
$temp['ConvertedTotal']['Amount'] = (string)$x->ConvertedTotal->CurrencyAmount;
$temp['ConvertedTotal']['CurrencyCode'] = (string)$x->ConvertedTotal->CurrencyCode;
}
if (isset($x->FundTransferDate)) {
$temp['FundTransferDate'] = (string)$x->FundTransferDate;
}
if (isset($x->TraceId)) {
$temp['TraceId'] = (string)$x->TraceId;
}
if (isset($x->AccountTail)) {
$temp['AccountTail'] = (string)$x->AccountTail;
}
$temp['BeginningBalance']['Amount'] = (string)$x->BeginningBalance->CurrencyAmount;
$temp['BeginningBalance']['CurrencyCode'] = (string)$x->BeginningBalance->CurrencyCode;
$temp['FinancialEventGroupStart'] = (string)$x->FinancialEventGroupStart;
if (isset($x->FinancialEventGroupEnd)) {
$temp['FinancialEventGroupEnd'] = (string)$x->FinancialEventGroupEnd;
}
$this->list[$this->index] = $temp;
$this->index++;
}
} | [
"protected",
"function",
"parseXml",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
"||",
"!",
"$",
"xml",
"->",
"FinancialEventGroupList",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"FinancialEventGroupList",
"->",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L178-L213 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getGroupId | public function getGroupId($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupId'])) {
return $this->list[$i]['FinancialEventGroupId'];
} else {
return false;
}
} | php | public function getGroupId($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupId'])) {
return $this->list[$i]['FinancialEventGroupId'];
} else {
return false;
}
} | [
"public",
"function",
"getGroupId",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'FinancialEventGroupId'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i",... | Returns the ID for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"ID",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L253-L259 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getProcessingStatus | public function getProcessingStatus($i = 0) {
if (isset($this->list[$i]['ProcessingStatus'])) {
return $this->list[$i]['ProcessingStatus'];
} else {
return false;
}
} | php | public function getProcessingStatus($i = 0) {
if (isset($this->list[$i]['ProcessingStatus'])) {
return $this->list[$i]['ProcessingStatus'];
} else {
return false;
}
} | [
"public",
"function",
"getProcessingStatus",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'ProcessingStatus'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
... | Returns the processing status for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean "Open" or "Closed", or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"processing",
"status",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L268-L274 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getTransferStatus | public function getTransferStatus($i = 0) {
if (isset($this->list[$i]['FundTransferStatus'])) {
return $this->list[$i]['FundTransferStatus'];
} else {
return false;
}
} | php | public function getTransferStatus($i = 0) {
if (isset($this->list[$i]['FundTransferStatus'])) {
return $this->list[$i]['FundTransferStatus'];
} else {
return false;
}
} | [
"public",
"function",
"getTransferStatus",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'FundTransferStatus'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
... | Returns the transfer status for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"transfer",
"status",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L283-L289 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getOriginalTotal | public function getOriginalTotal($i = 0, $only = false) {
if (isset($this->list[$i]['OriginalTotal'])) {
if ($only) {
return $this->list[$i]['OriginalTotal']['Amount'];
} else {
return $this->list[$i]['OriginalTotal'];
}
} else {
return false;
}
} | php | public function getOriginalTotal($i = 0, $only = false) {
if (isset($this->list[$i]['OriginalTotal'])) {
if ($only) {
return $this->list[$i]['OriginalTotal']['Amount'];
} else {
return $this->list[$i]['OriginalTotal'];
}
} else {
return false;
}
} | [
"public",
"function",
"getOriginalTotal",
"(",
"$",
"i",
"=",
"0",
",",
"$",
"only",
"=",
"false",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'OriginalTotal'",
"]",
")",
")",
"{",
"if",
"(",
"$",
"on... | Returns the original total for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
If an array is returned, it will have the fields <b>Amount</b> and <b>CurrencyCode</b>.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@param boolean $only [optional] <p>set to <b>TRUE</b> to get only the amount</p>
@return array|string|boolean array, single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"original",
"total",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L300-L310 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getConvertedTotal | public function getConvertedTotal($i = 0, $only = false) {
if (isset($this->list[$i]['ConvertedTotal'])) {
if ($only) {
return $this->list[$i]['ConvertedTotal']['Amount'];
} else {
return $this->list[$i]['ConvertedTotal'];
}
} else {
return false;
}
} | php | public function getConvertedTotal($i = 0, $only = false) {
if (isset($this->list[$i]['ConvertedTotal'])) {
if ($only) {
return $this->list[$i]['ConvertedTotal']['Amount'];
} else {
return $this->list[$i]['ConvertedTotal'];
}
} else {
return false;
}
} | [
"public",
"function",
"getConvertedTotal",
"(",
"$",
"i",
"=",
"0",
",",
"$",
"only",
"=",
"false",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'ConvertedTotal'",
"]",
")",
")",
"{",
"if",
"(",
"$",
"... | Returns the converted total for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
If an array is returned, it will have the fields <b>Amount</b> and <b>CurrencyCode</b>.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@param boolean $only [optional] <p>set to <b>TRUE</b> to get only the amount</p>
@return array|string|boolean array, single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"converted",
"total",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L321-L331 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getTransferDate | public function getTransferDate($i = 0) {
if (isset($this->list[$i]['FundTransferDate'])) {
return $this->list[$i]['FundTransferDate'];
} else {
return false;
}
} | php | public function getTransferDate($i = 0) {
if (isset($this->list[$i]['FundTransferDate'])) {
return $this->list[$i]['FundTransferDate'];
} else {
return false;
}
} | [
"public",
"function",
"getTransferDate",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'FundTransferDate'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i",... | Returns the transfer date for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean date in ISO 8601 format, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"transfer",
"date",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L340-L346 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getTraceId | public function getTraceId($i = 0) {
if (isset($this->list[$i]['TraceId'])) {
return $this->list[$i]['TraceId'];
} else {
return false;
}
} | php | public function getTraceId($i = 0) {
if (isset($this->list[$i]['TraceId'])) {
return $this->list[$i]['TraceId'];
} else {
return false;
}
} | [
"public",
"function",
"getTraceId",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'TraceId'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",... | Returns the trace ID for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"trace",
"ID",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L355-L361 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getAccountTail | public function getAccountTail($i = 0) {
if (isset($this->list[$i]['AccountTail'])) {
return $this->list[$i]['AccountTail'];
} else {
return false;
}
} | php | public function getAccountTail($i = 0) {
if (isset($this->list[$i]['AccountTail'])) {
return $this->list[$i]['AccountTail'];
} else {
return false;
}
} | [
"public",
"function",
"getAccountTail",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'AccountTail'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]"... | Returns the account tail for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"account",
"tail",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L370-L376 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getBeginningBalance | public function getBeginningBalance($i = 0, $only = false) {
if (isset($this->list[$i]['BeginningBalance'])) {
if ($only) {
return $this->list[$i]['BeginningBalance']['Amount'];
} else {
return $this->list[$i]['BeginningBalance'];
}
} else {
return false;
}
} | php | public function getBeginningBalance($i = 0, $only = false) {
if (isset($this->list[$i]['BeginningBalance'])) {
if ($only) {
return $this->list[$i]['BeginningBalance']['Amount'];
} else {
return $this->list[$i]['BeginningBalance'];
}
} else {
return false;
}
} | [
"public",
"function",
"getBeginningBalance",
"(",
"$",
"i",
"=",
"0",
",",
"$",
"only",
"=",
"false",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'BeginningBalance'",
"]",
")",
")",
"{",
"if",
"(",
"$",... | Returns the balance at the beginning of the settlement period for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
If an array is returned, it will have the fields <b>Amount</b> and <b>CurrencyCode</b>.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@param boolean $only [optional] <p>set to <b>TRUE</b> to get only the amount</p>
@return array|string|boolean array, single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"balance",
"at",
"the",
"beginning",
"of",
"the",
"settlement",
"period",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L387-L397 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getStartDate | public function getStartDate($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupStart'])) {
return $this->list[$i]['FinancialEventGroupStart'];
} else {
return false;
}
} | php | public function getStartDate($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupStart'])) {
return $this->list[$i]['FinancialEventGroupStart'];
} else {
return false;
}
} | [
"public",
"function",
"getStartDate",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'FinancialEventGroupStart'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
... | Returns the start date for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean date in ISO 8601 format, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"start",
"date",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L406-L412 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFinancialGroupList.php | AmazonFinancialGroupList.getEndDate | public function getEndDate($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupEnd'])) {
return $this->list[$i]['FinancialEventGroupEnd'];
} else {
return false;
}
} | php | public function getEndDate($i = 0) {
if (isset($this->list[$i]['FinancialEventGroupEnd'])) {
return $this->list[$i]['FinancialEventGroupEnd'];
} else {
return false;
}
} | [
"public",
"function",
"getEndDate",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"list",
"[",
"$",
"i",
"]",
"[",
"'FinancialEventGroupEnd'",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"list",
"[",
"$",
"i"... | Returns the end date for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean date in ISO 8601 format, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"end",
"date",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFinancialGroupList.php#L421-L427 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setFulfillmentAction | public function setFulfillmentAction($s){
if ($s === 'Ship' || $s === 'Hold'){
$this->options['FulfillmentAction'] = $s;
} else {
$this->log("Tried to set fulfillment action to invalid value", 'Warning');
return false;
}
} | php | public function setFulfillmentAction($s){
if ($s === 'Ship' || $s === 'Hold'){
$this->options['FulfillmentAction'] = $s;
} else {
$this->log("Tried to set fulfillment action to invalid value", 'Warning');
return false;
}
} | [
"public",
"function",
"setFulfillmentAction",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"$",
"s",
"===",
"'Ship'",
"||",
"$",
"s",
"===",
"'Hold'",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'FulfillmentAction'",
"]",
"=",
"$",
"s",
";",
"}",
"else",
... | Sets the fulfillment action that the shipment should use. (Optional)
This method indicates whether the order should ship now or be put on hold.
If this option is not sent, Amazon will assume that the order will ship now.
@param string $s <p>"Ship" or "Hold"</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"fulfillment",
"action",
"that",
"the",
"shipment",
"should",
"use",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L84-L91 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setDate | public function setDate($s){
if (is_string($s)){
$time = $this->genTime($s);
$this->options['DisplayableOrderDateTime'] = $time;
} else {
return false;
}
} | php | public function setDate($s){
if (is_string($s)){
$time = $this->genTime($s);
$this->options['DisplayableOrderDateTime'] = $time;
} else {
return false;
}
} | [
"public",
"function",
"setDate",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"time",
"=",
"$",
"this",
"->",
"genTime",
"(",
"$",
"s",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'DisplayableOrderDateTime'"... | Sets the displayed timestamp. (Required)
This method sets the displayed timestamp to be sent in the next request.
This parameter is required for creating a fulfillment order with Amazon.
The parameter is passed through <i>strtotime</i>, so values such as "-1 hour" are fine.
@param string $s <p>Time string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"displayed",
"timestamp",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L102-L109 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setShippingSpeed | public function setShippingSpeed($s){
if (is_string($s)){
if ($s == 'Standard' || $s == 'Expedited' || $s == 'Priority'){
$this->options['ShippingSpeedCategory'] = $s;
} else {
$this->log("Tried to set shipping status to invalid value",'Warning');
return false;
}
} else {
return false;
}
} | php | public function setShippingSpeed($s){
if (is_string($s)){
if ($s == 'Standard' || $s == 'Expedited' || $s == 'Priority'){
$this->options['ShippingSpeedCategory'] = $s;
} else {
$this->log("Tried to set shipping status to invalid value",'Warning');
return false;
}
} else {
return false;
}
} | [
"public",
"function",
"setShippingSpeed",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"if",
"(",
"$",
"s",
"==",
"'Standard'",
"||",
"$",
"s",
"==",
"'Expedited'",
"||",
"$",
"s",
"==",
"'Priority'",
")",
"{",
"... | Sets the shipping speed. (Required)
This method sets the shipping speed to be sent in the next request.
This parameter is required for creating a fulfillment order with Amazon.
@param string $s <p>"Standard", "Expedited", or "Priority"</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"shipping",
"speed",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L135-L146 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setAddress | public function setAddress($a){
if (is_null($a) || is_string($a) || !$a){
$this->log("Tried to set address to invalid values",'Warning');
return false;
}
$this->resetAddress();
$this->options['DestinationAddress.Name'] = $a['Name'];
$this->options['DestinationAddress.Line1'] = $a['Line1'];
if (array_key_exists('Line2', $a)){
$this->options['DestinationAddress.Line2'] = $a['Line2'];
} else {
$this->options['DestinationAddress.Line2'] = null;
}
if (array_key_exists('Line3', $a)){
$this->options['DestinationAddress.Line3'] = $a['Line3'];
} else {
$this->options['DestinationAddress.Line3'] = null;
}
if (array_key_exists('DistrictOrCounty', $a)){
$this->options['DestinationAddress.DistrictOrCounty'] = $a['DistrictOrCounty'];
} else {
$this->options['DestinationAddress.DistrictOrCounty'] = null;
}
$this->options['DestinationAddress.City'] = $a['City'];
$this->options['DestinationAddress.StateOrProvinceCode'] = $a['StateOrProvinceCode'];
$this->options['DestinationAddress.CountryCode'] = $a['CountryCode'];
$this->options['DestinationAddress.PostalCode'] = $a['PostalCode'];
if (array_key_exists('PhoneNumber', $a)){
$this->options['DestinationAddress.PhoneNumber'] = $a['PhoneNumber'];
} else {
$this->options['DestinationAddress.PhoneNumber'] = null;
}
} | php | public function setAddress($a){
if (is_null($a) || is_string($a) || !$a){
$this->log("Tried to set address to invalid values",'Warning');
return false;
}
$this->resetAddress();
$this->options['DestinationAddress.Name'] = $a['Name'];
$this->options['DestinationAddress.Line1'] = $a['Line1'];
if (array_key_exists('Line2', $a)){
$this->options['DestinationAddress.Line2'] = $a['Line2'];
} else {
$this->options['DestinationAddress.Line2'] = null;
}
if (array_key_exists('Line3', $a)){
$this->options['DestinationAddress.Line3'] = $a['Line3'];
} else {
$this->options['DestinationAddress.Line3'] = null;
}
if (array_key_exists('DistrictOrCounty', $a)){
$this->options['DestinationAddress.DistrictOrCounty'] = $a['DistrictOrCounty'];
} else {
$this->options['DestinationAddress.DistrictOrCounty'] = null;
}
$this->options['DestinationAddress.City'] = $a['City'];
$this->options['DestinationAddress.StateOrProvinceCode'] = $a['StateOrProvinceCode'];
$this->options['DestinationAddress.CountryCode'] = $a['CountryCode'];
$this->options['DestinationAddress.PostalCode'] = $a['PostalCode'];
if (array_key_exists('PhoneNumber', $a)){
$this->options['DestinationAddress.PhoneNumber'] = $a['PhoneNumber'];
} else {
$this->options['DestinationAddress.PhoneNumber'] = null;
}
} | [
"public",
"function",
"setAddress",
"(",
"$",
"a",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"a",
")",
"||",
"is_string",
"(",
"$",
"a",
")",
"||",
"!",
"$",
"a",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Tried to set address to invalid values\"",
... | Sets the address. (Required)
This method sets the destination address to be sent in the next request.
This parameter is required for creating a fulfillment order with Amazon.
The array provided should have the following fields:
<ul>
<li><b>Name</b> - max: 50 char</li>
<li><b>Line1</b> - max: 180 char</li>
<li><b>Line2</b> (optional) - max: 60 char</li>
<li><b>Line3</b> (optional) - max: 60 char</li>
<li><b>DistrictOrCounty</b> (optional) - max: 150 char</li>
<li><b>City</b> - max: 50 char</li>
<li><b>StateOrProvinceCode</b> - max: 150 char</li>
<li><b>CountryCode</b> - 2 digits</li>
<li><b>PostalCode</b> - max: 20 char</li>
<li><b>PhoneNumber</b> - max: 20 char</li>
</ul>
@param array $a <p>See above.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"address",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L169-L201 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.resetAddress | protected function resetAddress(){
unset($this->options['DestinationAddress.Name']);
unset($this->options['DestinationAddress.Line1']);
unset($this->options['DestinationAddress.Line2']);
unset($this->options['DestinationAddress.Line3']);
unset($this->options['DestinationAddress.DistrictOrCounty']);
unset($this->options['DestinationAddress.City']);
unset($this->options['DestinationAddress.StateOrProvinceCode']);
unset($this->options['DestinationAddress.CountryCode']);
unset($this->options['DestinationAddress.PostalCode']);
unset($this->options['DestinationAddress.PhoneNumber']);
} | php | protected function resetAddress(){
unset($this->options['DestinationAddress.Name']);
unset($this->options['DestinationAddress.Line1']);
unset($this->options['DestinationAddress.Line2']);
unset($this->options['DestinationAddress.Line3']);
unset($this->options['DestinationAddress.DistrictOrCounty']);
unset($this->options['DestinationAddress.City']);
unset($this->options['DestinationAddress.StateOrProvinceCode']);
unset($this->options['DestinationAddress.CountryCode']);
unset($this->options['DestinationAddress.PostalCode']);
unset($this->options['DestinationAddress.PhoneNumber']);
} | [
"protected",
"function",
"resetAddress",
"(",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"options",
"[",
"'DestinationAddress.Name'",
"]",
")",
";",
"unset",
"(",
"$",
"this",
"->",
"options",
"[",
"'DestinationAddress.Line1'",
"]",
")",
";",
"unset",
"(",
... | Resets the address options.
Since address is a required parameter, these options should not be removed
without replacing them, so this method is not public. | [
"Resets",
"the",
"address",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L209-L220 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setFulfillmentPolicy | public function setFulfillmentPolicy($s){
if (is_string($s)){
if ($s == 'FillOrKill' || $s == 'FillAll' || $s == 'FillAllAvailable'){
$this->options['FulfillmentPolicy'] = $s;
} else {
$this->log("Tried to set fulfillment policy to invalid value",'Warning');
return false;
}
} else {
return false;
}
} | php | public function setFulfillmentPolicy($s){
if (is_string($s)){
if ($s == 'FillOrKill' || $s == 'FillAll' || $s == 'FillAllAvailable'){
$this->options['FulfillmentPolicy'] = $s;
} else {
$this->log("Tried to set fulfillment policy to invalid value",'Warning');
return false;
}
} else {
return false;
}
} | [
"public",
"function",
"setFulfillmentPolicy",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"if",
"(",
"$",
"s",
"==",
"'FillOrKill'",
"||",
"$",
"s",
"==",
"'FillAll'",
"||",
"$",
"s",
"==",
"'FillAllAvailable'",
")"... | Sets the fulfillment policy. (Optional)
This method sets the Fulfillment Policy to be sent in the next request.
If this parameter is not set, Amazon will assume a <i>FillOrKill</i> policy.
Here is a quick description of the policies:
<ul>
<li><b>FillOrKill</b> - cancel the entire order if any of it cannot be fulfilled</li>
<li><b>FillAll</b> - send all possible, wait on any unfulfillable items</li>
<li><b>FillAllAvailable</b> - send all possible, cancel any unfulfillable items</li>
</ul>
@param string $s <p>"FillOrKill", "FillAll", or "FillAllAvailable"</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"fulfillment",
"policy",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L236-L247 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setEmails | public function setEmails($s){
if (is_string($s)){
$this->resetEmails();
$this->options['NotificationEmailList.member.1'] = $s;
} else if (is_array($s) && $s){
$this->resetEmails();
$i = 1;
foreach ($s as $x){
$this->options['NotificationEmailList.member.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setEmails($s){
if (is_string($s)){
$this->resetEmails();
$this->options['NotificationEmailList.member.1'] = $s;
} else if (is_array($s) && $s){
$this->resetEmails();
$i = 1;
foreach ($s as $x){
$this->options['NotificationEmailList.member.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setEmails",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetEmails",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'NotificationEmailList.member.1'",
"]",
"=",
"$",
"... | Sets the email(s). (Optional)
This method sets the list of Email addresses to be sent in the next request.
Setting this parameter tells Amazon who to send emails to regarding the
completion of the shipment.
@param array|string $s <p>A list of email addresses, or a single email address. (max: 64 chars each)</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"email",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L268-L282 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.resetEmails | public function resetEmails(){
foreach($this->options as $op=>$junk){
if(preg_match("#NotificationEmailList#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetEmails(){
foreach($this->options as $op=>$junk){
if(preg_match("#NotificationEmailList#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetEmails",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#NotificationEmailList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
... | Removes email options.
Use this in case you change your mind and want to remove the email
parameters you previously set. | [
"Removes",
"email",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L290-L296 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setCodSettings | public function setCodSettings($cu, $r = null, $c = null, $ct = null, $s = null, $st = null) {
if (empty($cu)) {
return false;
}
if (isset($r)) {
if (filter_var($r, FILTER_VALIDATE_BOOLEAN)) {
$r = 'true';
} else {
$r = 'false';
}
$this->options['CODSettings.IsCODRequired'] = $r;
}
//COD charge
if (isset($c) && is_numeric($c)) {
$this->options['CODSettings.CODCharge.Value'] = $c;
$this->options['CODSettings.CODCharge.CurrencyCode'] = $cu;
}
//COD charge tax
if (isset($ct) && is_numeric($ct)) {
$this->options['CODSettings.CODChargeTax.Value'] = $ct;
$this->options['CODSettings.CODChargeTax.CurrencyCode'] = $cu;
}
//shipping charge
if (isset($s) && is_numeric($s)) {
$this->options['CODSettings.ShippingCharge.Value'] = $s;
$this->options['CODSettings.ShippingCharge.CurrencyCode'] = $cu;
}
//shipping charge tax
if (isset($st) && is_numeric($st)) {
$this->options['CODSettings.ShippingChargeTax.Value'] = $st;
$this->options['CODSettings.ShippingChargeTax.CurrencyCode'] = $cu;
}
} | php | public function setCodSettings($cu, $r = null, $c = null, $ct = null, $s = null, $st = null) {
if (empty($cu)) {
return false;
}
if (isset($r)) {
if (filter_var($r, FILTER_VALIDATE_BOOLEAN)) {
$r = 'true';
} else {
$r = 'false';
}
$this->options['CODSettings.IsCODRequired'] = $r;
}
//COD charge
if (isset($c) && is_numeric($c)) {
$this->options['CODSettings.CODCharge.Value'] = $c;
$this->options['CODSettings.CODCharge.CurrencyCode'] = $cu;
}
//COD charge tax
if (isset($ct) && is_numeric($ct)) {
$this->options['CODSettings.CODChargeTax.Value'] = $ct;
$this->options['CODSettings.CODChargeTax.CurrencyCode'] = $cu;
}
//shipping charge
if (isset($s) && is_numeric($s)) {
$this->options['CODSettings.ShippingCharge.Value'] = $s;
$this->options['CODSettings.ShippingCharge.CurrencyCode'] = $cu;
}
//shipping charge tax
if (isset($st) && is_numeric($st)) {
$this->options['CODSettings.ShippingChargeTax.Value'] = $st;
$this->options['CODSettings.ShippingChargeTax.CurrencyCode'] = $cu;
}
} | [
"public",
"function",
"setCodSettings",
"(",
"$",
"cu",
",",
"$",
"r",
"=",
"null",
",",
"$",
"c",
"=",
"null",
",",
"$",
"ct",
"=",
"null",
",",
"$",
"s",
"=",
"null",
",",
"$",
"st",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"c... | Sets the COD settings. (Optional)
This method sets various settings related to COD (Cash on Delivery) orders.
Any setting that is passed as <p>NULL</p> will not be set.
Amazon will assume a value of 0 for any of the currency options not set.
@param string $cu <p>ISO 4217 currency code</p>
@param boolean $r [optional] <p>Whether or not COD is required for the order.</p>
@param float $c [optional] <p>COD charge to collect</p>
@param float $ct [optional] <p>tax on the COD charge to collect</p>
@param float $s [optional] <p>shipping charge to collect</p>
@param float $st [optional] <p>tax on the shipping charge to collect</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"COD",
"settings",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L312-L344 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.resetCodSettings | public function resetCodSettings(){
foreach($this->options as $op=>$junk){
if(preg_match("#CODSettings#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetCodSettings(){
foreach($this->options as $op=>$junk){
if(preg_match("#CODSettings#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetCodSettings",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#CODSettings#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
"$",
... | Removes COD settings options.
Use this in case you change your mind and want to remove the COD settings you previously set. | [
"Removes",
"COD",
"settings",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L351-L357 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setDeliveryWindow | public function setDeliveryWindow($s, $e){
if (empty($s) || empty($e)) {
return false;
}
$times = $this->genTime($s);
$this->options['DeliveryWindow.StartDateTime'] = $times;
$timee = $this->genTime($e);
$this->options['DeliveryWindow.EndDateTime'] = $timee;
} | php | public function setDeliveryWindow($s, $e){
if (empty($s) || empty($e)) {
return false;
}
$times = $this->genTime($s);
$this->options['DeliveryWindow.StartDateTime'] = $times;
$timee = $this->genTime($e);
$this->options['DeliveryWindow.EndDateTime'] = $timee;
} | [
"public",
"function",
"setDeliveryWindow",
"(",
"$",
"s",
",",
"$",
"e",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"s",
")",
"||",
"empty",
"(",
"$",
"e",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"times",
"=",
"$",
"this",
"->",
"genTime"... | Sets the delivery window for the order. (Optional)
This method sets the delivery window's start and end times for the next request.
This option is required if the shipping speed is set to "ScheduledDelivery".
The parameters are passed through <i>strtotime</i>, so values such as "-1 hour" are fine.
@param string $s <p>A time string for the earliest time.</p>
@param string $e <p>A time string for the latest time.</p>
@return boolean <b>FALSE</b> if improper input
@see genTime | [
"Sets",
"the",
"delivery",
"window",
"for",
"the",
"order",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L370-L378 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.setItems | public function setItems($a){
if (is_null($a) || is_string($a) || !$a){
$this->log("Tried to set Items to invalid values",'Warning');
return false;
}
$this->resetItems();
$i = 1;
foreach ($a as $x){
if (is_array($x) && array_key_exists('SellerSKU', $x) && array_key_exists('SellerFulfillmentOrderItemId', $x) && array_key_exists('Quantity', $x)){
$this->options['Items.member.'.$i.'.SellerSKU'] = $x['SellerSKU'];
$this->options['Items.member.'.$i.'.SellerFulfillmentOrderItemId'] = $x['SellerFulfillmentOrderItemId'];
$this->options['Items.member.'.$i.'.Quantity'] = $x['Quantity'];
if (array_key_exists('GiftMessage', $x)){
$this->options['Items.member.'.$i.'.GiftMessage'] = $x['GiftMessage'];
}
if (array_key_exists('Comment', $x)){
$this->options['Items.member.'.$i.'.DisplayableComment'] = $x['Comment'];
}
if (array_key_exists('FulfillmentNetworkSKU', $x)){
$this->options['Items.member.'.$i.'.FulfillmentNetworkSKU'] = $x['FulfillmentNetworkSKU'];
}
if (array_key_exists('OrderItemDisposition', $x)){
$this->options['Items.member.'.$i.'.OrderItemDisposition'] = $x['OrderItemDisposition'];
}
if (array_key_exists('PerUnitDeclaredValue', $x)){
$this->options['Items.member.'.$i.'.PerUnitDeclaredValue.CurrencyCode'] = $x['PerUnitDeclaredValue']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitDeclaredValue.Value'] = $x['PerUnitDeclaredValue']['Value'];
}
if (array_key_exists('PerUnitPrice', $x)){
$this->options['Items.member.'.$i.'.PerUnitPrice.CurrencyCode'] = $x['PerUnitPrice']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitPrice.Value'] = $x['PerUnitPrice']['Value'];
}
if (array_key_exists('PerUnitTax', $x)){
$this->options['Items.member.'.$i.'.PerUnitTax.CurrencyCode'] = $x['PerUnitTax']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitTax.Value'] = $x['PerUnitTax']['Value'];
}
$i++;
} else {
$this->resetItems();
$this->log("Tried to set Items with invalid array",'Warning');
return false;
}
}
} | php | public function setItems($a){
if (is_null($a) || is_string($a) || !$a){
$this->log("Tried to set Items to invalid values",'Warning');
return false;
}
$this->resetItems();
$i = 1;
foreach ($a as $x){
if (is_array($x) && array_key_exists('SellerSKU', $x) && array_key_exists('SellerFulfillmentOrderItemId', $x) && array_key_exists('Quantity', $x)){
$this->options['Items.member.'.$i.'.SellerSKU'] = $x['SellerSKU'];
$this->options['Items.member.'.$i.'.SellerFulfillmentOrderItemId'] = $x['SellerFulfillmentOrderItemId'];
$this->options['Items.member.'.$i.'.Quantity'] = $x['Quantity'];
if (array_key_exists('GiftMessage', $x)){
$this->options['Items.member.'.$i.'.GiftMessage'] = $x['GiftMessage'];
}
if (array_key_exists('Comment', $x)){
$this->options['Items.member.'.$i.'.DisplayableComment'] = $x['Comment'];
}
if (array_key_exists('FulfillmentNetworkSKU', $x)){
$this->options['Items.member.'.$i.'.FulfillmentNetworkSKU'] = $x['FulfillmentNetworkSKU'];
}
if (array_key_exists('OrderItemDisposition', $x)){
$this->options['Items.member.'.$i.'.OrderItemDisposition'] = $x['OrderItemDisposition'];
}
if (array_key_exists('PerUnitDeclaredValue', $x)){
$this->options['Items.member.'.$i.'.PerUnitDeclaredValue.CurrencyCode'] = $x['PerUnitDeclaredValue']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitDeclaredValue.Value'] = $x['PerUnitDeclaredValue']['Value'];
}
if (array_key_exists('PerUnitPrice', $x)){
$this->options['Items.member.'.$i.'.PerUnitPrice.CurrencyCode'] = $x['PerUnitPrice']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitPrice.Value'] = $x['PerUnitPrice']['Value'];
}
if (array_key_exists('PerUnitTax', $x)){
$this->options['Items.member.'.$i.'.PerUnitTax.CurrencyCode'] = $x['PerUnitTax']['CurrencyCode'];
$this->options['Items.member.'.$i.'.PerUnitTax.Value'] = $x['PerUnitTax']['Value'];
}
$i++;
} else {
$this->resetItems();
$this->log("Tried to set Items with invalid array",'Warning');
return false;
}
}
} | [
"public",
"function",
"setItems",
"(",
"$",
"a",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"a",
")",
"||",
"is_string",
"(",
"$",
"a",
")",
"||",
"!",
"$",
"a",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Tried to set Items to invalid values\"",
",",... | Sets the items. (Required)
This method sets the Fulfillment Order ID to be sent in the next request.
This parameter is required for creating a fulfillment order with Amazon.
The array provided should contain a list of arrays, each with the following fields:
<ul>
<li><b>SellerSKU</b> - max: 50 char</li>
<li><b>SellerFulfillmentOrderItemId</b> - useful for differentiating different items with the same SKU, max: 50 char</li>
<li><b>Quantity</b> - numeric</li>
<li><b>GiftMessage</b> (optional) - max: 512 char</li>
<li><b>DisplayableComment</b> (optional) - max: 250 char</li>
<li><b>FulfillmentNetworkSKU</b> (optional) - usually returned by <i>AmazonFulfillmentPreview</i></li>
<li><b>OrderItemDisposition</b> (optional) - "Sellable" or "Unsellable"</li>
<li><b>PerUnitDeclaredValue</b> (optional array) -</li>
<ul>
<li><b>CurrencyCode</b> - ISO 4217 currency code</li>
<li><b>Value</b> - number</li>
</ul>
<li><b>PerUnitPrice</b> (optional array) - same structure as PerUnitDeclaredValue</li>
<li><b>PerUnitTax</b> (optional array) - same structure as PerUnitDeclaredValue</li>
</ul>
@param array $a <p>See above.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"items",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L415-L459 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.createOrder | public function createOrder(){
if (!array_key_exists('SellerFulfillmentOrderId',$this->options)){
$this->log("Seller Fulfillment Order ID must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderId',$this->options)){
$this->log("Displayable Order ID must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderDateTime',$this->options)){
$this->log("Date must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderComment',$this->options)){
$this->log("Comment must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('ShippingSpeedCategory',$this->options)){
$this->log("Shipping Speed must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DestinationAddress.Name',$this->options)){
$this->log("Address must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('Items.member.1.SellerSKU',$this->options)){
$this->log("Items must be set in order to create an order",'Warning');
return false;
}
$this->prepareCreate();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
if ($this->mockMode){
$response = $this->fetchMockResponse();
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
}
if (!$this->checkResponse($response)){
return false;
} else {
$this->log("Successfully created Fulfillment Order ".$this->options['SellerFulfillmentOrderId']." / ".$this->options['DisplayableOrderId']);
return true;
}
} | php | public function createOrder(){
if (!array_key_exists('SellerFulfillmentOrderId',$this->options)){
$this->log("Seller Fulfillment Order ID must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderId',$this->options)){
$this->log("Displayable Order ID must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderDateTime',$this->options)){
$this->log("Date must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DisplayableOrderComment',$this->options)){
$this->log("Comment must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('ShippingSpeedCategory',$this->options)){
$this->log("Shipping Speed must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('DestinationAddress.Name',$this->options)){
$this->log("Address must be set in order to create an order",'Warning');
return false;
}
if (!array_key_exists('Items.member.1.SellerSKU',$this->options)){
$this->log("Items must be set in order to create an order",'Warning');
return false;
}
$this->prepareCreate();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
if ($this->mockMode){
$response = $this->fetchMockResponse();
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
}
if (!$this->checkResponse($response)){
return false;
} else {
$this->log("Successfully created Fulfillment Order ".$this->options['SellerFulfillmentOrderId']." / ".$this->options['DisplayableOrderId']);
return true;
}
} | [
"public",
"function",
"createOrder",
"(",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'SellerFulfillmentOrderId'",
",",
"$",
"this",
"->",
"options",
")",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Seller Fulfillment Order ID must be set in order to create ... | Creates a Fulfillment Order with Amazon.
Submits a <i>CreateFulfillmentOrder</i> request to Amazon. In order to do this,
a number of parameters are required. Amazon will send back an HTTP response,
so there is no data to retrieve afterwards. The following parameters are required:
fulfillment order ID, displayed order ID, displayed timestamp, comment,
shipping speed, address, and items.
@return boolean <b>TRUE</b> if the order creation was successful, <b>FALSE</b> if something goes wrong | [
"Creates",
"a",
"Fulfillment",
"Order",
"with",
"Amazon",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L485-L532 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonFulfillmentOrderCreator.php | AmazonFulfillmentOrderCreator.updateOrder | public function updateOrder(){
if (!array_key_exists('SellerFulfillmentOrderId',$this->options)){
$this->log("Seller Fulfillment Order ID must be set in order to update an order",'Warning');
return false;
}
$this->prepareUpdate();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
if ($this->mockMode){
$response = $this->fetchMockResponse();
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
}
if (!$this->checkResponse($response)){
return false;
} else {
$this->log("Successfully updated Fulfillment Order ".$this->options['SellerFulfillmentOrderId']);
return true;
}
} | php | public function updateOrder(){
if (!array_key_exists('SellerFulfillmentOrderId',$this->options)){
$this->log("Seller Fulfillment Order ID must be set in order to update an order",'Warning');
return false;
}
$this->prepareUpdate();
$url = $this->urlbase.$this->urlbranch;
$query = $this->genQuery();
if ($this->mockMode){
$response = $this->fetchMockResponse();
} else {
$response = $this->sendRequest($url, array('Post'=>$query));
}
if (!$this->checkResponse($response)){
return false;
} else {
$this->log("Successfully updated Fulfillment Order ".$this->options['SellerFulfillmentOrderId']);
return true;
}
} | [
"public",
"function",
"updateOrder",
"(",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'SellerFulfillmentOrderId'",
",",
"$",
"this",
"->",
"options",
")",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"\"Seller Fulfillment Order ID must be set in order to update ... | Updates a Fulfillment Order with Amazon.
Submits an <i>UpdateFulfillmentOrder</i> request to Amazon. In order to do this,
a fulfillment order ID is required. Amazon will send back an HTTP response,
so there is no data to retrieve afterwards.
@return boolean <b>TRUE</b> if the order creation was successful, <b>FALSE</b> if something goes wrong | [
"Updates",
"a",
"Fulfillment",
"Order",
"with",
"Amazon",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonFulfillmentOrderCreator.php#L542-L565 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.setReportIds | public function setReportIds($s){
if (is_string($s)){
$this->resetReportIds();
$this->options['ReportIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetReportIds();
$i = 1;
foreach ($s as $x){
$this->options['ReportIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setReportIds($s){
if (is_string($s)){
$this->resetReportIds();
$this->options['ReportIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetReportIds();
$i = 1;
foreach ($s as $x){
$this->options['ReportIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setReportIds",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetReportIds",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'ReportIdList.Id.1'",
"]",
"=",
"$",
"s",
"... | sets the request ID(s). (Required)
This method sets the list of Report IDs to be sent in the next request.
@param array|string $s <p>A list of Report IDs, or a single ID string.</p>
@return boolean <b>FALSE</b> if improper input | [
"sets",
"the",
"request",
"ID",
"(",
"s",
")",
".",
"(",
"Required",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L74-L88 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.resetReportIds | protected function resetReportIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#ReportIdList#",$op)){
unset($this->options[$op]);
}
}
} | php | protected function resetReportIds(){
foreach($this->options as $op=>$junk){
if(preg_match("#ReportIdList#",$op)){
unset($this->options[$op]);
}
}
} | [
"protected",
"function",
"resetReportIds",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#ReportIdList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
"$"... | Resets the ASIN options.
Since report ID is a required parameter, these options should not be removed
without replacing them, so this method is not public. | [
"Resets",
"the",
"ASIN",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L96-L102 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.setAcknowledgedFilter | public function setAcknowledgedFilter($s){
if ($s == 'true' || (is_bool($s) && $s == true)){
$this->options['Acknowledged'] = 'true';
} else if ($s == 'false' || (is_bool($s) && $s == false)){
$this->options['Acknowledged'] = 'false';
} else if (is_null($s)){
unset($this->options['Acknowledged']);
} else {
return false;
}
} | php | public function setAcknowledgedFilter($s){
if ($s == 'true' || (is_bool($s) && $s == true)){
$this->options['Acknowledged'] = 'true';
} else if ($s == 'false' || (is_bool($s) && $s == false)){
$this->options['Acknowledged'] = 'false';
} else if (is_null($s)){
unset($this->options['Acknowledged']);
} else {
return false;
}
} | [
"public",
"function",
"setAcknowledgedFilter",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"$",
"s",
"==",
"'true'",
"||",
"(",
"is_bool",
"(",
"$",
"s",
")",
"&&",
"$",
"s",
"==",
"true",
")",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'Acknowledged'",... | Sets the report acknowledgement filter. (Optional)
Setting this parameter to <b>TRUE</b> lists only reports that have been
acknowledged. Setting this parameter to <b>FALSE</b> lists only reports
that have not been acknowledged yet.
@param string|boolean $s <p>"true" or "false", or boolean</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"report",
"acknowledgement",
"filter",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L113-L123 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.getReportId | public function getReportId($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['ReportId'];
} else {
return false;
}
} | php | public function getReportId($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['ReportId'];
} else {
return false;
}
} | [
"public",
"function",
"getReportId",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"reportList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"i",
")",
")",
"{",
"return",
"$",... | Returns the report ID for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"report",
"ID",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L199-L208 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.getReportRequestId | public function getReportRequestId($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['ReportRequestId'];
} else {
return false;
}
} | php | public function getReportRequestId($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['ReportRequestId'];
} else {
return false;
}
} | [
"public",
"function",
"getReportRequestId",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"reportList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"i",
")",
")",
"{",
"return",... | Returns the report request ID for the specified entry.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"report",
"request",
"ID",
"for",
"the",
"specified",
"entry",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L235-L244 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.getAvailableDate | public function getAvailableDate($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['AvailableDate'];
} else {
return false;
}
} | php | public function getAvailableDate($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['AvailableDate'];
} else {
return false;
}
} | [
"public",
"function",
"getAvailableDate",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"reportList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"i",
")",
")",
"{",
"return",
... | Returns the date the specified report was first available.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"date",
"the",
"specified",
"report",
"was",
"first",
"available",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L253-L262 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.getIsAcknowledged | public function getIsAcknowledged($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['Acknowledged'];
} else {
return false;
}
} | php | public function getIsAcknowledged($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['Acknowledged'];
} else {
return false;
}
} | [
"public",
"function",
"getIsAcknowledged",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"reportList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"i",
")",
")",
"{",
"return",
... | Returns whether or not the specified report is scheduled.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"whether",
"or",
"not",
"the",
"specified",
"report",
"is",
"scheduled",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L271-L280 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportAcknowledger.php | AmazonReportAcknowledger.getAcknowledgedDate | public function getAcknowledgedDate($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['AcknowledgedDate'];
} else {
return false;
}
} | php | public function getAcknowledgedDate($i = 0){
if (!isset($this->reportList)){
return false;
}
if (is_int($i)){
return $this->reportList[$i]['AcknowledgedDate'];
} else {
return false;
}
} | [
"public",
"function",
"getAcknowledgedDate",
"(",
"$",
"i",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"reportList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"i",
")",
")",
"{",
"return"... | Returns the date the specified report was acknowledged.
This method will return <b>FALSE</b> if the list has not yet been filled.
@param int $i [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return string|boolean single value, or <b>FALSE</b> if Non-numeric index | [
"Returns",
"the",
"date",
"the",
"specified",
"report",
"was",
"acknowledged",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportAcknowledger.php#L289-L298 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonProductsCore.php | AmazonProductsCore.parseXML | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $x){
if($x->getName() == 'ResponseMetadata'){
continue;
}
$temp = (array)$x->attributes();
if (isset($temp['@attributes']['status']) && $temp['@attributes']['status'] != 'Success'){
$this->log("Warning: product return was not successful",'Warning');
}
if (isset($x->Products)){
foreach($x->Products->children() as $z){
$this->productList[$this->index] = new AmazonProduct($this->storeName, $z, $this->mockMode, $this->mockFiles,$this->config);
if (isset($temp['@attributes'])) {
$this->productList[$this->index]->data['Identifiers']['Request'] = $temp['@attributes'];
}
$this->index++;
}
} else if (in_array($x->getName(), array('GetProductCategoriesForSKUResult', 'GetProductCategoriesForASINResult',
'GetLowestPricedOffersForSKUResult', 'GetLowestPricedOffersForASINResult'))){
$this->productList[$this->index] = new AmazonProduct($this->storeName, $x, $this->mockMode, $this->mockFiles,$this->config);
$this->index++;
} else {
foreach($x->children() as $z){
if($z->getName() == 'Error'){
$error = (string)$z->Message;
$this->productList['Error'] = $error;
$this->log("Product Error: $error",'Warning');
} elseif($z->getName() != 'Product'){
$this->productList[$z->getName()] = (string)$z;
$this->log("Special case: ".$z->getName(),'Warning');
} else {
$this->productList[$this->index] = new AmazonProduct($this->storeName, $z, $this->mockMode, $this->mockFiles,$this->config);
$this->index++;
}
}
}
}
} | php | protected function parseXML($xml){
if (!$xml){
return false;
}
foreach($xml->children() as $x){
if($x->getName() == 'ResponseMetadata'){
continue;
}
$temp = (array)$x->attributes();
if (isset($temp['@attributes']['status']) && $temp['@attributes']['status'] != 'Success'){
$this->log("Warning: product return was not successful",'Warning');
}
if (isset($x->Products)){
foreach($x->Products->children() as $z){
$this->productList[$this->index] = new AmazonProduct($this->storeName, $z, $this->mockMode, $this->mockFiles,$this->config);
if (isset($temp['@attributes'])) {
$this->productList[$this->index]->data['Identifiers']['Request'] = $temp['@attributes'];
}
$this->index++;
}
} else if (in_array($x->getName(), array('GetProductCategoriesForSKUResult', 'GetProductCategoriesForASINResult',
'GetLowestPricedOffersForSKUResult', 'GetLowestPricedOffersForASINResult'))){
$this->productList[$this->index] = new AmazonProduct($this->storeName, $x, $this->mockMode, $this->mockFiles,$this->config);
$this->index++;
} else {
foreach($x->children() as $z){
if($z->getName() == 'Error'){
$error = (string)$z->Message;
$this->productList['Error'] = $error;
$this->log("Product Error: $error",'Warning');
} elseif($z->getName() != 'Product'){
$this->productList[$z->getName()] = (string)$z;
$this->log("Special case: ".$z->getName(),'Warning');
} else {
$this->productList[$this->index] = new AmazonProduct($this->storeName, $z, $this->mockMode, $this->mockFiles,$this->config);
$this->index++;
}
}
}
}
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"xml",
"->",
"children",
"(",
")",
"as",
"$",
"x",
")",
"{",
"if",
"(",
"$",
"x",
"->",
"g... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonProductsCore.php#L91-L132 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonProductsCore.php | AmazonProductsCore.getProduct | public function getProduct($num = null){
if (!isset($this->productList)){
return false;
}
if (is_numeric($num)){
return $this->productList[$num];
} else {
return $this->productList;
}
} | php | public function getProduct($num = null){
if (!isset($this->productList)){
return false;
}
if (is_numeric($num)){
return $this->productList[$num];
} else {
return $this->productList;
}
} | [
"public",
"function",
"getProduct",
"(",
"$",
"num",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"productList",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"is_numeric",
"(",
"$",
"num",
")",
")",
"{",
"retu... | Returns product specified or array of products.
See the <i>AmazonProduct</i> class for more information on the returned objects.
@param int $num [optional] <p>List index to retrieve the value from. Defaults to 0.</p>
@return AmazonProduct|array Product (or list of Products) | [
"Returns",
"product",
"specified",
"or",
"array",
"of",
"products",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonProductsCore.php#L141-L150 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportRequest.php | AmazonReportRequest.setShowSalesChannel | public function setShowSalesChannel($s){
if ($s == 'true' || (is_bool($s) && $s == true)){
$this->options['ReportOptions'] = 'ShowSalesChannel=true';
} else if ($s == 'false' || (is_bool($s) && $s == false)){
$this->options['ReportOptions'] = 'ShowSalesChannel=false';
} else {
return false;
}
} | php | public function setShowSalesChannel($s){
if ($s == 'true' || (is_bool($s) && $s == true)){
$this->options['ReportOptions'] = 'ShowSalesChannel=true';
} else if ($s == 'false' || (is_bool($s) && $s == false)){
$this->options['ReportOptions'] = 'ShowSalesChannel=false';
} else {
return false;
}
} | [
"public",
"function",
"setShowSalesChannel",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"$",
"s",
"==",
"'true'",
"||",
"(",
"is_bool",
"(",
"$",
"s",
")",
"&&",
"$",
"s",
"==",
"true",
")",
")",
"{",
"$",
"this",
"->",
"options",
"[",
"'ReportOptions'",
... | Sets whether or not the report should return the Sales Channel column. (Optional)
Setting this parameter to <b>TRUE</b> adds the Sales Channel column to the report.
@param string|boolean $s <p>"true" or "false", or boolean</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"whether",
"or",
"not",
"the",
"report",
"should",
"return",
"the",
"Sales",
"Channel",
"column",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportRequest.php#L187-L195 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportRequest.php | AmazonReportRequest.setMarketplaces | public function setMarketplaces($s){
if (is_string($s)){
$this->resetMarketplaces();
$this->options['MarketplaceIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetMarketplaces();
$i = 1;
foreach ($s as $x){
$this->options['MarketplaceIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | php | public function setMarketplaces($s){
if (is_string($s)){
$this->resetMarketplaces();
$this->options['MarketplaceIdList.Id.1'] = $s;
} else if (is_array($s)){
$this->resetMarketplaces();
$i = 1;
foreach ($s as $x){
$this->options['MarketplaceIdList.Id.'.$i] = $x;
$i++;
}
} else {
return false;
}
} | [
"public",
"function",
"setMarketplaces",
"(",
"$",
"s",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"s",
")",
")",
"{",
"$",
"this",
"->",
"resetMarketplaces",
"(",
")",
";",
"$",
"this",
"->",
"options",
"[",
"'MarketplaceIdList.Id.1'",
"]",
"=",
"$",... | Sets the marketplace ID(s). (Optional)
This method sets the list of marketplace IDs to be sent in the next request.
If this parameter is set, the report will only contain data relevant to the
marketplaces listed.
@param array|string $s <p>A list of marketplace IDs, or a single ID string.</p>
@return boolean <b>FALSE</b> if improper input | [
"Sets",
"the",
"marketplace",
"ID",
"(",
"s",
")",
".",
"(",
"Optional",
")"
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportRequest.php#L206-L220 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportRequest.php | AmazonReportRequest.resetMarketplaces | public function resetMarketplaces(){
foreach($this->options as $op=>$junk){
if(preg_match("#MarketplaceIdList#",$op)){
unset($this->options[$op]);
}
}
} | php | public function resetMarketplaces(){
foreach($this->options as $op=>$junk){
if(preg_match("#MarketplaceIdList#",$op)){
unset($this->options[$op]);
}
}
} | [
"public",
"function",
"resetMarketplaces",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"options",
"as",
"$",
"op",
"=>",
"$",
"junk",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"#MarketplaceIdList#\"",
",",
"$",
"op",
")",
")",
"{",
"unset",
"(",
... | Removes marketplace ID options.
Use this in case you change your mind and want to remove the Marketplace ID
parameters you previously set. | [
"Removes",
"marketplace",
"ID",
"options",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportRequest.php#L228-L234 |
CPIGroup/phpAmazonMWS | includes/classes/AmazonReportRequest.php | AmazonReportRequest.parseXML | protected function parseXML($xml){
if (!$xml){
return false;
}
$this->response = array();
$this->response['ReportRequestId'] = (string)$xml->ReportRequestId;
$this->response['ReportType'] = (string)$xml->ReportType;
$this->response['StartDate'] = (string)$xml->StartDate;
$this->response['EndDate'] = (string)$xml->EndDate;
$this->response['Scheduled'] = (string)$xml->Scheduled;
$this->response['SubmittedDate'] = (string)$xml->SubmittedDate;
$this->response['ReportProcessingStatus'] = (string)$xml->ReportProcessingStatus;
} | php | protected function parseXML($xml){
if (!$xml){
return false;
}
$this->response = array();
$this->response['ReportRequestId'] = (string)$xml->ReportRequestId;
$this->response['ReportType'] = (string)$xml->ReportType;
$this->response['StartDate'] = (string)$xml->StartDate;
$this->response['EndDate'] = (string)$xml->EndDate;
$this->response['Scheduled'] = (string)$xml->Scheduled;
$this->response['SubmittedDate'] = (string)$xml->SubmittedDate;
$this->response['ReportProcessingStatus'] = (string)$xml->ReportProcessingStatus;
} | [
"protected",
"function",
"parseXML",
"(",
"$",
"xml",
")",
"{",
"if",
"(",
"!",
"$",
"xml",
")",
"{",
"return",
"false",
";",
"}",
"$",
"this",
"->",
"response",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"response",
"[",
"'ReportRequestId'",
... | Parses XML response into array.
This is what reads the response XML and converts it into an array.
@param SimpleXMLElement $xml <p>The XML response from Amazon.</p>
@return boolean <b>FALSE</b> if no XML data is found | [
"Parses",
"XML",
"response",
"into",
"array",
"."
] | train | https://github.com/CPIGroup/phpAmazonMWS/blob/bf594dcb60e3176ec69148e90bd9e618f41a85d3/includes/classes/AmazonReportRequest.php#L279-L293 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.