Commit Graph

375 Commits

Author SHA1 Message Date
Vasilii Zolotukhin
f64acb148b Check for name existence in parameters before checking 2020-08-20 19:54:37 +01:00
Vasilii Zolotukhin
cc0809f9bc Pass json encoded vars array into parameters 2020-08-20 19:54:37 +01:00
Vasilii Zolotukhin
4a65f16f63 Fixed errors on member adding with nullable name 2020-08-20 19:54:37 +01:00
Tom Schlick
e7c913a17b fix /v3/domains/{domain}/ips endpoint 2020-08-20 19:42:02 +01:00
Justin Sims
e5ff7d84ec Added support for the new mailing list property 'reply_preference' 2020-08-14 01:06:45 +01:00
Tibor Hercz
b91979b1b6 added param to force DKIM authority 2020-08-14 01:06:22 +01:00
Martin San Juan
3fc2f8e227 build: fix style and phpstan 2020-08-14 00:49:39 +01:00
iwahara
5975310f0e fix. 2019-10-15 18:50:34 +01:00
iwahara
aeb82f7ac1 fix code format 2019-10-15 18:50:34 +01:00
iwahara
58c03ac34b fix code format error. 2019-10-15 18:50:34 +01:00
iwahara
14346359f1 format doc comment. 2019-10-15 18:50:34 +01:00
iwahara
c086ea8b6f format doc comment. 2019-10-15 18:50:34 +01:00
iwahara
8390bdd803 add unsubscribe delete parameter. 2019-10-15 18:50:34 +01:00
Littlesqx
e0cb8023a7 Update forbidden response, set message from response body content. 2019-08-30 19:49:02 +01:00
徐哈哈
c88f1bc174 Add Forbidden response 2019-08-30 19:49:02 +01:00
Nathan Perkins
2db0619d8a Revise domain creation assertions and add tests
Based on feedback from @DavidGarciaCat.
2019-08-29 22:25:39 +01:00
Nathan Perkins
c9bbf8e45f Revise domain creation to allow select arguments
Previously, passing `$spamAction` only worked if an SMTP password (`$smtpPass`) was provided. This revision de-couples those two arguments.

In addition, it adds support for the `$wildcard` arguments (which appeared to not be used before).

Finally, this revision adds SMTP password validation (the same used in the `credentials` method).
2019-08-29 22:25:39 +01:00
Kevin Pohl
ae9a549e7f sort api methods by name 2019-05-18 01:34:42 +01:00
Kevin Pohl
4d77573ae6 add missing mailingList method 2019-05-18 01:34:42 +01:00
Tobias Nyholm
f30985c925 Added return types 2019-04-19 21:37:48 +01:00
Tobias Nyholm
c3ea40c94e
Fixed a few PRs and some cleanup (#589)
* fix for #581

* fix for #582

* Remove final

This will fix #584

* Type cast to string properly

* Convert to json string if needed

* cs
2019-04-09 20:37:32 +02:00
Tobias Nyholm
ad67b4179c
Make sure Attachment::show always return ResponseInterface (#590) 2019-04-09 20:10:33 +02:00
Louis Coulet
7705cb7666 Fix attachment and inline image renaming (#571)
* Fix file renaming

* Fix file renaming
2019-04-09 19:12:50 +02:00
David Garcia
abf2a0ae55 Mailgun-461: Validate limits (#565)
* Check limit for paginated domains

* Check limit for paginated events

* Check limit for paginated rotues

* Check limit for paginated tags

* Check limit for paginated mailing lists

* Replace unexpected Assert
2019-02-18 16:43:59 +01:00
Ilya Chekalskiy
7e438f4b4e Fixes #573 (#574)
because `\Http\Client\Common\HttpMethodsClientInterface` is an interface, not a class
2019-02-18 16:41:38 +01:00
Tobias Nyholm
bbb88f0113 Make sure the link is updated 2019-02-03 21:58:26 +00:00
Nyholm
f84f757ae2 Use PSR-17 and mark classes as final 2019-02-03 21:55:05 +00:00
Tobias Nyholm
6954b4dd2a
Use PSR-18 (#522)
* Use PSR-18

* minor fixes

* phpstan fixes

* cs
2019-02-02 08:30:04 +01:00
David Garcia
c51c6b10a0 Revert "Add helper for MailingList"
This reverts commit 787811d08b.
2019-01-30 00:08:47 +00:00
David Garcia
b18b4b4f5f Revert "Fix PHPStan validation error"
This reverts commit 3329924ebc.
2019-01-30 00:08:47 +00:00
David Garcia
3329924ebc Fix PHPStan validation error
Class Mailgun\Api\MailingList referenced with incorrect case: Mailgun\API\MailingList.
2019-01-29 23:52:40 +00:00
David Garcia
787811d08b Add helper for MailingList 2019-01-29 23:52:40 +00:00
Tobias Nyholm
cbb13527b9
Minor cleanup and cs (#550)
* Minor cleanup and cs

* minor
2019-01-23 10:35:58 +01:00
Radoje Albijanic
a79b8bb86f CS fixes 2019-01-23 00:46:28 +00:00
Radoje Albijanic
58a353e5f3 Refactor models to php7 2019-01-23 00:46:28 +00:00
Radoje Albijanic
272033dff2 Refactor Tag models to php7 code (#548)
* Refactor models to php7 code

* return model from create method fix
2019-01-22 18:38:44 +01:00
Radoje Albijanic
259d91cb75 Update Suppression models to php7 (#547)
* PHP7 code in Suppression/Bounce

* PHP7 code in Suppression/Complaint and some fixes

* PHP7 code in Suppression/Unsubscribe and some fixes

* Minor

* Empty constructors, changed DateTimeImmutable instead of DateTime

* Code format

* Refactor and consistency fixes

* Nullable getter return values, nullable address fixes
2019-01-22 16:43:20 +01:00
Nyholm
2fe264038b Bugfix 2019-01-20 11:03:18 +00:00
Nyholm
997d545e61 Bugfixes 2019-01-20 11:03:18 +00:00
Nyholm
d0cafddeab Moved MailingList, Message and Route to PHP7 code 2019-01-20 11:03:18 +00:00
Nyholm
ac056e9f75 Updated paging to PHP7 2019-01-20 11:01:02 +00:00
Nyholm
61ae9bc945 Updating Stats models to PHP7 code 2019-01-20 10:59:47 +00:00
Tobias Nyholm
a7f8c14fe8 Cs 2019-01-17 08:31:01 +00:00
Nyholm
9dab02afd4 Make PHP-stan happy 2019-01-17 08:31:01 +00:00
Nyholm
28a4454c63 Fixed PHP7 on Event model and Ip model 2019-01-17 08:31:01 +00:00
Tobias Nyholm
51cff9dbdc cs 2019-01-15 10:43:26 +00:00
Nyholm
47ef0542f0 Updated other domain models 2019-01-15 10:43:26 +00:00
Nyholm
0c3b716cf2 Updated some models with PHP 7 code 2019-01-15 10:43:26 +00:00
Nyholm
0f54332d0e CS and fixes 2019-01-12 10:34:44 +00:00
Nyholm
2ec2c16227 Added PHP7 code and did some refactoring. 2019-01-12 10:34:44 +00:00
Nyholm
2b60fba811 Moved Mailgun\Model\Route\Response to Mailgun\Model\Route 2019-01-12 10:28:05 +00:00
David Garcia
6a943ddce3 Include missed use statements 2019-01-10 22:15:40 +00:00
David Garcia
de2902aac4 Review assets 2019-01-10 22:15:40 +00:00
David Garcia
88a9e4b1ff Relocate files 2019-01-10 22:15:40 +00:00
David Garcia
c40fe862cc Remove removed file
It was restored as part of a rebase.
Removing it again not to cause a namespace\class conflict.
2019-01-10 22:15:40 +00:00
David Garcia
f3566026b6 Remove egulias/email-validator and dependencies 2019-01-10 22:15:40 +00:00
David Garcia
5927cb162e Add method to get access to Email Validation 2019-01-10 22:15:40 +00:00
David Garcia
961ae177fa Add new lines to improve readability 2019-01-10 22:15:40 +00:00
David Garcia
2c98efc519 Re-order API methods by name
Easier to read
2019-01-10 22:15:40 +00:00
David Garcia
9f61a1e6dc Missed annotation 2019-01-10 22:15:40 +00:00
David Garcia
39feab32e5 Remove unused use statement 2019-01-10 22:15:40 +00:00
David Garcia
f12480e313 Remove public endpoints & implement private endpoints 2019-01-10 22:15:40 +00:00
David Garcia
e90f829eb4 Add ParsePesponse 2019-01-10 22:15:40 +00:00
David Garcia
0039e26be2 Add model to map the Parse response 2019-01-10 22:15:40 +00:00
David Garcia
1fb0d0bbc5 Email Validation does not return a key name, just the resource itself 2019-01-10 22:15:40 +00:00
David Garcia
3cf9aca200 StyleCI fixes 2019-01-10 22:15:40 +00:00
David Garcia
d15dbc4f69 Extract the email address from the string
me@davidgarcia.cat => me@davidgarcia.cat
David Garcia <me@davidgarcia.cat> => me@davidgarcia.cat
David Garcia me@davidgarcia.cat => me@davidgarcia.cat
David me@davidgarcia.cat Garcia => me@davidgarcia.cat
2019-01-10 22:15:40 +00:00
David Garcia
756b63ef54 Provide the EmailValidator entry point to send the API requests
So far we just validate the provided arguments.
Waiting for @Nyholm confirmation about the best way to proceed.
Please refer to
https://github.com/mailgun/mailgun-php/issues/191#issuecomment-350133021
2019-01-10 22:15:40 +00:00
David Garcia
682d7919ad Update error messages and provide @author annotation
http://docs.phpdoc.org/references/phpdoc/tags/author.html
2019-01-10 22:15:40 +00:00
David Garcia
e94334b4f1 Provide new Assert to validate an email address 2019-01-10 22:15:40 +00:00
David Garcia
77b50d3d17 Provide Validate Response 2019-01-10 22:15:40 +00:00
David Garcia
96b2242d5b Provide model to map the Email Validation 2019-01-10 22:15:40 +00:00
David Garcia
3079b8a75c Provide model to map the Email Validation Parts 2019-01-10 22:15:40 +00:00
Tobias Nyholm
a1ca1a3b2f
Added PHPStan test (#537)
* Added PHPStan test

This will fix #536

* Somce code style updates
2019-01-10 20:29:58 +01:00
Nyholm
750a7270e3 cs 2019-01-10 08:25:29 +00:00
Nyholm
34432e0517 Minor bugfixes detected with PHPStan 2019-01-10 08:25:29 +00:00
Nyholm
dd7c1d2361 Added new CS rules
Declare strict and no superfluous phpdoc
2019-01-10 08:25:29 +00:00
Nyholm
f915b103a3 cs 2019-01-09 20:51:05 +00:00
Nyholm
b619b66732 Adding tag aggregates 2019-01-09 20:51:05 +00:00
Tobias Nyholm
b725ab728e
Adding PHP7 type annotations (#523)
* Adding PHP7 type annotations

* cs

* Moved HttpClientConfigurator and RequestBuilder to Mailgun\HttpClient namespace

* fixing tests

* Rebased and fixed tests

* minors

* cs

* Bugfixes

* Typo
2019-01-09 20:18:58 +01:00
Tobias Nyholm
538ea52b37
Removed "final" for classes with known sub-classes (#520) 2019-01-07 06:15:44 +01:00
Tobias Nyholm
519fd7a674
Added proper PHP CS fixer rules (#527)
* Added proper PHP CS fixer rules

* Adding Symfony cs rules

* Updated CS on tests
2019-01-07 06:12:53 +01:00
Tobias Nyholm
e341a44a5c
Removed deprecated code (#521)
* Removed deprecated code

* cs

* Removed more deprecated code

* minor
2019-01-06 10:07:06 +01:00
Matěj Humpál
12fee2f714 MessageBuilder setters entirely fluent (#507) 2019-01-06 10:06:52 +01:00
Tobias Nyholm
1bcce53387
Use PSR-4 (#517) 2019-01-06 08:34:49 +01:00
Tobias Nyholm
7020c01cca
Make all model constructors private (#512) 2019-01-06 08:14:07 +01:00
Tobias Nyholm
e32031f671
Make all models final (#513) 2019-01-06 08:13:29 +01:00
Tobias Nyholm
da5ccde2a7
Adding support for Mailing list (#514)
* Adding Mailing list API

* Added tests

* cs

* Fixed the tests

* code cleanup
2019-01-06 08:11:37 +01:00
Tobias Nyholm
56655ad6c0
Added IP API class, models and test (#515)
* Added IP API class, models and test

* cs

* bugfix
2019-01-05 20:31:38 +01:00
Tobias Nyholm
c0a386027b
Added more tests for models (#511)
* Added more tests for models

* cs
2019-01-05 20:30:55 +01:00
Tobias Nyholm
09113482ea
Added "complaints" to TotalResponse (#509) 2019-01-05 19:56:55 +01:00
Paul R Rogers
02e3191bc9 Change exception message of HttpClientException when badRequest to us… (#466)
* Change exception message of HttpClientException when badRequest to use server content's message to aid resolving problems with user input.

* style(HttpClientException): Removed space to comply with styleCI.

* Fix missing assoc flag.

* Refactor to reuse constructor parsing when passing along server error.
Add tests covering passing along of server message.

* Updated tests

* cs

* bugfix
2019-01-05 12:52:40 +01:00
Matias Barletta
07da83776a fix: Validate file name length (#463)
* fix: Validate file name length

$message could contain a large email text that if sent to is_file it could break with this error:
` is_file(): File name is longer than the maximum allowed path `
This validation prevents using is_file if the $message is longer than the allowed path.

* style: Fix extra space

* Added a small test

* cs

* cs
2019-01-05 12:44:50 +01:00
David Garcia
ce641a6846 Prepare for 2.7.0 (#481)
* Prepare for 2.7.0

* Remove `declare(strict_types=1)`

* Remove missed `declare(strict_types=1)`
2019-01-05 08:24:22 +01:00
Tobias Nyholm
d4e4d4efbe
Close open resources (#473)
* Make sure to close any open resources

* Fixed test
2019-01-05 08:23:41 +01:00
Matěj Humpál
80a82508c7 Added deprecated notices to non-fluent MessageBuilder setters (#505) 2019-01-03 12:16:01 +01:00
Matěj Humpál
5398e0ad9c Added throws RuntimeException annotation to BatchMessage (#506) 2019-01-03 11:38:58 +01:00
Matěj Humpál
54aa0a7553 Fluent interface for MessageBuilder and BatchMessage 2019-01-03 09:56:56 +00:00
Arliee
1f5bd4200d Fix type error when creating tags (#501)
* Fix fatal error due to not using DateTime instead of string when creating a tag.

* Add unit tests to prove tag creation.

* Add unit tests to prove tag creation.

* Add first seen and last seen accessors to tags, and unit tests to prove correctness.
2019-01-03 10:55:24 +01:00
Ruud Kamphuis
3fb0f8210e MessageBuilder > addBccRecipient > Make $variables optional (#485)
This way, it's the same as `addToRecipient` and `addCcRecipient`
2018-09-07 22:37:59 +02:00