Commit Graph

34 Commits

Author SHA1 Message Date
Tobias Nyholm
d4e4d4efbe
Close open resources (#473)
* Make sure to close any open resources

* Fixed test
2019-01-05 08:23:41 +01:00
Tobias Nyholm
bec1da39aa
Removed integration tests. (#490) 2018-12-09 11:45:32 +00:00
Tobias Nyholm
a4aba16061
Added a way to get attachments (#476)
* Added a way to get attachments

* Added some tests

* cs

* minor

* Removed declare_strict

* Typos

* Bugfixes

* Fixed bugs
2018-08-09 18:59:38 +02:00
Nyholm
1835bc28d7 cs 2018-08-08 20:48:35 +01:00
Nyholm
1ed1c2557c Added test for webhook 2018-08-08 20:48:35 +01:00
Nyholm
6e209aaee2 Added Unsubscribe test 2018-08-08 20:48:35 +01:00
Nyholm
fa30639f99 Added complaint test 2018-08-08 20:48:35 +01:00
Nyholm
55547572aa Added bounce test 2018-08-08 20:48:35 +01:00
Nyholm
d6e48c6bc2 Added test for Message API 2018-08-08 20:48:35 +01:00
Nyholm
15bd5ae156 Added tests for Route 2018-08-08 20:48:35 +01:00
Nyholm
42503f72ce Added test for Domain API 2018-08-08 20:48:35 +01:00
Nyholm
afc8671eac We need both getApiMock and getApiInstance 2018-08-08 20:48:35 +01:00
Nyholm
75bab3016c cs 2018-08-08 20:48:35 +01:00
Nyholm
3d81db203e Add tests 2018-08-08 20:48:35 +01:00
Nyholm
bdcca2db0d Added more mock for tests 2018-08-08 20:48:35 +01:00
François-Xavier de Guillebon
b73adaf60c Fixed stats retrieval (#384)
* [Stats] Fixed stats always empty

* Added tests
2017-12-01 21:10:21 +01:00
Hannes Magnússon
ce484ecbc8 Grammar typo (#413)
* Grammar typo

* Fixed style errors as reported by styleci
2017-11-22 09:37:04 +01:00
Tobias Nyholm
e30955fa51 Do not skip route test (#342) 2017-04-14 10:59:35 +02:00
Tobias Nyholm
d4ab1b0a87 Support mime messages (#341)
* Support mime messages

* cs

* Removed pointless integration tests

* typo

* Create new endpoint for message.mime

* cs

* Added docs

* Doc fixes

* Refactor
2017-04-14 10:31:13 +02:00
z38
edcfcc397f Add integration tests for Route API (#334) 2017-04-08 10:34:57 +02:00
Tobias Nyholm
84fb433061 Renamed Routes to Route (#308)
* Renamed Routes to Route

Class names should be in singlular

* Update namespaces
2017-03-26 16:11:33 +02:00
Tobias Nyholm
0f4fe2bf9c Improving safe hydrate (#307)
* Improving safe deseriliaze

* Fixes

* Use switch statement

* cs

* bugfix

* Update method name

* Update return docs
2017-03-26 10:16:36 +02:00
Tobias Nyholm
e74d7ad130 Added test for Route::Create (#306)
* Added test for Route::Create

* cd
2017-03-25 14:02:11 +01:00
Tobias Nyholm
84a5c5dd4a Rename deserializer to hydrator (#296)
* Renamed "deserializer" to "hydrator"

* Make sure we use singlular in namespaces

Also did some cleanups.

* Fixed typo

* cs

* minor fix
2017-03-22 07:44:08 +01:00
Tobias Nyholm
d5a49f2e6d Tag api (#286)
* Started on tag api

* Added TagAPI

* code style

* cs

* removed final

* Adjusting to Davids feedback.

* Added PagingProvider interface
2017-02-21 08:22:57 +01:00
David Garcia
1613843c7e Routes API (#249)
* Add initial (empty) Routes PHP Unit Test file

We still need to provide the automated tests

* Add initial Routes file

* Describe API Methods

* Inherit method from TestCase - adding @inheritdoc annotation

* Add new DTOs to map API responses to known objects

* Add new Response to manage the Routes list

* Implement method to retrieve a list of Routes

* Add new Response to manage a single Route resource

* Implement method to retrieve a single Route

* Set ShowResponse as final

* Add new Response to manage the Create process

* Implement method to create a new Route

* Fix missing annotation

* Add new Response to manage the Delete Route process

* Implement method to delete a Route based on the ID

* Add new Response to manage the Update Route process

This response is based on Domain API docs due there are no examples on
Routes API docs. We may need to update the response.

* Implement method to update a Route based on the ID

* Require a $limit value greater than 0

* Require a $skip value greater than or equal to 0

* Set UpdateResponse as final

* Add new (empty) public methods to test the Routes API

* Provide method to get the Routes API from Mailgun Client

* Add missed annotation

* Update ShowResponse to return an instance of ApiResponse instead of the DTO

* Update annotation

* Fix annotation

* Update array $actions to provide an empty array by default

* Update parameters to make sure the last arg always is a DateTime (or null)

* Use empty()

* Remove DTO suffix

* Move DTOs to the parent folder/namespace

* Fix annotations
2016-12-09 14:15:06 -08:00
Sean Johnson
ce8215ff6c Apply fixes from StyleCI (#243) 2016-12-06 12:12:52 -06:00
Sean Johnson
ce9739ea91 Applied fixes from StyleCI (#228) 2016-11-23 23:02:12 +01:00
Tobias Nyholm
8668b4c222 Updated to use Assert 1.2 (#224) 2016-11-23 23:01:26 +01:00
Tobias Nyholm
9bd6732efd Introduce a request builder. (#217)
* Introduce a request builder.

We inject every dependency (eg RequestFactory and MultipartStreamBuilder) and we do not have to use postMultipart.

* code style

* Use uppercase on http verbs

* Added setters and use getters

* Added tests

* style
2016-11-23 21:55:05 +01:00
Sean Johnson
0da5f410a9 Rename serializer to deserializer (#201) (#216) 2016-11-12 02:50:47 +01:00
Tobias Nyholm
1a71c14097 Removed inheritence, Renamed classes, Mark all classes as final (#212)
* Removed inheritence, Renamed classes, Mark all classes as final

* code style

* Updated docs

* Code style

* Be consistant with the naming of functions

* Fixed tests
2016-11-11 14:53:26 -06:00
Sean Johnson
58430e4537 Domains API, #187 (#198) 2016-10-27 08:34:27 +02:00
Tobias Nyholm
738e6e32e2 POC - Better api (#192)
* Added base for the new API

* code style

* Added response classes

* Added support for serializer

* The abstract API should not know of Mailgun

* Minor

* minor

* Using a client configrator

* code style

* Put HTTPClient in the configurator

* Do not use the api() function

* Use stable version of Assert

* style

* Fixed tests

* make the httpClient private

* Renamed ResponseSerializer to ResponseDeserializer

* Disabled tests that are testing error messages with Assert

* style fixes

* Refactoring fix
2016-10-24 12:01:32 -05:00