summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Boulanger <christophe.boulanger@imio.be>2018-03-07 12:10:00 (GMT)
committerChristophe Boulanger <christophe.boulanger@imio.be>2018-03-07 12:10:00 (GMT)
commita402ea4d510623ac1426a1c8f9d0748289597d89 (patch)
tree7b07e613c780b440521bac429a4c12ba2b413119
parent6bb00d4c721efbfc1c039772e879f8fd15d58eef (diff)
downloadpasserelle-imio-extra-fees-a402ea4d510623ac1426a1c8f9d0748289597d89.zip
passerelle-imio-extra-fees-a402ea4d510623ac1426a1c8f9d0748289597d89.tar.gz
passerelle-imio-extra-fees-a402ea4d510623ac1426a1c8f9d0748289597d89.tar.bz2
Add method to get fees thanks to origin (belgium, europe, world)
-rw-r--r--passerelle_imio_extra_fees/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/passerelle_imio_extra_fees/models.py b/passerelle_imio_extra_fees/models.py
index 050b7f7..ac77f0b 100644
--- a/passerelle_imio_extra_fees/models.py
+++ b/passerelle_imio_extra_fees/models.py
@@ -118,6 +118,14 @@ class ExtraFees(BaseResource):
data = self.default_compute(request, **kwargs)
return data
+ # wcs : new webservice call : https://[COMMUNE]-passerelle.guichet-citoyen.be/extra-fees/[CONNECTOR-SLUG]/fees
+ # datasources : webservice.fees.get('belgium')
+ @endpoint()
+ def fees(self, request):
+ return {'belgium':self.belgium_postage_fee,
+ 'europe':self.europe_postage_fee,
+ 'world' :self.world_postage_fee}
+
@endpoint()
def destination_choices(self, request, q=None, **kwargs):
destination_choices = {'data':[{'id':'belgium', 'text':'En belgique', 'fee':self.belgium_postage_fee},