Wrapper Examples

In the Fonteva Services platform, developers can extend the wrapper classes.

  1. Extending Wrapper Class
    There are many times that custom fields are added to wrappers that may not exist in the core platform. These fields should be mapped in the wrapper class to make sure that they can inject into the platform. No custom mapping is needed to map fields to and from wrappers. Any new fields that are added to the object need to be added as camel a case to the wrapper class.

    For Example if you have the field Namespace__Stripe_Client_Secret__c this would translate to

    global String stripeClientSecret;

    Here is an example that contains new custom fields that will be auto mapped. You can override wrappers using global overrides or contextual overrides. To see this class in use with the contextual override, see class in Payment Engine example. As you can see in this example, we are instantiating our custom class and sending that into the core platform. Internally, the platform uses the correct classes and maps the custom fields back to the Fonteva objects.