With bug 36641 we allow fetching a keys list of effective circulation rules given a combination of library, patron category and item type. It would be great to have some endpoints to allow setting circulation rules via the API too.
Created attachment 170000 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset.
Created attachment 170001 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets
Initial submission to try and get some feedback from other API devs.. Tomas, I'm looking at you here ;P
Created attachment 170128 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset.
Created attachment 170129 [details] [review] Bug 37256: Unit tests for set_rules This patch adds unit tests for the to be introduced set_rules endpoint for setting circualtion rule sets.
Created attachment 170130 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets
Created attachment 170152 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset.
Created attachment 170153 [details] [review] Bug 37256: Unit tests for set_rules This patch adds unit tests for the to be introduced set_rules endpoint for setting circualtion rule sets.
Created attachment 170154 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets
Created attachment 170335 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset.
Created attachment 170336 [details] [review] Bug 37256: Unit tests for set_rules This patch adds unit tests for the to be introduced set_rules endpoint for setting circualtion rule sets.
Created attachment 170337 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets
Created attachment 170338 [details] [review] Bug 37256: Ensure empty and null work as expected in PUT
Created attachment 171719 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset.
Created attachment 171720 [details] [review] Bug 37256: Unit tests for set_rules This patch adds unit tests for the to be introduced set_rules endpoint for setting circualtion rule sets.
Created attachment 171721 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets
Created attachment 171722 [details] [review] Bug 37256: Ensure empty and null work as expected in PUT
Created attachment 171723 [details] [review] Bug 37256: Defined 'context' of circulation rules This is a follow-up to the previous bug exposing circulation rules over the API. We formally define a definition for a circulation rules set including a new 'context' object the defines the context, library_id, patron_category_id and item_type_id combination of the rules returned. This is just a patch I missed in the last submission that I'd meant to add and it's important for the PUT part of this patchset. Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk> Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Created attachment 171724 [details] [review] Bug 37256: Unit tests for set_rules This patch adds unit tests for the to be introduced set_rules endpoint for setting circulation rule sets. Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk> Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Created attachment 171725 [details] [review] Bug 37256: Add 'PUT' for circulation rule sets Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk> Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Created attachment 171726 [details] [review] Bug 37256: Ensure empty and null work as expected in PUT Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk> Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>
Thoroughly tested as part of testing bug 10190.