| 1 | package Net::Journyx::Code; | ||
| 2 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 3 | extends 'Net::Journyx::Record'; | |
| 4 | |||
| 5 | 3 | ▶ | use constant jx_record_class => 'CodeRecord'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 3 | ▶ | use constant jx_strip_record_suffix => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 3 | ▶ | use constant jx_meta => { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | defaults => 'getDefaultCode', | ||
| 9 | load => 'getCode', | ||
| 10 | update => { | ||
| 11 | operation => 'modifyCode', | ||
| 12 | leading => 'id', | ||
| 13 | leading_argname => 'id', | ||
| 14 | record_argname => 'rec', | ||
| 15 | }, | ||
| 16 | create => { | ||
| 17 | operation => 'addFullCode', | ||
| 18 | # According to WSDL file addCode 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 => 'addCode', | ||
| 26 | # columns => [qw(pretty_name)], | ||
| 27 | # rewrite => { pretty_name => 'name' }, | ||
| 28 | # } | ||
| 29 | }, | ||
| 30 | delete => { | ||
| 31 | operation => 'removeCode', | ||
| 32 | leading => 'id', | ||
| 33 | leading_argname => 'id', | ||
| 34 | }, | ||
| 35 | 3 | }; | |
| 36 | |||
| 37 | 3 | 1; | |