Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | List of all members
keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild Class Referencefinal

#include <SvUndebitCmdBuild.h>

Inherits keyple::calypso::command::po::AbstractPoCommandBuilder< SvUndebitRespPars >.

Public Member Functions

 SvUndebitCmdBuild (const PoClass &poClass, const PoRevision &poRevision, const int amount, const uint8_t kvc, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time)
 
void finalizeBuilder (const std::vector< uint8_t > &undebitComplementaryData)
 
const std::vector< uint8_t > getSvUndebitData () const
 
std::shared_ptr< SvUndebitRespParscreateResponseParser (std::shared_ptr< ApduResponse > apduResponse) override
 
bool isSessionBufferUsed () const override
 
- Public Member Functions inherited from keyple::calypso::command::po::AbstractPoCommandBuilder< SvUndebitRespPars >
 AbstractPoCommandBuilder (std::shared_ptr< CalypsoPoCommand > commandRef, std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractPoCommandBuilder ()=default
 
virtual const std::shared_ptr< SeCommandgetCommandRef () const override
 
virtual bool isSessionBufferUsed () const=0
 
- Public Member Functions inherited from keyple::core::command::AbstractIso7816CommandBuilder
 AbstractIso7816CommandBuilder (const std::shared_ptr< SeCommand > commandReference, const std::shared_ptr< ApduRequest > request)
 
 AbstractIso7816CommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractIso7816CommandBuilder ()=default
 
- Public Member Functions inherited from keyple::core::command::AbstractApduCommandBuilder
 AbstractApduCommandBuilder (const std::shared_ptr< SeCommand > commandRef, const std::shared_ptr< ApduRequest > request)
 
 AbstractApduCommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request)
 
virtual ~AbstractApduCommandBuilder ()=default
 
virtual void addSubName (const std::string &subName)
 
virtual const std::shared_ptr< SeCommandgetCommandRef () const
 
virtual const std::string & getName () const
 
virtual const std::shared_ptr< ApduRequestgetApduRequest () const
 

Additional Inherited Members

- Protected Member Functions inherited from keyple::core::command::AbstractIso7816CommandBuilder
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn)
 
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const uint8_t le)
 
virtual std::shared_ptr< ApduRequestsetApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn, const uint8_t le)
 
- Protected Attributes inherited from keyple::calypso::command::po::AbstractPoCommandBuilder< SvUndebitRespPars >
const std::shared_ptr< LoggermLogger
 
- Protected Attributes inherited from keyple::core::command::AbstractApduCommandBuilder
const std::shared_ptr< SeCommandmCommandRef
 
std::shared_ptr< ApduRequestmRequest
 

Detailed Description

The Class SvUndebitCmdBuild. This class provides the dedicated constructor to build the SV Undebit command. Note: keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild and keyple::calypso::command::po::builder::storedvalue::SvDebitCmdBuild shares the same parser keyple::calypso::command::po::parser::storedvalue::SvDebitRespPars

Constructor & Destructor Documentation

◆ SvUndebitCmdBuild()

keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild::SvUndebitCmdBuild ( const PoClass poClass,
const PoRevision poRevision,
const int  amount,
const uint8_t  kvc,
const std::vector< uint8_t > &  date,
const std::vector< uint8_t > &  time 
)

Instantiates a new SvUndebitCmdBuild.

Parameters
poClassindicates which CLA byte should be used for the Apdu
poRevisionthe PO revision
amountamount to undebit (positive integer from 0 to 32767)
kvcthe KVC
datedebit date (not checked by the PO)
timedebit time (not checked by the PO)
Exceptions
IllegalArgumentException- if the command is inconsistent
See also
Calypso Layer ID 8.02 (200108)
Ticketing Layer Recommendations 170 (200108)

Member Function Documentation

◆ createResponseParser()

std::shared_ptr< SvUndebitRespPars > keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild::createResponseParser ( std::shared_ptr< ApduResponse apduResponse)
overridevirtual

Create the response parser.

A check is made to see if the object has been finalized. If not, an exception keyple::common::exception::IllegalStateException is thrown.

Parameters
apduResponsethe response data from the SE
Returns
a keyple::calypso::command::po::parser::storedvalue::SvUndebitRespPars object

Implements keyple::calypso::command::po::AbstractPoCommandBuilder< SvUndebitRespPars >.

◆ finalizeBuilder()

void keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild::finalizeBuilder ( const std::vector< uint8_t > &  undebitComplementaryData)

Complete the construction of the APDU to be sent to the PO with the elements received from the SAM:

4-byte SAM id

3-byte challenge

3-byte transaction number

5 or 10 byte signature (hi part)

Parameters
undebitComplementaryDatathe data out from the SvPrepareDebit SAM command

◆ getSvUndebitData()

const std::vector< uint8_t > keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild::getSvUndebitData ( ) const

Gets the SV Undebit part of the data to include in the SAM SV Prepare Debit command

Returns
a byte array containing the SV undebit data

◆ isSessionBufferUsed()

bool keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild::isSessionBufferUsed ( ) const
override

The documentation for this class was generated from the following files: