Skip to content

Commit

Permalink
Update create_resource.md (#5)
Browse files Browse the repository at this point in the history
* Update create_resource.md
  • Loading branch information
krowinski authored and Maciej Tarnowski committed Aug 14, 2019
1 parent 7a9c44b commit 28527f5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/lib/create_resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
Example code

```php

use Getresponse\Sdk\Operation\Model\NewContact;
use Getresponse\Sdk\Operation\Model\ResourceCampaign;
use Getresponse\Sdk\Operation\Contacts\CreateContact\CreateContact;
use Getresponse\Sdk\GetresponseClientFactory;
use Getresponse\Sdk\Operation\Contacts\CreateContact\CreateContact;
use Getresponse\Sdk\Operation\Model\CampaignReference;
use Getresponse\Sdk\Operation\Model\NewContact;

$createContact = new NewContact(
new ResourceCampaign('cdd'),
new CampaignReference('cdd'),
'adam.foo@email.com'
);

$createContactOperation = new CreateContact();
$createContactOperation = new CreateContact($createContact);
$client = GetresponseClientFactory::createWithApiKey('my_api_key');
$response = $client->call($createContactOperation);

if ($response->isSuccess()) {
print 'OK';
}
```
Output:

```plain
OK
Output:

```plain
OK
```

___
Expand Down

0 comments on commit 28527f5

Please sign in to comment.