Skip to content
Open
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
7 changes: 7 additions & 0 deletions lib/Net/DRI/DRD/OpenSRS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,12 @@ sub domain_get_trade_lock
return $rc;
}

sub domain_trade
{
my ($self,$ndr,$domain,$rd)=@_;
my $rc=$ndr->process('domain','trade',[$domain, $rd]);
return $rc;
}

####################################################################################################
1;
22 changes: 22 additions & 0 deletions lib/Net/DRI/Protocol/OpenSRS/XCP/Domain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ sub register_commands
get_dnssec_info => [ \&get_dnssec_info ],
modify_trade_lock => [\&modify_trade_lock ],
get_trade_lock => [\&get_trade_lock],
trade => [\&trade],
);

return { 'domain' => \%tmp };
Expand Down Expand Up @@ -744,6 +745,27 @@ sub get_trade_lock
$msg->command(\%r);
$msg->command_attributes({domain => $domain});
}

sub trade
{
my ($xcp,$domain,$rd)=@_;
my $msg=$xcp->message();
my $attr = {domain => $domain};

my %r=(action=>'TRADE_DOMAIN',object=>'domain');
$msg->command(\%r);

my $registry_type = "registrant";
my $contactset=$rd->set('contact');
my $co=$contactset->get($registry_type);
$co->validate();
my $owner = add_contact_info($msg,$co);

$attr ={%$attr, %$owner};

$msg->command_attributes($attr);
}

}

####################################################################################################
Expand Down