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

Add create_contact deprecation #123

Merged
merged 3 commits into from
Aug 26, 2024
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
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,6 @@ This is done by getting an actual client
'integration name' - should be your integration name
'integration version' - should be your integration version

#### Contact Creation

Here is how you can create a basic client & submit contact.

```php
$contact = new Contact();

$contact->set_email( $email );
if ( $phone_number != '' ) {
$contact->set_phone( $phone_number );
}
$contact->set_first_name( $first_name );
$contact->set_last_name( $last_name );
$contact->set_birthday( $birthday );
$contact->set_postal_code( $postal_code );
$contact->set_address( $address );
$contact->set_state( $state );
$contact->set_country( $country );
$contact->set_city( $city );
if ( $email_consent ) {
$contact->set_email_consent( 'actual_email_consent_for_gdrp' );
$contact->set_email_opt_in( 'where user opted to become subscriber' );
}
$client = \Omnisend\SDK\V1\Omnisend::get_client( 'integration name', 'integration version' );

$response = $client->create_contact( $contact );
```

#### Save and update Contact

Expand Down
147 changes: 74 additions & 73 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading