mappers module

vdx_helper.mappers.certificate_mapper(json_: Dict[str, Any]) Certificate

Maps the json certificate response into a Certificate object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A Certificate instance

Return type:

vdx_helper.models.Certificate

vdx_helper.mappers.claim_mapper(json_: Dict[str, Any]) Claim

Maps the json claim response into a Claim object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A Claim instance

Return type:

vdx_helper.models.Claim

vdx_helper.mappers.credential_mapper(json_: Dict[str, Any]) Credential

Maps the json credential response into a Credential object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A Credential instance

Return type:

vdx_helper.models.Credential

vdx_helper.mappers.file_mapper(json_: Dict[str, Any]) File

Maps the json file response into a File object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A File instance

Return type:

vdx_helper.models.File

vdx_helper.mappers.get_paginated_mapper(mapper: Callable[[Dict[str, Any]], T]) Callable[[Dict[str, Any]], PaginatedResponse]

Obtain a mapper method that maps a json response from the Core API into a PaginatedResponse object containing a specific object as its items.

Parameters:

mapper (Callable) – The mapper to use to map the Paginated result’s items

Returns:

A mapping function

Return type:

Callable

vdx_helper.mappers.job_mapper(json_: Dict[str, Any]) Job

Maps the json job response into a Job object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A Job instance

Return type:

vdx_helper.models.Job

vdx_helper.mappers.json_mapper(json_: Dict[str, Any]) Dict[str, Any]

Directly map any json response to a json response.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

The response in json format

Return type:

Dict[str, Any]

vdx_helper.mappers.partner_mapper(json_: Dict[str, Any]) Partner

Maps the json partner response into a Partner object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A Partner instance

Return type:

vdx_helper.models.Partner

vdx_helper.mappers.verification_mapper(json_: Dict[str, Any]) VerificationResponse

Maps the json verification response into a VerificationResponse object.

Parameters:

json (Dict[str, Any]) – The json obtained from the endpoint call

Returns:

A VerificationResponse instance

Return type:

vdx_helper.models.VerificationResponse

vdx_helper.mappers.verification_report_mapper(json_: Dict[str, str]) VerificationReport

Maps the json verification report response into a Verification Report object.

Parameters:

json (Dict[str, str]) – The json obtained from the endpoint call

Returns:

A VerificationReport instance

Return type:

vdx_helper.models.VerificationReport

vdx_helper.mappers.verification_step_mapper(json_: Dict[str, Any]) VerificationStepResult

Maps the json verification step result response into a Verification Step Result object.

Parameters:

json (Dict[str, str]) – The json obtained from the endpoint call

Returns:

A VerificationStepResult instance

Return type:

vdx_helper.models.VerificationStepResult