示例#1
0
 def group_domain_entity_from_payload(payload):
     group_id = payload["id"]
     group_name = payload["name"]
     payment_address = payload["payment_address"]
     payment_config = payload["payment_config"]
     group = Group(group_name, group_id, payment_address, payment_config, '')
     group.setup_id()
     return group
示例#2
0
 def parse_group_domain_entity_from_metadata(payload):
     group_id = payload["group_id"]
     group_name = payload["group_name"]
     payment_address = payload['payment']["payment_address"]
     payment_config = {"payment_expiration_threshold": payload['payment']["payment_expiration_threshold"],
                       "payment_channel_storage_type": payload['payment']["payment_channel_storage_type"],
                       "payment_channel_storage_client": payload['payment']["payment_channel_storage_client"]}
     group = Group(group_name, group_id, payment_address, payment_config, '')
     group.setup_id()
     return group