Permalink
Browse files

Updated REST API endpoint and added some required variables

  • Loading branch information...
1 parent 47dd4c8 commit f2f9cd3aef3db3ab7f649ac9d5812947a03dd232 @vikram0 vikram0 committed Aug 5, 2010
Showing with 41 additions and 32 deletions.
  1. +41 −32 shoppingcart/shoppingcart.YourProducts.xml
@@ -6,58 +6,67 @@
<description>Shopping Cart can be used for selling your own products. "Select" returns shopping cart, "Insert" adds an item to the cart, "Update" modifies an item and "Delete" removes an item.</description>
<sampleQuery>select * from {table} where apiKey="{apiKey}" and cartID="{cartID}"</sampleQuery>
<sampleQuery>insert into {table} (apiKey,cartID,payvmentID,itemID,itemName,itemPrice) values ("{apiKey}", "{cartID}", "{payvmentID}", "shirt001","Polo Shirt","16.50")</sampleQuery>
- <sampleQuery>update {table} set itemQty="{itemQty}" where apiKey="{apiKey}" and cartID="{cartID}" and itemID="{itemID}"</sampleQuery>
- <sampleQuery>delete from {table} where apiKey="{apiKey}" and cartID="{cartID}" and itemID="{itemID}"</sampleQuery>
+
+ <sampleQuery>update {table} set itemQty="{itemQty}" where apiKey="{apiKey}" and cartID="{cartID}" and itemID="{itemID}" and retailerID="{relatilerID}"</sampleQuery>
+ <sampleQuery>delete from {table} where apiKey="{apiKey}" and cartID="{cartID}" and itemID="{itemID}" and retailerID="{relatilerID}"</sampleQuery>
</meta>
<bindings>
- <select itemPath="cartfeed" produces="XML" >
+ <select itemPath="cartfeed" produces="XML">
<urls>
- <url env="all">https://api.payvment.com/v1.2/rest/get/</url>
+ <url env="all">http://api.payvment.com/rest/</url>
+
</urls>
<inputs>
- <key id="apiKey" type="xs:string" paramType="query" required="true" />
- <key id="cartID" type="xs:string" paramType="query" required="false" />
+ <key id="apiKey" type="xs:string" paramType="query" required="true"/>
+ <key id="cartID" type="xs:string" paramType="query" required="false"/>
</inputs>
</select>
- <insert itemPath="cartfeed" produces="XML" >
+ <insert itemPath="cartfeed" produces="XML">
<urls>
- <url env="all">https://api.payvment.com/v1.2/rest/post/?command=addStoreItem</url>
+ <url env="all">http://api.payvment.com/rest/?command=addStoreItem</url>
+
</urls>
<inputs>
- <key id="apiKey" type="xs:string" paramType="query" required="true" />
- <key id="cartID" type="xs:string" paramType="query" required="true" />
- <value id="payvmentID" type="xs:string" paramType="query" required="true" />
- <value id="itemID" type="xs:string" paramType="query" required="true" />
- <value id="itemName" type="xs:string" paramType="query" required="true" />
- <value id="itemPrice" type="xs:string" paramType="query" required="true" />
- <value id="itemQty" type="xs:string" paramType="query" required="false" />
- <value id="itemShipping" type="xs:string" paramType="query" required="false" />
- <value id="itemNoShip" type="xs:string" paramType="query" required="false" />
- <value id="itemUrl" type="xs:string" paramType="query" required="false" />
- <value id="itemOption1" type="xs:string" paramType="query" required="false" />
- <value id="itemOption2" type="xs:string" paramType="query" required="false" />
+ <key id="apiKey" type="xs:string" paramType="query" required="true"/>
+ <key id="cartID" type="xs:string" paramType="query" required="true"/>
+ <value id="payvmentID" type="xs:string" paramType="query" required="true"/>
+ <value id="itemID" type="xs:string" paramType="query" required="true"/>
+ <value id="itemName" type="xs:string" paramType="query" required="true"/>
+ <value id="itemPrice" type="xs:string" paramType="query" required="true"/>
+ <value id="itemQty" type="xs:string" paramType="query" required="false"/>
+
+ <value id="itemShipping" type="xs:string" paramType="query" required="false"/>
+ <value id="itemNoShip" type="xs:string" paramType="query" required="false"/>
+ <value id="itemUrl" type="xs:string" paramType="query" required="false"/>
+ <value id="itemOption1" type="xs:string" paramType="query" required="false"/>
+ <value id="itemOption2" type="xs:string" paramType="query" required="false"/>
</inputs>
</insert>
- <update itemPath="cartfeed" produces="XML" >
+ <update itemPath="cartfeed" produces="XML">
<urls>
- <url>https://api.payvment.com/v1.2/rest/post/?command=updateStoreItem</url>
+
+ <url>http://api.payvment.com/rest/?command=updateStoreItem</url>
</urls>
<inputs>
- <key id="apiKey" type="xs:string" paramType="query" required="true" />
- <key id="cartID" type="xs:string" paramType="query" required="true" />
- <key id="itemID" type="xs:string" paramType="query" required="true" />
- <value id="itemQty" type="xs:string" paramType="query" required="true" />
+ <key id="apiKey" type="xs:string" paramType="query" required="true"/>
+ <key id="cartID" type="xs:string" paramType="query" required="true"/>
+ <key id="itemID" type="xs:string" paramType="query" required="true"/>
+ <value id="itemQty" type="xs:string" paramType="query" required="true"/>
+ <key id="retailerID" type="xs:string" paramType="query" required="true"/>
+
</inputs>
</update>
- <delete itemPath="cartfeed" produces="XML" >
+ <delete itemPath="cartfeed" produces="XML">
<urls>
- <url env="all">https://api.payvment.com/v1.2/rest/post/?command=deleteStoreItem</url>
+ <url env="all">http://api.payvment.com/rest/?command=deleteStoreItem</url>
</urls>
<inputs>
- <key id="apiKey" type="xs:string" paramType="query" required="true" />
- <key id="cartID" type="xs:string" paramType="query" required="true" />
- <key id="itemID" type="xs:string" paramType="query" required="true" />
+ <key id="apiKey" type="xs:string" paramType="query" required="true"/>
+
+ <key id="cartID" type="xs:string" paramType="query" required="true"/>
+ <key id="itemID" type="xs:string" paramType="query" required="true"/>
+ <key id="retailerID" type="xs:string" paramType="query" required="true"/>
</inputs>
</delete>
</bindings>
-</table>
+</table>

0 comments on commit f2f9cd3

Please sign in to comment.