Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"originGitCommitIsDirty": null,
"invokedBy": "ci",
"requestedVersion": "1.31.0",
"requestedVersion": "1.32.0",
"ciProvider": "gitlab",
"sdkVersion": "1.31.0"
"sdkVersion": "1.32.0"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

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

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "namecom/core-api",
"version": "1.31.0",
"version": "1.32.0",
"description": "Official PHP SDK for the name.com Core API",
"keywords": [
"namecom",
Expand Down
4 changes: 3 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3815,9 +3815,10 @@ $client->webhookNotifications->getSubscribedNotifications();
Creates a webhook subscription to receive real-time notifications about specific domain or account events (e.g. transfer completions, renewals). Pass the callback URL and event types. This allows external systems to stay in sync with name.com changes.
Supported webhook event names:
- `account.credit.balance_change` – account credit balance changes (increases or decreases).
- `account.domain.removal` – domain removed from the subscribing account.
- `domain.lock.status_change` – domain lock added or removed.
- `domain.transfer.status_change` – domain transfer IN to name.com; status updates while name.com is the gaining registrar.
- `domain.transfer_out.status_change` – domain transfer OUT from name.com to another registrar; fires when the domain is removed from the account.
- `domain.transfer_out.status_change` – domain transfer OUT from name.com; `initiated`, `completed` (domain removed), or `canceled` (no longer pending at the registry).
- `domain.transfer.internal_in` - name.com domain transfers in to the subscribing account via internal transfer.
- `domain.transfer.internal_out` - name.com domain transfers out of the subscribing account via internal transfer.
- `contact.verification.status_change` - contact verification status changes (verified or unverified).
Expand Down Expand Up @@ -4576,6 +4577,7 @@ $client->transfers->cancelTransfer(
<dd>

Cancels an outbound transfer for the given domain. Use this when the domain is being transferred out of name.com (losing registrar) to another (gaining) registrar and the registrant or reseller wants to cancel that transfer.
On success, subscribers receive `domain.transfer_out.status_change` with status `canceled`.
The endpoint validates that the domain exists and belongs to the authenticated account. Only domains in a pending transfer (out) state can be canceled.
</dd>
</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/NamecomClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ public function __construct(
$defaultHeaders = [
'X-Fern-Language' => 'PHP',
'X-Fern-SDK-Name' => 'Namecom',
'X-Fern-SDK-Version' => '1.31.0',
'User-Agent' => 'namecom/core-api/1.31.0',
'X-Fern-SDK-Version' => '1.32.0',
'User-Agent' => 'namecom/core-api/1.32.0',
];
$defaultHeaders['Authorization'] = "Basic " . base64_encode($username . ":" . $password);

Expand Down
1 change: 1 addition & 0 deletions src/Transfers/TransfersClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public function cancelTransfer(string $domainName, ?array $options = null): ?Tra

/**
* Cancels an outbound transfer for the given domain. Use this when the domain is being transferred out of name.com (losing registrar) to another (gaining) registrar and the registrant or reseller wants to cancel that transfer.
* On success, subscribers receive `domain.transfer_out.status_change` with status `canceled`.
* The endpoint validates that the domain exists and belongs to the authenticated account. Only domains in a pending transfer (out) state can be canceled.
*
* @param string $domainName DomainName is the domain whose transfer out should be canceled.
Expand Down
63 changes: 63 additions & 0 deletions src/Types/AccountDomainRemoval.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

namespace Namecom\Types;

use Namecom\Core\Json\JsonSerializableType;
use Namecom\Core\Json\JsonProperty;
use DateTime;
use Namecom\Core\Types\Date;

/**
* Payload sent when a domain is removed from the subscribing account.
*/
class AccountDomainRemoval extends JsonSerializableType
{
/**
* @var value-of<AccountDomainRemovalEventName> $eventName The name of the subscription event
*/
#[JsonProperty('eventName')]
public string $eventName;

/**
* @var string $domainName The name of the domain that was removed
*/
#[JsonProperty('domainName')]
public string $domainName;

/**
* @var value-of<AccountDomainRemovalReason> $reason Why the domain left inventory: `expiration` (registry delete / post-expiry inventory loss), `agp_refund` (AGP refund delete), or `administrative` (ops/support removal).
*/
#[JsonProperty('reason')]
public string $reason;

/**
* @var DateTime $expireDate The date and time when the domain expired
*/
#[JsonProperty('expireDate'), Date(Date::TYPE_DATETIME)]
public DateTime $expireDate;

/**
* @param array{
* eventName: value-of<AccountDomainRemovalEventName>,
* domainName: string,
* reason: value-of<AccountDomainRemovalReason>,
* expireDate: DateTime,
* } $values
*/
public function __construct(
array $values,
) {
$this->eventName = $values['eventName'];
$this->domainName = $values['domainName'];
$this->reason = $values['reason'];
$this->expireDate = $values['expireDate'];
}

/**
* @return string
*/
public function __toString(): string
{
return $this->toJson();
}
}
8 changes: 8 additions & 0 deletions src/Types/AccountDomainRemovalEventName.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Namecom\Types;

enum AccountDomainRemovalEventName: string
{
case AccountDomainRemoval = "account.domain.removal";
}
10 changes: 10 additions & 0 deletions src/Types/AccountDomainRemovalReason.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Namecom\Types;

enum AccountDomainRemovalReason: string
{
case Expiration = "expiration";
case AgpRefund = "agp_refund";
case Administrative = "administrative";
}
1 change: 1 addition & 0 deletions src/Types/AvailableWebhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
enum AvailableWebhooks: string
{
case AccountCreditBalanceChange = "account.credit.balance_change";
case AccountDomainRemoval = "account.domain.removal";
case DomainLockStatusChange = "domain.lock.status_change";
case DomainTransferStatusChange = "domain.transfer.status_change";
case DomainTransferOutStatusChange = "domain.transfer_out.status_change";
Expand Down
6 changes: 3 additions & 3 deletions src/Types/DomainTransferOutStatusChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Namecom\Core\Json\JsonProperty;

/**
* Payload sent when a domain transfer OUT from name.com to another registrar has a status change (initiated, completed, or canceled). When status is "completed", the domain has been removed from name.com. In some edge cases (including near-expiration scenarios) the data may not be fully accurate.
* Payload for `domain.transfer_out.status_change`. `completed` means the domain left name.com. `canceled` means the outbound transfer is no longer pending at the registry.
*/
class DomainTransferOutStatusChange extends JsonSerializableType
{
Expand All @@ -17,13 +17,13 @@ class DomainTransferOutStatusChange extends JsonSerializableType
public string $eventName;

/**
* @var string $domainName The domain that has transferred out of name.com.
* @var string $domainName The domain whose outbound transfer status changed. For `completed`, the domain has left name.com; for `initiated` and `canceled`, it remains on the losing account.
*/
#[JsonProperty('domainName')]
public string $domainName;

/**
* @var value-of<DomainTransferOutStatusChangeStatus> $status The status of the transfer out event. May be "initiated" (transfer out was started), "completed" (domain has been removed from the account), or "canceled" (transfer out was canceled before completion).
* @var value-of<DomainTransferOutStatusChangeStatus> $status `initiated` (pending out started), `completed` (domain removed), or `canceled` (no longer pending at the registry).
*/
#[JsonProperty('status')]
public string $status;
Expand Down
3 changes: 2 additions & 1 deletion src/WebhookNotifications/WebhookNotificationsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ public function getSubscribedNotifications(?array $options = null): ?ListSubscri
* Creates a webhook subscription to receive real-time notifications about specific domain or account events (e.g. transfer completions, renewals). Pass the callback URL and event types. This allows external systems to stay in sync with name.com changes.
* Supported webhook event names:
* - `account.credit.balance_change` – account credit balance changes (increases or decreases).
* - `account.domain.removal` – domain removed from the subscribing account.
* - `domain.lock.status_change` – domain lock added or removed.
* - `domain.transfer.status_change` – domain transfer IN to name.com; status updates while name.com is the gaining registrar.
* - `domain.transfer_out.status_change` – domain transfer OUT from name.com to another registrar; fires when the domain is removed from the account.
* - `domain.transfer_out.status_change` – domain transfer OUT from name.com; `initiated`, `completed` (domain removed), or `canceled` (no longer pending at the registry).
* - `domain.transfer.internal_in` - name.com domain transfers in to the subscribing account via internal transfer.
* - `domain.transfer.internal_out` - name.com domain transfers out of the subscribing account via internal transfer.
* - `contact.verification.status_change` - contact verification status changes (verified or unverified).
Expand Down
Loading