Lines 3-8
Link Here
|
3 |
get: |
3 |
get: |
4 |
x-mojo-to: TransferLimits#list |
4 |
x-mojo-to: TransferLimits#list |
5 |
operationId: listTransferLimits |
5 |
operationId: listTransferLimits |
|
|
6 |
description: "This resource returns a list of existing transfer limits." |
6 |
tags: |
7 |
tags: |
7 |
- transfer |
8 |
- transfer |
8 |
parameters: |
9 |
parameters: |
Lines 56-61
Link Here
|
56 |
post: |
57 |
post: |
57 |
x-mojo-to: TransferLimits#add |
58 |
x-mojo-to: TransferLimits#add |
58 |
operationId: addTransferLimit |
59 |
operationId: addTransferLimit |
|
|
60 |
description: "This resource accepts a new transfer limit and creates it if it does not already exist." |
59 |
tags: |
61 |
tags: |
60 |
- transfer |
62 |
- transfer |
61 |
parameters: |
63 |
parameters: |
Lines 103-108
Link Here
|
103 |
delete: |
105 |
delete: |
104 |
x-mojo-to: TransferLimits#delete |
106 |
x-mojo-to: TransferLimits#delete |
105 |
operationId: deleteTransferLimit |
107 |
operationId: deleteTransferLimit |
|
|
108 |
description: "This resource deletes a transfer limit for the given limit id" |
106 |
tags: |
109 |
tags: |
107 |
- transfer |
110 |
- transfer |
108 |
parameters: |
111 |
parameters: |
Lines 141-146
Link Here
|
141 |
post: |
144 |
post: |
142 |
x-mojo-to: TransferLimits#batch_add |
145 |
x-mojo-to: TransferLimits#batch_add |
143 |
operationId: batchAddTransferLimits |
146 |
operationId: batchAddTransferLimits |
|
|
147 |
description: "This resource batch creates new transfer limits based on the given data. |
148 |
|
149 |
For example, if the paramters `to_library_id: 'BranchA'` and `item_type: 'BOOK'` are passed in |
150 |
new transfer limits for `BOOK`s will be created, with one transfer limit each for all the |
151 |
branches defined in Koha. Given 4 branches, 3 limits would be created: |
152 |
|
153 |
|
154 |
* to_library_id: 'BranchA', from_library_id: 'BranchB', item_type: 'BOOK' |
155 |
|
156 |
* to_library_id: 'BranchA', from_library_id: 'BranchC', item_type: 'BOOK' |
157 |
|
158 |
* to_library_id: 'BranchA', from_library_id: 'BranchD', item_type: 'BOOK' |
159 |
|
160 |
|
161 |
The body of the query would look like |
162 |
``` |
163 |
{ |
164 |
'to_library_id': 'BranchA', |
165 |
'item_type': 'BOOK' |
166 |
|
167 |
} |
168 |
``` |
169 |
|
170 |
|
171 |
As another example, imagine we have an itemtype that is never supposed to be transferred to another library. |
172 |
If we call that itemtype `LOCAL_ONLY` we would need to just pass `item_type: 'LOCAL_ONLY'`, which would create transfer |
173 |
limits for all libraries, meaning those items would never be allowed to transfer to another |
174 |
library. The body of the query would look like |
175 |
``` |
176 |
{ |
177 |
'item_type': 'LOCAL_ONLY' |
178 |
} |
179 |
```" |
144 |
tags: |
180 |
tags: |
145 |
- transfer |
181 |
- transfer |
146 |
parameters: |
182 |
parameters: |
Lines 193-198
Link Here
|
193 |
delete: |
229 |
delete: |
194 |
x-mojo-to: TransferLimits#batch_delete |
230 |
x-mojo-to: TransferLimits#batch_delete |
195 |
operationId: batchDeleteTransferLimits |
231 |
operationId: batchDeleteTransferLimits |
|
|
232 |
description: 'This endpoint works just like [the POST version](#op-post-transfer_limits-batch), except it deletes transfer in batch |
233 |
rather than creating them.' |
196 |
tags: |
234 |
tags: |
197 |
- transfer |
235 |
- transfer |
198 |
parameters: |
236 |
parameters: |
199 |
- |
|
|