Interface EventDataObjectDeserializer.CompatibilityTransformer

Enclosing class:
EventDataObjectDeserializer

public static interface EventDataObjectDeserializer.CompatibilityTransformer
Definition of event data object JSON transformation to be compatible to API version of the library.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gson.JsonObject
    transform(com.google.gson.JsonObject rawJsonObject, String apiVersion, String eventType)
    Transform event data object JSON into a schema compatible with model classes of the library.
  • Method Details

    • transform

      com.google.gson.JsonObject transform(com.google.gson.JsonObject rawJsonObject, String apiVersion, String eventType)
      Transform event data object JSON into a schema compatible with model classes of the library. When used in EventDataObjectDeserializer.deserializeUnsafeWith(CompatibilityTransformer). the resulting JSON will be deserialized to StripeObject.
      Parameters:
      rawJsonObject - event data object JSON to be transformed. Direct mutation is allowed.
      apiVersion - API version of the event data object
      eventType - event type to which this event data object belongs to.
      Returns:
      transformed JSON with schema compatible to the model class in this library.