Skip to content

Conversation

Chethan-rao
Copy link
Contributor

@Chethan-rao Chethan-rao commented Oct 3, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR includes changes for adding a new generic, context, which will be passed during api call (server_wrap) to call the related implementation depending on context

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

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

@Chethan-rao Chethan-rao added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor labels Oct 3, 2023
@Chethan-rao Chethan-rao added this to the September 2023 Milestone milestone Oct 3, 2023
@Chethan-rao Chethan-rao requested a review from vspecky October 3, 2023 13:46
@Chethan-rao Chethan-rao requested review from a team as code owners October 3, 2023 13:46
@Chethan-rao Chethan-rao self-assigned this Oct 3, 2023
@Chethan-rao Chethan-rao requested a review from a team as a code owner October 3, 2023 13:46
@Chethan-rao Chethan-rao force-pushed the add_ctx_generic branch 4 times, most recently from a5e1215 to de83d0b Compare October 3, 2023 13:54
vspecky
vspecky previously approved these changes Oct 5, 2023
payment_data.token = Some(parent_payment_method_token);
}
(Some(_), _) => {
let payment_method_data = Ctx::retrieve_payment_method(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, always prefer destructuring tuples. (payment_method_data, payment_token). Not a blocker tho

@vspecky vspecky added S-ready-for-merge and removed R-waiting-on-L2 S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Oct 6, 2023
@vspecky vspecky enabled auto-merge October 6, 2023 07:26
@vspecky vspecky added this pull request to the merge queue Oct 6, 2023
Merged via the queue into main with commit 601c174 Oct 6, 2023
@vspecky vspecky deleted the add_ctx_generic branch October 6, 2023 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-payment-methods Area: Payment Methods C-refactor Category: Refactor
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

[REFACTOR] add support for passing context generic to api calls
4 participants