
from __future__ import print_function
import time
import authorizenet_rest
from authorizenet_rest.rest import ApiException
from authorizenet_rest.apis.customers_api import CustomersApi
from pprint import pprint
import os
import sys

import importlib
import imp

ExternalConfig = imp.load_source('modulename', '.\ExternalConfiguration.py')

#constants = importlib.import_module('modulename','constants.py' ) #imp.load_source('modulename', 'constants.py')
def get_customer(customer_id):
    # create an instance of the API class
    ExternalConfig.setConfig();
    apiclient = ExternalConfig.configureApiClient();
    authorization = ExternalConfig.getAuthorization()
    api_instance = authorizenet_rest.apis.customers_api.CustomersApi(apiclient)
    print("Check Output window")
    try:
        # Create A Customer Address
        api_response = api_instance.get_customer(customer_id, authorization=authorization)
        print(api_response)
    except ApiException as e:
        print("Exception when calling AddressesApi->create_customer_address: %s\n" % e)


if(os.path.basename(__file__) == os.path.basename(sys.argv[0])):
    get_customer('1813141319')
