Credit limit, payment due date and amount for Amazon Store Card. Closes #1718
This commit is contained in:
parent
0430d7e30f
commit
6427cd3bb4
1 changed files with 9 additions and 0 deletions
|
|
@ -55,12 +55,21 @@ class SummaryPage(SomePage):
|
|||
u'//text()[contains(.,"Account ending in")]')).split())
|
||||
balance = self.doc.xpath(
|
||||
'//span[@id="currentBalance"]/..')[0].text_content()
|
||||
cardlimit = self.doc.xpath(u'//td[contains(text(),'
|
||||
'"Total Credit Limit")]/../td[2]')[0].text_content()
|
||||
paydate = self.doc.xpath(u'//td[contains(text(),'
|
||||
'"Payment Due Date")]/../td[2]')[0].text_content()
|
||||
paymin = self.doc.xpath(
|
||||
'//span[@id="nextMinPayment"]/..')[0].text_content()
|
||||
a = Account()
|
||||
a.id = label[-4:]
|
||||
a.label = label
|
||||
a.currency = Account.get_currency(balance)
|
||||
a.balance = -AmTr.decimal_amount(balance)
|
||||
a.type = Account.TYPE_CARD
|
||||
a.cardlimit = AmTr.decimal_amount(cardlimit)
|
||||
a.paydate = datetime.strptime(paydate, '%m/%d/%Y')
|
||||
a.paymin = AmTr.decimal_amount(paymin)
|
||||
return a
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue