Package tbdex.sdk.protocol.models
Object Offering.Companion
-
- All Implemented Interfaces:
public class Offering.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Offering.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Offeringcreate(String from, OfferingData data, String protocol)Creates a new Offeringresource, autopopulating the id, creation/updated time, and resource kind.final Offeringparse(String payload)Takes an existing Offering in the form of a json string and parses it into an Offering object. -
-
Method Detail
-
create
final Offering create(String from, OfferingData data, String protocol)
Creates a new
Offeringresource, autopopulating the id, creation/updated time, and resource kind.- Parameters:
from- DID of the PFI.data- Specific parameters relevant to an Offering.protocol- version of the tbdex protocol.- Returns:
Offering instance.
-
parse
final Offering parse(String payload)
Takes an existing Offering in the form of a json string and parses it into an Offering object. Validates object structure and performs an integrity check using the resource signature.
- Parameters:
payload- The Offering as a json string.- Returns:
The json string parsed into an Offering
-
-
-
-