Repository navigation
Routes - Add Mailgun::Routes wrapper - #402
Merged
Merged
Conversation
- Add Mailgun::Routes covering the 6 v3 routes endpoints: list, create, get, update, remove and match - Methods require a v3 client and raise ParameterError on a missing route ID or match address - Switch the routes integration spec to the wrapper, replaying the existing routes cassette (create, list, get, update, delete) - Add a routes match spec recorded against the live API (cassette routes_match); it also holds the argument and API version checks - The new cassette is scrubbed like the existing ones (key, auth header, test domain); the X-Mailgun-Key-Id header value is replaced too - Add docs/Routes.md and link it from the README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
Mailgun::Routeswrapper for the v3 Routes API, the rules that handle incoming email. Until now routes could only be managed through the raw client.Methods
listGET /v3/routescreatePOST /v3/routesgetGET /v3/routes/{id}updatePUT /v3/routes/{id}removeDELETE /v3/routes/{id}matchGET /v3/routes/matchlistreturnsitems,create/updatereturn the response hash,removereturns a boolean, no aliases.actionfields.ParameterErrorwhen a route ID or match address is missing.docs/Routes.md, linked from the README.Testing
routescassette (create, list, get, update, delete), still matching on request body.routes_matchspec, recorded against the live API, creates a route, matches an address to it and deletes it. It also holds the argument and API version checks.X-Mailgun-Key-Idvalue is replaced with a placeholder.