TaxLetterService
in package
Table of Contents
Constants
Properties
- $clientRepository : ClientRepository
- $countryService : CountryService
- $em : EntityManager
- $httpClient : Client
- $redis : Redis
- $remoteApiKey : string
- $remoteApiUrl : string
- $response : mixed
- $taxLetterRepository : TaxLetterRepository
- $taxLetterStatusRepository : TaxLetterStatusRepository
- $taxLetterStatusService : TaxLetterStatusService
- $url : mixed
Methods
- __construct() : mixed
- TaxLetterService constructor.
- fetchTaxLetterPdfByTaxLetterObject() : Response|null
- getNotificationNotSentTaxLetterByUserIdAndReaded() : array<string|int, TaxLetter>
- getTaxLetterFromApiByClient() : array<string|int, stdClass>|null
- getTaxLettersByUserId() : array<string|int, stdClass>
- getTaxLettersByUserIdAndLastNotificationSentBeforeAndReaded() : array<string|int, TaxLetter>
- prepareLetter() : mixed
- sync() : void
- getCacheKeyForLastCheckByClient() : mixed
- getStoredVisibleTaxLettersByClient() : mixed
- getTextId() : mixed
- needSyncForClient() : mixed
- taxLetterShow() : bool
- updateLastCheckCacheByClient() : mixed
- validClient() : mixed
Constants
CACHE_LIFETIME_IN_SECONDS
public
mixed
CACHE_LIFETIME_IN_SECONDS
= 1
Properties
$clientRepository
private
ClientRepository
$clientRepository
$countryService
private
CountryService
$countryService
$em
private
EntityManager
$em
$httpClient
private
Client
$httpClient
$redis
private
Redis
$redis
$remoteApiKey
private
string
$remoteApiKey
$remoteApiUrl
private
string
$remoteApiUrl
$response
private
mixed
$response
$taxLetterRepository
private
TaxLetterRepository
$taxLetterRepository
$taxLetterStatusRepository
private
TaxLetterStatusRepository
$taxLetterStatusRepository
$taxLetterStatusService
private
TaxLetterStatusService
$taxLetterStatusService
$url
private
mixed
$url
Methods
__construct()
TaxLetterService constructor.
public
__construct(TaxLetterStatusRepository $taxLetterStatusRepository, TaxLetterStatusService $taxLetterStatusService, CountryService $countryService, Client $httpClient, Url $url, Response $response, ClientRepository $clientRepository, Redis $redis, TaxLetterRepository $taxLetterRepository, EntityManager $em) : mixed
Parameters
- $taxLetterStatusRepository : TaxLetterStatusRepository
- $taxLetterStatusService : TaxLetterStatusService
- $countryService : CountryService
- $httpClient : Client
- $url : Url
- $response : Response
- $clientRepository : ClientRepository
- $redis : Redis
- $taxLetterRepository : TaxLetterRepository
- $em : EntityManager
fetchTaxLetterPdfByTaxLetterObject()
public
fetchTaxLetterPdfByTaxLetterObject(stdClass $taxLetter) : Response|null
Parameters
- $taxLetter : stdClass
Tags
Return values
Response|nullgetNotificationNotSentTaxLetterByUserIdAndReaded()
public
getNotificationNotSentTaxLetterByUserIdAndReaded(int $userId, bool $readed) : array<string|int, TaxLetter>
Parameters
- $userId : int
- $readed : bool
Return values
array<string|int, TaxLetter>getTaxLetterFromApiByClient()
public
getTaxLetterFromApiByClient(Client $client) : array<string|int, stdClass>|null
Parameters
- $client : Client
Tags
Return values
array<string|int, stdClass>|nullgetTaxLettersByUserId()
public
getTaxLettersByUserId(int $clientId[, int $viewerId = null ]) : array<string|int, stdClass>
Parameters
- $clientId : int
- $viewerId : int = null
-
Id of the person viewing the tax letter, for the purpose of "read" status
Tags
Return values
array<string|int, stdClass>getTaxLettersByUserIdAndLastNotificationSentBeforeAndReaded()
public
getTaxLettersByUserIdAndLastNotificationSentBeforeAndReaded(int $userId, DateTime $notificationDate, bool $readed) : array<string|int, TaxLetter>
Parameters
- $userId : int
- $notificationDate : DateTime
- $readed : bool
Return values
array<string|int, TaxLetter>prepareLetter()
public
prepareLetter(mixed $client, TaxLetter $taxLetter, mixed $letterInfo) : mixed
Parameters
- $client : mixed
- $taxLetter : TaxLetter
- $letterInfo : mixed
sync()
public
sync(Client $client[, bool $force = false ]) : void
Parameters
- $client : Client
- $force : bool = false
getCacheKeyForLastCheckByClient()
private
getCacheKeyForLastCheckByClient(mixed $client) : mixed
Parameters
- $client : mixed
getStoredVisibleTaxLettersByClient()
private
getStoredVisibleTaxLettersByClient(Client $client, mixed $viewerId) : mixed
Parameters
- $client : Client
- $viewerId : mixed
getTextId()
private
getTextId(Client $client) : mixed
Parameters
- $client : Client
needSyncForClient()
private
needSyncForClient(Client $client) : mixed
Parameters
- $client : Client
taxLetterShow()
private
taxLetterShow(object $taxLetter) : bool
Parameters
- $taxLetter : object
Return values
boolupdateLastCheckCacheByClient()
private
updateLastCheckCacheByClient(Client $client) : mixed
Parameters
- $client : Client
validClient()
private
validClient(Client $client) : mixed
Parameters
- $client : Client