33
44from bunq .sdk import client
55from bunq .sdk import context
6- from bunq .sdk import model
6+ from bunq .sdk . model import core
77from bunq .sdk import security
88from bunq .sdk .json import converter
9- from bunq .sdk .model import generated
9+ from bunq .sdk .model . generated import endpoint
1010from bunq .sdk .model .generated import object_
1111
1212
@@ -29,25 +29,25 @@ class InstallationAdapter(converter.JsonAdapter):
2929 @classmethod
3030 def deserialize (cls , target_class , array ):
3131 """
32- :type target_class: model .Installation|type
32+ :type target_class: core .Installation|type
3333 :type array: list
3434
35- :rtype: model .Installation
35+ :rtype: core .Installation
3636 """
3737
3838 installation = target_class .__new__ (target_class )
3939 server_public_key_wrapped = array [cls ._INDEX_SERVER_PUBLIC_KEY ]
4040 installation .__dict__ = {
4141 cls ._ATTRIBUTE_ID : converter .deserialize (
42- model .Id ,
42+ core .Id ,
4343 array [cls ._INDEX_ID ][cls ._FIELD_ID ]
4444 ),
4545 cls ._ATTRIBUTE_TOKEN : converter .deserialize (
46- model .SessionToken ,
46+ core .SessionToken ,
4747 array [cls ._INDEX_TOKEN ][cls ._FIELD_TOKEN ]
4848 ),
4949 cls ._ATTRIBUTE_SERVER_PUBLIC_KEY : converter .deserialize (
50- model .PublicKeyServer ,
50+ core .PublicKeyServer ,
5151 server_public_key_wrapped [cls ._FIELD_SERVER_PUBLIC_KEY ]
5252 ),
5353 }
@@ -57,7 +57,7 @@ def deserialize(cls, target_class, array):
5757 @classmethod
5858 def serialize (cls , installation ):
5959 """
60- :type installation: model .Installation
60+ :type installation: core .Installation
6161
6262 :rtype: list
6363 """
@@ -98,20 +98,20 @@ class SessionServerAdapter(converter.JsonAdapter):
9898 @classmethod
9999 def deserialize (cls , target_class , array ):
100100 """
101- :type target_class: model .SessionServer|type
101+ :type target_class: core .SessionServer|type
102102 :type array: list
103103
104- :rtype: model .SessionServer
104+ :rtype: core .SessionServer
105105 """
106106
107107 session_server = target_class .__new__ (target_class )
108108 session_server .__dict__ = {
109109 cls ._ATTRIBUTE_ID : converter .deserialize (
110- model .Id ,
110+ core .Id ,
111111 array [cls ._INDEX_ID ][cls ._FIELD_ID ]
112112 ),
113113 cls ._ATTRIBUTE_TOKEN : converter .deserialize (
114- model .SessionToken ,
114+ core .SessionToken ,
115115 array [cls ._INDEX_TOKEN ][cls ._FIELD_TOKEN ]
116116 ),
117117 cls ._ATTRIBUTE_USER_COMPANY : None ,
@@ -123,13 +123,13 @@ def deserialize(cls, target_class, array):
123123 if cls ._FIELD_USER_COMPANY in user_dict_wrapped :
124124 session_server .__dict__ [cls ._ATTRIBUTE_USER_COMPANY ] = \
125125 converter .deserialize (
126- generated .UserCompany ,
126+ endpoint .UserCompany ,
127127 user_dict_wrapped [cls ._FIELD_USER_COMPANY ]
128128 )
129129 elif cls ._FIELD_USER_PERSON in user_dict_wrapped :
130130 session_server .__dict__ [cls ._ATTRIBUTE_USER_PERSON ] = \
131131 converter .deserialize (
132- generated .UserPerson ,
132+ endpoint .UserPerson ,
133133 user_dict_wrapped [cls ._FIELD_USER_PERSON ]
134134 )
135135
@@ -138,7 +138,7 @@ def deserialize(cls, target_class, array):
138138 @classmethod
139139 def serialize (cls , session_server ):
140140 """
141- :type session_server: model .SessionServer
141+ :type session_server: core .SessionServer
142142
143143 :rtype: list
144144 """
@@ -545,4 +545,4 @@ def serialize(cls, pagination):
545545
546546 _ = pagination
547547
548- raise NotImplementedError ()
548+ raise NotImplementedError ()
0 commit comments