Skip to content

Commit 3b91398

Browse files
committed
Merge pull request #85 from intercom/BL/contacts
Acquire support
2 parents a0a1bd9 + b9873c0 commit 3b91398

File tree

7 files changed

+705
-0
lines changed

7 files changed

+705
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ build/
22
phpunit.xml
33
composer.lock
44
vendor/*
5+
*.swp

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,23 @@ The metadata key values in the example are treated as follows-
445445
- stripe_invoice: The identifier of the Stripe invoice (has a 'stripe_invoice' key)
446446
- order_number: a Rich Link (value contains 'url' and 'value' keys)
447447
- price: An Amount in US Dollars (value contains 'amount' and 'currency' keys)
448+
449+
#### Contacts
450+
451+
`Contacts` represent logged out users of your application.
452+
453+
```php
454+
<?
455+
//Create a new contact
456+
$response = $this->client->createContact(['email' => '[email protected]']);
457+
458+
//Update a contact
459+
$updated = $this->client->updateContact([
460+
'id' => $response['id'],
461+
'custom_attributes' => ['foo' => 'bar']
462+
]);
463+
464+
//Get all contacts by email
465+
$search = $this->client->getContacts(['email' => '[email protected]']);
466+
>
467+
```

src/Intercom/Service/config/intercom_public.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"intercom_public_segment.json",
1414
"intercom_public_admin.json",
1515
"intercom_public_user.json",
16+
"intercom_public_contact.json",
1617
"intercom_public_abstract_operations.json"
1718
]
1819
}

0 commit comments

Comments
 (0)