<?php
namespace App\Amadeus\FileParser;

class Line_VAL extends \App\Amadeus\FileParser\LineAbstract
{
	/**
	 * 4.115. VAL Agency Validation Data (Electronic Ticket)
	 * see page 296(338)
	 *
	 * This field is used to validate the original issuing office of Validation Codes and exists only the ETKT - method 4.
	 * It is NOT sent in any back office AIR. - why is this documented then??????
	 */
	protected $structure = [
		['name'=> 'MSGTAG',  'val' => 'VAL',   'type' => 'AN',   'req' => 'M',  'len' => 3,],                          // 1 : Message Tag (VAL)
		['name'=> 'TAID',                      'type' => 'N',                   'len_min' => 1,   'len_max' => 9,],    // 2 : Travel Agency Identification details
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 3 : Delimiter (Constant value of ';')
		['name'=> 'INID',                      'type' => 'AN',                  'len_min' => 1,   'len_max' => 9,],    // 4 : In-House Identification
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 5 : Delimiter (Constant value of ';')
		['name'=> 'INID2',                     'type' => 'AN',                  'len_min' => 1,   'len_max' => 9,],    // 6 : In-House Identification
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 7 : Delimiter (Constant value of ';')
		['name'=> 'PLACE',                     'type' => 'AN',                  'len_min' => 1,   'len_max' => 25,],   // 8 : Place/Location Identification
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 9 : Delimiter (Constant value of ';')
		['name'=> 'ORIG',                      'type' => 'AN',                  'len' => 1,],                          // 10 : Originator Type
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 11 : Delimiter (Constant value of ';')
		['name'=> 'AGTADD',                    'type' => 'AN',                  'len_min' => 1,   'len_max' => 70,],   // 12 : Agency Address
	];
}
