diff options
Diffstat (limited to 'lib/Travel/Status/DE/EFA/Trip.pm')
-rw-r--r-- | lib/Travel/Status/DE/EFA/Trip.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm index b1e3437..a34e6fe 100644 --- a/lib/Travel/Status/DE/EFA/Trip.pm +++ b/lib/Travel/Status/DE/EFA/Trip.pm @@ -12,7 +12,7 @@ use parent 'Class::Accessor'; our $VERSION = '3.00'; Travel::Status::DE::EFA::Trip->mk_ro_accessors( - qw(operator name line number type id dest_name dest_id)); + qw(operator product product_class name line number type id dest_name dest_id)); sub new { my ( $obj, %conf ) = @_; @@ -21,11 +21,13 @@ sub new { my $ref = { operator => $json->{operator}{name}, + product => $json->{product}{name}, + product_class => $json->{product}{class}, polyline => $json->{coords}, name => $json->{name}, line => $json->{disassembledName}, number => $json->{properties}{trainNumber}, - type => $json->{properties}{trainType}, + type => $json->{properties}{trainType} // $json->{product}{name}, id => $json->{id}, dest_name => $json->{destination}{name}, dest_id => $json->{destination}{id}, |