Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor(payments_response): remove setter from payments response #5676

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

Narayanbhat166
Copy link
Member

@Narayanbhat166 Narayanbhat166 commented Aug 22, 2024

Type of Change

  • Refactoring

Description

This PR removes the setter method from payments response. The fields are initialized directly.

Additional Changes

  • This PR modifies the API contract
    Few fields in the response are made mandatory. This is completely backwards compatible

Motivation and Context

How did you test it?

  • Create a payment and check if all the fields are populated in the response
  • Postman tests

Impact

Payments Response after creating a payment. The fields should be properly populated

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@Narayanbhat166 Narayanbhat166 self-assigned this Aug 22, 2024
@Narayanbhat166 Narayanbhat166 requested review from a team as code owners August 22, 2024 15:17
Copy link

semanticdiff-com bot commented Aug 22, 2024

Review changes with SemanticDiff.

Analyzed 3 of 12 files.

Overall, the semantic diff is 38% smaller than the GitHub diff.

Filename Status
crates/router/tests/payments.rs Unsupported file format
crates/router/tests/payments2.rs Unsupported file format
crates/router/src/events/outgoing_webhook_logs.rs Unsupported file format
crates/router/src/core/webhooks/incoming.rs Unsupported file format
crates/router/src/core/webhooks/outgoing.rs Unsupported file format
crates/router/src/core/payments/transformers.rs Unsupported file format
crates/router/src/compatibility/stripe/setup_intents/types.rs Unsupported file format
crates/router/src/compatibility/stripe/payment_intents/types.rs Unsupported file format
✔️ crates/api_models/src/payments.rs 63.33% smaller
crates/api_models/src/events/payment.rs Unsupported file format
✔️ api-reference-v2/openapi_spec.json 25.0% smaller
✔️ api-reference/openapi_spec.json 25.0% smaller

@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Aug 22, 2024
@Narayanbhat166 Narayanbhat166 added this to the August 2024 Release milestone Aug 26, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 26, 2024
Merged via the queue into main with commit 800da6a Aug 26, 2024
18 checks passed
@likhinbopanna likhinbopanna deleted the make_payments_response_setter_free branch August 26, 2024 07:14
pixincreate added a commit that referenced this pull request Aug 26, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(customer_v2):  added list customer v2 end point (#5517)
  feat(business_profile): add tax_connector_id column in business_profile table (#5576)
  chore: create v2 route for organization (#5679)
  refactor(payments_response): remove setter from payments response (#5676)
  feat(payment_methods_v2): Payment methods v2 API models (#5564)
  chore(version): 2024.08.26.0
pixincreate added a commit that referenced this pull request Aug 27, 2024
* 'main' of github.com:juspay/hyperswitch: (134 commits)
  refactor(open_banking): Added merchant data update in mca update (#5655)
  feat: add test_mode for quickly testing payout links (#5669)
  refactor: introduce a domain type for profile ID (#5687)
  ci(cypress): update paybox configs (#5664)
  feat(openapi):  Add open api routes for routing v2 (#5686)
  feat(connector): [NOVALNET] Add template code (#5670)
  feat(user): business email update (#5674)
  chore(config): add production connector-configs for netcetera external 3ds flow (#5698)
  chore(version): 2024.08.27.0
  refactor(euclid): make the disabled node's relation as negative (#5701)
  feat: populate payment method details in payments response (#5661)
  build(deps): bump `diesel` to `2.2.3` and `sqlx` to `0.8.1` (#5688)
  feat(customer_v2):  added list customer v2 end point (#5517)
  feat(business_profile): add tax_connector_id column in business_profile table (#5576)
  chore: create v2 route for organization (#5679)
  refactor(payments_response): remove setter from payments response (#5676)
  feat(payment_methods_v2): Payment methods v2 API models (#5564)
  chore(version): 2024.08.26.0
  feat(connector): [Adyen] add dispute flows for adyen connector (#5514)
  chore(version): 2024.08.23.0
  ...
pixincreate added a commit that referenced this pull request Aug 27, 2024
…-key-check

* 'main' of github.com:juspay/hyperswitch:
  feat(core): Add mTLS certificates for each request (#5636)
  refactor(open_banking): Added merchant data update in mca update (#5655)
  feat: add test_mode for quickly testing payout links (#5669)
  refactor: introduce a domain type for profile ID (#5687)
  ci(cypress): update paybox configs (#5664)
  feat(openapi):  Add open api routes for routing v2 (#5686)
  feat(connector): [NOVALNET] Add template code (#5670)
  feat(user): business email update (#5674)
  chore(config): add production connector-configs for netcetera external 3ds flow (#5698)
  chore(version): 2024.08.27.0
  refactor(euclid): make the disabled node's relation as negative (#5701)
  feat: populate payment method details in payments response (#5661)
  build(deps): bump `diesel` to `2.2.3` and `sqlx` to `0.8.1` (#5688)
  feat(customer_v2):  added list customer v2 end point (#5517)
  feat(business_profile): add tax_connector_id column in business_profile table (#5576)
  chore: create v2 route for organization (#5679)
  refactor(payments_response): remove setter from payments response (#5676)
  feat(payment_methods_v2): Payment methods v2 API models (#5564)
  chore(version): 2024.08.26.0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants