#---------------------------------------------------------------
# ____                   _ _         ____  _
#|  _ \ ___  _   _  __ _| | |_ _   _/ ___|| |__   __ _ _ __ ___
#| |_) / _ \| | | |/ _` | | __| | | \___ \| '_ \ / _` | '__/ _ \
#|  _ < (_) | |_| | (_| | | |_| |_| |___) | | | | (_| | | |  __/
#|_| \_\___/ \__, |\__,_|_|\__|\__, |____/|_| |_|\__,_|_|  \___|
#            |___/             |___/
#
# Copyright (C) 2010 RoyaltyShare, Inc.   All Rights Reserved
#---------------------------------------------------------------

package RPS::Import::XboxMusic::Subscription::v3;

use strict;

use lib '/app/tools/common/lib';
use Common::Assert;
use Common::UTF8;

use lib '/app/tools/rps/lib';
use RPS::Import::ServiceMap;

use base 'RPS::Import::XboxMusic::Subscription::v1';

sub _fieldMap {
    {
        albumName        => 'F',
        artistName       => 'C',
        countryCode      => 'M',
        formatType       => 'P',
        isrc             => 'D',
        labelName        => 'J',
        productType      => 'N',
        serviceID        => 'L',
        trackName        => 'B',
        units            => 'O',
        upc              => 'H',
        currencyCode     => 'T',
        price            => 'S',
    }
}

sub _headerIdentifier { ( productType => 'Product Type' ) }

sub currencyCode {
    my $self = shift;
    my $ccode = $self->_getByFieldName( 'currencyCode' );
    return ($ccode eq '') ? 'USD' : $ccode;
}

###
1;# Play nicely.
###
