dobryprogramator / idoklad-api-php-client
PHP client for iDoklad API v3
Installs: 3 034
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 1
Requires
- php: ^7.4|^8.0
- ext-json: *
- jms/serializer: ^1.9|^3.9
- marc-mabe/php-enum: ^4.4
- symfony/http-client: ^5.1|^6.0
- symfony/http-foundation: ^5.1|^6.0
Requires (Dev)
- phpstan/phpstan: ^0.12.50
- symplify/easy-coding-standard: ^8.3
- dev-main
- v1.0.0
- v0.0.18-alpha
- v0.0.17-alpha
- v0.0.16-alpha
- v0.0.15-alpha
- v0.0.14-alpha
- v0.0.13-alpha
- v0.0.12-alpha
- v0.0.11-alpha
- v0.0.10-alpha
- v0.0.9-alpha
- v0.0.8-alpha
- v0.0.7-alpha
- v0.0.6-alpha
- v0.0.5-alpha
- v0.0.4-alpha
- v0.0.3-alpha
- v0.0.2-alpha
- v0.0.1-alpha
- dev-symfony-6
- dev-nullable_userCreatedId
- dev-ISSUED_TAX_DOCUMENT_enum
- dev-fix_numeric_sequences
- dev-new_invoice
- dev-use-case-proforma-invoice
This package is auto-updated.
Last update: 2024-10-27 18:22:06 UTC
README
Fill in
Installation
Fill in
Usage
Fill in
Supported use cases
Contact
Create contact
Usage
<?php use DobryProgramator\iDoklad\Enum\Country; use DobryProgramator\iDoklad\iDokladApiClient; use DobryProgramator\iDoklad\UseCase\Contact\CreateContact\CreateContactRequest; $idokladClient = new iDokladApiClient('clientId', 'clientSecret'); $createContactRequest = new CreateContactRequest('Acme Corporation', Country::CZECHIA()); $createContactRequest->setFirstname('John'); $createContactRequest->setSurname('Doe'); // All fields according to the documentation are available $response = $idokladClient->sendRequest($createContactRequest);
Enums
Country 🔗
Corresponds to iDoklad documentation, enum name is NameEnglish
.
Currency 🔗
Corresponds to iDoklad documentation, enum name is Code
.
DocumentType
Corresponds to iDoklad documentation, enum name is DocumentType
.
EetResponsibility
Exported
IsSentToPurchaser
Corresponds to iDoklad documentation, enum name is IsSentToPurchaser
.
ItemType
Corresponds to iDoklad documentation, enum name is ItemType
.
Payment option
PaymentStatus
Corresponds to iDoklad documentation, enum name is PaymentStatus
.
PriceType
ReportLanguage
VatOnPayStatus
VatRateType
Throwed exceptions
4xx
DobryProgramator\iDoklad\Exception\ApiRateExceededException
You API rate limit was exceeded. See iDoklad pricing 🔗 for more information.
DobryProgramator\iDoklad\Exception\BadRequestException
Bad request. Most likely you passed in wrong data, please check the documentation for integrity constraints.
DobryProgramator\iDoklad\UseCase\Authentication\AuthenticationException
Unable to authenticate. Either authentication request is wrong (which is unlikely), or your credentials are wrong.
DobryProgramator\iDoklad\Exception\NoActiveSubscriptionException
You either do not have an active subscription, or it expired. See my subscriptions page 🔗 for more information.
DobryProgramator\iDoklad\Exception\UnauthorizedException
iDoklad says you are not authenticated. This is most likely a bug in this library. Please create an issue.
5xx
DobryProgramator\iDoklad\Exception\CouldNotProcessResponseException
Throwed when iDoklad's response could not be parsed (e.g. when API response changed without maintaining BC).
DobryProgramator\iDoklad\Exception\iDokladServerException
Throwed when iDoklad API returns 5xx
HTTP code.