-
Notifications
You must be signed in to change notification settings - Fork 7
feat: separate offer delivery endpoints #260
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
base: beta
Are you sure you want to change the base?
Conversation
| "method": "GET", | ||
| "header": [], | ||
| "url": { | ||
| "raw": "{{HOST}}/v0/keys/list-all", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some endpoints in this updated Postman collection are unrelated to the code changes in this PR, right?
| }, | ||
| "url": { | ||
| "raw": "{{HOST}}/v0/offers/send", | ||
| "raw": "{{HOST}}/v0/offers/send-offer-to-organization", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change since the old endpoint (/offers/send) would not work any longer. The type of commit is thus not a refactor:, but a feat: (including a BREAKING CHANGE in the body).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated^
| .route("/offers", post(offers).get(all_offers)) | ||
| .route("/offers/{offer_id}", get(offer)) | ||
| .route("/offers/send", post(send)), | ||
| .route("/offers/send-offer-to-individual", post(email_offer)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight inconsistency here between the endpoint names and the handler functions: you called it email_offer and not individual_offer (compared to organization_offer).
Description of change
Previously, the send offer endpoint was a singular endpoint with the delivery method specified within the body of the request.
In order to improve API clarity this PR adds:
POST/offers/send-offer-to-individualfor email delivery.POST/offers/send-offer-to-organizationfor organizational target_url delivery.BREAKING CHANGE
This PR deprecates the old
offers/sendendpoint.How the change has been tested
Updated Postman collection. Existing tests pass.
Definition of Done checklist
Add an
xto the boxes that are relevant to your changes.