Skip to content

Commit

Permalink
add field
Browse files Browse the repository at this point in the history
  • Loading branch information
gilv93 committed Mar 19, 2024
1 parent f922f16 commit d904373
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recurly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ class BillingInfo(Resource):
'primary_payment_method',
'backup_payment_method',
'online_banking_payment_type',
'username'
'username',
'card_network_preference'
)
sensitive_attributes = ('number', 'verification_value', 'account_number', 'iban')
xml_attribute_attributes = ('type',)
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/billing-info/created.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<billing_info type="credit_card">
<address1>123 Main St</address1>
<card_network_preference>Cartes Bancaires</card_network_preference>
<city>San Jose</city>
<country>US</country>
<currency>USD</currency>
Expand Down Expand Up @@ -48,6 +49,7 @@ Location: https://api.recurly.com/v2/accounts/binfomock/billing_info
<currency>USD</currency>
<gateway_token>gatewaytoken123</gateway_token>
<gateway_code>gatewaycode123</gateway_code>
<card_network_preference>Cartes Bancaires</card_network_preference>
<gateway_attributes>
<account_reference>ABC123</account_reference>
</gateway_attributes>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ def test_billing_info(self):
verification_value='7777',
year='2015',
month='12',
card_network_preference='Cartes Bancaires',
gateway_token='gatewaytoken123',
gateway_code='gatewaycode123',
gateway_attributes=gateway_attributes,
Expand All @@ -997,6 +998,7 @@ def test_billing_info(self):
self.assertEqual(binfo.fraud.score, 87)
self.assertEqual(binfo.fraud.decision, 'DECLINED')
self.assertEqual(binfo.gateway_attributes.account_reference, 'ABC123')
self.assertEqual(binfo.card_network_preference, 'Cartes Bancaires')

logger.removeHandler(log_handler)
log_content = log_content.getvalue()
Expand Down

0 comments on commit d904373

Please sign in to comment.