| Total Complexity | 0 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | ''' |
||
| 8 | class constants(object): |
||
| 9 | """All the constants are defined here |
||
| 10 | Define all your constants instead of using magic numbers in the |
||
| 11 | code. |
||
| 12 | """ |
||
| 13 | |||
| 14 | '''Environments''' |
||
| 15 | SANDBOX = 'https://apitest.authorize.net/xml/v1/request.api' |
||
| 16 | PRODUCTION = 'https://api2.authorize.net/xml/v1/request.api' |
||
| 17 | |||
| 18 | '''clientId''' |
||
| 19 | version = '1.1.0' |
||
| 20 | clientId = 'sdk-python-' + version |
||
| 21 | |||
| 22 | '''xml encoding''' |
||
| 23 | xml_encoding = 'utf-8' |
||
| 24 | |||
| 25 | '''xml headers''' |
||
| 26 | headers = {'Content-Type' : 'application/xml', 'version' : '1.0', 'encoding' : xml_encoding} |
||
| 27 | |||
| 28 | """ |
||
| 29 | Following constants are defined and used in the ARBSubscriptionStatusController |
||
| 30 | Used to remove the "Status" element, that has been deprecated |
||
| 31 | However, since the server response still contains it, we have to remove it |
||
| 32 | before de-serialization |
||
| 33 | """ |
||
| 34 | '''ARBGetSubscriptionStatus <Status> tag''' |
||
| 35 | StatusStart = '<Status>' |
||
| 36 | StatusEnd = '</Status>' |
||
| 37 | |||
| 38 | '''response encoding''' |
||
| 39 | response_encoding = 'ISO-8859-1' |
||
| 40 | |||
| 41 | '''note section of subscription status response''' |
||
| 42 | note = ' note="Status with a capital \'S\' is obsolete."' |
||
| 43 | |||
| 44 | '''ns namespace 1''' |
||
| 45 | nsNamespace1 = b'ns1:' |
||
| 46 | |||
| 47 | '''ns namespace 2''' |
||
| 48 | nsNamespace2 = b':ns1' |
||
| 49 | |||
| 50 | '''default log file name''' |
||
| 51 | defaultLogFileName = "anetsdk.log" |
||
| 52 | |||
| 53 | '''default logging level''' |
||
| 54 | defaultLoggingLevel = logging.WARNING |
||
| 55 | # defaultLoggingLevel = logging.DEBUG |
||
| 56 | |||
| 57 | '''default log format''' |
||
| 58 | defaultlogformat = '%(asctime)s %(message)s' |
||
| 59 | |||
| 60 | propertiesloggingfilename = "loggingfilename" |
||
| 61 | |||
| 62 | propertiesexecutionlogginglevel = "executionlogginglevel" |
||
| 63 | |||
| 64 | defaultLoggerName = "authorizenet.sdk" |
||
| 65 | |||
| 67 |