+source currency pick fix +fx side propagation

This commit is contained in:
Stephan D
2026-02-26 02:39:48 +01:00
parent 008427483c
commit 70b1c2a9cc
73 changed files with 2123 additions and 656 deletions

View File

@@ -12,20 +12,13 @@ type PaymentQuoteRecord struct {
storable.Base `bson:",inline" json:",inline"`
model.OrganizationBoundBase `bson:",inline" json:",inline"`
QuoteRef string `bson:"quoteRef" json:"quoteRef"`
IdempotencyKey string `bson:"idempotencyKey" json:"idempotencyKey"`
Intent PaymentIntent `bson:"intent,omitempty" json:"intent,omitempty"`
Intents []PaymentIntent `bson:"intents,omitempty" json:"intents,omitempty"`
Quote *PaymentQuoteSnapshot `bson:"quote,omitempty" json:"quote,omitempty"`
Quotes []*PaymentQuoteSnapshot `bson:"quotes,omitempty" json:"quotes,omitempty"`
StatusV2 *QuoteStatusV2 `bson:"statusV2,omitempty" json:"statusV2,omitempty"`
StatusesV2 []*QuoteStatusV2 `bson:"statusesV2,omitempty" json:"statusesV2,omitempty"`
Plan *PaymentPlan `bson:"plan,omitempty" json:"plan,omitempty"`
Plans []*PaymentPlan `bson:"plans,omitempty" json:"plans,omitempty"`
ExecutionNote string `bson:"executionNote,omitempty" json:"executionNote,omitempty"`
ExpiresAt time.Time `bson:"expiresAt" json:"expiresAt"`
PurgeAt time.Time `bson:"purgeAt,omitempty" json:"purgeAt,omitempty"`
Hash string `bson:"hash" json:"hash"`
QuoteRef string `bson:"quoteRef" json:"quoteRef"`
IdempotencyKey string `bson:"idempotencyKey" json:"idempotencyKey"`
RequestShape QuoteRequestShape `bson:"requestShape,omitempty" json:"requestShape,omitempty"`
Items []*PaymentQuoteItemV2 `bson:"items,omitempty" json:"items,omitempty"`
ExpiresAt time.Time `bson:"expiresAt" json:"expiresAt"`
PurgeAt time.Time `bson:"purgeAt,omitempty" json:"purgeAt,omitempty"`
Hash string `bson:"hash" json:"hash"`
}
// Collection implements storable.Storable.

View File

@@ -1,5 +1,14 @@
package model
// QuoteRequestShape identifies the API surface that created the quote record.
type QuoteRequestShape string
const (
QuoteRequestShapeUnspecified QuoteRequestShape = "unspecified"
QuoteRequestShapeSingle QuoteRequestShape = "single"
QuoteRequestShapeBatch QuoteRequestShape = "batch"
)
// QuoteState captures v2 quote state metadata for persistence.
type QuoteState string
@@ -30,3 +39,10 @@ type QuoteStatusV2 struct {
State QuoteState `bson:"state,omitempty" json:"state,omitempty"`
BlockReason QuoteBlockReason `bson:"blockReason,omitempty" json:"blockReason,omitempty"`
}
// PaymentQuoteItemV2 keeps one intent/quote/status tuple in a stable shape.
type PaymentQuoteItemV2 struct {
Intent *PaymentIntent `bson:"intent,omitempty" json:"intent,omitempty"`
Quote *PaymentQuoteSnapshot `bson:"quote,omitempty" json:"quote,omitempty"`
Status *QuoteStatusV2 `bson:"status,omitempty" json:"status,omitempty"`
}