Lines 61-65
Link Here
|
61 |
} |
61 |
} |
62 |
} |
62 |
} |
63 |
} |
63 |
} |
|
|
64 |
}, |
65 |
"/patrons/{patron_id}/account/credits": { |
66 |
"post": { |
67 |
"x-mojo-to": "Patrons::Account#add_credit", |
68 |
"operationId": "addPatronCredit", |
69 |
"tags": [ |
70 |
"patron" |
71 |
], |
72 |
"parameters": [ |
73 |
{ |
74 |
"$ref": "../parameters.json#/patron_id_pp" |
75 |
}, |
76 |
{ |
77 |
"name": "body", |
78 |
"in": "body", |
79 |
"description": "A JSON object containing credit information", |
80 |
"required": true, |
81 |
"schema": { |
82 |
"$ref": "../definitions.json#/patron_account_credit" |
83 |
} |
84 |
} |
85 |
], |
86 |
"produces": [ |
87 |
"application/json" |
88 |
], |
89 |
"responses": { |
90 |
"200": { |
91 |
"description": "Credit added", |
92 |
"schema": { |
93 |
"type": "object" |
94 |
} |
95 |
}, |
96 |
"401": { |
97 |
"description": "Authentication required", |
98 |
"schema": { |
99 |
"$ref": "../definitions.json#/error" |
100 |
} |
101 |
}, |
102 |
"403": { |
103 |
"description": "Access forbidden", |
104 |
"schema": { |
105 |
"$ref": "../definitions.json#/error" |
106 |
} |
107 |
}, |
108 |
"404": { |
109 |
"description": "Patron not found", |
110 |
"schema": { |
111 |
"$ref": "../definitions.json#/error" |
112 |
} |
113 |
}, |
114 |
"500": { |
115 |
"description": "Internal server error", |
116 |
"schema": { |
117 |
"$ref": "../definitions.json#/error" |
118 |
} |
119 |
}, |
120 |
"503": { |
121 |
"description": "Under maintenance", |
122 |
"schema": { |
123 |
"$ref": "../definitions.json#/error" |
124 |
} |
125 |
} |
126 |
}, |
127 |
"x-koha-authorization": { |
128 |
"permissions": { |
129 |
"updatecharges": "remaining_permissions" |
130 |
} |
131 |
} |
132 |
} |
64 |
} |
133 |
} |
65 |
} |
134 |
} |
66 |
- |
|
|