summaryrefslogtreecommitdiff
path: root/fracture
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2020-08-06 01:06:09 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2020-08-06 01:06:09 +0200
commitc901bfa8e7a6f33ef7cb369995510e83cd31e52d (patch)
tree89e95f5c0d06e8ed30ebd784b871f06f3e723292 /fracture
parented5e5dc316a3d98933ec34bd33ba28291f9da6e7 (diff)
Make types private
Diffstat (limited to 'fracture')
-rw-r--r--fracture/invoice.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/fracture/invoice.py b/fracture/invoice.py
index 754af02..84c0f9b 100644
--- a/fracture/invoice.py
+++ b/fracture/invoice.py
@@ -27,7 +27,7 @@ class Customer:
self.address = address
class Invoice:
- TYPES = {"sent", "received"}
+ _TYPES = {"sent", "received"}
SERIES = {}
ID_FORMAT = None
CURRENCY = None
@@ -47,7 +47,7 @@ class Invoice:
taxes = None,
id = None):
# Initializes to empty state if not set
- self.set_type(type or tuple(Invoice.TYPES)[0])
+ self.set_type(type or tuple(Invoice._TYPES)[0])
self.id = id
self.set_series(series or tuple(Invoice.SERIES.keys())[0])
self.date = idate or date.today()
@@ -65,9 +65,9 @@ class Invoice:
self.series = series
def set_type(self, type):
- if type not in Invoice.TYPES:
+ if type not in Invoice._TYPES:
raise ValueError ("Not valid type for Invoice. Valid are: %s"
- % Invoice.TYPES)
+ % Invoice._TYPES)
self.type = type
def format_id(self):