hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(storage_models): impl generic filter order and add function in payment_attempt to get latest based on created_at

Open Abhicodes-crypto opened this issue 1 year ago • 0 comments

Type of Change

  • [ ] Bugfix
  • [x] New feature
  • [ ] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates

Description

In order to have multiple payment_attempts for a single payment_intent we need a function to fetch the latest payment attempt.

Additional Changes

  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checked if it compiles.

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed submitted code
  • [x] I added unit tests for my changes where possible
  • [ ] I added a CHANGELOG entry if applicable

Abhicodes-crypto avatar Jan 13 '23 11:01 Abhicodes-crypto