Allow ungleich_pay_server parameter to be passed by the user
This commit is contained in:
parent
3af7d04a9a
commit
66a27d435f
1 changed files with 8 additions and 1 deletions
|
@ -18,10 +18,17 @@ class ungleichPay(object):
|
|||
'--token', required=True,
|
||||
help="A valid token obtained from ungleich"
|
||||
)
|
||||
self.parser['ungleich_pay_server'].add_argument(
|
||||
'--ungleich-pay-server', required=False,
|
||||
help="A valid ungleich pay server url"
|
||||
)
|
||||
self.parser['customers-list'].set_defaults(func=self.customers_list)
|
||||
|
||||
def customers_list(self, args):
|
||||
customers_list_endpoint = "/customers-list"
|
||||
if args.ungleich_pay_server:
|
||||
request_url = args.ungleich_pay_server + customers_list_endpoint
|
||||
else:
|
||||
request_url = UNGLEICH_PAY_SERVER_URL + customers_list_endpoint
|
||||
req = urllib.request.Request(url=request_url,
|
||||
method='GET',
|
||||
|
|
Loading…
Reference in a new issue