Commit Graph

59 Commits

Author SHA1 Message Date
Jeppler
253bce7789 Fix for deprecation message for sendMessage() (#383)
The `sendMessage()` method will be replaced by `Mailgun->messages()->send()` see issue #383
2017-08-16 18:37:06 +02:00
Tobias Nyholm
487c1edd77 Prepare for release 2.3.2 (#352)
* Style fixes

* Added changelog
2017-05-16 15:20:33 +02:00
Tobias Nyholm
91f96bad3e Show that the constructor is deprecated (#347) 2017-05-16 14:51:25 +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
0f5440c368 Fix new constructor (#314)
* Bugfix

* Updated docs

* cs
2017-03-26 13:42:36 -05: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
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
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
Tobias Nyholm
83a20afbfb Added deprecation notices (#295) 2017-03-14 10:58:47 +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
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
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
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
cc82355e50 Messages api (#247)
* Added message API

* Still use json

* code style
2016-12-07 16:29:08 -06:00
Tobias Nyholm
de13ff66ce Added Event API with pagination (#245)
* Added Event API with pagination

* code style

* code style
2016-12-07 12:03:50 -06:00
Sean Johnson
ce8215ff6c Apply fixes from StyleCI (#243) 2016-12-06 12:12:52 -06:00
Tobias Nyholm
a3e999e875 Rename functions to reflect the API (#226)
This will fix #202
2016-11-23 22:21:15 +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
e4d181a4fa Rename ObjectSerializer to ModelSerializer (#215)
Fix #204
2016-11-11 15:25:01 -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
Tobias Nyholm
043658f996 Added meta files (#195)
* Added meta files

* Style fixes from StyleCI
2016-10-14 19:20:46 -05:00
Tobias Nyholm
359c6001d4 Deprecate SSL functions (#179) 2016-09-30 15:04:43 +02:00
Tobias Nyholm
8fe342f5b9 Apply fixes from StyleCI and make sure we add MIT license properly (#163)
* Applied fixes from StyleCI

* Create LICENSE
2016-09-18 09:56:14 +02:00
David Garcia
817dad1f90 Applied fixes from StyleCI 2016-07-24 07:42:47 -04:00
David Garcia
8da94ac190 PHP CS Fixer 2016-07-24 12:41:21 +01:00
David Garcia
09eda3df13 PHP Code Sniffer 2016-07-24 12:40:50 +01:00
Sergey Obukhov
7844883c86 Merge pull request #117 from gaomd/fix-signature-check
Strict check of signature
2016-07-20 14:46:35 -07:00
Sergey Obukhov
c808bbeec1 Merge branch 'develop' of https://github.com/YupItsZac/mailgun-php into YupItsZac-develop
Conflicts:
	src/Mailgun/Mailgun.php
2016-07-20 12:44:05 -07:00
Sergey Obukhov
341e06a196 Merge pull request #90 from z38/fix-webhook-notices
Fix notices on empty webhook requests
2016-07-20 12:34:11 -07:00
=
e921db5cc9 Added var types to docblock 2016-06-22 23:04:31 +02:00
=
8c97f6f451 Updated docblock for sendMessage function to include @return and @throws 2016-06-22 23:00:27 +02:00
temirkhan
2d9cd57d2e PHPDoc typos fixed, minor performance changes 2016-04-19 15:27:12 +03:00
Mengdi Gao
20422956e8 Strict check of signature 2016-04-11 00:26:34 +08:00
Tobias Nyholm
b85f1461d4 Removed unused tests and some parameters from the constructor 2016-03-05 11:13:28 +01:00
Tobias Nyholm
b961cfb4eb Updated to latest version of Httplug and made auto discovery optional 2016-02-26 12:04:54 +01:00
Tobias Nyholm
7f3d637756 Updated to reflect changes in PHP-HTTP 2015-11-18 15:46:53 +01:00
Tobias Nyholm
78f252761e Updated the php-http lib 2015-10-30 14:28:43 +01:00
Tobias Nyholm
b8420451c7 Added docs 2015-10-13 08:59:43 +02:00
Tobias Nyholm
61d03262a9 Removed dependency on Happyr/AutoDiscovery 2015-10-12 19:23:58 +02:00
z38
1f555c2f27 Fixed notices on empty webhook requests 2015-09-13 20:01:16 +02:00
Wietse de Vries
edae22eba4 Updated default API version from v2 to v3
http://blog.mailgun.com/default-api-version-now-v3/
2015-05-05 18:18:08 -07:00
Michael Crawford
4924b597f4 * Added php docblocks to functions and member variables.
* Changed constants to use new constant classes.
* Changed class docblock to include link to readme file
* Moved function descriptions of sendMessage() and verifyWebhookSignature() methods to function docblocks
2014-11-20 12:41:25 -06:00
Travis Swientek
b28a742efb Merge branch 'verifyWebhookSignature' of https://github.com/gmacon/mailgun-php into gmacon-verifyWebhookSignature
Conflicts:
	src/Mailgun/Mailgun.php
2014-11-19 14:29:08 -08:00
Travis Swientek
f781158019 Removed legacy PHP closing braces 2014-10-06 15:53:33 -07:00
George Macon
46f63044ad Add Mailgun->verifyWebhookSignature 2014-06-24 17:36:21 -04:00
Iain Cambridge
bdeadc1a01 Add tests to ensure exceptions are flung and fixed wrong variable name used 2014-05-13 16:12:32 +01:00
Iain Cambridge
35c65aaa57 Removed apiKey member since it's not used anywhere. 2014-05-13 14:59:11 +01:00