ORE Studio 0.0.4
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
currencies_commands Class Reference

Manages commands related to CURRENCIES. More...

#include <currencies_commands.hpp>

Collaboration diagram for currencies_commands:
Collaboration graph

Static Public Member Functions

static void register_commands (cli::Menu &root_menu, ores::nats::service::nats_client &session, pagination_context &pagination)
 Register currency-related commands.
 
static void process_get_currencies (std::ostream &out, ores::nats::service::nats_client &session, pagination_context &pagination)
 Process a get currencies request.
 
static void process_add_currency (std::ostream &out, ores::nats::service::nats_client &session, std::string iso_code, std::string name, std::string numeric_code, std::string symbol, std::string fractions_per_unit, std::string change_reason_code, std::string change_commentary)
 Process an add currency request.
 
static void process_delete_currency (std::ostream &out, ores::nats::service::nats_client &session, std::string iso_code)
 Process a delete currency request.
 
static void process_get_currency_history (std::ostream &out, ores::nats::service::nats_client &session, std::string iso_code)
 Process a get currency history request.
 

Detailed Description

Manages commands related to CURRENCIES.

Member Function Documentation

◆ register_commands()

void register_commands ( cli::Menu &  root_menu,
ores::nats::service::nats_client session,
pagination_context pagination 
)
static

Register currency-related commands.

Creates the currencies submenu and adds currency operations.

◆ process_get_currencies()

void process_get_currencies ( std::ostream &  out,
ores::nats::service::nats_client session,
pagination_context pagination 
)
static

Process a get currencies request.

Retrieves currencies from the server with pagination and displays them.

Parameters
outOutput stream for results
sessionClient session for connectivity.
paginationPagination context for state management.
Here is the caller graph for this function:

◆ process_add_currency()

void process_add_currency ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  iso_code,
std::string  name,
std::string  numeric_code,
std::string  symbol,
std::string  fractions_per_unit,
std::string  change_reason_code,
std::string  change_commentary 
)
static

Process an add currency request.

Creates a new currency with the provided details. The modified_by field is automatically set from the logged-in user's session.

Parameters
outOutput stream for results
sessionClient session for connectivity.
iso_codeISO 4217 alphabetic code (e.g., "USD")
nameFull name of the currency
numeric_codeISO 4217 numeric code (optional)
symbolCurrency symbol (optional)
fractions_per_unitNumber of fractional units (default: 100)
change_reason_codeCode identifying the reason for the change
change_commentaryFree-text commentary explaining the change
Here is the caller graph for this function:

◆ process_delete_currency()

void process_delete_currency ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  iso_code 
)
static

Process a delete currency request.

Deletes a currency by its ISO code. Requires authentication.

Parameters
outOutput stream for results
sessionClient session for connectivity.
iso_codeISO 4217 code of the currency to delete
Here is the caller graph for this function:

◆ process_get_currency_history()

void process_get_currency_history ( std::ostream &  out,
ores::nats::service::nats_client session,
std::string  iso_code 
)
static

Process a get currency history request.

Retrieves the version history for a currency by its ISO code.

Parameters
outOutput stream for results
sessionClient session for connectivity.
iso_codeISO 4217 code of the currency
Here is the caller graph for this function: