package BookPub::Import::Importer::EDMap::Version3;

use strict;

use lib '/app/tools/bookpub/lib';
use base 'BookPub::Import::Importer::EDMap';

sub _fieldMap {
    my $self = shift;

    my %fieldMap = (
        3 => {
            dateBegin          => 'E',
            rTitle             => 'D',
            rIsbn13            => 'C',
            rInstitution       => 'A',
            rState             => 'Q',
            countryCode        => 'S',
            rUnits             => 'G',
            rUnitPrice         => 'T',
            rListPrice         => 'T',
            rListPriceCurrency => 'V',
            currencyCode       => 'V',
            rModel             => 'W',
        }
    );

    return $fieldMap{ $self->_version };
}

sub _headerIdentifier { rIsbn13 => 'ISBN' }
sub rProductType      { BookPub::DB::Item::Sale::kProductTypeEBook }
sub purchaseType      { BookPub::DB::Item::Sale::kPurchaseTypePrintOnDemand }
sub rPurchaseType     { BookPub::DB::Item::Sale::kPurchaseTypePrintOnDemand }

sub rServiceName {
    return BookPub::Tracker::Service::GetDefaultServiceName(
        service_id => shift->serviceID
    );
}


1;
