diff --git a/Sources/Paywalls/PaywallData.swift b/Sources/Paywalls/PaywallData.swift index e7770c2cba..e8d7e3b089 100644 --- a/Sources/Paywalls/PaywallData.swift +++ b/Sources/Paywalls/PaywallData.swift @@ -195,8 +195,8 @@ extension PaywallData.LocalizedConfiguration: Codable { private enum CodingKeys: String, CodingKey { case title case subtitle - case callToAction = "cta" - case callToActionWithIntroOffer = "ctaWithIntroOffer" + case callToAction + case callToActionWithIntroOffer case offerDetails case offerDetailsWithIntroOffer } diff --git a/Tests/UnitTests/Networking/Responses/Fixtures/Offerings.json b/Tests/UnitTests/Networking/Responses/Fixtures/Offerings.json index cebc63cb99..07fef12625 100644 --- a/Tests/UnitTests/Networking/Responses/Fixtures/Offerings.json +++ b/Tests/UnitTests/Networking/Responses/Fixtures/Offerings.json @@ -44,16 +44,16 @@ "en_US": { "title": "Paywall", "subtitle": "Description", - "cta": "Purchase now", - "cta_with_intro_offer": "Purchase now", + "call_to_action": "Purchase now", + "call_to_action_with_intro_offer": "Purchase now", "offer_details": "{{ price_per_month }} per month", "offer_details_with_intro_offer": "Start your {{ intro_duration }} trial, then {{ price_per_month }} per month" }, "es_ES": { "title": "Tienda", "subtitle": "Descripción", - "cta": "Comprar", - "cta_with_intro_offer": "Comprar", + "call_to_action": "Comprar", + "call_to_action_with_intro_offer": "Comprar", "offer_details": "{{ price_per_month }} cada mes", "offer_details_with_intro_offer": "Comienza tu prueba de {{ intro_duration }}, y después {{ price_per_month }} cada mes" } diff --git a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-Sample1.json b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-Sample1.json index 8b9c7f5ea0..5cbbfd8381 100644 --- a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-Sample1.json +++ b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-Sample1.json @@ -4,15 +4,15 @@ "en_US": { "title": "Paywall", "subtitle": "Description", - "cta": "Purchase now", - "cta_with_intro_offer": "Purchase now", + "call_to_action": "Purchase now", + "call_to_action_with_intro_offer": "Purchase now", "offer_details": "{{ price_per_month }} per month", "offer_details_with_intro_offer": "Start your {{ intro_duration }} trial, then {{ price_per_month }} per month" }, "es_ES": { "title": "Tienda", "subtitle": "Descripción", - "cta": "Comprar", + "call_to_action": "Comprar", "offer_details": "{{ price_per_month }} cada mes" } }, diff --git a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_and_default_locale.json b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_and_default_locale.json index c9f68c1d80..e1c3f1b869 100644 --- a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_and_default_locale.json +++ b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_and_default_locale.json @@ -4,8 +4,8 @@ "it_IT": { "title": "Paywall", "subtitle": "Description", - "cta": "Purchase now", - "cta_with_intro_offer": "Purchase now", + "call_to_action": "Purchase now", + "call_to_action_with_intro_offer": "Purchase now", "offer_details": "{{ price_per_month }} per month", "offer_details_with_intro_offer": "Start your {{ intro_duration }} trial, then {{ price_per_month }} per month" } diff --git a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_locale.json b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_locale.json index a2f0fa98e5..8a2b766c72 100644 --- a/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_locale.json +++ b/Tests/UnitTests/Networking/Responses/Fixtures/PaywallData-missing_current_locale.json @@ -4,8 +4,8 @@ "es_ES": { "title": "Tienda", "subtitle": "Descripción", - "cta": "Comprar", - "cta_with_intro_offer": "Comprar", + "call_to_action": "Comprar", + "call_to_action_with_intro_offer": "Comprar", "offer_details": "{{ price_per_month }} cada mes", "offer_details_with_intro_offer": "Comienza tu prueba de {{ intro_duration }}, y después {{ price_per_month }} cada mes" }