Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/java/com/facebook/ads/sdk/APIRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ private static String convertToString(Object input) {
.disableHtmlEscaping()
.create();
return gson.toJson((List)input);
} else if (input instanceof Enum) {
String result = input.toString();
// Convert EnumDatePreset values to lowercase for API compatibility
if (input.getClass().getSimpleName().equals("EnumDatePreset")) {
return result.toLowerCase();
}
return result;
} else {
return input.toString();
}
Expand Down
80 changes: 40 additions & 40 deletions src/main/java/com/facebook/ads/sdk/AdSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -7740,46 +7740,46 @@ public String toString() {
}

public static enum EnumDatePreset {
@SerializedName("DATA_MAXIMUM")
VALUE_DATA_MAXIMUM("DATA_MAXIMUM"),
@SerializedName("LAST_14D")
VALUE_LAST_14D("LAST_14D"),
@SerializedName("LAST_28D")
VALUE_LAST_28D("LAST_28D"),
@SerializedName("LAST_30D")
VALUE_LAST_30D("LAST_30D"),
@SerializedName("LAST_3D")
VALUE_LAST_3D("LAST_3D"),
@SerializedName("LAST_7D")
VALUE_LAST_7D("LAST_7D"),
@SerializedName("LAST_90D")
VALUE_LAST_90D("LAST_90D"),
@SerializedName("LAST_MONTH")
VALUE_LAST_MONTH("LAST_MONTH"),
@SerializedName("LAST_QUARTER")
VALUE_LAST_QUARTER("LAST_QUARTER"),
@SerializedName("LAST_WEEK_MON_SUN")
VALUE_LAST_WEEK_MON_SUN("LAST_WEEK_MON_SUN"),
@SerializedName("LAST_WEEK_SUN_SAT")
VALUE_LAST_WEEK_SUN_SAT("LAST_WEEK_SUN_SAT"),
@SerializedName("LAST_YEAR")
VALUE_LAST_YEAR("LAST_YEAR"),
@SerializedName("MAXIMUM")
VALUE_MAXIMUM("MAXIMUM"),
@SerializedName("THIS_MONTH")
VALUE_THIS_MONTH("THIS_MONTH"),
@SerializedName("THIS_QUARTER")
VALUE_THIS_QUARTER("THIS_QUARTER"),
@SerializedName("THIS_WEEK_MON_TODAY")
VALUE_THIS_WEEK_MON_TODAY("THIS_WEEK_MON_TODAY"),
@SerializedName("THIS_WEEK_SUN_TODAY")
VALUE_THIS_WEEK_SUN_TODAY("THIS_WEEK_SUN_TODAY"),
@SerializedName("THIS_YEAR")
VALUE_THIS_YEAR("THIS_YEAR"),
@SerializedName("TODAY")
VALUE_TODAY("TODAY"),
@SerializedName("YESTERDAY")
VALUE_YESTERDAY("YESTERDAY"),
@SerializedName("data_maximum")
VALUE_DATA_MAXIMUM("data_maximum"),
@SerializedName("last_14d")
VALUE_LAST_14D("last_14d"),
@SerializedName("last_28d")
VALUE_LAST_28D("last_28d"),
@SerializedName("last_30d")
VALUE_LAST_30D("last_30d"),
@SerializedName("last_3d")
VALUE_LAST_3D("last_3d"),
@SerializedName("last_7d")
VALUE_LAST_7D("last_7d"),
@SerializedName("last_90d")
VALUE_LAST_90D("last_90d"),
@SerializedName("last_month")
VALUE_LAST_MONTH("last_month"),
@SerializedName("last_quarter")
VALUE_LAST_QUARTER("last_quarter"),
@SerializedName("last_week_mon_sun")
VALUE_LAST_WEEK_MON_SUN("last_week_mon_sun"),
@SerializedName("last_week_sun_sat")
VALUE_LAST_WEEK_SUN_SAT("last_week_sun_sat"),
@SerializedName("last_year")
VALUE_LAST_YEAR("last_year"),
@SerializedName("maximum")
VALUE_MAXIMUM("maximum"),
@SerializedName("this_month")
VALUE_THIS_MONTH("this_month"),
@SerializedName("this_quarter")
VALUE_THIS_QUARTER("this_quarter"),
@SerializedName("this_week_mon_today")
VALUE_THIS_WEEK_MON_TODAY("this_week_mon_today"),
@SerializedName("this_week_sun_today")
VALUE_THIS_WEEK_SUN_TODAY("this_week_sun_today"),
@SerializedName("this_year")
VALUE_THIS_YEAR("this_year"),
@SerializedName("today")
VALUE_TODAY("today"),
@SerializedName("yesterday")
VALUE_YESTERDAY("yesterday"),
;

private String value;
Expand Down