From 5bd21cbf12b83c63afd9553aaf73f20936ec17e3 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Thu, 10 Oct 2019 17:09:21 +0100
Subject: [PATCH] Bug 23049: Update API
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
---
 Koha/REST/V1/Patrons/Account.pm              | 2 ++
 api/v1/swagger/definitions/account_line.json | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/Koha/REST/V1/Patrons/Account.pm b/Koha/REST/V1/Patrons/Account.pm
index eb495f924e..5facbd7455 100644
--- a/Koha/REST/V1/Patrons/Account.pm
+++ b/Koha/REST/V1/Patrons/Account.pm
@@ -228,6 +228,7 @@ sub _to_model {
 our $to_api_mapping = {
     accountlines_id   => 'account_line_id',
     accounttype       => 'account_type',
+    debit_type_code   => 'debit_type',
     amountoutstanding => 'amount_outstanding',
     borrowernumber    => 'patron_id',
     branchcode        => 'library_id',
@@ -244,6 +245,7 @@ our $to_api_mapping = {
 our $to_model_mapping = {
     account_line_id    => 'accountlines_id',
     account_type       => 'accounttype',
+    debit_type         => 'debit_type_code',
     amount_outstanding => 'amountoutstanding',
     checkout_id        => 'issue_id',
     internal_note      => 'note',
diff --git a/api/v1/swagger/definitions/account_line.json b/api/v1/swagger/definitions/account_line.json
index ac81f9d05d..b0e71e7253 100644
--- a/api/v1/swagger/definitions/account_line.json
+++ b/api/v1/swagger/definitions/account_line.json
@@ -43,6 +43,10 @@
       "type": "string",
       "description": "Account line type"
     },
+    "debit_type": {
+      "type": "string",
+      "description": "Account line debit type"
+    },
     "payment_type": {
       "type": [
         "string",
-- 
2.20.1