Skip to content

Commit

Permalink
📝. Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hansott authored May 4, 2021
1 parent 46ab5f1 commit 6e4a94c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if ($call->succeeded()) {

#### Create or update user

_Note: when sending an empty value (`""`) as value for a property, the property will be deleted._
Note: `full_name`, `first_name`, `last_name`, `phone` and `registered_at` are default properties

```php
$call = $client->upsertUser([
Expand All @@ -112,20 +112,19 @@ $call = $client->upsertUser([

// optional
"properties" => [
"full_name" => "John Doe",
"first_name" => "John",
"last_name" => "Doe",
"plan" => "Pro",
"age" => 26,
"is_developer" => true,
"registered_at" => new DateTimeImmutable("..."),
"this_property_will_be_deleted" => "",
"phone" => "123",
"registered_at" => new \DateTimeImmutable("..."),
"is_admin" => true,
],
]);
```

#### Create or update account

_Note: when sending an empty value (`""`) as value for a property, the property will be deleted._
Note: `name`, `mrr`, `plan` and `registered_at` are default properties

```php
$call = $client->upsertAccount([
Expand All @@ -135,11 +134,10 @@ $call = $client->upsertAccount([
// optional
"properties" => [
"name" => "Acme, Inc",
"mrr" => 399,
"plan" => "Pro",
"is_paying_account" => true,
"amount_of_users" => 3,
"registered_at" => new \DateTimeImmutable("..."),
"this_property_will_be_deleted" => "",
"is_paying" => true,
],

// optional
Expand Down

0 comments on commit 6e4a94c

Please sign in to comment.