Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
SvDebitLogRecordAdapter.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2023 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional information regarding *
5 * copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the terms of the Eclipse *
8 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9 * *
10 * SPDX-License-Identifier: EPL-2.0 *
11 **************************************************************************************************/
12
13#pragma once
14
15#include <cstdint>
16#include <memory>
17#include <ostream>
18#include <vector>
19
20/* Calypsonet Terminal Calypso */
21#include "SvDebitLogRecord.h"
22
23/* Keyple Card Calypso */
25
26namespace keyple {
27namespace card {
28namespace calypso {
29
30using namespace calypsonet::terminal::calypso::card;
31
38class KEYPLECARDCALYPSO_API SvDebitLogRecordAdapter final : public SvDebitLogRecord {
39public:
47 SvDebitLogRecordAdapter(const std::vector<uint8_t>& cardResponse, const int offset);
48
54 const std::vector<uint8_t>& getRawData() const override;
55
61 int getAmount() const override;
62
68 int getBalance() const override;
69
75 const std::vector<uint8_t> getDebitTime() const override;
76
82 const std::vector<uint8_t> getDebitDate() const override;
83
89 uint8_t getKvc() const override;
95 const std::vector<uint8_t> getSamId() const override;
96
102 int getSvTNum() const override;
103
109 int getSamTNum() const override;
110
114 friend KEYPLECARDCALYPSO_API std::ostream& operator<<(std::ostream& os,
115 const SvDebitLogRecordAdapter& ra);
116
120 friend KEYPLECARDCALYPSO_API std::ostream& operator<<(
121 std::ostream& os,
122 const std::shared_ptr<SvDebitLogRecordAdapter> ra);
123
130 const std::string toJSONString() const;
131
132private:
136 const int mOffset;
137
141 const std::vector<uint8_t> mCardResponse;
142};
143
144}
145}
146}
#define KEYPLECARDCALYPSO_API
std::ostream & operator<<(std::ostream &os, const std::shared_ptr< ApduRequestAdapter > ara)