from dateutil import parser
from q2_cores import data_helpers
[docs]
def mock_demo_info_response(cust_number):
response = """
<CustDetailsRs xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CustNumber xmlns="http://harlandfs.com/pl/TransactionExchange">{cust_number}</CustNumber>
<FirstName xmlns="http://harlandfs.com/pl/TransactionExchange">{first_name}</FirstName>
<LastName xmlns="http://harlandfs.com/pl/TransactionExchange">{last_name}</LastName>
<MiddleName xmlns="http://harlandfs.com/pl/TransactionExchange">{middle_name}</MiddleName>
<CustTitle xmlns="http://harlandfs.com/pl/TransactionExchange">{title}</CustTitle>
<TaxIdType xmlns="http://harlandfs.com/pl/TransactionExchange">SocialSecurityNumber</TaxIdType>
<TaxId xmlns="http://harlandfs.com/pl/TransactionExchange">{social_security_number}</TaxId>
<TaxIdCertifyDt xmlns="http://harlandfs.com/pl/TransactionExchange">2017-02-22T00:00:00</TaxIdCertifyDt>
<BirthDt xmlns="http://harlandfs.com/pl/TransactionExchange">{birth_date}</BirthDt>
<Gender xmlns="http://harlandfs.com/pl/TransactionExchange">Female</Gender>
<MaritalStatus xmlns="http://harlandfs.com/pl/TransactionExchange">UnSpecified</MaritalStatus>
<HomePhone xmlns="http://harlandfs.com/pl/TransactionExchange">{home_phone}</HomePhone>
<HomeFax xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<WorkPhone xmlns="http://harlandfs.com/pl/TransactionExchange">{work_phone}</WorkPhone>
<PhoneExtension xmlns="http://harlandfs.com/pl/TransactionExchange">{work_ext}</PhoneExtension>
<CellPhone xmlns="http://harlandfs.com/pl/TransactionExchange">{cell_phone}</CellPhone>
<EMailAddr xmlns="http://harlandfs.com/pl/TransactionExchange">{email}</EMailAddr>
<Memo xmlns="http://harlandfs.com/pl/TransactionExchange">00*</Memo>
<RelPricingGroup xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<DriversLicense xmlns="http://harlandfs.com/pl/TransactionExchange">{drivers_license}</DriversLicense>
<LicenseState xmlns="http://harlandfs.com/pl/TransactionExchange">{state_abbrev}</LicenseState>
<Dependants xmlns="http://harlandfs.com/pl/TransactionExchange">0</Dependants>
<DependentAges xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<SchoolYears xmlns="http://harlandfs.com/pl/TransactionExchange">-2147483648</SchoolYears>
<CustType xmlns="http://harlandfs.com/pl/TransactionExchange">Business</CustType>
<ResAddr xmlns="http://harlandfs.com/pl/TransactionExchange">
<Addr1>{address_1}</Addr1>
<Addr2>{address_2}</Addr2>
<City>{city}</City>
<State>{state_abbrev}</State>
<Zip>{zipcode}-{zipcode_last4}</Zip>
<Country/>
<AddrYears>-2147483648</AddrYears>
<AddrMonths>-2147483648</AddrMonths>
</ResAddr>
<HousingType xmlns="http://harlandfs.com/pl/TransactionExchange">UnSpecified</HousingType>
<PrevAddr xmlns="http://harlandfs.com/pl/TransactionExchange">
<Addr1/>
<Addr2/>
<City/>
<State/>
<Zip/>
<AddrYears>-2147483648</AddrYears>
<AddrMonths>-2147483648</AddrMonths>
</PrevAddr>
<PrevHousingType xmlns="http://harlandfs.com/pl/TransactionExchange">UnSpecified</PrevHousingType>
<PostalAddr xmlns="http://harlandfs.com/pl/TransactionExchange">
<Addr1>PO Box 101</Addr1>
<Addr2/>
<City>Austin</City>
<State>TX</State>
<Zip>{zipcode}-{zipcode_last4}</Zip>
<Country/>
</PostalAddr>
<AltAddrFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</AltAddrFlag>
<AltAddr xmlns="http://harlandfs.com/pl/TransactionExchange">
<Addr1/>
<Addr2/>
<City/>
<State/>
<Zip/>
<Country/>
</AltAddr>
<AltAddrStartDt xmlns="http://harlandfs.com/pl/TransactionExchange">0001-01-01T00:00:00</AltAddrStartDt>
<AltAddrEndDt xmlns="http://harlandfs.com/pl/TransactionExchange">0001-01-01T00:00:00</AltAddrEndDt>
<AltAddrRecurringFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</AltAddrRecurringFlag>
<AltAddrExpireDt xmlns="http://harlandfs.com/pl/TransactionExchange">0001-01-01T00:00:00</AltAddrExpireDt>
<AcctStatus xmlns="http://harlandfs.com/pl/TransactionExchange">NewUser</AcctStatus>
<AcctAccessLevel xmlns="http://harlandfs.com/pl/TransactionExchange">FullControl</AcctAccessLevel>
<CustInfoFrozenFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</CustInfoFrozenFlag>
<CustPswd xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<BillerType xmlns="http://harlandfs.com/pl/TransactionExchange">Ultrafis</BillerType>
<BillerRegFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</BillerRegFlag>
<BillerAcct xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<BillerMemoFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</BillerMemoFlag>
<NewBillPayer xmlns="http://harlandfs.com/pl/TransactionExchange">Ultrafis</NewBillPayer>
<BillPresFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</BillPresFlag>
<DelinqFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</DelinqFlag>
<BondInt xmlns="http://harlandfs.com/pl/TransactionExchange">0</BondInt>
<BondValue xmlns="http://harlandfs.com/pl/TransactionExchange">0</BondValue>
<BondCashed xmlns="http://harlandfs.com/pl/TransactionExchange">0</BondCashed>
<PrevYrBondInt xmlns="http://harlandfs.com/pl/TransactionExchange">0</PrevYrBondInt>
<PrevYrBondValue xmlns="http://harlandfs.com/pl/TransactionExchange">0</PrevYrBondValue>
<PrevYrBondCashed xmlns="http://harlandfs.com/pl/TransactionExchange">0</PrevYrBondCashed>
<RelPricingGroupCER xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<SecretId xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<CustClass xmlns="http://harlandfs.com/pl/TransactionExchange">RegularMember</CustClass>
<CustBranch xmlns="http://harlandfs.com/pl/TransactionExchange">9</CustBranch>
<CustPayrollDept xmlns="http://harlandfs.com/pl/TransactionExchange">199</CustPayrollDept>
<CustMailCode xmlns="http://harlandfs.com/pl/TransactionExchange">1</CustMailCode>
<CustNameExtension xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<BusinessType xmlns="http://harlandfs.com/pl/TransactionExchange">1</BusinessType>
<TaxExempt xmlns="http://harlandfs.com/pl/TransactionExchange">false</TaxExempt>
<PersonnelId xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<CompanyId xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<CoinDepositAllowFlag xmlns="http://harlandfs.com/pl/TransactionExchange">false</CoinDepositAllowFlag>
<OptOutElect xmlns="http://harlandfs.com/pl/TransactionExchange">false</OptOutElect>
<TaxName xmlns="http://harlandfs.com/pl/TransactionExchange">
<TaxNameLast/>
<TaxNameFirst/>
<TaxNameInitials/>
</TaxName>
<OpeningMethod xmlns="http://harlandfs.com/pl/TransactionExchange">4-Face To Face</OpeningMethod>
<DeathDt xmlns="http://harlandfs.com/pl/TransactionExchange">0001-01-01T00:00:00</DeathDt>
<UserDefinedFieldTable xmlns="http://harlandfs.com/pl/TransactionExchange" xsi:nil="true"/>
<CustClassList xmlns="http://harlandfs.com/pl/TransactionExchange" xsi:nil="true"/>
<OvdSvcElection xmlns="http://harlandfs.com/pl/TransactionExchange">false</OvdSvcElection>
<CustLocationCode xmlns="http://harlandfs.com/pl/TransactionExchange"/>
<Estatement xmlns="http://harlandfs.com/pl/TransactionExchange">false</Estatement>
<JoinDt xmlns="http://harlandfs.com/pl/TransactionExchange">2017-01-07T00:00:00</JoinDt>
<Eligibility xmlns="http://harlandfs.com/pl/TransactionExchange"/>
</CustDetailsRs>
""".format(
cust_number=cust_number,
first_name=data_helpers.FIRSTNAME,
middle_name=data_helpers.MIDDLENAME,
last_name=data_helpers.LASTNAME,
title=data_helpers.TITLE,
social_security_number=data_helpers.SOCIALSECURITY,
birth_date=parser.parse(data_helpers.DOB).isoformat(),
home_phone="({}) {}-{}".format(
data_helpers.PHONEAREACODE,
data_helpers.PHONEEXCHANGE,
data_helpers.PHONESUFFIX,
),
work_phone="({}) {}-{}".format(
data_helpers.WORKAREACODE,
data_helpers.WORKEXCHANGE,
data_helpers.WORKSUFFIX,
),
work_ext=data_helpers.WORKEXTENSION,
cell_phone="({}) {}-{}".format(
data_helpers.CELLAREACODE,
data_helpers.CELLEXCHANGE,
data_helpers.CELLSUFFIX,
),
email=data_helpers.EMAIL,
drivers_license=data_helpers.DRIVERSLICENSENUM,
state_abbrev=data_helpers.STATEABBRV,
address_1=data_helpers.ADDRESS1,
address_2=data_helpers.ADDRESS2,
city=data_helpers.CITY,
zipcode=data_helpers.ZIP,
zipcode_last4=data_helpers.ZIPCODELAST4,
)
return data_helpers.normalize_xml_str(response)