Google-Checkout
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Google/Checkout/General/DigitalContent.pm view on Meta::CPAN
C<Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY>.
=item get_key
Returns key for key/URL delivery. This is only useful for
C<Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY>.
=item set_key
Sets the key for key/URL delivery. This is only useful for
C<Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY>.
Sets the price of the merchant item.
=item get_url
Returns the URL for key/URL delivery. This is only useful for
C<Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY>.
=item set_url URL
Sets the URL for key/URL delivery. This is only useful for
C<Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY>.
=back
=cut
=head1 COPYRIGHT
Copyright 2006 Google. All rights reserved.
=head1 SEE ALSO
Google::Checkout::General::MerchantItem
=cut
#--
#-- <digital-content>...</digital-content>
#--
use strict;
use warnings;
use Google::Checkout::General::Error;
use Google::Checkout::General::Util qw/date_time_string/;
use Google::Checkout::General::MerchantItem;
our @ISA = qw/Google::Checkout::General::MerchantItem/;
use constant EMAIL_DELIVERY => "email_delivery";
use constant KEY_URL_DELIVERY => "key_url_delivery";
sub new
{
my ($class, %args) = @_;
my $self = Google::Checkout::General::MerchantItem->new(%args);
$self = bless $self => $class;
$self->set_delivery_method($args{delivery_method});
$self->set_download_instruction($args{download_instruction});
$self->set_key($args{key});
$self->set_url($args{url});
return $self;
}
sub get_delivery_method
{
my ($self) = @_;
return $self->{delivery_method} || '';
}
sub set_delivery_method
{
my ($self, $method) = @_;
if ($method && ($method eq Google::Checkout::General::DigitalContent::EMAIL_DELIVERY ||
$method eq Google::Checkout::General::DigitalContent::KEY_URL_DELIVERY))
{
$self->{delivery_method} = $method;
}
else
{
$self->{delivery_method} = '';
}
}
sub get_download_instruction
{
my ($self) = @_;
return $self->{download_instruction} || '';
}
sub set_download_instruction
{
my ($self, $instruction) = @_;
$self->{download_instruction} = defined $instruction ? $instruction : '';
}
sub get_key
{
my ($self) = @_;
return $self->{key} || '';
}
sub set_key
{
my ($self, $key) = @_;
$self->{key} = defined $key ? $key : '';
}
sub get_url
view all matches for this distributionview release on metacpan - search on metacpan
( run in 2.884 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )