package BookPub::Import::Importer::AmblingBooks::Version1;

use strict;

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

sub _fieldMap {
    {
        countryCode    => 'J',
        dateBegin      => 'A',
        dateEnd        => 'A',
        rIsbn13        => 'F',
        rTitle         => 'C',
        rAuthor        => 'D',
        rListPrice     => 'G',
        rPurchasePrice => 'H',
        rRevenue       => 'I',
    };
}

sub _headerIdentifier { ( rTitle => 'Title' ) }

sub priceType    { 'rrp' }
sub productType  { BookPub::DB::Item::Sale::kProductTypeAudioBook }
sub purchaseType { BookPub::DB::Item::Sale::kPurchaseTypeDownload }
sub currencyCode { 'USD' }
sub _dateFormat  { ['iso'] }
sub units        { ( shift->rRevenue() < 0 ) ? -1 : 1 }

1;
