Bug 39830: Add order claim object definition
This patch adds the required mapping in `Koha::Acquisition::Order::Claim` and adds it's definition to the API spec. To test: 1. Apply the patches 2. Verify the mapping makes sense and conforms to the current style and API coding guidelines. 3. Run: $ ktd --shell k$ prove xt/api.t => SUCCESS: Tests pass 4. Sign off :-D Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
03020b5794
commit
1b3e7cb296
|
|
@ -29,8 +29,22 @@ Koha::Acquisition::Order::Claim - Koha Claim Object class
|
|||
|
||||
=head2 Class methods
|
||||
|
||||
|
||||
=head3 to_api_mapping
|
||||
|
||||
This method returns the mapping for representing a Koha::Patron object
|
||||
on the API.
|
||||
|
||||
=cut
|
||||
|
||||
sub to_api_mapping {
|
||||
return {
|
||||
id => 'order_claim_id',
|
||||
ordernumber => 'order_id',
|
||||
claimed_on => 'date_claimed',
|
||||
};
|
||||
}
|
||||
|
||||
=head2 Internal methods
|
||||
|
||||
=head3 _type
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
type: object
|
||||
properties:
|
||||
order_claim_id:
|
||||
type: integer
|
||||
description: Internally assigned order claim identifier
|
||||
order_id:
|
||||
type: integer
|
||||
description: Internally assigned order identifier
|
||||
date_claimed:
|
||||
type: string
|
||||
format: date
|
||||
description: Date the claim was recorded
|
||||
additionalProperties: false
|
||||
|
|
@ -142,6 +142,8 @@ definitions:
|
|||
$ref: ./definitions/merge_biblios.yaml
|
||||
order:
|
||||
$ref: ./definitions/order.yaml
|
||||
order_claim:
|
||||
$ref: ./definitions/order_claim.yaml
|
||||
patron:
|
||||
$ref: ./definitions/patron.yaml
|
||||
patron_account_credit:
|
||||
|
|
|
|||
Loading…
Reference in New Issue