| 1 | package Net::Journyx::Subsubcode; | ||
| 2 | use Moose; | ||
| 3 | # XXX: do we want to extend Subcode? At this point questionable | ||
| 4 | extends 'Net::Journyx::Code'; | ||
| 5 | |||
| 6 | use constant jx_record_class => 'SubsubcodeRecord'; | ||
| 7 | use constant jx_meta => { | ||
| 8 | defaults => 'getDefaultSubsubcode', | ||
| 9 | load => 'getSubsubcode', | ||
| 10 | update => { | ||
| 11 | operation => 'modifySubsubcode', | ||
| 12 | leading => 'id', | ||
| 13 | leading_argname => 'id', | ||
| 14 | record_argname => 'rec', | ||
| 15 | }, | ||
| 16 | create => { | ||
| 17 | operation => 'addFullSubsubcode', | ||
| 18 | # According to WSDL file addSubsubcode takes 'name' and CodeRecord has pretty_name column, | ||
| 19 | # but we get the following error: | ||
| 20 | # There are problems with 1 columns in your record: | ||
| 21 | # The column codes_tasks.pname is not allowed to have the null value. [] | ||
| 22 | # | ||
| 23 | # Let's disable quick create | ||
| 24 | # quick => { | ||
| 25 | # operation => 'addSubsubcode', | ||
| 26 | # columns => [qw(pretty_name)], | ||
| 27 | # rewrite => { pretty_name => 'name' }, | ||
| 28 | # } | ||
| 29 | }, | ||
| 30 | delete => { | ||
| 31 | operation => 'removeSubsubcode', | ||
| 32 | leading => 'id', | ||
| 33 | leading_argname => 'id', | ||
| 34 | }, | ||
| 35 | }; | ||
| 36 | |||
| 37 | 1; |