This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / FS / FS / cdr / wip.pm
1 package FS::cdr::wip;
2
3 use strict;
4 use vars qw( @ISA %info );
5 use FS::cdr qw(_cdr_date_parser_maker);
6
7 @ISA = qw(FS::cdr);
8
9 %info = (
10   'name'          => 'WIP',
11   'weight'        => 100,
12   'header'        => 1,
13   'type'          => 'csv',
14   'sep_char'      => ':',
15   'import_fields' => [
16 # All of these are based on the January 2010 version of the spec,
17 # except that we assume that before all the fields mentioned in the
18 # spec, there's a counter field.
19     skip(4),          # counter, id, APCSJursID, RecordType
20     'unique_id',      # CDRID
21     skip(1),          # AccountNumber; empty
22     'charged_party',  # ServiceNumber
23     skip(1),          # ServiceNumberType
24     'src',            # PointOrigin
25     'dst',            # PointTarget
26     'calltypenum',    # Jurisdiction: need to remap
27     _cdr_date_parser_maker('startdate'), #TransactionDate
28     skip(3),          # BillClass, TypeIDUsage, ElementID
29     'duration',       # PrimaryUnits
30     skip(6),          # CompletionStatus, Latitude, Longitude, 
31                       # OriginDescription, TargetDescription, RatePeriod
32     'billsec',        # RatedUnits; seems to always be equal to PrimaryUnits
33     skip(6),  #SecondsUnits, ThirdUnits, FileID, OriginalExtractSequenceNumber,
34               #RateClass, #ProviderClass
35     skip(8),  #ProviderID, CurrencyCode, EquipmentTypeCode, ClassOfServiceCode,
36               #RateUnitsType, DistanceBandID, ZoneClass, CDRStatus
37     'upstream_price', # ISPBuy
38     skip(2),          # EUBuy, CDRFromCarrier
39     ],
40 # Need clarification on:
41 # Values for RecordType, Jurisdiction, CompletionStatus, and ProviderClass
42 # Do we care about the following:
43 # AccountNumber, ServiceNumberType, CDRStatus
44
45 );
46
47 sub skip { map {''} (1..$_[0]) }
48
49 1;