Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix/adding delete billing plan endpoint #640

Merged

Conversation

MuthoniMN
Copy link
Contributor

@MuthoniMN MuthoniMN commented Feb 28, 2025

Description

Creating an endpoint for the delete billing plan controller method

Related Issue (Link to Github issue)

#641

Motivation and Context

A delete endpoint will be made available

How Has This Been Tested?

  1. Run the app locally using php artisan serve
  2. In Postman, send a DELETE request to /api/v1/billing-plans/{id] with the following:
    Headers:
{
   Authorization: "Bearer {your-token}"
}
  1. You can receive either of these responses:
    204 - Successful deletion
{
  status: "error",
  status_code: 204
  message: "This billing plan was successfully deleted",
  data: {}
}

404 - Billing plan not found

{
  status: "error",
  status_code: 404
  message: "This billing plan not found",
  data: {}
}

500 - Internal Server Error

{
  status: "error",
  status_code: 500,
  message: "Internal server error",
  data: {}
}

Screenshots (if appropriate - Postman, etc):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@MuthoniMN MuthoniMN marked this pull request as ready for review February 28, 2025 23:10
@bhimbho bhimbho merged commit 73d5bf4 into hngprojects:dev Mar 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants