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, comms::net::client_session &session)
 Register currency-related commands.
 
static void process_get_currencies (std::ostream &out, comms::net::client_session &session)
 Process a get currencies request.
 
static void process_add_currency (std::ostream &out, comms::net::client_session &session, std::string iso_code, std::string name, std::string numeric_code, std::string symbol, std::string fractions_per_unit)
 Process an add currency request.
 

Detailed Description

Manages commands related to CURRENCIES.

Member Function Documentation

◆ register_commands()

void register_commands ( cli::Menu &  root_menu,
comms::net::client_session session 
)
static

Register currency-related commands.

Creates the currencies submenu and adds currency operations.

◆ process_get_currencies()

void process_get_currencies ( std::ostream &  out,
comms::net::client_session session 
)
static

Process a get currencies request.

Retrieves all currencies from the server and displays them.

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

◆ process_add_currency()

void process_add_currency ( std::ostream &  out,
comms::net::client_session session,
std::string  iso_code,
std::string  name,
std::string  numeric_code,
std::string  symbol,
std::string  fractions_per_unit 
)
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)
Here is the caller graph for this function: