Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use List interface instead of ArrayList for return types and method parameters #41

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

Nandi
Copy link
Contributor

@Nandi Nandi commented Jun 16, 2022

By using the List interface consumers of the API have more flexibility in how they interact with it.

Example when using this library with Kotlin:
With ArrayList

val postmarkClient = Postmark.getApiClient(postmarkToken)
val messages = listOf(constructTemplateMessage(templateId, receiver, model)
postmarkClient.deliverMessageWithTemplate(messages as ArrayList<TemplatedMessage>)

With List

val postmarkClient = Postmark.getApiClient(postmarkToken)
val messages = listOf(constructTemplateMessage(templateId, receiver, model)
postmarkClient.deliverMessageWithTemplate(messages)

…arameters.

By using the List interface consumers of the API have more flexibility in how they interact with it.
@ibalosh ibalosh merged commit 0c4ed8e into ActiveCampaign:main Aug 23, 2022
@Nandi Nandi deleted the replace-arraylist-with-list branch August 25, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants