conversions2
This commit is contained in:
@@ -15,7 +15,8 @@ enum ExchangeRateDateRule {
|
|||||||
|
|
||||||
enum ExchangeRateSource {
|
enum ExchangeRateSource {
|
||||||
EXCHANGE_RATE_SOURCE_UNSPECIFIED = 0;
|
EXCHANGE_RATE_SOURCE_UNSPECIFIED = 0;
|
||||||
EXCHANGE_RATE_SOURCE_ECB = 1;
|
// The rate source's own published reference rate (ECB's, today).
|
||||||
|
EXCHANGE_RATE_SOURCE_OFFICIAL = 1;
|
||||||
// A reusable rate from the profile's custom_exchange_rates table.
|
// A reusable rate from the profile's custom_exchange_rates table.
|
||||||
EXCHANGE_RATE_SOURCE_SAVED_CUSTOM = 2;
|
EXCHANGE_RATE_SOURCE_SAVED_CUSTOM = 2;
|
||||||
// A one-off rate recorded only in this posting's immutable evidence.
|
// A one-off rate recorded only in this posting's immutable evidence.
|
||||||
@@ -29,8 +30,9 @@ message ExchangeRateSelection {
|
|||||||
ExchangeRateSource source = 2;
|
ExchangeRateSource source = 2;
|
||||||
// Required for SPECIFIC_PUBLICATION_DATE and MANUAL; YYYY-MM-DD.
|
// Required for SPECIFIC_PUBLICATION_DATE and MANUAL; YYYY-MM-DD.
|
||||||
optional string specific_rate_date = 3;
|
optional string specific_rate_date = 3;
|
||||||
// Required only for MANUAL. Exact foreign-currency units per EUR.
|
// Required only for MANUAL. Exact foreign-currency units per one unit of
|
||||||
optional string manual_units_per_eur = 4;
|
// the rate source's pivot currency (EUR for ECB).
|
||||||
|
optional string manual_units_per_pivot = 4;
|
||||||
// Required for SPECIFIC_PUBLICATION_DATE and MANUAL.
|
// Required for SPECIFIC_PUBLICATION_DATE and MANUAL.
|
||||||
string reason = 5;
|
string reason = 5;
|
||||||
}
|
}
|
||||||
@@ -153,7 +155,7 @@ message PreviewEcbConversionResponse {
|
|||||||
string determination_method = 5;
|
string determination_method = 5;
|
||||||
string rounding_method = 6;
|
string rounding_method = 6;
|
||||||
optional string rate_date = 7;
|
optional string rate_date = 7;
|
||||||
optional string units_per_eur = 8;
|
optional string units_per_pivot = 8;
|
||||||
optional int64 rate_observation_id = 9;
|
optional int64 rate_observation_id = 9;
|
||||||
optional string observation_hash = 10;
|
optional string observation_hash = 10;
|
||||||
optional string source_payload_hash = 11;
|
optional string source_payload_hash = 11;
|
||||||
@@ -162,8 +164,8 @@ message PreviewEcbConversionResponse {
|
|||||||
optional string source_endpoint = 14;
|
optional string source_endpoint = 14;
|
||||||
|
|
||||||
// Present only when determination_method is custom_rate. rate_date and
|
// Present only when determination_method is custom_rate. rate_date and
|
||||||
// units_per_eur then describe the hand-entered row identified here, and the
|
// units_per_pivot then describe the hand-entered row identified here, and
|
||||||
// ECB observation fields above are empty.
|
// the ECB observation fields above are empty.
|
||||||
optional int64 custom_rate_table_definition_id = 15;
|
optional int64 custom_rate_table_definition_id = 15;
|
||||||
optional int64 custom_rate_record_id = 16;
|
optional int64 custom_rate_record_id = 16;
|
||||||
optional int64 custom_rate_row_revision = 17;
|
optional int64 custom_rate_row_revision = 17;
|
||||||
@@ -223,7 +225,7 @@ message EcbConversionEvidence {
|
|||||||
string determination_method = 8;
|
string determination_method = 8;
|
||||||
string rounding_method = 9;
|
string rounding_method = 9;
|
||||||
optional string rate_date = 10;
|
optional string rate_date = 10;
|
||||||
optional string units_per_eur = 11;
|
optional string units_per_pivot = 11;
|
||||||
optional int64 rate_observation_id = 12;
|
optional int64 rate_observation_id = 12;
|
||||||
optional string observation_hash = 13;
|
optional string observation_hash = 13;
|
||||||
optional string source_payload_hash = 14;
|
optional string source_payload_hash = 14;
|
||||||
@@ -233,7 +235,7 @@ message EcbConversionEvidence {
|
|||||||
string evidence_created_at = 18;
|
string evidence_created_at = 18;
|
||||||
|
|
||||||
// Present only when determination_method is custom_rate. The hand-entered row
|
// Present only when determination_method is custom_rate. The hand-entered row
|
||||||
// that supplied rate_date and units_per_eur. The row itself stays editable, so
|
// that supplied rate_date and units_per_pivot. The row itself stays editable, so
|
||||||
// the figures above are the immutable record of what was actually applied.
|
// the figures above are the immutable record of what was actually applied.
|
||||||
optional int64 custom_rate_table_definition_id = 19;
|
optional int64 custom_rate_table_definition_id = 19;
|
||||||
optional int64 custom_rate_record_id = 20;
|
optional int64 custom_rate_record_id = 20;
|
||||||
@@ -253,6 +255,25 @@ message EcbConversionEvidence {
|
|||||||
// the original-currency-to-EUR leg's evidence_id, which produced this row's
|
// the original-currency-to-EUR leg's evidence_id, which produced this row's
|
||||||
// original_amount/original_currency (always EUR).
|
// original_amount/original_currency (always EUR).
|
||||||
optional int64 derived_from_evidence_id = 26;
|
optional int64 derived_from_evidence_id = 26;
|
||||||
|
|
||||||
|
// The pivot currency of the rate source that priced this hop (EUR for
|
||||||
|
// every hop today). A rate-based hop always has this currency on exactly
|
||||||
|
// one side of original_currency/converted_currency.
|
||||||
|
string pivot_currency = 27;
|
||||||
|
|
||||||
|
// Which rate source's policy governs this hop's profile ("ecb" for every
|
||||||
|
// hop today). Absent only for already_same_currency, where no policy
|
||||||
|
// needed to be consulted. This is about which policy applies, not about
|
||||||
|
// who actually supplied this specific rate -- see observation_source_id
|
||||||
|
// for that.
|
||||||
|
optional string policy_source_id = 28;
|
||||||
|
|
||||||
|
// Which rate source actually supplied this hop's rate as its own official
|
||||||
|
// observation. Present only when determination_method is
|
||||||
|
// official_reference_rate; absent for custom_rate, manual_rate, and
|
||||||
|
// already_same_currency, since none of those were priced by the policy's
|
||||||
|
// source itself -- a human entered them.
|
||||||
|
optional string observation_source_id = 29;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListEcbConversionEvidenceResponse {
|
message ListEcbConversionEvidenceResponse {
|
||||||
|
|||||||
Binary file not shown.
@@ -10,9 +10,10 @@ pub struct ExchangeRateSelection {
|
|||||||
/// Required for SPECIFIC_PUBLICATION_DATE and MANUAL; YYYY-MM-DD.
|
/// Required for SPECIFIC_PUBLICATION_DATE and MANUAL; YYYY-MM-DD.
|
||||||
#[prost(string, optional, tag = "3")]
|
#[prost(string, optional, tag = "3")]
|
||||||
pub specific_rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
pub specific_rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
/// Required only for MANUAL. Exact foreign-currency units per EUR.
|
/// Required only for MANUAL. Exact foreign-currency units per one unit of
|
||||||
|
/// the rate source's pivot currency (EUR for ECB).
|
||||||
#[prost(string, optional, tag = "4")]
|
#[prost(string, optional, tag = "4")]
|
||||||
pub manual_units_per_eur: ::core::option::Option<::prost::alloc::string::String>,
|
pub manual_units_per_pivot: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
/// Required for SPECIFIC_PUBLICATION_DATE and MANUAL.
|
/// Required for SPECIFIC_PUBLICATION_DATE and MANUAL.
|
||||||
#[prost(string, tag = "5")]
|
#[prost(string, tag = "5")]
|
||||||
pub reason: ::prost::alloc::string::String,
|
pub reason: ::prost::alloc::string::String,
|
||||||
@@ -142,7 +143,7 @@ pub struct PreviewEcbConversionResponse {
|
|||||||
#[prost(string, optional, tag = "7")]
|
#[prost(string, optional, tag = "7")]
|
||||||
pub rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
pub rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
#[prost(string, optional, tag = "8")]
|
#[prost(string, optional, tag = "8")]
|
||||||
pub units_per_eur: ::core::option::Option<::prost::alloc::string::String>,
|
pub units_per_pivot: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
#[prost(int64, optional, tag = "9")]
|
#[prost(int64, optional, tag = "9")]
|
||||||
pub rate_observation_id: ::core::option::Option<i64>,
|
pub rate_observation_id: ::core::option::Option<i64>,
|
||||||
#[prost(string, optional, tag = "10")]
|
#[prost(string, optional, tag = "10")]
|
||||||
@@ -156,8 +157,8 @@ pub struct PreviewEcbConversionResponse {
|
|||||||
#[prost(string, optional, tag = "14")]
|
#[prost(string, optional, tag = "14")]
|
||||||
pub source_endpoint: ::core::option::Option<::prost::alloc::string::String>,
|
pub source_endpoint: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
/// Present only when determination_method is custom_rate. rate_date and
|
/// Present only when determination_method is custom_rate. rate_date and
|
||||||
/// units_per_eur then describe the hand-entered row identified here, and the
|
/// units_per_pivot then describe the hand-entered row identified here, and
|
||||||
/// ECB observation fields above are empty.
|
/// the ECB observation fields above are empty.
|
||||||
#[prost(int64, optional, tag = "15")]
|
#[prost(int64, optional, tag = "15")]
|
||||||
pub custom_rate_table_definition_id: ::core::option::Option<i64>,
|
pub custom_rate_table_definition_id: ::core::option::Option<i64>,
|
||||||
#[prost(int64, optional, tag = "16")]
|
#[prost(int64, optional, tag = "16")]
|
||||||
@@ -234,7 +235,7 @@ pub struct EcbConversionEvidence {
|
|||||||
#[prost(string, optional, tag = "10")]
|
#[prost(string, optional, tag = "10")]
|
||||||
pub rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
pub rate_date: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
#[prost(string, optional, tag = "11")]
|
#[prost(string, optional, tag = "11")]
|
||||||
pub units_per_eur: ::core::option::Option<::prost::alloc::string::String>,
|
pub units_per_pivot: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
#[prost(int64, optional, tag = "12")]
|
#[prost(int64, optional, tag = "12")]
|
||||||
pub rate_observation_id: ::core::option::Option<i64>,
|
pub rate_observation_id: ::core::option::Option<i64>,
|
||||||
#[prost(string, optional, tag = "13")]
|
#[prost(string, optional, tag = "13")]
|
||||||
@@ -250,7 +251,7 @@ pub struct EcbConversionEvidence {
|
|||||||
#[prost(string, tag = "18")]
|
#[prost(string, tag = "18")]
|
||||||
pub evidence_created_at: ::prost::alloc::string::String,
|
pub evidence_created_at: ::prost::alloc::string::String,
|
||||||
/// Present only when determination_method is custom_rate. The hand-entered row
|
/// Present only when determination_method is custom_rate. The hand-entered row
|
||||||
/// that supplied rate_date and units_per_eur. The row itself stays editable, so
|
/// that supplied rate_date and units_per_pivot. The row itself stays editable, so
|
||||||
/// the figures above are the immutable record of what was actually applied.
|
/// the figures above are the immutable record of what was actually applied.
|
||||||
#[prost(int64, optional, tag = "19")]
|
#[prost(int64, optional, tag = "19")]
|
||||||
pub custom_rate_table_definition_id: ::core::option::Option<i64>,
|
pub custom_rate_table_definition_id: ::core::option::Option<i64>,
|
||||||
@@ -275,6 +276,25 @@ pub struct EcbConversionEvidence {
|
|||||||
/// original_amount/original_currency (always EUR).
|
/// original_amount/original_currency (always EUR).
|
||||||
#[prost(int64, optional, tag = "26")]
|
#[prost(int64, optional, tag = "26")]
|
||||||
pub derived_from_evidence_id: ::core::option::Option<i64>,
|
pub derived_from_evidence_id: ::core::option::Option<i64>,
|
||||||
|
/// The pivot currency of the rate source that priced this hop (EUR for
|
||||||
|
/// every hop today). A rate-based hop always has this currency on exactly
|
||||||
|
/// one side of original_currency/converted_currency.
|
||||||
|
#[prost(string, tag = "27")]
|
||||||
|
pub pivot_currency: ::prost::alloc::string::String,
|
||||||
|
/// Which rate source's policy governs this hop's profile ("ecb" for every
|
||||||
|
/// hop today). Absent only for already_same_currency, where no policy
|
||||||
|
/// needed to be consulted. This is about which policy applies, not about
|
||||||
|
/// who actually supplied this specific rate -- see observation_source_id
|
||||||
|
/// for that.
|
||||||
|
#[prost(string, optional, tag = "28")]
|
||||||
|
pub policy_source_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
/// Which rate source actually supplied this hop's rate as its own official
|
||||||
|
/// observation. Present only when determination_method is
|
||||||
|
/// official_reference_rate; absent for custom_rate, manual_rate, and
|
||||||
|
/// already_same_currency, since none of those were priced by the policy's
|
||||||
|
/// source itself -- a human entered them.
|
||||||
|
#[prost(string, optional, tag = "29")]
|
||||||
|
pub observation_source_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
}
|
}
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct ListEcbConversionEvidenceResponse {
|
pub struct ListEcbConversionEvidenceResponse {
|
||||||
@@ -335,7 +355,8 @@ impl ExchangeRateDateRule {
|
|||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
pub enum ExchangeRateSource {
|
pub enum ExchangeRateSource {
|
||||||
Unspecified = 0,
|
Unspecified = 0,
|
||||||
Ecb = 1,
|
/// The rate source's own published reference rate (ECB's, today).
|
||||||
|
Official = 1,
|
||||||
/// A reusable rate from the profile's custom_exchange_rates table.
|
/// A reusable rate from the profile's custom_exchange_rates table.
|
||||||
SavedCustom = 2,
|
SavedCustom = 2,
|
||||||
/// A one-off rate recorded only in this posting's immutable evidence.
|
/// A one-off rate recorded only in this posting's immutable evidence.
|
||||||
@@ -349,7 +370,7 @@ impl ExchangeRateSource {
|
|||||||
pub fn as_str_name(&self) -> &'static str {
|
pub fn as_str_name(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Self::Unspecified => "EXCHANGE_RATE_SOURCE_UNSPECIFIED",
|
Self::Unspecified => "EXCHANGE_RATE_SOURCE_UNSPECIFIED",
|
||||||
Self::Ecb => "EXCHANGE_RATE_SOURCE_ECB",
|
Self::Official => "EXCHANGE_RATE_SOURCE_OFFICIAL",
|
||||||
Self::SavedCustom => "EXCHANGE_RATE_SOURCE_SAVED_CUSTOM",
|
Self::SavedCustom => "EXCHANGE_RATE_SOURCE_SAVED_CUSTOM",
|
||||||
Self::Manual => "EXCHANGE_RATE_SOURCE_MANUAL",
|
Self::Manual => "EXCHANGE_RATE_SOURCE_MANUAL",
|
||||||
}
|
}
|
||||||
@@ -358,7 +379,7 @@ impl ExchangeRateSource {
|
|||||||
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||||
match value {
|
match value {
|
||||||
"EXCHANGE_RATE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
|
"EXCHANGE_RATE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
|
||||||
"EXCHANGE_RATE_SOURCE_ECB" => Some(Self::Ecb),
|
"EXCHANGE_RATE_SOURCE_OFFICIAL" => Some(Self::Official),
|
||||||
"EXCHANGE_RATE_SOURCE_SAVED_CUSTOM" => Some(Self::SavedCustom),
|
"EXCHANGE_RATE_SOURCE_SAVED_CUSTOM" => Some(Self::SavedCustom),
|
||||||
"EXCHANGE_RATE_SOURCE_MANUAL" => Some(Self::Manual),
|
"EXCHANGE_RATE_SOURCE_MANUAL" => Some(Self::Manual),
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|||||||
2
server
2
server
Submodule server updated: 0fc100a434...81f0410185
Reference in New Issue
Block a user