Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ class BlazeCampaignsStoreTest {
val suggestions = List(10) {
BlazeAdSuggestion(
tagLine = it.toString(),
description = "Ad $it"
description = "Ad $it",
ctaText = "CTA $it"
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
)
}
}
Expand Down
Loading