Skip to content

Commit 0d18fbe

Browse files
authored
Merge pull request #684 from recurly/add_card_network_preference
Add card_network_preference field to v2
2 parents f922f16 + d904373 commit 0d18fbe

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

recurly/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ class BillingInfo(Resource):
608608
'primary_payment_method',
609609
'backup_payment_method',
610610
'online_banking_payment_type',
611-
'username'
611+
'username',
612+
'card_network_preference'
612613
)
613614
sensitive_attributes = ('number', 'verification_value', 'account_number', 'iban')
614615
xml_attribute_attributes = ('type',)

tests/fixtures/billing-info/created.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Content-Type: application/xml; charset=utf-8
88
<?xml version="1.0" encoding="UTF-8"?>
99
<billing_info type="credit_card">
1010
<address1>123 Main St</address1>
11+
<card_network_preference>Cartes Bancaires</card_network_preference>
1112
<city>San Jose</city>
1213
<country>US</country>
1314
<currency>USD</currency>
@@ -48,6 +49,7 @@ Location: https://api.recurly.com/v2/accounts/binfomock/billing_info
4849
<currency>USD</currency>
4950
<gateway_token>gatewaytoken123</gateway_token>
5051
<gateway_code>gatewaycode123</gateway_code>
52+
<card_network_preference>Cartes Bancaires</card_network_preference>
5153
<gateway_attributes>
5254
<account_reference>ABC123</account_reference>
5355
</gateway_attributes>

tests/test_resources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,7 @@ def test_billing_info(self):
985985
verification_value='7777',
986986
year='2015',
987987
month='12',
988+
card_network_preference='Cartes Bancaires',
988989
gateway_token='gatewaytoken123',
989990
gateway_code='gatewaycode123',
990991
gateway_attributes=gateway_attributes,
@@ -997,6 +998,7 @@ def test_billing_info(self):
997998
self.assertEqual(binfo.fraud.score, 87)
998999
self.assertEqual(binfo.fraud.decision, 'DECLINED')
9991000
self.assertEqual(binfo.gateway_attributes.account_reference, 'ABC123')
1001+
self.assertEqual(binfo.card_network_preference, 'Cartes Bancaires')
10001002

10011003
logger.removeHandler(log_handler)
10021004
log_content = log_content.getvalue()

0 commit comments

Comments
 (0)