diff --git a/Koha/AdditionalField.pm b/Koha/AdditionalField.pm index 25d6808c16..a9230ff666 100644 --- a/Koha/AdditionalField.pm +++ b/Koha/AdditionalField.pm @@ -55,9 +55,11 @@ sub to_api { my ( $self, $params ) = @_; my $table_to_resource = { - 'aqbasket' => 'basket', - 'aqinvoices' => 'invoice', - 'aqorders' => 'order', + 'accountlines:credit' => 'credit', + 'accountlines:debit' => 'debit', + 'aqbasket' => 'basket', + 'aqinvoices' => 'invoice', + 'aqorders' => 'order', }; my $json = $self->SUPER::to_api($params); diff --git a/Koha/REST/V1/ExtendedAttributeTypes.pm b/Koha/REST/V1/ExtendedAttributeTypes.pm index 528197ad0c..c49fddc232 100644 --- a/Koha/REST/V1/ExtendedAttributeTypes.pm +++ b/Koha/REST/V1/ExtendedAttributeTypes.pm @@ -47,6 +47,8 @@ sub list { # FIXME: Maybe not the best place for this mapping my $resource_to_table = { basket => 'aqbasket', + credit => 'accountlines:credit', + debit => 'accountlines:debit', invoice => 'aqinvoices', order => 'aqorders', }; diff --git a/api/v1/swagger/paths/extended_attribute_types.yaml b/api/v1/swagger/paths/extended_attribute_types.yaml index f49d54b91e..f20eb2ff58 100644 --- a/api/v1/swagger/paths/extended_attribute_types.yaml +++ b/api/v1/swagger/paths/extended_attribute_types.yaml @@ -15,11 +15,11 @@ type: string enum: - basket + - credit + - debit - invoice - order - subscription - - accountlines:credit - - accountlines:debit - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" - $ref: "../swagger.yaml#/parameters/page"