Add method to get fees thanks to origin (belgium, europe, world)

This commit is contained in:
Christophe Boulanger 2018-03-07 13:10:00 +01:00
parent 6bb00d4c72
commit a402ea4d51
1 changed files with 8 additions and 0 deletions

View File

@ -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},