diff --git a/example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt b/example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt index c6bbdac8f4..f01250ec49 100644 --- a/example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt +++ b/example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt @@ -402,7 +402,8 @@ class BlazeCampaignsStoreTest { val suggestions = List(10) { BlazeAdSuggestion( tagLine = it.toString(), - description = "Ad $it" + description = "Ad $it", + ctaText = "CTA $it" ) } diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeAdSuggestion.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeAdSuggestion.kt index d19ba73883..28e9b423fa 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeAdSuggestion.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeAdSuggestion.kt @@ -2,5 +2,6 @@ package org.wordpress.android.fluxc.model.blaze data class BlazeAdSuggestion( val tagLine: String, - val description: String + val description: String, + val ctaText: String ) diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeCampaignCreationRequest.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeCampaignCreationRequest.kt index 905d8317e9..e98cf974da 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeCampaignCreationRequest.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/model/blaze/BlazeCampaignCreationRequest.kt @@ -12,6 +12,7 @@ data class BlazeCampaignCreationRequest( val paymentMethodId: String, val tagLine: String, val description: String, + val ctaText: String, val startDate: Date, val endDate: Date, val budget: BlazeCampaignCreationRequestBudget, diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCreationRestClient.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCreationRestClient.kt index 004458d8f3..dff6c1b78c 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCreationRestClient.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCreationRestClient.kt @@ -234,6 +234,7 @@ class BlazeCreationRestClient @Inject constructor( ), "site_name" to request.tagLine, "text_snippet" to request.description, + "cta_text" to request.ctaText, "target_url" to request.targetUrl, "url_params" to request.urlParams.entries.joinToString(separator = "&") { "${it.key}=${it.value}" }, "main_image" to JsonObject().apply { @@ -366,11 +367,14 @@ private class BlazeAdSuggestionListResponse( val siteName: String, @SerializedName("text_snippet") val textSnippet: String, + @SerializedName("cta_text") + val ctaText: String, ) { fun toDomainModel(): BlazeAdSuggestion { return BlazeAdSuggestion( tagLine = siteName, - description = textSnippet + description = textSnippet, + ctaText = ctaText ) } }