@@ -, +, @@ Koha::Acquisition::BasketGroup --- Koha/Acquisition/BasketGroup.pm | 18 +++++++++++++++++- Koha/Schema/Result/Aqbasketgroup.pm | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) --- a/Koha/Acquisition/BasketGroup.pm +++ a/Koha/Acquisition/BasketGroup.pm @@ -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 --- a/Koha/Schema/Result/Aqbasketgroup.pm +++ a/Koha/Schema/Result/Aqbasketgroup.pm @@ -138,10 +138,14 @@ __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'; } + sub koha_objects_class { 'Koha::Acquisition::BasketGroups'; } --