Skip to main content

currency.proto

path protobuffet/example/currency/v1/currency.proto

package protobuffet.example.currency.v1


Messages​

CurrencyConversionRequest​

Request for converting a given amount to a different currency.

NameTypeDescription
fromprotobuffet.example.common.types.v1.MoneyMoney that should be converted.
to_codestringThe 3-letter currency code defined in ISO 4217.

Empty​

Represents successful response with no data required.

NameTypeDescription

GetSupportedCurrenciesResponse​

Response containing supported currencies.

NameTypeDescription
currency_codesrepeated stringThe 3-letter currency code defined in ISO 4217.

Services​

CurrencyService​

Currency management service. Keep currency calculations encapsulated within this service to avoid this complexity leaking to other domains.

GetSupportedCurrencies​

MethodGetSupportedCurrencies
RequestEmpty
ResponseGetSupportedCurrenciesResponse
DescriptionFetch all supported currencies.

Convert​

MethodConvert
RequestCurrencyConversionRequest
ResponseMoney
DescriptionConvert an amount to a different currency.