Documentation

TaxLetterService
in package

Table of Contents

Constants

CACHE_LIFETIME_IN_SECONDS  = 1

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

Properties

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
throws
Exception
Return values
Response|null

getNotificationNotSentTaxLetterByUserIdAndReaded()

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
throws
Exception
Return values
array<string|int, stdClass>|null

getTaxLettersByUserId()

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
throws
UserNotFoundException
throws
Exception
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

getCacheKeyForLastCheckByClient()

private getCacheKeyForLastCheckByClient(mixed $client) : mixed
Parameters
$client : mixed

getStoredVisibleTaxLettersByClient()

private getStoredVisibleTaxLettersByClient(Client $client, mixed $viewerId) : mixed
Parameters
$client : Client
$viewerId : mixed

taxLetterShow()

private taxLetterShow(object $taxLetter) : bool
Parameters
$taxLetter : object
Return values
bool

        
On this page

Search results