Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
SvDebitLogRecordAdapter.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 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
23namespace keyple {
24namespace card {
25namespace calypso {
26
27using namespace calypsonet::terminal::calypso::card;
28
35class SvDebitLogRecordAdapter final : public SvDebitLogRecord {
36public:
44 SvDebitLogRecordAdapter(const std::vector<uint8_t>& cardResponse, const int offset);
45
51 const std::vector<uint8_t>& getRawData() const override;
52
58 int getAmount() const override;
59
65 int getBalance() const override;
66
72 const std::vector<uint8_t> getDebitTime() const override;
73
79 const std::vector<uint8_t> getDebitDate() const override;
80
86 uint8_t getKvc() const override;
92 const std::vector<uint8_t> getSamId() const override;
93
99 int getSvTNum() const override;
100
106 int getSamTNum() const override;
107
111 friend std::ostream& operator<<(std::ostream& os, const SvDebitLogRecordAdapter& ra);
112
116 friend std::ostream& operator<<(std::ostream& os,
117 const std::shared_ptr<SvDebitLogRecordAdapter> ra);
118
125 const std::string toJSONString() const;
126
127private:
131 const int mOffset;
132
136 const std::vector<uint8_t> mCardResponse;
137};
138
139}
140}
141}
const std::vector< uint8_t > & getRawData() const override
SvDebitLogRecordAdapter(const std::vector< uint8_t > &cardResponse, const int offset)
const std::vector< uint8_t > getDebitDate() const override
const std::vector< uint8_t > getSamId() const override
friend std::ostream & operator<<(std::ostream &os, const SvDebitLogRecordAdapter &ra)
const std::vector< uint8_t > getDebitTime() const override