Gift balances - #2583
Ticket(s) / Related Merge Requests
Summary of Changes
Introduces balances for gift cards
Testing Considerations
Deployment Considerations
Regression Scope
Platform Affected (web, mobile, etc)
Developer Testing Completed
{
giftCardsBalance
giftCardsBalances {
productId
balance
}
giftCardTransactions(first: 12) {
edges {
node {
paymentGuid
amount
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasNextPage
}
}
giftCards(includeIssued: false, first: 12, ordering: CREATED_DESC, productId: BOOST) {
edges {
cursor
node {
id
guid
productId
amount
balance
transactions(first: 12) {
edges {
node {
paymentGuid
amount
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
{
"data": {
"giftCardsBalance": 8.5,
"giftCardsBalances": [
{
"productId": "BOOST",
"balance": 8.5
},
{
"productId": "PLUS",
"balance": 0
},
{
"productId": "PRO",
"balance": 0
},
{
"productId": "SUPERMIND",
"balance": 0
}
],
"giftCardTransactions": {
"edges": [
{
"node": {
"paymentGuid": "1517888098275430412",
"amount": -1.5
}
},
{
"node": {
"paymentGuid": "1517887615225827332",
"amount": 10
}
}
],
"pageInfo": {
"startCursor": null,
"endCursor": null,
"hasNextPage": false
}
},
"giftCards": {
"edges": [
{
"cursor": "MTUxNzg4NzYxNTIwOTA1MDEzMQ==",
"node": {
"id": "gift-card-1517887615209050131",
"guid": "1517887615209050131",
"productId": "BOOST",
"amount": 10,
"balance": 8.5,
"transactions": {
"edges": [
{
"node": {
"paymentGuid": "1517888098275430412",
"amount": -1.5
}
},
{
"node": {
"paymentGuid": "1517887615225827332",
"amount": 10
}
}
],
"pageInfo": {
"startCursor": null,
"endCursor": null,
"hasNextPage": false
}
}
}
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": null,
"endCursor": null
}
}
}
}
Screenshots / Screen Recording
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out
Edited by Mark Harding