Lines 1565-1595
sub to_api {
Link Here
|
1565 |
return $json_patron; |
1565 |
return $json_patron; |
1566 |
} |
1566 |
} |
1567 |
|
1567 |
|
1568 |
=head3 attributes_from_api |
|
|
1569 |
|
1570 |
my $attrs = $patron->attributes_from_api( $attrs ); |
1571 |
|
1572 |
Overloaded method that implement specific data transformations after |
1573 |
calling the original Koha::Object->attributes_from_api method. |
1574 |
|
1575 |
=cut |
1576 |
|
1577 |
sub attributes_from_api { |
1578 |
my ( $self, $attrs ) = @_; |
1579 |
|
1580 |
$attrs = $self->SUPER::attributes_from_api( $attrs ); |
1581 |
|
1582 |
if ( exists $attrs->{lastseen} ) { |
1583 |
$attrs->{lastseen} = dt_from_string($attrs->{lastseen}, 'rfc3339'); |
1584 |
} |
1585 |
|
1586 |
if ( exists $attrs->{updated_on} ) { |
1587 |
$attrs->{updated_on} = dt_from_string($attrs->{updated_on}, 'rfc3339'); |
1588 |
} |
1589 |
|
1590 |
return $attrs; |
1591 |
} |
1592 |
|
1593 |
=head3 to_api_mapping |
1568 |
=head3 to_api_mapping |
1594 |
|
1569 |
|
1595 |
This method returns the mapping for representing a Koha::Patron object |
1570 |
This method returns the mapping for representing a Koha::Patron object |
1596 |
- |
|
|