AppCore
Loading...
Searching...
No Matches
ECardBusinessLogic.h
Go to the documentation of this file.
1#ifndef CARDBUSINESSLOGIC_H
2#define CARDBUSINESSLOGIC_H
3
4#include <string>
5
6#include "core/common/eplatform.h"
7#include "appcore/ticketissuelogic/ETicketIssueLogicDefines.h"
8#include "appcore/cardfacade/ECardFacadeDefines.h"
9
10namespace EM
11{
12 namespace Strojcek
13 {
14 namespace VstupneUdaje
15 {
16 class CappingInformationData;
17
18 namespace TarifnySystem
19 {
20 class ETarifa;
21 class ETarifnePasmo;
22 }
23 }
24 }
25 namespace TicketIssueLogic
26 {
28 {
29 private:
33 public:
35
42 static EIssueLogicDefines::ReturnValues GetDepartmentNumberFromCard( unsigned long &departmentNumber );
43
47 DEPRECATED( static bool GetValidCustomerProfileIndex( unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff ) );
48
56 static bool IsCustomerProfileValidByTariff( unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff );
57
64 static EIssueLogicDefines::ReturnValues CheckCardNetworkWithTariffNetwork( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork );
65
66 static bool GetDiscountTypeByCardType( unsigned short cardType, EM::CardFacade::ECardFacadeDefines::CardTypeStandard standard, bool timeTicket, unsigned char &discountType );
67 static bool GetDiscountTypeByCardType( unsigned char cardTypeID, bool timeTicket, unsigned char &discountType );
68
73 DEPRECATED( static bool GetCustomerProfileName( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile ) );
74
81 static bool GetCustomerProfileName( unsigned char customerProfileIndex, std::string &customerProfile );
82
83 static bool GetNameAndSurname( std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled );
84
85 static bool GetBornNumber( unsigned short &year, unsigned short &month, unsigned short &day, bool &showingEnabled );
86
90 static EIssueLogicDefines::ReturnValues GetCardTypeID( unsigned char &cardTypeID, unsigned char validCustomerProfileIndex );
91
98 static EIssueLogicDefines::ReturnValues GetCardType( unsigned short &cardType, const unsigned char validCustomerProfileIndex );
99
105 static bool GetWalletBalanceText( std::string &walletBalance );
106
112 static bool IsHomeCompanyCard( bool &isHomeCompanyCard );
113
120 static EIssueLogicDefines::ReturnValues IsAllowedCompanyCard( bool &isAllowedCompanyCard );
121
136 static EIssueLogicDefines::ReturnValues IsSupportedLineTripProtectNumberOnCard( bool &isSupportedFlagsOnCard );
137
144 static EIssueLogicDefines::ReturnValues GetCardNetworkID( unsigned long &cardNetworkID );
145
152 static EIssueLogicDefines::ReturnValues IsSupportedProfileValidityStartOnCard( bool &isSupportedProfileValidityStart );
153
171 static EIssueLogicDefines::ReturnValues GetCustomerProfileValidity( unsigned long &customerProfileValidityStart, unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex );
172
176 static bool IsCityCard();
177
196 static EIssueLogicDefines::ReturnValues GetTariffFromCard( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
197
211 static EIssueLogicDefines::ReturnValues GetOneWayTicketPriceListRowFromCard( unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow );
212
219 static EIssueLogicDefines::ReturnValues IsAllowedCardTypeForCardActivation( bool &isAllowedCardTypeForCardActivation );
220
229 static EIssueLogicDefines::ReturnValues IsAnyCustomerProfileValid( unsigned char &firstValidCustomerProfile, unsigned long timeToCompareProfileValidityTo = 0 );
230
239 static EIssueLogicDefines::ReturnValues IsCustomerProfileValidByDate( unsigned char customerProfileIndex, unsigned long timeToCompareProfileValidityTo = 0 );
240
249 static EIssueLogicDefines::ReturnValues EvaluateCardTypeForInvalidCustomerProfile( unsigned short &cardType );
250
258 static EIssueLogicDefines::ReturnValues IsAnyValidFareProviderForCurrentCompanyNumber();
259
267 static EIssueLogicDefines::ReturnValues GetNIDFromTimeTicket( const unsigned char timeTicketIndex, unsigned long &timeTicketNID );
268
276 static EIssueLogicDefines::ReturnValues GetNIDFromOneWayTicket( const unsigned char oneWayTicketIndex, unsigned long &oneWayTicketNID );
277
284 static EIssueLogicDefines::ReturnValues GetUTNFromTimeTicket( const unsigned char timeTicketIndex, long &urbanTransportNumber );
285
292 static EIssueLogicDefines::ReturnValues CheckCardWalletISOPayUnitCodeValidity( bool &walletPayUnitValidity );
293
301 static EIssueLogicDefines::ReturnValues GetCappingInformation( unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData );
302
303 private:
320 static EIssueLogicDefines::ReturnValues TryProlongStudentCardDiscountValidity( unsigned long &customerProfileValidity );
321
322 static EIssueLogicDefines::ReturnValues GetTariffFromTimeTicket( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
323 static EIssueLogicDefines::ReturnValues GetTariffFromOneWayTicket( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
324
330 static bool IsCustomerProfileValidityException( const unsigned char customerProfileIndex );
331
332 static bool GetTariffDetails( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned char &tariffDiscountType, bool &isTimeTicketTariff );
333 };
334 }
335}
336
337#endif // CARDBUSINESSLOGIC_H
unsigned char GetCardTypeID()
#define DLL_API
Definition ECardFacadeDefines.h:8
CardFacadeType
Definition ECardFacadeDefines.h:162
CardTypeStandard
Definition ECardFacadeDefines.h:248
Definition ECardBusinessLogic.h:28
static EIssueLogicDefines::ReturnValues GetCappingInformation(unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData)
GetCappingInformation - gains capping information data from tariff system and from card data structur...
static bool GetCustomerProfileName(unsigned char customerProfileIndex, std::string &customerProfile)
Get name of card type (text representation of card type)
static bool GetWalletBalanceText(std::string &walletBalance)
Get balance of electronic wallet on card in form of "amount currency".
static bool IsCustomerProfileValidByTariff(unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
Checks if customer profile on specified index can use specified tariff.
static bool GetNameAndSurname(std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled)
DEPRECATED(static bool GetValidCustomerProfileIndex(unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff))
static EIssueLogicDefines::ReturnValues CheckCardNetworkWithTariffNetwork(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork)
check if the network on card is the same for selling tariff
static EIssueLogicDefines::ReturnValues GetTariffFromCard(CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff)
GetTariffFromCard - Get tariff from card by ticketIndex.
static EIssueLogicDefines::ReturnValues GetOneWayTicketPriceListRowFromCard(unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow)
GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket.
DEPRECATED(static bool GetCustomerProfileName(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile))
ReturnValues
Definition ETicketIssueLogicDefines.h:50
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7