Fixes + stable gateway ids
This commit is contained in:
@@ -7,21 +7,17 @@ option go_package = "github.com/tech/sendico/pkg/proto/payments/quotation/v2;quo
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "api/proto/common/storable/v1/storable.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/payment/v1/asset.proto";
|
||||
import "api/proto/billing/fees/v1/fees.proto";
|
||||
import "api/proto/oracle/v1/oracle.proto";
|
||||
|
||||
enum QuoteKind {
|
||||
QUOTE_KIND_UNSPECIFIED = 0;
|
||||
enum QuoteState {
|
||||
QUOTE_STATE_UNSPECIFIED = 0;
|
||||
|
||||
QUOTE_KIND_EXECUTABLE = 1; // can be executed now (subject to execution-time checks)
|
||||
QUOTE_KIND_INDICATIVE = 2; // informational only
|
||||
}
|
||||
|
||||
enum QuoteLifecycle {
|
||||
QUOTE_LIFECYCLE_UNSPECIFIED = 0;
|
||||
|
||||
QUOTE_LIFECYCLE_ACTIVE = 1;
|
||||
QUOTE_LIFECYCLE_EXPIRED = 2;
|
||||
QUOTE_STATE_INDICATIVE = 1;
|
||||
QUOTE_STATE_EXECUTABLE = 2;
|
||||
QUOTE_STATE_BLOCKED = 3;
|
||||
QUOTE_STATE_EXPIRED = 4;
|
||||
}
|
||||
|
||||
enum QuoteBlockReason {
|
||||
@@ -59,18 +55,25 @@ message RouteHop {
|
||||
RouteHopRole role = 6;
|
||||
}
|
||||
|
||||
message RouteSettlement {
|
||||
common.payment.v1.ChainAsset asset = 1;
|
||||
string model = 2;
|
||||
}
|
||||
|
||||
// Abstract execution route selected during quotation.
|
||||
// This is not an execution plan and must not contain operational steps.
|
||||
message RouteSpecification {
|
||||
// Optional summary fields. Topology is represented by hops + route_ref.
|
||||
string rail = 1;
|
||||
string provider = 2;
|
||||
string payout_method = 3;
|
||||
string settlement_asset = 4;
|
||||
string settlement_model = 5;
|
||||
reserved 4, 5;
|
||||
reserved "settlement_asset", "settlement_model";
|
||||
string network = 6;
|
||||
string route_ref = 7;
|
||||
string pricing_profile_ref = 8;
|
||||
repeated RouteHop hops = 9;
|
||||
RouteSettlement settlement = 10;
|
||||
}
|
||||
|
||||
// Execution assumptions and constraints evaluated at quotation time.
|
||||
@@ -87,17 +90,10 @@ message ExecutionConditions {
|
||||
|
||||
message PaymentQuote {
|
||||
common.storable.v1.Storable storable = 1;
|
||||
QuoteKind kind = 2;
|
||||
QuoteLifecycle lifecycle = 3;
|
||||
|
||||
// Execution-status rules:
|
||||
// 1) kind=QUOTE_KIND_INDICATIVE => execution_status must be unset.
|
||||
// 2) lifecycle=QUOTE_LIFECYCLE_EXPIRED => execution_status must be unset.
|
||||
// 3) kind=QUOTE_KIND_EXECUTABLE and lifecycle=QUOTE_LIFECYCLE_ACTIVE => execution_status must be set.
|
||||
oneof execution_status {
|
||||
bool executable = 13; // must be true when set
|
||||
QuoteBlockReason block_reason = 4;
|
||||
}
|
||||
QuoteState state = 2;
|
||||
QuoteBlockReason block_reason = 4;
|
||||
reserved 3, 13;
|
||||
reserved "kind", "lifecycle", "executable";
|
||||
|
||||
common.money.v1.Money debit_amount = 5;
|
||||
common.money.v1.Money credit_amount = 6;
|
||||
|
||||
Reference in New Issue
Block a user