Skip to content
Browse files

add to item quantity

  • Loading branch information...
1 parent f709ec2 commit 665262af4188ac267e59f739c77dee20e210b2d8 @japerk committed
Showing with 19 additions and 0 deletions.
  1. +4 −0 .hgignore
  2. +15 −0 pycheddar/__init__.py
View
4 .hgignore
@@ -0,0 +1,4 @@
+syntax: glob
+
+*~
+*.pyc
View
15 pycheddar/__init__.py
@@ -802,6 +802,21 @@ def save(self):
self._load_data_from_xml(xml)
return self
+
+ def add(self, quantity):
+ """Increment item quantity back to CheddarGetter."""
+ self.quantity += quantity
+ self.validate()
+
+ xml = CheddarGetter.request(
+ '/customers/add-item-quantity/',
+ product_code=self._product_code,
+ item_code=self.code,
+ code=self.customer.code,
+ quantity=quantity)
+
+ self._load_data_from_xml(xml)
+ return self
class Invoice(CheddarObject):

0 comments on commit 665262a

Please sign in to comment.
Something went wrong with that request. Please try again.