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

Allow consumers to specify the account the new contacts will be inserted into #54

Merged
merged 3 commits into from
Feb 19, 2022

Conversation

alexstyl
Copy link
Owner

@alexstyl alexstyl commented Feb 19, 2022

This PR introduces the option to specify an InternetAccount in which new contacts will be saved into. All data items inserted in the initial contact will also be stored in the specified InternetAccount

Example of usage:

val account = InternetAccount("test@test.com", "test.com")
        store.execute {
            insert(account) {
                phone("555", PhoneNumberMobile)
                mail("555@mail.com", LocationHome)
                event(dayOfMonth = 1, month = 1, year = 2021, DateBirthday)
                postalAddress(
                    street = "Somestreet",
                    poBox = "12345",
                    neighborhood = "Hood",
                    city = "City",
                    region = "",
                    postCode = "",
                    country = "",
                    label = LocationHome
                )
                webAddress(Uri.parse("https://acme.corp"), Label.WebsiteHomePage)
                imAddress(
                    address = "ImAddress",
                    protocol = "protocol",
                    label = LocationHome
                )
                relation(name = "Person", label = Label.PhoneNumberAssistant)
                sipAddress(address = "123", label = LocationHome)
            }
        }

@alexstyl alexstyl merged commit 17a28f3 into main Feb 19, 2022
@alexstyl alexstyl deleted the accounts branch February 19, 2022 21:58
@alexstyl alexstyl linked an issue Feb 19, 2022 that may be closed by this pull request
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.

Support storing of data items in different accounts
1 participant