File tree Expand file tree Collapse file tree
aries_cloudagent/messaging/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import json
2+ from aries_cloudagent .messaging .models .base_record import BaseExchangeRecord
3+
4+
5+ class LightWeightWebhook :
6+ __acceptable_keys_list = [
7+ "connection_id" ,
8+ "credential_exchange_id" ,
9+ "cred_ex_id" ,
10+ "cred_def_id" ,
11+ "role" ,
12+ "initiator" ,
13+ "revoc_reg_id" ,
14+ "revocation_id" ,
15+ "auto_offer" ,
16+ "auto_issue" ,
17+ "auto_remove" ,
18+ "error_msg" ,
19+ "thread_id" ,
20+ "parent_thread_id" ,
21+ "state" ,
22+ "credential_definition_id" ,
23+ "schema_id" ,
24+ "credential_id" ,
25+ "trace" ,
26+ "public_did" ,
27+ "cred_id_stored" ,
28+ "conn_id" ,
29+ ]
30+
31+ def __init__ (
32+ self ,
33+ version , # 2 = V20CredExRecord ; 1 = V10CredentialExchange
34+ ** kwargs ,
35+ ):
36+ [
37+ self .__setattr__ (key , kwargs .get (key ))
38+ for key in self .__acceptable_keys_list
39+ if kwargs .get (key ) != None
40+ ]
41+ if version == 2 :
42+ self .cred_ex_id = kwargs .get ("_id" )
43+ else :
44+ self .credential_exchange_id = kwargs .get ("_id" )
You can’t perform that action at this time.
0 commit comments