Commit Graph

507 Commits

Author SHA1 Message Date
Tobias Nyholm
fab86bbef3 Make integrationt tests safe to run simultaneously (#338)
* Make integrationt tests safe to run simultaneously

* cs

* We only have the credentials when we do not make a PR
2017-04-08 11:22:20 +02:00
z38
afd8f361f3 Enable integration tests (#335) 2017-04-08 11:07:10 +02:00
Tobias Nyholm
af98ed3307 Added documentation for the API classes (#328)
* Added documentation for the API classes

* Added more docs

* Added domain

* Typo

* Minor fixes
2017-04-08 10:45:25 +02:00
Tobias Nyholm
1e33bc5545 Always run "composer test-all" (#337)
This PR will also remove the "IS_PR"-check
2017-04-08 10:43:04 +02:00
Tobias Nyholm
f2dfd56224 Delete test file. (#336) 2017-04-08 10:38:07 +02:00
z38
edcfcc397f Add integration tests for Route API (#334) 2017-04-08 10:34:57 +02:00
Tobias Nyholm
7665700b00 Implemented a way to verify webhook signature (#325)
* Implemented a way to verify webhook signature

* CS
2017-04-07 18:29:20 -05:00
Tobias Nyholm
d8e716fbd3 Removed old "shared host install". (#331) 2017-04-07 18:28:18 -05:00
z38
b713364dc0 Fix integration tests for domain API (#294)
* Send multipart/form-data requests by default

* Fix integration tests for Domain API
2017-04-07 18:24:48 -05:00
z38
0bc0a3b1a5 Fix disordered POST parameters (#279) 2017-04-07 18:24:37 -05:00
Tobias Nyholm
ae9ee585a2 Fixing broken suppression API (#332)
* Fixing broken suppression API

* cs
2017-04-07 22:09:59 +02:00
Tobias Nyholm
27d13d85fd Updated function parameters (#333)
* Updated function parameters

* cs
2017-04-07 21:52:30 +02:00
Tobias Nyholm
f73445726f Fixed typo in namespace (#330) 2017-04-07 21:31:57 +02:00
Tobias Nyholm
1fa199ddf1 Removed old pagination methods (#329) 2017-04-07 21:30:44 +02:00
Tobias Nyholm
0f5440c368 Fix new constructor (#314)
* Bugfix

* Updated docs

* cs
2017-03-26 13:42:36 -05:00
Tobias Nyholm
7d27717473 Added changelog (#318) 2017-03-26 17:28:24 +02:00
z38
1e00e8853e Remove unused error response class (#319) 2017-03-26 17:28:09 +02:00
Tobias Nyholm
bc5215090d Renamed DeserializeException to HydrationException (#317) 2017-03-26 17:27:47 +02:00
Tobias Nyholm
70d467955a Make error responses accessable (#312) 2017-03-26 17:26:57 +02:00
Tobias Nyholm
511ad186ce Adding attachments and content id map (#316) 2017-03-26 16:42:12 +02:00
Tobias Nyholm
1222104e54 Do not use json request body (#313)
Build a query encoded request strings and set proper headers.
2017-03-26 16:13:44 +02:00
Tobias Nyholm
9e19f12a3d Added docs of how to debug (#315)
* Added debug options

* Added docs

* cs
2017-03-26 16:12:17 +02:00
Tobias Nyholm
7c83da9246 Added deprecation notices (#309) 2017-03-26 16:11:52 +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
0eb15969b9 Made most classes final (#310)
* Made most classes final

* bugfix
2017-03-26 10:49:33 +02:00
James Kraus
d2638a0457 Bug fix - Allow adding custom headers with non-array value (#255)
* Bug fix - Allow adding custom headers with non-array value

* Remove whitespace

* Functional test for adding custom headers (either singular or multiple)

* Style fixes for functional test
2017-03-26 10:23:03 +02:00
Tobias Nyholm
64d1c40604 Make sure we can get the last response from the API again. (#305)
* Make sure we can get the last response from the API again.

* cs
2017-03-26 10:17:10 +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
1bfd40721e Added factory methods (#304)
* Added factory methods

* Removed urelated code

* Update test code
2017-03-25 13:48:03 +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
z38
b3f24e9d7a Fix setting Reply-To multiple times (#300) 2017-03-14 16:51:33 +01:00
Tobias Nyholm
83a20afbfb Added deprecation notices (#295) 2017-03-14 10:58:47 +01:00
Tobias Nyholm
2e9f56e694 Show build status on master branch only (#297) 2017-02-28 11:36:23 +01:00
Sergei Beregov
718547a273 #276 additional method to get an attachment (#277)
* #276 additional method to get an attachment

* #276 fix code style

* Add Mailgun::getAttachment + test

* code style fix
2017-02-28 08:10:04 +01:00
Michal Hanajík
74929b6518 Renamed namespace from Resource\Api to Model (#293)
* Renamed namespace from Resource\Api to Model

* Moved Resources\ApiResponse to Models namespace

Signed-off-by: Michal Hanajík <michal.hanajik@outlook.com>

* Fix of code style
2017-02-23 20:56:30 +01:00
Tobias Nyholm
da873dad04 Removed framework version number (#292) 2017-02-21 08:23:10 +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
z38
e67ef95d5b Avoid fatal error when deserializing unauthorized requests (#282) 2017-02-20 14:04:05 -06:00
Tobias Nyholm
2d83ab3bf8 Show that we allow MultipartStreamBuilder 0.2 (#291) 2017-02-20 13:59:56 -06:00
Sean Johnson
da6ee36fed Implement suppressions API (#258) (#264)
* Implement suppressions API (#258)

* Fix annotation issues and use alternate pagination method
2017-02-20 13:57:54 -06:00
Sean Johnson
b6d035c9a3 Add getPagination* concrete functions on Pagination trait (#271) 2017-02-20 13:21:55 -06:00
Tobias Nyholm
47f816ac56 Add quotes around the boundary. (#278)
This will support bounderies with non whitespace
2017-02-18 18:14:12 +01:00
Sean Johnson
e177e13a0c Update boundary regex to match RFC1341 (#283)
* Update boundary regex to match RFC1341
2017-02-18 10:53:21 -06:00
Sean Johnson
01e0c33ee8 Fix typo in PaginationResponse: getFistUrl (#269) 2017-01-27 18:13:39 -06: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
Tobias Nyholm
1a883bac89 Increase timeout for code coverate (#252) 2016-12-09 22:54:02 +01:00
David Garcia
b61d5291b2 Minor amends reported by Scrutinizer CI (#250)
* Scrutinizer CI: Bug

The property deserializer does not seem to exist. Did you mean
serializer?

* Scrutinizer CI: Coding Style + Best Practice

It seems like you are loosely comparing two booleans. Considering using
the strict comparison === instead.

* Scrutinizer CI: Bug

It seems like $variables defined by parameter $variables on line ???
can also be of type null; however,
Mailgun\Messages\MessageBuilder::addRecipient() does only seem to
accept array, maybe add an additional type check?

* Scrutinizer CI: Documentation

The doc-type $class|SimpleResponse could not be parsed: Unknown type
name "$class" at position 0

Adding `object` instead of `SimpleResponse` due we have no files called
`SimpleResponse` in our project, and PhpDoc provides the `object`
keyword as a valid option.

https://www.phpdoc.org/docs/latest/guides/types.html#keywords

* Scrutinizer CI: Documentation

There is no parameter named $smtpPass. Did you maybe mean $smtpPassword?

* Scrutinizer CI: Unused Code

$resource is not used, you could remove the assignment.

* Scrutinizer CI: Unused Code

The parameter $message is not used and could be removed.

* Scrutinizer CI: Unused code

This method is not used, and could be removed. (x2)

* Scrutinizer CI: Patch

Doc Comments

* Scrutinizer CI: Patch

Doc comments
2016-12-09 13:41:23 -08:00
Tobias Nyholm
cc82355e50 Messages api (#247)
* Added message API

* Still use json

* code style
2016-12-07 16:29:08 -06:00
Tobias Nyholm
b1f949a925 Added Webhook API (#246)
* Added Webhook API

* code style
2016-12-07 20:42:24 +01:00