Skip to content

Commit ba95b29

Browse files
authored
Merge pull request #65 from CodeMakerInc/docs/transfers
Document domain and contact transfers in the README
2 parents db762e2 + 35b3e71 commit ba95b29

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,48 @@ Our library is a complete implementation of the EPP specification. Have a look a
2020
PM> Install-Package EppLib
2121
```
2222

23+
# Transfers
24+
25+
`DomainTransfer` and `ContactTransfer` support every transfer operation in RFC 5731 and RFC 5733: `Request` (the default), `Query`, `Approve`, `Reject` and `Cancel`. Put the object's authorization code in `Password`.
26+
27+
Request a domain transfer, adding a year to the registration:
28+
29+
```csharp
30+
var request = new DomainTransfer("example.com")
31+
{
32+
Period = new DomainPeriod(1, "y"),
33+
Password = "2fooBAR"
34+
};
35+
var response = service.Execute(request);
36+
37+
var transfer = response.DomainTransferResult;
38+
// transfer.TransferStatus is "pending" until the losing registrar or the registry acts.
39+
```
40+
41+
Check on it later, or approve, reject or cancel it, with the same command and a different operation:
42+
43+
```csharp
44+
var query = new DomainTransfer("example.com") { Operation = TransferOperation.Query, Password = "2fooBAR" };
45+
var status = service.Execute(query).DomainTransferResult;
46+
47+
Console.WriteLine($"{status.TransferStatus}: requested by {status.RequestClientId} on {status.RequestDate}, " +
48+
$"action due from {status.ActionClientId} by {status.ActionDate}");
49+
50+
// As the losing registrar:
51+
service.Execute(new DomainTransfer("example.com") { Operation = TransferOperation.Approve });
52+
```
53+
54+
When the authorization code belongs to one of the domain's contacts rather than the domain itself, set `AuthInfoRoid` to that contact's repository ID (the `roid` attribute on `pw`).
55+
56+
Contacts transfer the same way:
57+
58+
```csharp
59+
var contactTransfer = service.Execute(new ContactTransfer("sh8013") { Password = "2fooBAR" });
60+
// contactTransfer.ContactId, TransferStatus, RequestClientId, RequestDate, ActionClientId, ActionDate
61+
```
62+
63+
Registries that need extra data use their own subclass, such as `CiraDomainTransfer` for .ca, which accepts the same `Operation`, `Period` and `Password`.
64+
2365
# Upgrading
2466

2567
Releases 1.4.1 to 1.7.0 change behavior you may depend on. Newest first:

0 commit comments

Comments
 (0)