r58334 - in /branches/upstream/libwww-cnic-perl/current/lib/WWW: CNic.pm CNic/Cookbook.pm CNic/Response/LockDomain.pm CNic/Response/UnlockDomain.pm

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sun May 23 15:56:26 UTC 2010


Author: gregoa
Date: Sun May 23 15:56:15 2010
New Revision: 58334

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58334
Log:
[svn-upgrade] Integrating new upstream version, libwww-cnic-perl (0.32)

Added:
    branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/LockDomain.pm
    branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/UnlockDomain.pm
Modified:
    branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic.pm
    branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Cookbook.pm

Modified: branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic.pm?rev=58334&op=diff
==============================================================================
--- branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic.pm (original)
+++ branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic.pm Sun May 23 15:56:15 2010
@@ -1,7 +1,7 @@
 # Copyright (c) 2010 CentralNic Ltd. All rights reserved. This program is
 # free software; you can redistribute it and/or modify it under the same
 # terms as Perl itself.
-# $Id: CNic.pm,v 1.61 2010/03/31 11:58:30 gavin Exp $
+# $Id: CNic.pm,v 1.62 2010/05/21 16:36:47 gavin Exp $
 package WWW::CNic;
 use LWP;
 use LWP::ConnCache;
@@ -11,7 +11,7 @@
 use vars qw($VERSION $CONNECTION_CACHE);
 use strict;
 
-our $VERSION = '0.31';
+our $VERSION = '0.32';
 
 =pod
 
@@ -227,7 +227,9 @@
 		$self->{_command} eq 'reject_transfer'		&& return $self->_reject_transfer();
 		$self->{_command} eq 'list_outstanding_domains'	&& return $self->_list_outstanding_domains();
 		$self->{_command} eq 'submit_payment_batch'	&& return $self->_submit_payment_batch();
-		$self->{_command} eq 'registrant_transfer' && return $self->_registrant_transfer();
+		$self->{_command} eq 'registrant_transfer'	&& return $self->_registrant_transfer();
+		$self->{_command} eq 'lock_domain'		&& return $self->_lock_domain();
+		$self->{_command} eq 'unlock_domain'		&& return $self->_unlock_domain();
 		die("Invalid command '$self->{_command}'");
 	}
 }
@@ -912,6 +914,44 @@
 	return WWW::CNic::Response::SubmitPaymentBatch->new($self->{_response}->{_raw});
 }
 
+sub _lock_domain {
+	my $self = shift;
+	$self->{_base} =~ s/^http:/https:/g;	# Requires SSL
+	die("Missing username") if $self->{_username} eq '';
+	die("Missing password") if $self->{_password} eq '';
+	die("Missing domain")	if $self->{_domain}   eq '';
+	my %params = (
+				user		=> $self->{_username},
+				password	=> $self->_crypt_md5($self->{_password}),
+				test		=> $self->{_test},
+				domain		=> $self->{_domain},
+	);
+	my $url = "$self->{_base}/lock_domain";
+	my $req = POST($url, \%params);
+	$self->{_response}->{_raw} = $self->_get($req);
+	use WWW::CNic::Response::LockDomain;
+	return WWW::CNic::Response::LockDomain->new($self->{_response}->{_raw});
+}
+
+sub _unlock_domain {
+	my $self = shift;
+	$self->{_base} =~ s/^http:/https:/g;	# Requires SSL
+	die("Missing username") if $self->{_username} eq '';
+	die("Missing password") if $self->{_password} eq '';
+	die("Missing domain")	if $self->{_domain}   eq '';
+	my %params = (
+				user		=> $self->{_username},
+				password	=> $self->_crypt_md5($self->{_password}),
+				test		=> $self->{_test},
+				domain		=> $self->{_domain},
+	);
+	my $url = "$self->{_base}/unlock_domain";
+	my $req = POST($url, \%params);
+	$self->{_response}->{_raw} = $self->_get($req);
+	use WWW::CNic::Response::UnlockDomain;
+	return WWW::CNic::Response::UnlockDomain->new($self->{_response}->{_raw});
+}
+
 sub _get {
 	my ($self, $request) = @_;
 	my $response = $self->{_agent}->request($request);

Modified: branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Cookbook.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Cookbook.pm?rev=58334&op=diff
==============================================================================
--- branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Cookbook.pm (original)
+++ branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Cookbook.pm Sun May 23 15:56:15 2010
@@ -1,7 +1,7 @@
 # Copyright (c) 2010 CentralNic Ltd. All rights reserved. This program is
 # free software; you can redistribute it and/or modify it under the same
 # terms as Perl itself.
-# $Id: Cookbook.pm,v 1.51 2010/03/31 11:58:30 gavin Exp $
+# $Id: Cookbook.pm,v 1.52 2010/04/26 13:35:23 gavin Exp $
 
 package WWW::CNic::Cookbook;
 use vars qw($VERSION);
@@ -603,6 +603,8 @@
 
 =item the "gaining" registrar has not opted-out of the "push" system
 
+=item there are no unpaid registration or renewal fees against it
+
 =back
 
 	my $query = WWW::CNic->new(
@@ -624,8 +626,7 @@
 	}
 
 If the transaction is successful, the domain name will be immediately removed
-from your account. Any outstanding invoices will be credited to you and
-re-issued to the gaining account.
+from your account.
 
 If you are also listed as Technical Contact for the domain name, then this
 handle will also be changed to the gaining registrar account.

Added: branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/LockDomain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/LockDomain.pm?rev=58334&op=file
==============================================================================
--- branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/LockDomain.pm (added)
+++ branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/LockDomain.pm Sun May 23 15:56:15 2010
@@ -1,0 +1,59 @@
+# Copyright (c) 2010 CentralNic Ltd. All rights reserved. This program is
+# free software; you can redistribute it and/or modify it under the same
+# terms as Perl itself.
+# $Id: LockDomain.pm,v 1.1 2010/05/21 16:36:47 gavin Exp $
+
+package WWW::CNic::Response::LockDomain;
+use vars qw($VERSION);
+
+=pod
+
+=head1 NAME
+
+WWW::CNic::Response::LockDomain - a WWW::CNic response object for locking a domain name.
+
+=head1 SYNOPSIS
+
+	use WWW::CNic;
+
+	my $query = WWW::CNic->new( OPTIONS );
+	$query->set( PARAMETERS );
+
+	my $response = $query->execute();
+
+=head1 DESCRIPTION
+
+Response module for locking domain names via the CentralNic Toolkit (http://toolkit.centralnic.com/). This module inherits all its methods from the base class, I<WWW::CNic::Response>.
+
+=head1 METHODS
+
+This class has no additional methods than those it inherits from I<WWW::CNic::Response>. Check L<WWW::CNic::Response> for information about available methods.
+
+=head1 COPYRIGHT
+
+This module is (c) 2010 CentralNic Ltd. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+=over
+
+=item *
+
+http://toolkit.centralnic.com/
+
+=item *
+
+L<WWW::CNic::Response>
+
+=item *
+
+L<WWW::CNic>
+
+=back
+
+=cut
+
+use WWW::CNic::Response;
+ at ISA = qw(WWW::CNic::Response);
+
+1;

Added: branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/UnlockDomain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/UnlockDomain.pm?rev=58334&op=file
==============================================================================
--- branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/UnlockDomain.pm (added)
+++ branches/upstream/libwww-cnic-perl/current/lib/WWW/CNic/Response/UnlockDomain.pm Sun May 23 15:56:15 2010
@@ -1,0 +1,59 @@
+# Copyright (c) 2010 CentralNic Ltd. All rights reserved. This program is
+# free software; you can redistribute it and/or modify it under the same
+# terms as Perl itself.
+# $Id: UnlockDomain.pm,v 1.1 2010/05/21 16:36:47 gavin Exp $
+
+package WWW::CNic::Response::UnlockDomain;
+use vars qw($VERSION);
+
+=pod
+
+=head1 NAME
+
+WWW::CNic::Response::UnlockDomain - a WWW::CNic response object for unlocking a domain name.
+
+=head1 SYNOPSIS
+
+	use WWW::CNic;
+
+	my $query = WWW::CNic->new( OPTIONS );
+	$query->set( PARAMETERS );
+
+	my $response = $query->execute();
+
+=head1 DESCRIPTION
+
+Response module for unlocking domain names via the CentralNic Toolkit (http://toolkit.centralnic.com/). This module inherits all its methods from the base class, I<WWW::CNic::Response>.
+
+=head1 METHODS
+
+This class has no additional methods than those it inherits from I<WWW::CNic::Response>. Check L<WWW::CNic::Response> for information about available methods.
+
+=head1 COPYRIGHT
+
+This module is (c) 2010 CentralNic Ltd. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+=over
+
+=item *
+
+http://toolkit.centralnic.com/
+
+=item *
+
+L<WWW::CNic::Response>
+
+=item *
+
+L<WWW::CNic>
+
+=back
+
+=cut
+
+use WWW::CNic::Response;
+ at ISA = qw(WWW::CNic::Response);
+
+1;




More information about the Pkg-perl-cvs-commits mailing list