From 08e654d5fb5b73e0617d8c48e10419d3804efc42 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 12 Aug 2022 19:47:29 +0200 Subject: [PATCH] Add list label templates method to Fluics API client [SCI-7045] --- app/services/label_printers/fluics/api_client.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/services/label_printers/fluics/api_client.rb b/app/services/label_printers/fluics/api_client.rb index 9e6120124..a2b87fa6c 100644 --- a/app/services/label_printers/fluics/api_client.rb +++ b/app/services/label_printers/fluics/api_client.rb @@ -42,6 +42,11 @@ module LabelPrinters ) end + def list_templates + group_name = ENV['FLUICS_TEMPLATES_GROUP'] || '' + do_request(:get, '/get_templates', params: { query: { templateGroups: group_name } }) + end + private def do_request(http_method, path, params: {})