Skip to content

Instantly share code, notes, and snippets.

@jordanbeck
Last active March 14, 2025 19:09
Show Gist options
  • Save jordanbeck/44c697d77a992c7184bbf640dee1445d to your computer and use it in GitHub Desktop.
Save jordanbeck/44c697d77a992c7184bbf640dee1445d to your computer and use it in GitHub Desktop.
Update to can be applied to ListingUiFactory in order to send back test data
private fun buildPersonalization(
listingFetch: ListingFetch,
listingViewEligibility: ListingViewEligibility,
userEnteredPersonalization: String? = null
): ListingUiModel? {
return null
}
/**
* Build the Personalizations object to support the new perso fields. See PBS-12 for more info.
*/
private fun buildPersonalizations(
listingFetch: ListingFetch,
): Personalizations? {
return Personalizations(
isExpanded = false,
isRequired = true,
fields = listOf(
PersonalizationField.TextInput(
id = 1L,
label = "Pet name",
instructions = "E.g. Here are the instructions",
isRequired = true,
maxCharacterCount = 255,
),
PersonalizationField.TextInput(
id = 2L,
label = "Pet description",
instructions = "E.g. Here are the instructions",
isRequired = true,
maxCharacterCount = 255,
),
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment