SparkPost / java-sparkpost

SparkPost client library for Java
https://www.sparkpost.com/
Other
39 stars 35 forks source link

TransimisionBase should allow other types than String for Metadata value #96

Closed stevebor1 closed 4 years ago

stevebor1 commented 4 years ago

The following field has the metadata set at a Map<String, String>, however it should be <String, Object> so that when converted to JSON, string, int and boolean should be all be valid values, just like in the other SparkPost clients.

@Description(
            value = "Transmission level metadata containing key/value pairs. Metadata is available during events through the Webhooks and is provided to the substitution engine. A maximum of 1000 bytes of merged metadata (transmission level + recipient level) is available with recipient metadata taking precedence over transmission metadata when there are conflicts.",
            sample = {""})
    private Map<String, String> metadata = null;
yepher commented 4 years ago

That is a fair point. I will change it to <String, Object>

yepher commented 4 years ago

Fixed in version 0.23