Openbravo Issue Tracking System - Retail Modules
View Issue Details
0056346Retail ModulesGift cards and gift voucherspublic2024-09-03 09:112024-09-24 13:00
inaki_luque 
inaki_luque 
normaltrivialhave not tried
closedfixed 
5
 
 
No
0056346: Add credit to Giftcards through API
Be able to increase the current amount of a gift card by API and if the gift card was closed, it needs to be at a status usable.

Jira link (https://openbravo.atlassian.net/browse/RM-14434 [^])
- Customer purchases shoes with a GC
- Amount of GC is diminished (or exhausted)
- Customer comes back, return the shoes
- GC is credited with the paid amount.
Create a new webservice, ImportService/AddCreditGiftCard and will receive the following information:

  - "client"
  - "organization"
  - "giftCardIdentifier"
  - "amount"
  - "returnOrder"
  - "expirationDate"

The update should share the infos on:

  - New Amount of the gift card
  - Status update (As the gift card might have been closed before)
  - Expiration date
No tags attached.
Issue History
2024-09-03 09:11inaki_luqueNew Issue
2024-09-03 09:11inaki_luqueAssigned To => Retail
2024-09-03 09:11inaki_luqueTriggers an Emergency Pack => No
2024-09-03 09:12inaki_luqueStatusnew => scheduled
2024-09-03 09:12inaki_luqueSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=28398#r28398
2024-09-03 09:12inaki_luqueAssigned ToRetail => inaki_luque
2024-09-05 13:27hgbotNote Added: 0168812
2024-09-12 13:55hgbotNote Added: 0169139
2024-09-12 16:50hgbotNote Added: 0169145
2024-09-24 13:00hgbotResolutionopen => fixed
2024-09-24 13:00hgbotStatusscheduled => closed
2024-09-24 13:00hgbotNote Added: 0169519
2024-09-24 13:00hgbotNote Added: 0169520
2024-09-24 13:00hgbotNote Added: 0169521
2024-09-24 13:00hgbotNote Added: 0169522
2024-09-24 13:00hgbotNote Added: 0169523
2024-09-24 13:00hgbotNote Added: 0169524

Notes
(0168812)
hgbot   
2024-09-05 13:27   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/40 [^]
(0169139)
hgbot   
2024-09-12 13:55   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/374 [^]
(0169145)
hgbot   
2024-09-12 16:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/116 [^]
(0169519)
hgbot   
2024-09-24 13:00   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards [^]
Changeset: 89993a5e83a9ab8c10673c2038fedb97c877287b
Author: Iñaki Luque <i.luque@orisha.com>
Date: 24-09-2024 11:00:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/commit/89993a5e83a9ab8c10673c2038fedb97c877287b [^]

Fixed ISSUE-56346: Created new Web Service for recrediting an existing gift card

---
A api/org.openbravo.retail.api.giftcards-addcreditgiftcards.yml
A src/org/openbravo/retail/api/giftcards/service/AddCreditGiftCardApiImportWebService.java
A src/org/openbravo/retail/api/giftcards/utils/GiftCardsApiUtils.java
M config/org.openbravo.retail.api.giftcards-provider-config.xml
M examples/Retail API GiftCard.postman_collection.json
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/api/giftcards/service/ConsumeGiftCardApiImportWebService.java
---
(0169520)
hgbot   
2024-09-24 13:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/40 [^]
(0169521)
hgbot   
2024-09-24 13:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/374 [^]
(0169522)
hgbot   
2024-09-24 13:00   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 56ebb6a35d348f98a62b81448228e6a60d5158b1
Author: Iñaki Luque <i.luque@orisha.com>
Date: 24-09-2024 11:00:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/56ebb6a35d348f98a62b81448228e6a60d5158b1 [^]

Related to ISSUE-56346: Unifying GC Web Services code

* Created utility class for GC Web Services purposes
* Calling utility methods in classes that are used by the Web
  Services

---
A src/org/openbravo/retail/giftcards/utils/GiftCardUtils.java
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/giftcards/ConsumeGiftCardAmount.java
M src/org/openbravo/retail/giftcards/ConsumeGiftCardAmountExtension.java
M src/org/openbravo/retail/giftcards/GiftCardModel.java
---
(0169523)
hgbot   
2024-09-24 13:00   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api [^]
Changeset: 0772ac804e35016e3c4d7273bd582d5ea031e904
Author: Iñaki <i.luque@orisha.com>
Date: 19-09-2024 10:35:17
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/commit/0772ac804e35016e3c4d7273bd582d5ea031e904 [^]

Related to ISSUE-56346: Created new generic messages for API unsupported operations

---
A src-db/database/sourcedata/AD_MESSAGE.xml
---
(0169524)
hgbot   
2024-09-24 13:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api/-/merge_requests/116 [^]