def delete_api_v1_payment_requests_payment_identifier(req, callback): # Create an instance of the API class api_instance = openapi_client.DefaultApi() authenticated, token = get_client_credentials(PAYMENT_SVC_AUTH_URL, PAYMENT_SVC_AUTH_CLIENT_ID, PAYMENT_SVC_CLIENT_SECRET) if not authenticated: raise SBCPaymentException(message=MSG_CLIENT_CREDENTIALS_REQ_FAILED) set_api_client_auth_header(api_instance, token) try: api_instance.delete_api_v1_payment_requests_payment_identifier( req.payment_identifier) except Exception as e: print( "Exception when calling DefaultApi->delete_api_v1_payment_requests_payment_identifier: %s\n" % e)
from __future__ import print_function import time import openapi_client import os from openapi_client.rest import ApiException from pprint import pprint # Create an instance of the API class api_client = openapi_client.ApiClient() api_client.configuration.host = 'http://' + os.environ[ 'PROXY_REST_HOST'] + ':' + os.environ['PROXY_REST_PORT'] api_instance = openapi_client.DefaultApi(api_client) port = os.environ['PROXY_PORT'] url_pattern = '.*' try: api_response = api_instance.entries(port, url_pattern) pprint(api_response) except ApiException as e: print("Exception when calling DefaultApi->entries: %s\n" % e) raise
def __init__(self, host, given_file): self.given_file = given_file config = openapi_client.Configuration() config.host = host self.api_instance = openapi_client.DefaultApi( openapi_client.ApiClient(config))