Skip to content

Commit

Permalink
Added info to readme (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-mykhailenko committed Feb 10, 2024
1 parent 433bd92 commit 85e598f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,37 @@ $result = $mgClient->domains()->updateWebScheme($domain, 'https');
print_r($result);
```

### Update web prefix

```php
# Include the Autoloader (see "Libraries" for install instructions)
require 'vendor/autoload.php';
use Mailgun\Mailgun;

# Instantiate the client.
$mgClient = Mailgun::create('KEY', 'FULL_DOMAIN_URL');
$domain = "DOMAIN";

# Issue the call to the client.
$result = $mgClient->domains()->updateWebPrefix($domain, 'tracking');
print_r($result);
```

- Example of response
```
Mailgun\Model\Domain\WebPrefixResponse Object
(
[message:Mailgun\Model\Domain\AbstractDomainResponse:private] => Domain web prefix updated
[domain:Mailgun\Model\Domain\AbstractDomainResponse:private] =>
[inboundDnsRecords:Mailgun\Model\Domain\AbstractDomainResponse:private] => Array
(
)
[outboundDnsRecords:Mailgun\Model\Domain\AbstractDomainResponse:private] => Array
(
)
)
```

### Custom http request to the API

```php
Expand Down
4 changes: 2 additions & 2 deletions tests/Model/Domain/WebPrefixResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Mailgun\Tests\Model\Domain;

use Mailgun\Model\Domain\WebPrefixResponse;
use Mailgun\Tests\Model\BaseModelTest;
use Mailgun\Tests\Model\BaseModel;

class WebPrefixResponseTest extends BaseModelTest
class WebPrefixResponseTest extends BaseModel
{
public function testCreate()
{
Expand Down

0 comments on commit 85e598f

Please sign in to comment.