Bugzilla – Attachment 181907 Details for
Bug 39830
Add order claim object definition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39830: Add order claim object definition
Bug-39830-Add-order-claim-object-definition.patch (text/plain), 2.42 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-05-05 11:29:58 UTC
(
hide
)
Description:
Bug 39830: Add order claim object definition
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-05-05 11:29:58 UTC
Size:
2.42 KB
patch
obsolete
>From 554954045e0859c2977064304fe2bf2bb8cc8f13 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 5 May 2025 08:26:16 -0300 >Subject: [PATCH] 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 >--- > Koha/Acquisition/Order/Claim.pm | 14 ++++++++++++++ > api/v1/swagger/definitions/order_claim.yaml | 14 ++++++++++++++ > api/v1/swagger/swagger.yaml | 2 ++ > 3 files changed, 30 insertions(+) > create mode 100644 api/v1/swagger/definitions/order_claim.yaml > >diff --git a/Koha/Acquisition/Order/Claim.pm b/Koha/Acquisition/Order/Claim.pm >index 37d028a83ad..c1d63488f85 100644 >--- a/Koha/Acquisition/Order/Claim.pm >+++ b/Koha/Acquisition/Order/Claim.pm >@@ -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 >diff --git a/api/v1/swagger/definitions/order_claim.yaml b/api/v1/swagger/definitions/order_claim.yaml >new file mode 100644 >index 00000000000..351e6400f0e >--- /dev/null >+++ b/api/v1/swagger/definitions/order_claim.yaml >@@ -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 >diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml >index d38e04e8201..21c24b872bf 100644 >--- a/api/v1/swagger/swagger.yaml >+++ b/api/v1/swagger/swagger.yaml >@@ -140,6 +140,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: >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39830
:
181907
|
182062