Skip to content

Commit 92ea4cd

Browse files
Merge pull request #14 from bunq/bunq/sdk_python#13/update-sdk-version
Update the SDK version to 1.13.1. (bunq/sdk_python#13)
2 parents 77f9022 + 3f5cf6c commit 92ea4cd

File tree

3 files changed

+87
-73
lines changed

3 files changed

+87
-73
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
bunq-sdk = "1.13.1"
7+
bunq-sdk = "==1.13.1"
88

99
[dev-packages]
1010

Pipfile.lock

Lines changed: 70 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tinker/libs/bunq_lib.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import json
2-
from re import search
3-
from os.path import isfile
4-
from os import remove
52
import socket
3+
from os import remove
4+
from os.path import isfile
65
from time import sleep
76

87
import requests
@@ -13,8 +12,10 @@
1312
from bunq.sdk.exception import BunqException
1413
from bunq.sdk.exception import ForbiddenException
1514
from bunq.sdk.model.generated import endpoint
16-
from bunq.sdk.model.generated.object_ import Pointer, Amount, NotificationFilter
17-
15+
from bunq.sdk.model.generated.object_ import Amount
16+
from bunq.sdk.model.generated.object_ import CardPinAssignment
17+
from bunq.sdk.model.generated.object_ import NotificationFilter
18+
from bunq.sdk.model.generated.object_ import Pointer
1819

1920
NOTIFICATION_DELIVERY_METHOD_URL = 'URL'
2021

@@ -196,8 +197,15 @@ def link_card(self, card_id, account_id):
196197
:type account_id: int
197198
"""
198199

199-
endpoint.Card.update(card_id=int(card_id),
200-
monetary_account_current_id=int(account_id))
200+
endpoint.Card.update(
201+
card_id=int(card_id),
202+
pin_code_assignment=[
203+
CardPinAssignment(
204+
type_='PRIMARY',
205+
monetary_account_id=int(account_id)
206+
)
207+
]
208+
)
201209

202210
def add_callback_url(self, callback_url):
203211
"""
@@ -272,4 +280,4 @@ def __request_spending_money_if_needed(self):
272280

273281
def __should_request_spending_money(self):
274282
return self.env == ApiEnvironmentType.SANDBOX \
275-
and float(BunqContext.user_context().primary_monetary_account.balance.value) <= self._ZERO_BALANCE
283+
and float(BunqContext.user_context().primary_monetary_account.balance.value) <= self._ZERO_BALANCE

0 commit comments

Comments
 (0)