Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2024-04-17 16:28:06 +00:00 committed by Katrin Fischer
parent 062e04c9c3
commit da475321a5
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
3 changed files with 27 additions and 2 deletions

View File

@ -31,6 +31,21 @@ Koha::ERM::EUsage::CounterLog - Koha ErmCounterLog Object class
=cut
=head3 borrowernumber
Return the borrower for this counter_file
=cut
sub borrowernumber {
my ($self) = @_;
my $borrowers_rs = $self->_result->borrowernumber;
return unless $borrowers_rs;
return Koha::Patron->_new_from_dbic($borrowers_rs);
}
=head2 Internal methods
=head3 _type

View File

@ -11,9 +11,10 @@ properties:
- integer
- "null"
borrowernumber:
description: borrowernumber of the counter_log
type: object
description: patron object
type:
- integer
- object
- "null"
importdate:
type: string

View File

@ -13,6 +13,15 @@
name: usage_data_provider_id
required: false
type: integer
- name: x-koha-embed
in: header
required: false
description: Embed list sent as a request header
type: array
items:
type: string
enum:
- borrowernumber
- $ref: "../swagger.yaml#/parameters/match"
- $ref: "../swagger.yaml#/parameters/order_by"
- $ref: "../swagger.yaml#/parameters/page"