|
Lines 429-434
sub as_marc_field {
Link Here
|
| 429 |
return $field; |
429 |
return $field; |
| 430 |
} |
430 |
} |
| 431 |
|
431 |
|
|
|
432 |
=head3 to_api_mapping |
| 433 |
|
| 434 |
This method returns the mapping for representing a Koha::Item object |
| 435 |
on the API. |
| 436 |
|
| 437 |
=cut |
| 438 |
|
| 439 |
sub to_api_mapping { |
| 440 |
return { |
| 441 |
itemnumber => 'item_id', |
| 442 |
biblionumber => 'biblio_id', |
| 443 |
biblioitemnumber => undef, |
| 444 |
barcode => 'external_id', |
| 445 |
dateaccessioned => 'acquisition_date', |
| 446 |
booksellerid => 'acquisition_source', |
| 447 |
homebranch => 'home_library_id', |
| 448 |
price => 'purchase_price', |
| 449 |
replacementprice => 'replacement_price', |
| 450 |
replacementpricedate => 'replacement_price_date', |
| 451 |
datelastborrowed => 'last_checkout_date', |
| 452 |
datelastseen => 'last_seen_date', |
| 453 |
stack => undef, |
| 454 |
notforloan => 'not_for_loan_status', |
| 455 |
damaged => 'damaged_status', |
| 456 |
damaged_on => 'damaged_date', |
| 457 |
itemlost => 'lost_status', |
| 458 |
itemlost_on => 'lost_date', |
| 459 |
withdrawn => 'withdrawn', |
| 460 |
withdrawn_on => 'withdrawn_date', |
| 461 |
itemcallnumber => 'callnumber', |
| 462 |
coded_location_qualifier => 'coded_location_qualifier', |
| 463 |
issues => 'checkouts_count', |
| 464 |
renewals => 'renewals_count', |
| 465 |
reserves => 'holds_count', |
| 466 |
restricted => 'restricted_status', |
| 467 |
itemnotes => 'public_notes', |
| 468 |
itemnotes_nonpublic => 'internal_notes', |
| 469 |
holdingbranch => 'holding_library_id', |
| 470 |
paidfor => undef, |
| 471 |
timestamp => 'timestamp', |
| 472 |
location => 'location', |
| 473 |
permanent_location => 'permanent_location', |
| 474 |
onloan => 'checked_out_date', |
| 475 |
cn_source => 'call_number_source', |
| 476 |
cn_sort => 'call_number_sort', |
| 477 |
ccode => 'collection_code', |
| 478 |
materials => 'materials_notes', |
| 479 |
uri => 'uri', |
| 480 |
itype => 'item_type', |
| 481 |
more_subfields_xml => 'extended_subfields', |
| 482 |
enumchron => 'serial_issue_number', |
| 483 |
copynumber => 'copy_number', |
| 484 |
stocknumber => 'inventory_number', |
| 485 |
new_status => 'new_status' |
| 486 |
}; |
| 487 |
} |
| 488 |
|
| 432 |
=head2 Internal methods |
489 |
=head2 Internal methods |
| 433 |
|
490 |
|
| 434 |
=head3 _type |
491 |
=head3 _type |