|
1 | 1 | class RequestValidationDomain(object): |
2 | 2 | def __init__(self, data): |
3 | | - if 'domain' in data: self.domain = data['domain'] |
4 | | - if 'dcvType' in data: self.dcv_type = data['dcvType'] |
5 | | - if 'dcvEmail' in data: self.dcv_email = data['dcvEmail'] |
6 | | - if 'status' in data: self.status = data['status'] |
7 | | - if 'statusDetail' in data: self.status_detail = data['statusDetail'] |
8 | | - if 'statusMessage' in data: self.status_message = data['statusMessage'] |
9 | | - if 'md5' in data: self.md5 = data['md5'] |
10 | | - if 'sha1' in data: self.sha1 = data['sha1'] |
| 3 | + self.domain = data.get('domain') |
| 4 | + self.dcv_type = data.get('dcvType') |
| 5 | + self.dcv_email = data.get('dcvEmail') |
| 6 | + self.status = data.get('status') |
| 7 | + self.status_detail = data.get('statusDetail') |
| 8 | + self.status_message = data.get('statusMessage') |
| 9 | + self.md5 = data.get('md5') |
| 10 | + self.sha1 = data.get('sha1') |
11 | 11 |
|
12 | | - if 'dnsRecord' in data: self.dnsRecord = data['dnsRecord'] |
13 | | - if 'dnsCnameValue' in data: self.dnsCnameValue = data['dnsCnameValue'] |
14 | | - if 'fileLocation' in data: self.fileLocation = data['fileLocation'] |
15 | | - if 'fileContents' in data: self.fileContents = data['fileContents'] |
| 12 | + self.dnsRecord = data.get('dnsRecord') |
| 13 | + self.dnsCnameValue = data.get('dnsCnameValue') |
| 14 | + self.fileLocation = data.get('fileLocation') |
| 15 | + self.fileContents = data.get('fileContents') |
0 commit comments