Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http client #1

Merged
merged 30 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7b81e0a
require symfony/http-client and psr/http-client
davysumo Sep 28, 2021
fb32b4a
constructor for autowiring httpclient
davysumo Sep 28, 2021
39d083d
PSR-4 autoloading is incompatible with the target-dir property
davysumo Sep 28, 2021
574b1dc
move DeFactuur and Exception to src folder
davysumo Sep 28, 2021
6ba0da9
use HttpClientInterface instead of Psr18Client
davysumo Sep 28, 2021
a5b159b
rewrite accountApiToken method with HttpClient
davysumo Sep 28, 2021
518133a
merge with master
davysumo Sep 29, 2021
1ff8aa9
refactor doCall method to work with httpClientInterface
davysumo Sep 30, 2021
44a3bbb
throw specific exception for status code 422
davysumo Sep 30, 2021
a10444a
constructor with required parameters, make optional parameters nullab…
davysumo Sep 30, 2021
8647aaf
remove phpdoc author and license data
davysumo Sep 30, 2021
144f4d8
provide initial values in constructor, make public setters chainable
davysumo Oct 1, 2021
72a467e
create ValueObjects for PaymentMethod and State
davysumo Oct 1, 2021
9e39b60
provide initial values for Item + make public setters chainable
davysumo Oct 1, 2021
743979d
fix initializeWithRawData methods for Invoice and Item
davysumo Oct 1, 2021
029f46e
check if values are set when initialising client from raw data
davysumo Oct 8, 2021
c13991a
remove unnecessary phpdoc
davysumo Oct 8, 2021
bbb8c88
change variable names in constructor + check for empty string on api …
davysumo Oct 8, 2021
5b0b9e0
cast State to string in toArray method
davysumo Oct 8, 2021
8a68ec8
paymentmethod as string, not valueobject
davysumo Oct 8, 2021
5895222
add more possible values to State
davysumo Oct 8, 2021
ffa7d8e
amount = float
davysumo Oct 8, 2021
fc85e9e
rename FactuurException -> DeFactuurException
davysumo Oct 8, 2021
fccad97
require psr httpclient instead of symfony's
davysumo Oct 11, 2021
19f0a1e
do not require php-http/message
davysumo Oct 12, 2021
499260b
use psr-7 and psr-18 interfaces instead of client implementations to …
davysumo Oct 12, 2021
405b0c0
remove excess whitespace
davysumo Oct 12, 2021
66ceb28
Only add prepare_for_sending if it's true
davysumo Oct 12, 2021
fb4c1b0
add example to readme and suggest symfony httpclient in composer
davysumo Oct 12, 2021
be76c0f
provide initialisation examples for HttpClient and Guzzle
davysumo Oct 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Exception.php

This file was deleted.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"php": ">=7.4.0",
"ext-curl": "*",
"ext-json": "*",
"symfony/http-client": "^5.3"
"psr/http-client": "^1.0",
"nyholm/psr7": "^1.4"
},
"autoload": {
"psr-4": {"SumoCoders\\DeFactuur\\": "src"}
Expand Down
8 changes: 0 additions & 8 deletions src/Client/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

namespace SumoCoders\DeFactuur\Client;

/**
* Address class
*
* @author Tijs Verkoyen <php-factr@verkoyen.eu>
* @version 2.0.0
* @copyright Copyright (c), Tijs Verkoyen. All rights reserved.
* @license BSD License
*/
class Address
{
protected string $country;
Expand Down
Loading