diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-03 12:11:25 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-10-03 12:11:25 +0200 |
commit | 2cc84ed0a8a877d969d0ca74ed55e6d0a6e94549 (patch) | |
tree | 71383670bf303a0a36d629fce18dad052979bcb3 /lib/Travel/Status/DE | |
parent | 6fa6997cb1bb859272ad3f426ab0e0bb94065c7e (diff) |
Trip: Add product, product_class accessors
Diffstat (limited to 'lib/Travel/Status/DE')
-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}, |