+source currency pick fix +fx side propagation
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user