Skip to content

Commit 01d5b48

Browse files
authored
Merge pull request #5 from cardano-foundation/feat/rejection_reasons
feat: transaction rejection types
2 parents 895d7a8 + f101fd8 commit 01d5b48

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

accounting_reporting_core/src/main/java/org/cardanofoundation/lob/app/accounting_reporting_core/resource/AccountingCoreResource.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import lombok.extern.slf4j.Slf4j;
1313
import lombok.val;
1414
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.core.TransactionType;
15+
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.entity.Rejection;
16+
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.entity.RejectionCode;
1517
import org.cardanofoundation.lob.app.accounting_reporting_core.resource.model.AccountingCorePresentationViewService;
1618
import org.cardanofoundation.lob.app.accounting_reporting_core.resource.model.AccountingCoreResourceService;
1719
import org.cardanofoundation.lob.app.accounting_reporting_core.resource.requests.BatchSearchRequest;
@@ -100,6 +102,18 @@ public ResponseEntity<?> transactionType() throws JSONException {
100102
return ResponseEntity.ok().body(jsonArray.toString());
101103
}
102104

105+
@Tag(name = "Transactions", description = "Transactions API")
106+
@Operation(description = "Rejection types", responses = {
107+
@ApiResponse(content =
108+
{@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, array = @ArraySchema(schema = @Schema(implementation = RejectionCode.class)))}
109+
)
110+
})
111+
@GetMapping(value = "/rejection-types", produces = MediaType.APPLICATION_JSON_VALUE, name = "Rejection types")
112+
public ResponseEntity<?> rejectionTypes() {
113+
114+
return ResponseEntity.ok().body(RejectionCode.values());
115+
}
116+
103117
@Tag(name = "Transactions", description = "Transactions API")
104118
@PostMapping(value = "/extraction", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
105119
@Operation(description = "Trigger the extraction from the ERP system(s)", responses = {

0 commit comments

Comments
 (0)