Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup

This patch adds to_api_mapping to the Koha::Acquistion::BasketGroup
class.

To test:
1. Compare the mapping with the one on the RFC
=> SUCCESS: They match
2. Sigh off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomás Cohen Arazi 2020-01-20 11:08:23 -03:00 committed by Martin Renvoize
parent 09f2b5f90b
commit b3b58d406e
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 20 additions and 1 deletions

View file

@ -27,10 +27,26 @@ Koha::Acquisition::BasketGroup - Koha Basket group Object class
=head1 API
=head2 Class Methods
=head2 Class methods
=head3 to_api_mapping
This method returns the mapping for representing a Koha::Acquisition::BasketGroup object
on the API.
=cut
sub to_api_mapping {
return {
id => 'basket_group_id',
booksellerid => 'vendor_id',
deliveryplace => 'delivery_library_id',
freedeliveryplace => 'delivery_place',
deliverycomment => 'delivery_note',
billingplace => 'invoice_library_id',
};
}
=head2 Internal methods
=head3 _type

View file

@ -138,6 +138,9 @@ __PACKAGE__->belongs_to(
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9cEWAMwcFKPYPEG1CaaD3w
__PACKAGE__->add_columns(
'+closed' => { is_boolean => 1 }
);
sub koha_object_class {
'Koha::Acquisition::BasketGroup';