package BookPub::Import::Importer::SainsburysEntertainment::Version8;

use strict;

use lib '/app/tools/common/lib';
use Common::Country;

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

sub _fieldMap {
    my $self = shift;

    my %fieldMap = (
        8 => {
            dateBegin              => 'K',
            rAuthor                => 'D',
            rTitle                 => 'B',
            rSubtitle              => 'C',
            rImprint               => 'G',
            isbn                   => 'A',
            rSales                 => 'L',
            rReturns               => 'O',
            rListPrice             => 'R',
            rListPriceCurrency     => 'P',
            rPurchasePrice         => 'T',
            rPurchasePriceCurrency => 'P',
            rRevenue               => 'W',
            currencyCode           => 'P',
            rTaxUnitPrice          => 'U',
            countryCode            => 'X',
        },
    );

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

sub _unverifiedFieldMap {
    my $self = shift;

    my %fieldMap = (
        8 => {
            dateReturned => 'N',
        },
    );

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

sub countryCode { shift->_getByFieldName('countryCode') }

1;
