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

47/master/fix missing fields #48

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
php: ['8.0', '8.1']
php: ['8.1', '8.2', '8.3']
runs-on: ubuntu-latest

steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: composer install --prefer-dist --no-progress

- name: run code php-cs-fixer
run: ./tools/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run
run: PHP_CS_FIXER_IGNORE_ENV=true ./tools/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run

- name: run phpstan
run: ./tools/phpstan analyse -l 5 ./src
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"require": {
"guzzlehttp/guzzle": "^6.0|^7.0",
"php": "^8.0",
"php": "^8.1",
"ext-simplexml": "*"
},
"require-dev": {
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ services:
container_name: fastbill_sdk
image: dockware/flex:latest
ports:
- "22:22" # ssh
- "80:80" # apache2
- "2222:22" # ssh
- "8088:80" # apache2
volumes:
- "sdk_volume:/var/www/html"
networks:
- sdk-web
environment:
- XDEBUG_ENABLED=1
- FILEBEAT_ENABLED=0
- PHP_VERSION=8.0
- PHP_VERSION=8.2


## ***********************************************************************
Expand Down
6 changes: 3 additions & 3 deletions examples/contact/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$customersService = new FastBillSdk\Contact\ContactService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Contact\ContactValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Contact\ContactValidator()
);
$contactEntity = new \FastBillSdk\Contact\ContactEntity();
$contactEntity = new FastBillSdk\Contact\ContactEntity();
$contactEntity->customerId = 123123123;
$contactEntity->firstName = 'Max';
$contactEntity->lastName = 'Mustermann';
Expand Down
6 changes: 3 additions & 3 deletions examples/contact/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$customersService = new FastBillSdk\Contact\ContactService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Contact\ContactValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Contact\ContactValidator()
);
$contactEntity = new \FastBillSdk\Contact\ContactEntity();
$contactEntity = new FastBillSdk\Contact\ContactEntity();
$contactEntity->contactId = 112233;
$result = $customersService->deleteContact($contactEntity);

Expand Down
6 changes: 3 additions & 3 deletions examples/contact/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$customersService = new FastBillSdk\Contact\ContactService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Contact\ContactValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Contact\ContactValidator()
);
$customersSearchStruct = new \FastBillSdk\Contact\ContactSearchStruct();
$customersSearchStruct = new FastBillSdk\Contact\ContactSearchStruct();
$customersSearchStruct->setCustomerIdFilter(123123123);
$result = $customersService->getContact($customersSearchStruct);

Expand Down
6 changes: 3 additions & 3 deletions examples/contact/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$customersService = new FastBillSdk\Contact\ContactService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Contact\ContactValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Contact\ContactValidator()
);
$contactEntity = new \FastBillSdk\Contact\ContactEntity();
$contactEntity = new FastBillSdk\Contact\ContactEntity();
$contactEntity->contactId = 112233;
$contactEntity->firstName = 'Max';
$contactEntity->lastName = 'Musterfrau';
Expand Down
8 changes: 4 additions & 4 deletions examples/customer/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

$customersService = new FastBillSdk\Customer\CustomerService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Customer\CustomerValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Customer\CustomerValidator()
);

$customersEntity = new \FastBillSdk\Customer\CustomerEntity();
$customersEntity->customerType = \FastBillSdk\Customer\CustomerEntity::CUSTOMER_TYPE_CONSUMER;
$customersEntity = new FastBillSdk\Customer\CustomerEntity();
$customersEntity->customerType = FastBillSdk\Customer\CustomerEntity::CUSTOMER_TYPE_CONSUMER;
$customersEntity->firstName = 'FirstName';
$customersEntity->lastName = 'LastName';
$result = $customersService->createCustomer($customersEntity);
Expand Down
6 changes: 3 additions & 3 deletions examples/customer/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$customersService = new FastBillSdk\Customer\CustomerService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Customer\CustomerValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Customer\CustomerValidator()
);

$customersEntity = new \FastBillSdk\Customer\CustomerEntity();
$customersEntity = new FastBillSdk\Customer\CustomerEntity();
$customersEntity->customerId = 1111;
$result = $customersService->deleteCustomer($customersEntity);

Expand Down
6 changes: 3 additions & 3 deletions examples/customer/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$customersService = new FastBillSdk\Customer\CustomerService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Customer\CustomerValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Customer\CustomerValidator()
);
$customersSearchStruct = new \FastBillSdk\Customer\CustomerSearchStruct();
$customersSearchStruct = new FastBillSdk\Customer\CustomerSearchStruct();
$customersSearchStruct->setCustomerIdFilter(123123123);
$result = $customersService->getCustomer($customersSearchStruct);

Expand Down
8 changes: 4 additions & 4 deletions examples/customer/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

$customersService = new FastBillSdk\Customer\CustomerService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Customer\CustomerValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Customer\CustomerValidator()
);

$customersEntity = new \FastBillSdk\Customer\CustomerEntity();
$customersEntity->customerType = \FastBillSdk\Customer\CustomerEntity::CUSTOMER_TYPE_CONSUMER;
$customersEntity = new FastBillSdk\Customer\CustomerEntity();
$customersEntity->customerType = FastBillSdk\Customer\CustomerEntity::CUSTOMER_TYPE_CONSUMER;
$customersEntity->customerId = 1111;
$customersEntity->firstName = 'FirstName v2';
$customersEntity->lastName = 'LastName v2';
Expand Down
10 changes: 5 additions & 5 deletions examples/estimate/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

$estimateService = new FastBillSdk\Estimate\EstimateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Estimate\EstimateValidator(
new \FastBillSdk\Estimate\EstimateItemValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Estimate\EstimateValidator(
new FastBillSdk\Estimate\EstimateItemValidator()
)
);
$estimateEntity = new \FastBillSdk\Estimate\EstimateEntity();
$estimateEntity = new FastBillSdk\Estimate\EstimateEntity();
$estimateEntity->customerId = 123123123;
$estimateItemEntity = new \FastBillSdk\Estimate\EstimateItemEntity();
$estimateItemEntity = new FastBillSdk\Estimate\EstimateItemEntity();
$estimateItemEntity->description = 'FastBill SDK';
$estimateItemEntity->unitPrice = '1337';
$estimateItemEntity->vatPercent = '19';
Expand Down
8 changes: 4 additions & 4 deletions examples/estimate/createinvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

$estimateService = new FastBillSdk\Estimate\EstimateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Estimate\EstimateValidator(
new \FastBillSdk\Estimate\EstimateItemValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Estimate\EstimateValidator(
new FastBillSdk\Estimate\EstimateItemValidator()
)
);

$estimateEntity = new \FastBillSdk\Estimate\EstimateEntity();
$estimateEntity = new FastBillSdk\Estimate\EstimateEntity();
$estimateEntity->estimateId = 16343450;
$result = $estimateService->createInvoiceFromEstimate($estimateEntity);

Expand Down
8 changes: 4 additions & 4 deletions examples/estimate/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

$estimateService = new FastBillSdk\Estimate\EstimateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Estimate\EstimateValidator(
new \FastBillSdk\Estimate\EstimateItemValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Estimate\EstimateValidator(
new FastBillSdk\Estimate\EstimateItemValidator()
)
);
$estimateEntity = new \FastBillSdk\Estimate\EstimateEntity();
$estimateEntity = new FastBillSdk\Estimate\EstimateEntity();
$estimateEntity->estimateId = '16343462';
$result = $estimateService->deleteEstimate($estimateEntity);

Expand Down
8 changes: 4 additions & 4 deletions examples/estimate/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

$estimateService = new FastBillSdk\Estimate\EstimateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Estimate\EstimateValidator(
new \FastBillSdk\Estimate\EstimateItemValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Estimate\EstimateValidator(
new FastBillSdk\Estimate\EstimateItemValidator()
)
);
$estimateSearchStruct = new \FastBillSdk\Estimate\EstimateSearchStruct();
$estimateSearchStruct = new FastBillSdk\Estimate\EstimateSearchStruct();
$result = $estimateService->getEstimate($estimateSearchStruct);

ini_set('xdebug.var_display_max_depth', '5');
Expand Down
8 changes: 4 additions & 4 deletions examples/estimate/sendbyemail.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

$estimateService = new FastBillSdk\Estimate\EstimateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Estimate\EstimateValidator(
new \FastBillSdk\Estimate\EstimateItemValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Estimate\EstimateValidator(
new FastBillSdk\Estimate\EstimateItemValidator()
)
);
$estimateId = 16343450;
$recipient = new \FastBillSdk\Common\RecipientEntity();
$recipient = new FastBillSdk\Common\RecipientEntity();
$recipient->setToEmailAddress('[email protected]');

$subject = 'Estimate Subject';
Expand Down
4 changes: 2 additions & 2 deletions examples/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function lowerCamelCase($string)
VAT_VALUE';

foreach (explode("\n", $fields) as $value) {
echo 'public $' . lowerCamelCase($value) . ';' . '<br /><br />';
echo 'public $' . lowerCamelCase($value) . ';<br /><br />';
}

echo ' const FIELD_MAPPING = [<br/>';
Expand All @@ -39,7 +39,7 @@ function lowerCamelCase($string)
echo '];<br /><br />';

echo ' const XML_FIELD_MAPPING = [<br/>';
foreach (\FastBillSdk\Invoice\InvoiceEntity::FIELD_MAPPING as $key => $value) {
foreach (FastBillSdk\Invoice\InvoiceEntity::FIELD_MAPPING as $key => $value) {
echo '\'' . $value . '\' => \'' . $key . '\',<br />';
}
echo '];<br /><br />';
6 changes: 3 additions & 3 deletions examples/product/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$productService = new FastBillSdk\Product\ProductService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Product\ProductValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Product\ProductValidator()
);

$entity = new \FastBillSdk\Product\ProductEntity();
$entity = new FastBillSdk\Product\ProductEntity();
$entity->title = 'FastBill SDK';
$entity->unitPrice = 1337;
$entity->articleNumber = 222;
Expand Down
6 changes: 3 additions & 3 deletions examples/product/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$productService = new FastBillSdk\Product\ProductService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Product\ProductValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Product\ProductValidator()
);

$entity = new \FastBillSdk\Product\ProductEntity();
$entity = new FastBillSdk\Product\ProductEntity();
$entity->articleId = 3493981;

$result = $productService->deleteProduct($entity);
Expand Down
6 changes: 3 additions & 3 deletions examples/product/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$productService = new FastBillSdk\Product\ProductService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Product\ProductValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Product\ProductValidator()
);

$result = $productService->getProducts(new \FastBillSdk\Product\ProductSearchStruct());
$result = $productService->getProducts(new FastBillSdk\Product\ProductSearchStruct());

ini_set('xdebug.var_display_max_depth', '5');
ini_set('xdebug.var_display_max_children', '256');
Expand Down
6 changes: 3 additions & 3 deletions examples/product/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$productService = new FastBillSdk\Product\ProductService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\Product\ProductValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\Product\ProductValidator()
);

$entity = new \FastBillSdk\Product\ProductEntity();
$entity = new FastBillSdk\Product\ProductEntity();
$entity->articleId = 3493981;
$entity->articleNumber = 42;
$entity->title = 'FastBill SDK v2';
Expand Down
2 changes: 1 addition & 1 deletion examples/template.get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$templatesService = new FastBillSdk\Template\TemplateService(
$fastBillClient,
new \FastBillSdk\Common\XmlService()
new FastBillSdk\Common\XmlService()
);
$result = $templatesService->getTemplate();

Expand Down
6 changes: 3 additions & 3 deletions examples/worktime/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$workTimesService = new FastBillSdk\WorkTime\WorkTimeService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\WorkTime\WorkTimeValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\WorkTime\WorkTimeValidator()
);

$workTimeEntity = new \FastBillSdk\WorkTime\WorkTimeEntity();
$workTimeEntity = new FastBillSdk\WorkTime\WorkTimeEntity();
$workTimeEntity->customerId = 123;
$workTimeEntity->projectId = 456;
$workTimeEntity->comment = 'sdk test';
Expand Down
6 changes: 3 additions & 3 deletions examples/worktime/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

$workTimesService = new FastBillSdk\WorkTime\WorkTimeService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\WorkTime\WorkTimeValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\WorkTime\WorkTimeValidator()
);

$workTimeEntity = new \FastBillSdk\WorkTime\WorkTimeEntity();
$workTimeEntity = new FastBillSdk\WorkTime\WorkTimeEntity();
$workTimeEntity->timeId = 991936;

$result = $workTimesService->deleteTime($workTimeEntity);
Expand Down
6 changes: 3 additions & 3 deletions examples/worktime/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

$workTimesService = new FastBillSdk\WorkTime\WorkTimeService(
$fastBillClient,
new \FastBillSdk\Common\XmlService(),
new \FastBillSdk\WorkTime\WorkTimeValidator()
new FastBillSdk\Common\XmlService(),
new FastBillSdk\WorkTime\WorkTimeValidator()
);
$workTimesSearchStruct = new \FastBillSdk\WorkTime\WorkTimeSearchStruct();
$workTimesSearchStruct = new FastBillSdk\WorkTime\WorkTimeSearchStruct();
// $workTimesSearchStruct->setCustomerIdFilter(123123);
$result = $workTimesService->getTime($workTimesSearchStruct);

Expand Down
Loading
Loading