add more payment related shit
This commit is contained in:
@@ -824,7 +824,7 @@ func (s *PoolServer) AdyenHookHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error capturing payment: %v", err)
|
log.Printf("Error capturing payment: %v", err)
|
||||||
} else {
|
} else {
|
||||||
log.Printf("Payment captured successfully: %v", res)
|
log.Printf("Payment captured successfully: %+v", res)
|
||||||
s.Apply(r.Context(), uint64(cartId), &messages.OrderCreated{
|
s.Apply(r.Context(), uint64(cartId), &messages.OrderCreated{
|
||||||
OrderId: res.PaymentPspReference,
|
OrderId: res.PaymentPspReference,
|
||||||
Status: item.EventCode,
|
Status: item.EventCode,
|
||||||
@@ -880,14 +880,14 @@ func (s *PoolServer) AdyenReturnHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
Payload: common.PtrString(r.URL.Query().Get("payload")),
|
Payload: common.PtrString(r.URL.Query().Get("payload")),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
log.Printf("Request for %s API:\n%+v\n", "PaymentDetails", dreq)
|
|
||||||
dres, httpRes, err := service.PaymentsApi.PaymentsDetails(r.Context(), dreq)
|
dres, httpRes, err := service.PaymentsApi.PaymentsDetails(r.Context(), dreq)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("Response for %s API::\n%+v\n", "PaymentDetails", res)
|
log.Printf("Payment details response: %+v", dres)
|
||||||
|
|
||||||
if !common.IsNil(dres.PspReference) && *dres.PspReference != "" {
|
if !common.IsNil(dres.PspReference) && *dres.PspReference != "" {
|
||||||
var redirectURL string
|
var redirectURL string
|
||||||
|
|||||||
@@ -84,6 +84,50 @@ type Notice struct {
|
|||||||
Code *string `json:"code,omitempty"`
|
Code *string `json:"code,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PaymentStatus string
|
||||||
|
type CartPaymentStatus PaymentStatus
|
||||||
|
|
||||||
|
const (
|
||||||
|
PaymentStatusPending PaymentStatus = "pending"
|
||||||
|
PaymentStatusFailed PaymentStatus = "failed"
|
||||||
|
PaymentStatusSuccess PaymentStatus = "success"
|
||||||
|
CartPaymentStatusPending CartPaymentStatus = "pending"
|
||||||
|
CartPaymentStatusFailed CartPaymentStatus = "failed"
|
||||||
|
CartPaymentStatusSuccess CartPaymentStatus = "success"
|
||||||
|
CartPaymentStatusCancelled CartPaymentStatus = "partial"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CartPayment struct {
|
||||||
|
PaymentId string `json:"paymentId"`
|
||||||
|
Status PaymentStatus `json:"status"`
|
||||||
|
Amount int64 `json:"amount"`
|
||||||
|
Currency string `json:"currency"`
|
||||||
|
Provider string `json:"provider,omitempty"`
|
||||||
|
Method *string `json:"method,omitempty"`
|
||||||
|
Events []*PaymentEvent `json:"events,omitempty"`
|
||||||
|
ProcessorReference *string `json:"processorReference,omitempty"`
|
||||||
|
StartedAt *time.Time `json:"startedAt,omitempty"`
|
||||||
|
CompletedAt *time.Time `json:"completedAt,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PaymentEvent struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Data json.RawMessage `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *CartPayment) IsSettled() bool {
|
||||||
|
if p == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
switch p.Status {
|
||||||
|
case PaymentStatusSuccess:
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type Marking struct {
|
type Marking struct {
|
||||||
Type uint32 `json:"type"`
|
Type uint32 `json:"type"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
@@ -119,15 +163,17 @@ type CartGrain struct {
|
|||||||
Processing bool `json:"processing"`
|
Processing bool `json:"processing"`
|
||||||
PaymentInProgress bool `json:"paymentInProgress"`
|
PaymentInProgress bool `json:"paymentInProgress"`
|
||||||
OrderReference string `json:"orderReference,omitempty"`
|
OrderReference string `json:"orderReference,omitempty"`
|
||||||
PaymentStatus string `json:"paymentStatus,omitempty"`
|
PaymentStatus PaymentStatus `json:"paymentStatus,omitempty"`
|
||||||
|
PaidInFull bool `json:"paidInFull"`
|
||||||
Vouchers []*Voucher `json:"vouchers,omitempty"`
|
Vouchers []*Voucher `json:"vouchers,omitempty"`
|
||||||
Notifications []CartNotification `json:"cartNotification,omitempty"`
|
Notifications []CartNotification `json:"cartNotification,omitempty"`
|
||||||
SubscriptionDetails map[string]*SubscriptionDetails `json:"subscriptionDetails,omitempty"`
|
SubscriptionDetails map[string]*SubscriptionDetails `json:"subscriptionDetails,omitempty"`
|
||||||
PaymentDeclinedNotices []Notice `json:"paymentDeclinedNotices,omitempty"`
|
PaymentDeclinedNotices []Notice `json:"paymentDeclinedNotices,omitempty"`
|
||||||
|
Payments []*CartPayment `json:"payments,omitempty"`
|
||||||
Confirmation *ConfirmationStatus `json:"confirmation,omitempty"`
|
Confirmation *ConfirmationStatus `json:"confirmation,omitempty"`
|
||||||
CheckoutOrderId string `json:"checkoutOrderId,omitempty"`
|
//CheckoutOrderId string `json:"checkoutOrderId,omitempty"`
|
||||||
CheckoutStatus string `json:"checkoutStatus,omitempty"`
|
CheckoutStatus CartPaymentStatus `json:"checkoutStatus,omitempty"`
|
||||||
CheckoutCountry string `json:"checkoutCountry,omitempty"`
|
//CheckoutCountry string `json:"checkoutCountry,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ConfirmationStatus struct {
|
type ConfirmationStatus struct {
|
||||||
@@ -208,6 +254,7 @@ func NewCartGrain(id uint64, ts time.Time) *CartGrain {
|
|||||||
Id: CartId(id),
|
Id: CartId(id),
|
||||||
Items: []*CartItem{},
|
Items: []*CartItem{},
|
||||||
TotalPrice: NewPrice(),
|
TotalPrice: NewPrice(),
|
||||||
|
Payments: []*CartPayment{},
|
||||||
SubscriptionDetails: make(map[string]*SubscriptionDetails),
|
SubscriptionDetails: make(map[string]*SubscriptionDetails),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,6 +331,53 @@ func (c *CartGrain) FindItemWithSku(sku string) (*CartItem, bool) {
|
|||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *CartGrain) FindPayment(paymentId string) (*CartPayment, bool) {
|
||||||
|
if paymentId == "" {
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
|
for _, payment := range c.Payments {
|
||||||
|
if payment != nil && payment.PaymentId == paymentId {
|
||||||
|
return payment, true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil, false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CartGrain) SettledPayments() []*CartPayment {
|
||||||
|
if len(c.Payments) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
settled := make([]*CartPayment, 0, len(c.Payments))
|
||||||
|
for _, payment := range c.Payments {
|
||||||
|
if payment != nil && payment.IsSettled() {
|
||||||
|
settled = append(settled, payment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(settled) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return settled
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CartGrain) OpenPayments() []*CartPayment {
|
||||||
|
if len(c.Payments) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
pending := make([]*CartPayment, 0, len(c.Payments))
|
||||||
|
for _, payment := range c.Payments {
|
||||||
|
if payment == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !payment.IsSettled() {
|
||||||
|
pending = append(pending, payment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(pending) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return pending
|
||||||
|
}
|
||||||
|
|
||||||
// func (c *CartGrain) Apply(content proto.Message, isReplay bool) (*CartGrain, error) {
|
// func (c *CartGrain) Apply(content proto.Message, isReplay bool) (*CartGrain, error) {
|
||||||
|
|
||||||
// updated, err := ApplyRegistered(c, content)
|
// updated, err := ApplyRegistered(c, content)
|
||||||
@@ -348,4 +442,5 @@ func (c *CartGrain) UpdateTotals() {
|
|||||||
c.TotalPrice.Subtract(*value)
|
c.TotalPrice.Subtract(*value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,9 +115,18 @@ func NewCartMultationRegistry(context *CartMutationContext) actor.MutationRegist
|
|||||||
actor.NewMutation(SubscriptionAdded, func() *messages.SubscriptionAdded {
|
actor.NewMutation(SubscriptionAdded, func() *messages.SubscriptionAdded {
|
||||||
return &messages.SubscriptionAdded{}
|
return &messages.SubscriptionAdded{}
|
||||||
}),
|
}),
|
||||||
|
actor.NewMutation(PaymentStarted, func() *messages.PaymentStarted {
|
||||||
|
return &messages.PaymentStarted{}
|
||||||
|
}),
|
||||||
|
actor.NewMutation(PaymentCompleted, func() *messages.PaymentCompleted {
|
||||||
|
return &messages.PaymentCompleted{}
|
||||||
|
}),
|
||||||
actor.NewMutation(PaymentDeclined, func() *messages.PaymentDeclined {
|
actor.NewMutation(PaymentDeclined, func() *messages.PaymentDeclined {
|
||||||
return &messages.PaymentDeclined{}
|
return &messages.PaymentDeclined{}
|
||||||
}),
|
}),
|
||||||
|
actor.NewMutation(PaymentEventHandler, func() *messages.PaymentEvent {
|
||||||
|
return &messages.PaymentEvent{}
|
||||||
|
}),
|
||||||
actor.NewMutation(ConfirmationViewed, func() *messages.ConfirmationViewed {
|
actor.NewMutation(ConfirmationViewed, func() *messages.ConfirmationViewed {
|
||||||
return &messages.ConfirmationViewed{}
|
return &messages.ConfirmationViewed{}
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
||||||
"github.com/google/uuid"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateCheckoutOrder(grain *CartGrain, req *messages.CreateCheckoutOrder) error {
|
func CreateCheckoutOrder(grain *CartGrain, req *messages.CreateCheckoutOrder) error {
|
||||||
@@ -15,8 +14,8 @@ func CreateCheckoutOrder(grain *CartGrain, req *messages.CreateCheckoutOrder) er
|
|||||||
return errors.New("terms must be accepted")
|
return errors.New("terms must be accepted")
|
||||||
}
|
}
|
||||||
// Validate other fields as needed
|
// Validate other fields as needed
|
||||||
grain.CheckoutOrderId = uuid.New().String()
|
//grain.CheckoutOrderId = uuid.New().String()
|
||||||
grain.CheckoutStatus = "pending"
|
grain.CheckoutStatus = "pending"
|
||||||
grain.CheckoutCountry = req.Country
|
//grain.CheckoutCountry = req.Country
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ func (c *CartMutationContext) InitializeCheckout(g *CartGrain, m *messages.Initi
|
|||||||
}
|
}
|
||||||
|
|
||||||
g.OrderReference = m.OrderId
|
g.OrderReference = m.OrderId
|
||||||
g.PaymentStatus = m.Status
|
//g.PaymentStatus = m.Status
|
||||||
g.PaymentInProgress = m.PaymentInProgress
|
g.PaymentInProgress = m.PaymentInProgress
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func OrderCreated(g *CartGrain, m *messages.OrderCreated) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g.OrderReference = m.OrderId
|
g.OrderReference = m.OrderId
|
||||||
g.PaymentStatus = m.Status
|
//g.PaymentStatus = m.Status
|
||||||
g.PaymentInProgress = false
|
//g.PaymentInProgress = false
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
32
pkg/cart/mutation_payment_completed.go
Normal file
32
pkg/cart/mutation_payment_completed.go
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package cart
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PaymentStarted registers the beginning of a payment attempt for a cart.
|
||||||
|
// It either upserts the payment entry (based on paymentId) or creates a new one,
|
||||||
|
// marks the cart as having an in-progress payment, and recalculates the PaidInFull flag.
|
||||||
|
func PaymentCompleted(grain *CartGrain, msg *messages.PaymentCompleted) error {
|
||||||
|
if msg == nil {
|
||||||
|
return fmt.Errorf("PaymentStarted: nil payload")
|
||||||
|
}
|
||||||
|
paymentId := msg.PaymentId
|
||||||
|
payment, found := grain.FindPayment(paymentId)
|
||||||
|
if !found {
|
||||||
|
return fmt.Errorf("PaymentStarted: payment not found")
|
||||||
|
}
|
||||||
|
|
||||||
|
payment.ProcessorReference = msg.ProcessorReference
|
||||||
|
payment.Status = PaymentStatusSuccess
|
||||||
|
payment.Amount = msg.Amount
|
||||||
|
payment.Currency = msg.Currency
|
||||||
|
payment.CompletedAt = asPointer(time.Now())
|
||||||
|
|
||||||
|
// maybe update cart status
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,21 +1,26 @@
|
|||||||
package cart
|
package cart
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func PaymentDeclined(grain *CartGrain, req *messages.PaymentDeclined) error {
|
func asPointer[T any](value T) *T {
|
||||||
grain.PaymentStatus = "declined"
|
return &value
|
||||||
grain.PaymentDeclinedNotices = append(grain.PaymentDeclinedNotices, Notice{
|
|
||||||
Timestamp: time.Now(),
|
|
||||||
Message: req.Message,
|
|
||||||
Code: req.Code,
|
|
||||||
})
|
|
||||||
// Optionally clear checkout order if in progress
|
|
||||||
if grain.CheckoutOrderId != "" {
|
|
||||||
grain.CheckoutOrderId = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ErrPaymentNotFound = errors.New("payment not found")
|
||||||
|
|
||||||
|
func PaymentDeclined(grain *CartGrain, req *messages.PaymentDeclined) error {
|
||||||
|
|
||||||
|
payment, found := grain.FindPayment(req.PaymentId)
|
||||||
|
if !found {
|
||||||
|
return ErrPaymentNotFound
|
||||||
|
}
|
||||||
|
|
||||||
|
payment.CompletedAt = asPointer(time.Now())
|
||||||
|
payment.Status = PaymentStatusFailed
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
21
pkg/cart/mutation_payment_event.go
Normal file
21
pkg/cart/mutation_payment_event.go
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package cart
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PaymentEventHandler(grain *CartGrain, req *messages.PaymentEvent) error {
|
||||||
|
|
||||||
|
payment, found := grain.FindPayment(req.PaymentId)
|
||||||
|
if !found {
|
||||||
|
return ErrPaymentNotFound
|
||||||
|
}
|
||||||
|
metaBytes := req.Data.GetValue()
|
||||||
|
payment.Events = append(payment.Events, &PaymentEvent{
|
||||||
|
Name: req.Name,
|
||||||
|
Data: json.RawMessage(metaBytes),
|
||||||
|
})
|
||||||
|
return nil
|
||||||
|
}
|
||||||
86
pkg/cart/mutation_payment_started.go
Normal file
86
pkg/cart/mutation_payment_started.go
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
package cart
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
messages "git.k6n.net/go-cart-actor/pkg/messages"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PaymentStarted registers the beginning of a payment attempt for a cart.
|
||||||
|
// It either upserts the payment entry (based on paymentId) or creates a new one,
|
||||||
|
// marks the cart as having an in-progress payment, and recalculates the PaidInFull flag.
|
||||||
|
func PaymentStarted(grain *CartGrain, msg *messages.PaymentStarted) error {
|
||||||
|
if msg == nil {
|
||||||
|
return fmt.Errorf("PaymentStarted: nil payload")
|
||||||
|
}
|
||||||
|
paymentID := strings.TrimSpace(msg.PaymentId)
|
||||||
|
if paymentID == "" {
|
||||||
|
return fmt.Errorf("PaymentStarted: missing paymentId")
|
||||||
|
}
|
||||||
|
if msg.Amount < 0 {
|
||||||
|
return fmt.Errorf("PaymentStarted: amount cannot be negative")
|
||||||
|
}
|
||||||
|
|
||||||
|
currency := strings.TrimSpace(msg.Currency)
|
||||||
|
provider := strings.TrimSpace(msg.Provider)
|
||||||
|
method := copyOptionalString(msg.Method)
|
||||||
|
|
||||||
|
startedAt := time.Now().UTC()
|
||||||
|
if msg.StartedAt != nil {
|
||||||
|
startedAt = msg.StartedAt.AsTime()
|
||||||
|
}
|
||||||
|
|
||||||
|
payment, found := grain.FindPayment(paymentID)
|
||||||
|
|
||||||
|
if found {
|
||||||
|
if payment.Status != PaymentStatusPending {
|
||||||
|
return fmt.Errorf("PaymentStarted: payment already started")
|
||||||
|
}
|
||||||
|
if payment.PaymentId != paymentID {
|
||||||
|
payment.PaymentId = paymentID
|
||||||
|
}
|
||||||
|
payment.Status = PaymentStatusPending
|
||||||
|
payment.Amount = msg.Amount
|
||||||
|
if currency != "" {
|
||||||
|
payment.Currency = currency
|
||||||
|
}
|
||||||
|
if provider != "" {
|
||||||
|
payment.Provider = provider
|
||||||
|
}
|
||||||
|
if method != nil {
|
||||||
|
payment.Method = method
|
||||||
|
}
|
||||||
|
payment.StartedAt = &startedAt
|
||||||
|
payment.CompletedAt = nil
|
||||||
|
payment.ProcessorReference = nil
|
||||||
|
} else {
|
||||||
|
grain.Payments = append(grain.Payments, &CartPayment{
|
||||||
|
PaymentId: paymentID,
|
||||||
|
Status: PaymentStatusPending,
|
||||||
|
Amount: msg.Amount,
|
||||||
|
Currency: currency,
|
||||||
|
Provider: provider,
|
||||||
|
Method: method,
|
||||||
|
StartedAt: &startedAt,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
grain.PaymentInProgress = true
|
||||||
|
grain.PaymentStatus = PaymentStatusPending
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyOptionalString(src *string) *string {
|
||||||
|
if src == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
trimmed := strings.TrimSpace(*src)
|
||||||
|
if trimmed == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
dst := trimmed
|
||||||
|
return &dst
|
||||||
|
}
|
||||||
@@ -132,9 +132,9 @@ func msgSubscriptionAdded(itemId uint32, detailsId, orderRef string) *messages.S
|
|||||||
return &messages.SubscriptionAdded{ItemId: itemId, DetailsId: detailsId, OrderReference: orderRef}
|
return &messages.SubscriptionAdded{ItemId: itemId, DetailsId: detailsId, OrderReference: orderRef}
|
||||||
}
|
}
|
||||||
|
|
||||||
func msgPaymentDeclined(message, code string) *messages.PaymentDeclined {
|
// func msgPaymentDeclined(message, code string) *messages.PaymentDeclined {
|
||||||
return &messages.PaymentDeclined{Message: message, Code: &code}
|
// return &messages.PaymentDeclined{Message: message, Code: &code}
|
||||||
}
|
// }
|
||||||
|
|
||||||
func msgConfirmationViewed() *messages.ConfirmationViewed {
|
func msgConfirmationViewed() *messages.ConfirmationViewed {
|
||||||
return &messages.ConfirmationViewed{}
|
return &messages.ConfirmationViewed{}
|
||||||
@@ -695,29 +695,29 @@ func TestSubscriptionAdded(t *testing.T) {
|
|||||||
applyErrorContains(t, reg, g, msgSubscriptionAdded(9999, "", ""), "not found")
|
applyErrorContains(t, reg, g, msgSubscriptionAdded(9999, "", ""), "not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPaymentDeclined(t *testing.T) {
|
// func TestPaymentDeclined(t *testing.T) {
|
||||||
reg := newRegistry()
|
// reg := newRegistry()
|
||||||
g := newTestGrain()
|
// g := newTestGrain()
|
||||||
|
|
||||||
g.CheckoutOrderId = "test-order"
|
// applyOK(t, reg, g, msgPaymentDeclined("Payment failed due to insufficient funds", "INSUFFICIENT_FUNDS"))
|
||||||
applyOK(t, reg, g, msgPaymentDeclined("Payment failed due to insufficient funds", "INSUFFICIENT_FUNDS"))
|
|
||||||
if g.PaymentStatus != "declined" || g.CheckoutOrderId != "" {
|
// if g.PaymentStatus != "declined" || g.CheckoutOrderId != "" {
|
||||||
t.Fatalf("payment declined not handled: status=%s checkoutId=%s", g.PaymentStatus, g.CheckoutOrderId)
|
// t.Fatalf("payment declined not handled: status=%s checkoutId=%s", g.PaymentStatus, g.CheckoutOrderId)
|
||||||
}
|
// }
|
||||||
if len(g.PaymentDeclinedNotices) != 1 {
|
// if len(g.PaymentDeclinedNotices) != 1 {
|
||||||
t.Fatalf("expected 1 notice, got %d", len(g.PaymentDeclinedNotices))
|
// t.Fatalf("expected 1 notice, got %d", len(g.PaymentDeclinedNotices))
|
||||||
}
|
// }
|
||||||
notice := g.PaymentDeclinedNotices[0]
|
// notice := g.PaymentDeclinedNotices[0]
|
||||||
if notice.Message != "Payment failed due to insufficient funds" {
|
// if notice.Message != "Payment failed due to insufficient funds" {
|
||||||
t.Fatalf("notice message not set correctly: %s", notice.Message)
|
// t.Fatalf("notice message not set correctly: %s", notice.Message)
|
||||||
}
|
// }
|
||||||
if notice.Code == nil || *notice.Code != "INSUFFICIENT_FUNDS" {
|
// if notice.Code == nil || *notice.Code != "INSUFFICIENT_FUNDS" {
|
||||||
t.Fatalf("notice code not set correctly: %v", notice.Code)
|
// t.Fatalf("notice code not set correctly: %v", notice.Code)
|
||||||
}
|
// }
|
||||||
if notice.Timestamp.IsZero() {
|
// if notice.Timestamp.IsZero() {
|
||||||
t.Fatalf("notice timestamp not set")
|
// t.Fatalf("notice timestamp not set")
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
func TestConfirmationViewed(t *testing.T) {
|
func TestConfirmationViewed(t *testing.T) {
|
||||||
reg := newRegistry()
|
reg := newRegistry()
|
||||||
@@ -755,10 +755,10 @@ func TestCreateCheckoutOrder(t *testing.T) {
|
|||||||
applyOK(t, reg, g, msgAddItem("CHECKOUT", 1000, 1, nil))
|
applyOK(t, reg, g, msgAddItem("CHECKOUT", 1000, 1, nil))
|
||||||
|
|
||||||
applyOK(t, reg, g, msgCreateCheckoutOrder("accepted", "SE"))
|
applyOK(t, reg, g, msgCreateCheckoutOrder("accepted", "SE"))
|
||||||
if g.CheckoutOrderId == "" || g.CheckoutStatus != "pending" || g.CheckoutCountry != "SE" {
|
// if g.CheckoutOrderId == "" || g.CheckoutStatus != "pending" || g.CheckoutCountry != "SE" {
|
||||||
t.Fatalf("checkout order not created: id=%s status=%s country=%s",
|
// t.Fatalf("checkout order not created: id=%s status=%s country=%s",
|
||||||
g.CheckoutOrderId, g.CheckoutStatus, g.CheckoutCountry)
|
// g.CheckoutOrderId, g.CheckoutStatus, g.CheckoutCountry)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Empty cart
|
// Empty cart
|
||||||
g2 := newTestGrain()
|
g2 := newTestGrain()
|
||||||
|
|||||||
@@ -553,7 +553,6 @@ var File_control_plane_proto protoreflect.FileDescriptor
|
|||||||
var file_control_plane_proto_rawDesc = string([]byte{
|
var file_control_plane_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e,
|
0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a,
|
||||||
0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
|
||||||
0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||||
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d,
|
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d,
|
||||||
0x70, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x09, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
0x70, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x09, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
||||||
@@ -679,7 +678,6 @@ func file_control_plane_proto_init() {
|
|||||||
if File_control_plane_proto != nil {
|
if File_control_plane_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_messages_proto_init()
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
|||||||
@@ -919,17 +919,194 @@ func (x *SubscriptionAdded) GetOrderReference() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PaymentStarted struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
PaymentId string `protobuf:"bytes,1,opt,name=paymentId,proto3" json:"paymentId,omitempty"`
|
||||||
|
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
|
||||||
|
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||||
|
Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
|
||||||
|
Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"`
|
||||||
|
Method *string `protobuf:"bytes,6,opt,name=method,proto3,oneof" json:"method,omitempty"`
|
||||||
|
StartedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=startedAt,proto3,oneof" json:"startedAt,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) Reset() {
|
||||||
|
*x = PaymentStarted{}
|
||||||
|
mi := &file_messages_proto_msgTypes[12]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PaymentStarted) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_proto_msgTypes[12]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use PaymentStarted.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PaymentStarted) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{12}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetPaymentId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PaymentId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetVersion() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Version
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetAmount() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Amount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetCurrency() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Currency
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetProvider() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Provider
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetMethod() string {
|
||||||
|
if x != nil && x.Method != nil {
|
||||||
|
return *x.Method
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentStarted) GetStartedAt() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.StartedAt
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type PaymentCompleted struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
PaymentId string `protobuf:"bytes,1,opt,name=paymentId,proto3" json:"paymentId,omitempty"`
|
||||||
|
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||||
|
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||||
|
Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
|
||||||
|
ProcessorReference *string `protobuf:"bytes,5,opt,name=processorReference,proto3,oneof" json:"processorReference,omitempty"`
|
||||||
|
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=completedAt,proto3,oneof" json:"completedAt,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) Reset() {
|
||||||
|
*x = PaymentCompleted{}
|
||||||
|
mi := &file_messages_proto_msgTypes[13]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PaymentCompleted) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_proto_msgTypes[13]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use PaymentCompleted.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PaymentCompleted) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{13}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetPaymentId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PaymentId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetStatus() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Status
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetAmount() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Amount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetCurrency() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Currency
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetProcessorReference() string {
|
||||||
|
if x != nil && x.ProcessorReference != nil {
|
||||||
|
return *x.ProcessorReference
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentCompleted) GetCompletedAt() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.CompletedAt
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type PaymentDeclined struct {
|
type PaymentDeclined struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
PaymentId string `protobuf:"bytes,1,opt,name=paymentId,proto3" json:"paymentId,omitempty"`
|
||||||
Code *string `protobuf:"bytes,2,opt,name=code,proto3,oneof" json:"code,omitempty"`
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
|
Code *string `protobuf:"bytes,3,opt,name=code,proto3,oneof" json:"code,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PaymentDeclined) Reset() {
|
func (x *PaymentDeclined) Reset() {
|
||||||
*x = PaymentDeclined{}
|
*x = PaymentDeclined{}
|
||||||
mi := &file_messages_proto_msgTypes[12]
|
mi := &file_messages_proto_msgTypes[14]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -941,7 +1118,7 @@ func (x *PaymentDeclined) String() string {
|
|||||||
func (*PaymentDeclined) ProtoMessage() {}
|
func (*PaymentDeclined) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *PaymentDeclined) ProtoReflect() protoreflect.Message {
|
func (x *PaymentDeclined) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[12]
|
mi := &file_messages_proto_msgTypes[14]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -954,7 +1131,14 @@ func (x *PaymentDeclined) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use PaymentDeclined.ProtoReflect.Descriptor instead.
|
// Deprecated: Use PaymentDeclined.ProtoReflect.Descriptor instead.
|
||||||
func (*PaymentDeclined) Descriptor() ([]byte, []int) {
|
func (*PaymentDeclined) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{12}
|
return file_messages_proto_rawDescGZIP(), []int{14}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentDeclined) GetPaymentId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PaymentId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PaymentDeclined) GetMessage() string {
|
func (x *PaymentDeclined) GetMessage() string {
|
||||||
@@ -971,15 +1155,76 @@ func (x *PaymentDeclined) GetCode() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PaymentEvent struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
PaymentId string `protobuf:"bytes,1,opt,name=paymentId,proto3" json:"paymentId,omitempty"`
|
||||||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
|
Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) Reset() {
|
||||||
|
*x = PaymentEvent{}
|
||||||
|
mi := &file_messages_proto_msgTypes[15]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PaymentEvent) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_proto_msgTypes[15]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use PaymentEvent.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PaymentEvent) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{15}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) GetPaymentId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PaymentId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) GetName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Name
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PaymentEvent) GetData() *anypb.Any {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type ConfirmationViewed struct {
|
type ConfirmationViewed struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
ViewedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=viewedAt,proto3" json:"viewedAt,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ConfirmationViewed) Reset() {
|
func (x *ConfirmationViewed) Reset() {
|
||||||
*x = ConfirmationViewed{}
|
*x = ConfirmationViewed{}
|
||||||
mi := &file_messages_proto_msgTypes[13]
|
mi := &file_messages_proto_msgTypes[16]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -991,7 +1236,7 @@ func (x *ConfirmationViewed) String() string {
|
|||||||
func (*ConfirmationViewed) ProtoMessage() {}
|
func (*ConfirmationViewed) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ConfirmationViewed) ProtoReflect() protoreflect.Message {
|
func (x *ConfirmationViewed) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[13]
|
mi := &file_messages_proto_msgTypes[16]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1004,7 +1249,14 @@ func (x *ConfirmationViewed) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ConfirmationViewed.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ConfirmationViewed.ProtoReflect.Descriptor instead.
|
||||||
func (*ConfirmationViewed) Descriptor() ([]byte, []int) {
|
func (*ConfirmationViewed) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{13}
|
return file_messages_proto_rawDescGZIP(), []int{16}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ConfirmationViewed) GetViewedAt() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.ViewedAt
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCheckoutOrder struct {
|
type CreateCheckoutOrder struct {
|
||||||
@@ -1021,7 +1273,7 @@ type CreateCheckoutOrder struct {
|
|||||||
|
|
||||||
func (x *CreateCheckoutOrder) Reset() {
|
func (x *CreateCheckoutOrder) Reset() {
|
||||||
*x = CreateCheckoutOrder{}
|
*x = CreateCheckoutOrder{}
|
||||||
mi := &file_messages_proto_msgTypes[14]
|
mi := &file_messages_proto_msgTypes[17]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1033,7 +1285,7 @@ func (x *CreateCheckoutOrder) String() string {
|
|||||||
func (*CreateCheckoutOrder) ProtoMessage() {}
|
func (*CreateCheckoutOrder) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CreateCheckoutOrder) ProtoReflect() protoreflect.Message {
|
func (x *CreateCheckoutOrder) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[14]
|
mi := &file_messages_proto_msgTypes[17]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1046,7 +1298,7 @@ func (x *CreateCheckoutOrder) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CreateCheckoutOrder.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CreateCheckoutOrder.ProtoReflect.Descriptor instead.
|
||||||
func (*CreateCheckoutOrder) Descriptor() ([]byte, []int) {
|
func (*CreateCheckoutOrder) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{14}
|
return file_messages_proto_rawDescGZIP(), []int{17}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateCheckoutOrder) GetTerms() string {
|
func (x *CreateCheckoutOrder) GetTerms() string {
|
||||||
@@ -1101,7 +1353,7 @@ type OrderCreated struct {
|
|||||||
|
|
||||||
func (x *OrderCreated) Reset() {
|
func (x *OrderCreated) Reset() {
|
||||||
*x = OrderCreated{}
|
*x = OrderCreated{}
|
||||||
mi := &file_messages_proto_msgTypes[15]
|
mi := &file_messages_proto_msgTypes[18]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1113,7 +1365,7 @@ func (x *OrderCreated) String() string {
|
|||||||
func (*OrderCreated) ProtoMessage() {}
|
func (*OrderCreated) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *OrderCreated) ProtoReflect() protoreflect.Message {
|
func (x *OrderCreated) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[15]
|
mi := &file_messages_proto_msgTypes[18]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1126,7 +1378,7 @@ func (x *OrderCreated) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use OrderCreated.ProtoReflect.Descriptor instead.
|
// Deprecated: Use OrderCreated.ProtoReflect.Descriptor instead.
|
||||||
func (*OrderCreated) Descriptor() ([]byte, []int) {
|
func (*OrderCreated) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{15}
|
return file_messages_proto_rawDescGZIP(), []int{18}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OrderCreated) GetOrderId() string {
|
func (x *OrderCreated) GetOrderId() string {
|
||||||
@@ -1151,7 +1403,7 @@ type Noop struct {
|
|||||||
|
|
||||||
func (x *Noop) Reset() {
|
func (x *Noop) Reset() {
|
||||||
*x = Noop{}
|
*x = Noop{}
|
||||||
mi := &file_messages_proto_msgTypes[16]
|
mi := &file_messages_proto_msgTypes[19]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1163,7 +1415,7 @@ func (x *Noop) String() string {
|
|||||||
func (*Noop) ProtoMessage() {}
|
func (*Noop) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Noop) ProtoReflect() protoreflect.Message {
|
func (x *Noop) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[16]
|
mi := &file_messages_proto_msgTypes[19]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1176,7 +1428,7 @@ func (x *Noop) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Noop.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Noop.ProtoReflect.Descriptor instead.
|
||||||
func (*Noop) Descriptor() ([]byte, []int) {
|
func (*Noop) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{16}
|
return file_messages_proto_rawDescGZIP(), []int{19}
|
||||||
}
|
}
|
||||||
|
|
||||||
type InitializeCheckout struct {
|
type InitializeCheckout struct {
|
||||||
@@ -1190,7 +1442,7 @@ type InitializeCheckout struct {
|
|||||||
|
|
||||||
func (x *InitializeCheckout) Reset() {
|
func (x *InitializeCheckout) Reset() {
|
||||||
*x = InitializeCheckout{}
|
*x = InitializeCheckout{}
|
||||||
mi := &file_messages_proto_msgTypes[17]
|
mi := &file_messages_proto_msgTypes[20]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1202,7 +1454,7 @@ func (x *InitializeCheckout) String() string {
|
|||||||
func (*InitializeCheckout) ProtoMessage() {}
|
func (*InitializeCheckout) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *InitializeCheckout) ProtoReflect() protoreflect.Message {
|
func (x *InitializeCheckout) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[17]
|
mi := &file_messages_proto_msgTypes[20]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1215,7 +1467,7 @@ func (x *InitializeCheckout) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use InitializeCheckout.ProtoReflect.Descriptor instead.
|
// Deprecated: Use InitializeCheckout.ProtoReflect.Descriptor instead.
|
||||||
func (*InitializeCheckout) Descriptor() ([]byte, []int) {
|
func (*InitializeCheckout) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{17}
|
return file_messages_proto_rawDescGZIP(), []int{20}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *InitializeCheckout) GetOrderId() string {
|
func (x *InitializeCheckout) GetOrderId() string {
|
||||||
@@ -1250,7 +1502,7 @@ type InventoryReserved struct {
|
|||||||
|
|
||||||
func (x *InventoryReserved) Reset() {
|
func (x *InventoryReserved) Reset() {
|
||||||
*x = InventoryReserved{}
|
*x = InventoryReserved{}
|
||||||
mi := &file_messages_proto_msgTypes[18]
|
mi := &file_messages_proto_msgTypes[21]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1262,7 +1514,7 @@ func (x *InventoryReserved) String() string {
|
|||||||
func (*InventoryReserved) ProtoMessage() {}
|
func (*InventoryReserved) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *InventoryReserved) ProtoReflect() protoreflect.Message {
|
func (x *InventoryReserved) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[18]
|
mi := &file_messages_proto_msgTypes[21]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1275,7 +1527,7 @@ func (x *InventoryReserved) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use InventoryReserved.ProtoReflect.Descriptor instead.
|
// Deprecated: Use InventoryReserved.ProtoReflect.Descriptor instead.
|
||||||
func (*InventoryReserved) Descriptor() ([]byte, []int) {
|
func (*InventoryReserved) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{18}
|
return file_messages_proto_rawDescGZIP(), []int{21}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *InventoryReserved) GetId() string {
|
func (x *InventoryReserved) GetId() string {
|
||||||
@@ -1311,7 +1563,7 @@ type AddVoucher struct {
|
|||||||
|
|
||||||
func (x *AddVoucher) Reset() {
|
func (x *AddVoucher) Reset() {
|
||||||
*x = AddVoucher{}
|
*x = AddVoucher{}
|
||||||
mi := &file_messages_proto_msgTypes[19]
|
mi := &file_messages_proto_msgTypes[22]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1323,7 +1575,7 @@ func (x *AddVoucher) String() string {
|
|||||||
func (*AddVoucher) ProtoMessage() {}
|
func (*AddVoucher) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AddVoucher) ProtoReflect() protoreflect.Message {
|
func (x *AddVoucher) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[19]
|
mi := &file_messages_proto_msgTypes[22]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1336,7 +1588,7 @@ func (x *AddVoucher) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use AddVoucher.ProtoReflect.Descriptor instead.
|
// Deprecated: Use AddVoucher.ProtoReflect.Descriptor instead.
|
||||||
func (*AddVoucher) Descriptor() ([]byte, []int) {
|
func (*AddVoucher) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{19}
|
return file_messages_proto_rawDescGZIP(), []int{22}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddVoucher) GetCode() string {
|
func (x *AddVoucher) GetCode() string {
|
||||||
@@ -1376,7 +1628,7 @@ type RemoveVoucher struct {
|
|||||||
|
|
||||||
func (x *RemoveVoucher) Reset() {
|
func (x *RemoveVoucher) Reset() {
|
||||||
*x = RemoveVoucher{}
|
*x = RemoveVoucher{}
|
||||||
mi := &file_messages_proto_msgTypes[20]
|
mi := &file_messages_proto_msgTypes[23]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1388,7 +1640,7 @@ func (x *RemoveVoucher) String() string {
|
|||||||
func (*RemoveVoucher) ProtoMessage() {}
|
func (*RemoveVoucher) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RemoveVoucher) ProtoReflect() protoreflect.Message {
|
func (x *RemoveVoucher) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[20]
|
mi := &file_messages_proto_msgTypes[23]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1401,7 +1653,7 @@ func (x *RemoveVoucher) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RemoveVoucher.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RemoveVoucher.ProtoReflect.Descriptor instead.
|
||||||
func (*RemoveVoucher) Descriptor() ([]byte, []int) {
|
func (*RemoveVoucher) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{20}
|
return file_messages_proto_rawDescGZIP(), []int{23}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveVoucher) GetId() uint32 {
|
func (x *RemoveVoucher) GetId() uint32 {
|
||||||
@@ -1423,7 +1675,7 @@ type UpsertSubscriptionDetails struct {
|
|||||||
|
|
||||||
func (x *UpsertSubscriptionDetails) Reset() {
|
func (x *UpsertSubscriptionDetails) Reset() {
|
||||||
*x = UpsertSubscriptionDetails{}
|
*x = UpsertSubscriptionDetails{}
|
||||||
mi := &file_messages_proto_msgTypes[21]
|
mi := &file_messages_proto_msgTypes[24]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1435,7 +1687,7 @@ func (x *UpsertSubscriptionDetails) String() string {
|
|||||||
func (*UpsertSubscriptionDetails) ProtoMessage() {}
|
func (*UpsertSubscriptionDetails) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UpsertSubscriptionDetails) ProtoReflect() protoreflect.Message {
|
func (x *UpsertSubscriptionDetails) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[21]
|
mi := &file_messages_proto_msgTypes[24]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1448,7 +1700,7 @@ func (x *UpsertSubscriptionDetails) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use UpsertSubscriptionDetails.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UpsertSubscriptionDetails.ProtoReflect.Descriptor instead.
|
||||||
func (*UpsertSubscriptionDetails) Descriptor() ([]byte, []int) {
|
func (*UpsertSubscriptionDetails) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{21}
|
return file_messages_proto_rawDescGZIP(), []int{24}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpsertSubscriptionDetails) GetId() string {
|
func (x *UpsertSubscriptionDetails) GetId() string {
|
||||||
@@ -1490,7 +1742,7 @@ type PreConditionFailed struct {
|
|||||||
|
|
||||||
func (x *PreConditionFailed) Reset() {
|
func (x *PreConditionFailed) Reset() {
|
||||||
*x = PreConditionFailed{}
|
*x = PreConditionFailed{}
|
||||||
mi := &file_messages_proto_msgTypes[22]
|
mi := &file_messages_proto_msgTypes[25]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1502,7 +1754,7 @@ func (x *PreConditionFailed) String() string {
|
|||||||
func (*PreConditionFailed) ProtoMessage() {}
|
func (*PreConditionFailed) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *PreConditionFailed) ProtoReflect() protoreflect.Message {
|
func (x *PreConditionFailed) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[22]
|
mi := &file_messages_proto_msgTypes[25]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1515,7 +1767,7 @@ func (x *PreConditionFailed) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use PreConditionFailed.ProtoReflect.Descriptor instead.
|
// Deprecated: Use PreConditionFailed.ProtoReflect.Descriptor instead.
|
||||||
func (*PreConditionFailed) Descriptor() ([]byte, []int) {
|
func (*PreConditionFailed) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{22}
|
return file_messages_proto_rawDescGZIP(), []int{25}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PreConditionFailed) GetOperation() string {
|
func (x *PreConditionFailed) GetOperation() string {
|
||||||
@@ -1553,7 +1805,7 @@ type GiftcardItem struct {
|
|||||||
|
|
||||||
func (x *GiftcardItem) Reset() {
|
func (x *GiftcardItem) Reset() {
|
||||||
*x = GiftcardItem{}
|
*x = GiftcardItem{}
|
||||||
mi := &file_messages_proto_msgTypes[23]
|
mi := &file_messages_proto_msgTypes[26]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1565,7 +1817,7 @@ func (x *GiftcardItem) String() string {
|
|||||||
func (*GiftcardItem) ProtoMessage() {}
|
func (*GiftcardItem) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GiftcardItem) ProtoReflect() protoreflect.Message {
|
func (x *GiftcardItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[23]
|
mi := &file_messages_proto_msgTypes[26]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1578,7 +1830,7 @@ func (x *GiftcardItem) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GiftcardItem.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GiftcardItem.ProtoReflect.Descriptor instead.
|
||||||
func (*GiftcardItem) Descriptor() ([]byte, []int) {
|
func (*GiftcardItem) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{23}
|
return file_messages_proto_rawDescGZIP(), []int{26}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GiftcardItem) GetValue() int64 {
|
func (x *GiftcardItem) GetValue() int64 {
|
||||||
@@ -1632,7 +1884,7 @@ type AddGiftcard struct {
|
|||||||
|
|
||||||
func (x *AddGiftcard) Reset() {
|
func (x *AddGiftcard) Reset() {
|
||||||
*x = AddGiftcard{}
|
*x = AddGiftcard{}
|
||||||
mi := &file_messages_proto_msgTypes[24]
|
mi := &file_messages_proto_msgTypes[27]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1644,7 +1896,7 @@ func (x *AddGiftcard) String() string {
|
|||||||
func (*AddGiftcard) ProtoMessage() {}
|
func (*AddGiftcard) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AddGiftcard) ProtoReflect() protoreflect.Message {
|
func (x *AddGiftcard) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[24]
|
mi := &file_messages_proto_msgTypes[27]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1657,7 +1909,7 @@ func (x *AddGiftcard) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use AddGiftcard.ProtoReflect.Descriptor instead.
|
// Deprecated: Use AddGiftcard.ProtoReflect.Descriptor instead.
|
||||||
func (*AddGiftcard) Descriptor() ([]byte, []int) {
|
func (*AddGiftcard) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{24}
|
return file_messages_proto_rawDescGZIP(), []int{27}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddGiftcard) GetGiftcard() *GiftcardItem {
|
func (x *AddGiftcard) GetGiftcard() *GiftcardItem {
|
||||||
@@ -1676,7 +1928,7 @@ type RemoveGiftcard struct {
|
|||||||
|
|
||||||
func (x *RemoveGiftcard) Reset() {
|
func (x *RemoveGiftcard) Reset() {
|
||||||
*x = RemoveGiftcard{}
|
*x = RemoveGiftcard{}
|
||||||
mi := &file_messages_proto_msgTypes[25]
|
mi := &file_messages_proto_msgTypes[28]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1688,7 +1940,7 @@ func (x *RemoveGiftcard) String() string {
|
|||||||
func (*RemoveGiftcard) ProtoMessage() {}
|
func (*RemoveGiftcard) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RemoveGiftcard) ProtoReflect() protoreflect.Message {
|
func (x *RemoveGiftcard) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[25]
|
mi := &file_messages_proto_msgTypes[28]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1701,7 +1953,7 @@ func (x *RemoveGiftcard) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RemoveGiftcard.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RemoveGiftcard.ProtoReflect.Descriptor instead.
|
||||||
func (*RemoveGiftcard) Descriptor() ([]byte, []int) {
|
func (*RemoveGiftcard) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{25}
|
return file_messages_proto_rawDescGZIP(), []int{28}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveGiftcard) GetId() uint32 {
|
func (x *RemoveGiftcard) GetId() uint32 {
|
||||||
@@ -1739,6 +1991,9 @@ type Mutation struct {
|
|||||||
// *Mutation_PreConditionFailed
|
// *Mutation_PreConditionFailed
|
||||||
// *Mutation_AddGiftcard
|
// *Mutation_AddGiftcard
|
||||||
// *Mutation_RemoveGiftcard
|
// *Mutation_RemoveGiftcard
|
||||||
|
// *Mutation_PaymentStarted
|
||||||
|
// *Mutation_PaymentCompleted
|
||||||
|
// *Mutation_PaymentEvent
|
||||||
Type isMutation_Type `protobuf_oneof:"type"`
|
Type isMutation_Type `protobuf_oneof:"type"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -1746,7 +2001,7 @@ type Mutation struct {
|
|||||||
|
|
||||||
func (x *Mutation) Reset() {
|
func (x *Mutation) Reset() {
|
||||||
*x = Mutation{}
|
*x = Mutation{}
|
||||||
mi := &file_messages_proto_msgTypes[26]
|
mi := &file_messages_proto_msgTypes[29]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1758,7 +2013,7 @@ func (x *Mutation) String() string {
|
|||||||
func (*Mutation) ProtoMessage() {}
|
func (*Mutation) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Mutation) ProtoReflect() protoreflect.Message {
|
func (x *Mutation) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_messages_proto_msgTypes[26]
|
mi := &file_messages_proto_msgTypes[29]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1771,7 +2026,7 @@ func (x *Mutation) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Mutation.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Mutation.ProtoReflect.Descriptor instead.
|
||||||
func (*Mutation) Descriptor() ([]byte, []int) {
|
func (*Mutation) Descriptor() ([]byte, []int) {
|
||||||
return file_messages_proto_rawDescGZIP(), []int{26}
|
return file_messages_proto_rawDescGZIP(), []int{29}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Mutation) GetType() isMutation_Type {
|
func (x *Mutation) GetType() isMutation_Type {
|
||||||
@@ -1997,6 +2252,33 @@ func (x *Mutation) GetRemoveGiftcard() *RemoveGiftcard {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Mutation) GetPaymentStarted() *PaymentStarted {
|
||||||
|
if x != nil {
|
||||||
|
if x, ok := x.Type.(*Mutation_PaymentStarted); ok {
|
||||||
|
return x.PaymentStarted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Mutation) GetPaymentCompleted() *PaymentCompleted {
|
||||||
|
if x != nil {
|
||||||
|
if x, ok := x.Type.(*Mutation_PaymentCompleted); ok {
|
||||||
|
return x.PaymentCompleted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Mutation) GetPaymentEvent() *PaymentEvent {
|
||||||
|
if x != nil {
|
||||||
|
if x, ok := x.Type.(*Mutation_PaymentEvent); ok {
|
||||||
|
return x.PaymentEvent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type isMutation_Type interface {
|
type isMutation_Type interface {
|
||||||
isMutation_Type()
|
isMutation_Type()
|
||||||
}
|
}
|
||||||
@@ -2097,6 +2379,18 @@ type Mutation_RemoveGiftcard struct {
|
|||||||
RemoveGiftcard *RemoveGiftcard `protobuf:"bytes,24,opt,name=remove_giftcard,json=removeGiftcard,proto3,oneof"`
|
RemoveGiftcard *RemoveGiftcard `protobuf:"bytes,24,opt,name=remove_giftcard,json=removeGiftcard,proto3,oneof"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Mutation_PaymentStarted struct {
|
||||||
|
PaymentStarted *PaymentStarted `protobuf:"bytes,25,opt,name=payment_started,json=paymentStarted,proto3,oneof"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mutation_PaymentCompleted struct {
|
||||||
|
PaymentCompleted *PaymentCompleted `protobuf:"bytes,26,opt,name=payment_completed,json=paymentCompleted,proto3,oneof"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mutation_PaymentEvent struct {
|
||||||
|
PaymentEvent *PaymentEvent `protobuf:"bytes,27,opt,name=payment_event,json=paymentEvent,proto3,oneof"`
|
||||||
|
}
|
||||||
|
|
||||||
func (*Mutation_ClearCart) isMutation_Type() {}
|
func (*Mutation_ClearCart) isMutation_Type() {}
|
||||||
|
|
||||||
func (*Mutation_AddItem) isMutation_Type() {}
|
func (*Mutation_AddItem) isMutation_Type() {}
|
||||||
@@ -2145,6 +2439,12 @@ func (*Mutation_AddGiftcard) isMutation_Type() {}
|
|||||||
|
|
||||||
func (*Mutation_RemoveGiftcard) isMutation_Type() {}
|
func (*Mutation_RemoveGiftcard) isMutation_Type() {}
|
||||||
|
|
||||||
|
func (*Mutation_PaymentStarted) isMutation_Type() {}
|
||||||
|
|
||||||
|
func (*Mutation_PaymentCompleted) isMutation_Type() {}
|
||||||
|
|
||||||
|
func (*Mutation_PaymentEvent) isMutation_Type() {}
|
||||||
|
|
||||||
var File_messages_proto protoreflect.FileDescriptor
|
var File_messages_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_messages_proto_rawDesc = string([]byte{
|
var file_messages_proto_rawDesc = string([]byte{
|
||||||
@@ -2276,14 +2576,61 @@ var file_messages_proto_rawDesc = string([]byte{
|
|||||||
0x73, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x74, 0x61, 0x69,
|
0x73, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x74, 0x61, 0x69,
|
||||||
0x6c, 0x73, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66,
|
0x6c, 0x73, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66,
|
||||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72,
|
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72,
|
||||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x0f,
|
0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x8d, 0x02, 0x0a,
|
||||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x12,
|
0x0e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12,
|
||||||
0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x1c, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88,
|
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07,
|
||||||
0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x43,
|
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||||
0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x69, 0x65, 0x77, 0x65,
|
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||||
0x64, 0x22, 0xb9, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63,
|
0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||||
|
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
|
||||||
|
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||||
|
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||||
|
0x64, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41,
|
||||||
|
0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||||
|
0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||||
|
0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0c,
|
||||||
|
0x0a, 0x0a, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9b, 0x02, 0x0a,
|
||||||
|
0x10, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
|
||||||
|
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12,
|
||||||
|
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||||
|
0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x33, 0x0a, 0x12, 0x70,
|
||||||
|
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||||
|
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65,
|
||||||
|
0x73, 0x73, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01,
|
||||||
|
0x12, 0x41, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18,
|
||||||
|
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||||
|
0x70, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||||
|
0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f,
|
||||||
|
0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x6b, 0x0a, 0x0f, 0x50, 0x61,
|
||||||
|
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x1c, 0x0a,
|
||||||
|
0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
|
||||||
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07,
|
||||||
|
0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x6a, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||||
|
0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||||
|
0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d,
|
||||||
|
0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||||
|
0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x64,
|
||||||
|
0x61, 0x74, 0x61, 0x22, 0x4c, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x56, 0x69, 0x65, 0x77, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x76, 0x69, 0x65,
|
||||||
|
0x77, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
||||||
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x76, 0x69, 0x65, 0x77, 0x65, 0x64, 0x41,
|
||||||
|
0x74, 0x22, 0xb9, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63,
|
||||||
0x6b, 0x6f, 0x75, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x65, 0x72,
|
0x6b, 0x6f, 0x75, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x65, 0x72,
|
||||||
0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12,
|
0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12,
|
||||||
0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
@@ -2363,7 +2710,7 @@ var file_messages_proto_rawDesc = string([]byte{
|
|||||||
0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x63, 0x61, 0x72, 0x64,
|
0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x63, 0x61, 0x72, 0x64,
|
||||||
0x22, 0x20, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61,
|
0x22, 0x20, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61,
|
||||||
0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02,
|
0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02,
|
||||||
0x69, 0x64, 0x22, 0x95, 0x0d, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
0x69, 0x64, 0x22, 0xe4, 0x0e, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
0x3b, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
|
0x3b, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x43,
|
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x43,
|
||||||
0x6c, 0x65, 0x61, 0x72, 0x43, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
|
0x6c, 0x65, 0x61, 0x72, 0x43, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
|
||||||
@@ -2468,10 +2815,23 @@ var file_messages_proto_rawDesc = string([]byte{
|
|||||||
0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61, 0x72, 0x64,
|
0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61, 0x72, 0x64,
|
||||||
0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61,
|
0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x69, 0x66, 0x74, 0x63, 0x61,
|
||||||
0x72, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69,
|
0x72, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74,
|
||||||
0x74, 0x2e, 0x6b, 0x36, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x61, 0x72,
|
0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65,
|
||||||
0x74, 0x2d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6d, 0x65,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x61, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
|
0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x11, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||||
|
0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x50, 0x61,
|
||||||
|
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x48, 0x00,
|
||||||
|
0x52, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
||||||
|
0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x76,
|
||||||
|
0x65, 0x6e, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73,
|
||||||
|
0x61, 0x67, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e,
|
||||||
|
0x74, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e,
|
||||||
|
0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74,
|
||||||
|
0x2e, 0x6b, 0x36, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x61, 0x72, 0x74,
|
||||||
|
0x2d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6d, 0x65, 0x73,
|
||||||
|
0x73, 0x61, 0x67, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -2486,7 +2846,7 @@ func file_messages_proto_rawDescGZIP() []byte {
|
|||||||
return file_messages_proto_rawDescData
|
return file_messages_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
|
||||||
var file_messages_proto_goTypes = []any{
|
var file_messages_proto_goTypes = []any{
|
||||||
(*ClearCartRequest)(nil), // 0: messages.ClearCartRequest
|
(*ClearCartRequest)(nil), // 0: messages.ClearCartRequest
|
||||||
(*AddItem)(nil), // 1: messages.AddItem
|
(*AddItem)(nil), // 1: messages.AddItem
|
||||||
@@ -2500,60 +2860,70 @@ var file_messages_proto_goTypes = []any{
|
|||||||
(*LineItemMarking)(nil), // 9: messages.LineItemMarking
|
(*LineItemMarking)(nil), // 9: messages.LineItemMarking
|
||||||
(*RemoveLineItemMarking)(nil), // 10: messages.RemoveLineItemMarking
|
(*RemoveLineItemMarking)(nil), // 10: messages.RemoveLineItemMarking
|
||||||
(*SubscriptionAdded)(nil), // 11: messages.SubscriptionAdded
|
(*SubscriptionAdded)(nil), // 11: messages.SubscriptionAdded
|
||||||
(*PaymentDeclined)(nil), // 12: messages.PaymentDeclined
|
(*PaymentStarted)(nil), // 12: messages.PaymentStarted
|
||||||
(*ConfirmationViewed)(nil), // 13: messages.ConfirmationViewed
|
(*PaymentCompleted)(nil), // 13: messages.PaymentCompleted
|
||||||
(*CreateCheckoutOrder)(nil), // 14: messages.CreateCheckoutOrder
|
(*PaymentDeclined)(nil), // 14: messages.PaymentDeclined
|
||||||
(*OrderCreated)(nil), // 15: messages.OrderCreated
|
(*PaymentEvent)(nil), // 15: messages.PaymentEvent
|
||||||
(*Noop)(nil), // 16: messages.Noop
|
(*ConfirmationViewed)(nil), // 16: messages.ConfirmationViewed
|
||||||
(*InitializeCheckout)(nil), // 17: messages.InitializeCheckout
|
(*CreateCheckoutOrder)(nil), // 17: messages.CreateCheckoutOrder
|
||||||
(*InventoryReserved)(nil), // 18: messages.InventoryReserved
|
(*OrderCreated)(nil), // 18: messages.OrderCreated
|
||||||
(*AddVoucher)(nil), // 19: messages.AddVoucher
|
(*Noop)(nil), // 19: messages.Noop
|
||||||
(*RemoveVoucher)(nil), // 20: messages.RemoveVoucher
|
(*InitializeCheckout)(nil), // 20: messages.InitializeCheckout
|
||||||
(*UpsertSubscriptionDetails)(nil), // 21: messages.UpsertSubscriptionDetails
|
(*InventoryReserved)(nil), // 21: messages.InventoryReserved
|
||||||
(*PreConditionFailed)(nil), // 22: messages.PreConditionFailed
|
(*AddVoucher)(nil), // 22: messages.AddVoucher
|
||||||
(*GiftcardItem)(nil), // 23: messages.GiftcardItem
|
(*RemoveVoucher)(nil), // 23: messages.RemoveVoucher
|
||||||
(*AddGiftcard)(nil), // 24: messages.AddGiftcard
|
(*UpsertSubscriptionDetails)(nil), // 24: messages.UpsertSubscriptionDetails
|
||||||
(*RemoveGiftcard)(nil), // 25: messages.RemoveGiftcard
|
(*PreConditionFailed)(nil), // 25: messages.PreConditionFailed
|
||||||
(*Mutation)(nil), // 26: messages.Mutation
|
(*GiftcardItem)(nil), // 26: messages.GiftcardItem
|
||||||
(*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp
|
(*AddGiftcard)(nil), // 27: messages.AddGiftcard
|
||||||
(*anypb.Any)(nil), // 28: google.protobuf.Any
|
(*RemoveGiftcard)(nil), // 28: messages.RemoveGiftcard
|
||||||
|
(*Mutation)(nil), // 29: messages.Mutation
|
||||||
|
(*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp
|
||||||
|
(*anypb.Any)(nil), // 31: google.protobuf.Any
|
||||||
}
|
}
|
||||||
var file_messages_proto_depIdxs = []int32{
|
var file_messages_proto_depIdxs = []int32{
|
||||||
27, // 0: messages.AddItem.reservationEndTime:type_name -> google.protobuf.Timestamp
|
30, // 0: messages.AddItem.reservationEndTime:type_name -> google.protobuf.Timestamp
|
||||||
6, // 1: messages.SetDelivery.pickupPoint:type_name -> messages.PickupPoint
|
6, // 1: messages.SetDelivery.pickupPoint:type_name -> messages.PickupPoint
|
||||||
28, // 2: messages.UpsertSubscriptionDetails.data:type_name -> google.protobuf.Any
|
30, // 2: messages.PaymentStarted.startedAt:type_name -> google.protobuf.Timestamp
|
||||||
28, // 3: messages.PreConditionFailed.input:type_name -> google.protobuf.Any
|
30, // 3: messages.PaymentCompleted.completedAt:type_name -> google.protobuf.Timestamp
|
||||||
28, // 4: messages.GiftcardItem.designConfig:type_name -> google.protobuf.Any
|
31, // 4: messages.PaymentEvent.data:type_name -> google.protobuf.Any
|
||||||
23, // 5: messages.AddGiftcard.giftcard:type_name -> messages.GiftcardItem
|
30, // 5: messages.ConfirmationViewed.viewedAt:type_name -> google.protobuf.Timestamp
|
||||||
0, // 6: messages.Mutation.clear_cart:type_name -> messages.ClearCartRequest
|
31, // 6: messages.UpsertSubscriptionDetails.data:type_name -> google.protobuf.Any
|
||||||
1, // 7: messages.Mutation.add_item:type_name -> messages.AddItem
|
31, // 7: messages.PreConditionFailed.input:type_name -> google.protobuf.Any
|
||||||
2, // 8: messages.Mutation.remove_item:type_name -> messages.RemoveItem
|
31, // 8: messages.GiftcardItem.designConfig:type_name -> google.protobuf.Any
|
||||||
3, // 9: messages.Mutation.change_quantity:type_name -> messages.ChangeQuantity
|
26, // 9: messages.AddGiftcard.giftcard:type_name -> messages.GiftcardItem
|
||||||
4, // 10: messages.Mutation.set_delivery:type_name -> messages.SetDelivery
|
0, // 10: messages.Mutation.clear_cart:type_name -> messages.ClearCartRequest
|
||||||
5, // 11: messages.Mutation.set_pickup_point:type_name -> messages.SetPickupPoint
|
1, // 11: messages.Mutation.add_item:type_name -> messages.AddItem
|
||||||
7, // 12: messages.Mutation.remove_delivery:type_name -> messages.RemoveDelivery
|
2, // 12: messages.Mutation.remove_item:type_name -> messages.RemoveItem
|
||||||
8, // 13: messages.Mutation.set_user_id:type_name -> messages.SetUserId
|
3, // 13: messages.Mutation.change_quantity:type_name -> messages.ChangeQuantity
|
||||||
9, // 14: messages.Mutation.line_item_marking:type_name -> messages.LineItemMarking
|
4, // 14: messages.Mutation.set_delivery:type_name -> messages.SetDelivery
|
||||||
10, // 15: messages.Mutation.remove_line_item_marking:type_name -> messages.RemoveLineItemMarking
|
5, // 15: messages.Mutation.set_pickup_point:type_name -> messages.SetPickupPoint
|
||||||
11, // 16: messages.Mutation.subscription_added:type_name -> messages.SubscriptionAdded
|
7, // 16: messages.Mutation.remove_delivery:type_name -> messages.RemoveDelivery
|
||||||
12, // 17: messages.Mutation.payment_declined:type_name -> messages.PaymentDeclined
|
8, // 17: messages.Mutation.set_user_id:type_name -> messages.SetUserId
|
||||||
13, // 18: messages.Mutation.confirmation_viewed:type_name -> messages.ConfirmationViewed
|
9, // 18: messages.Mutation.line_item_marking:type_name -> messages.LineItemMarking
|
||||||
14, // 19: messages.Mutation.create_checkout_order:type_name -> messages.CreateCheckoutOrder
|
10, // 19: messages.Mutation.remove_line_item_marking:type_name -> messages.RemoveLineItemMarking
|
||||||
15, // 20: messages.Mutation.order_created:type_name -> messages.OrderCreated
|
11, // 20: messages.Mutation.subscription_added:type_name -> messages.SubscriptionAdded
|
||||||
16, // 21: messages.Mutation.noop:type_name -> messages.Noop
|
14, // 21: messages.Mutation.payment_declined:type_name -> messages.PaymentDeclined
|
||||||
17, // 22: messages.Mutation.initialize_checkout:type_name -> messages.InitializeCheckout
|
16, // 22: messages.Mutation.confirmation_viewed:type_name -> messages.ConfirmationViewed
|
||||||
18, // 23: messages.Mutation.inventory_reserved:type_name -> messages.InventoryReserved
|
17, // 23: messages.Mutation.create_checkout_order:type_name -> messages.CreateCheckoutOrder
|
||||||
19, // 24: messages.Mutation.add_voucher:type_name -> messages.AddVoucher
|
18, // 24: messages.Mutation.order_created:type_name -> messages.OrderCreated
|
||||||
20, // 25: messages.Mutation.remove_voucher:type_name -> messages.RemoveVoucher
|
19, // 25: messages.Mutation.noop:type_name -> messages.Noop
|
||||||
21, // 26: messages.Mutation.upsert_subscription_details:type_name -> messages.UpsertSubscriptionDetails
|
20, // 26: messages.Mutation.initialize_checkout:type_name -> messages.InitializeCheckout
|
||||||
22, // 27: messages.Mutation.pre_condition_failed:type_name -> messages.PreConditionFailed
|
21, // 27: messages.Mutation.inventory_reserved:type_name -> messages.InventoryReserved
|
||||||
24, // 28: messages.Mutation.add_giftcard:type_name -> messages.AddGiftcard
|
22, // 28: messages.Mutation.add_voucher:type_name -> messages.AddVoucher
|
||||||
25, // 29: messages.Mutation.remove_giftcard:type_name -> messages.RemoveGiftcard
|
23, // 29: messages.Mutation.remove_voucher:type_name -> messages.RemoveVoucher
|
||||||
30, // [30:30] is the sub-list for method output_type
|
24, // 30: messages.Mutation.upsert_subscription_details:type_name -> messages.UpsertSubscriptionDetails
|
||||||
30, // [30:30] is the sub-list for method input_type
|
25, // 31: messages.Mutation.pre_condition_failed:type_name -> messages.PreConditionFailed
|
||||||
30, // [30:30] is the sub-list for extension type_name
|
27, // 32: messages.Mutation.add_giftcard:type_name -> messages.AddGiftcard
|
||||||
30, // [30:30] is the sub-list for extension extendee
|
28, // 33: messages.Mutation.remove_giftcard:type_name -> messages.RemoveGiftcard
|
||||||
0, // [0:30] is the sub-list for field type_name
|
12, // 34: messages.Mutation.payment_started:type_name -> messages.PaymentStarted
|
||||||
|
13, // 35: messages.Mutation.payment_completed:type_name -> messages.PaymentCompleted
|
||||||
|
15, // 36: messages.Mutation.payment_event:type_name -> messages.PaymentEvent
|
||||||
|
37, // [37:37] is the sub-list for method output_type
|
||||||
|
37, // [37:37] is the sub-list for method input_type
|
||||||
|
37, // [37:37] is the sub-list for extension type_name
|
||||||
|
37, // [37:37] is the sub-list for extension extendee
|
||||||
|
0, // [0:37] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_messages_proto_init() }
|
func init() { file_messages_proto_init() }
|
||||||
@@ -2566,10 +2936,12 @@ func file_messages_proto_init() {
|
|||||||
file_messages_proto_msgTypes[5].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[5].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[6].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[6].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[12].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[12].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[18].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[13].OneofWrappers = []any{}
|
||||||
|
file_messages_proto_msgTypes[14].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[21].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[21].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[23].OneofWrappers = []any{}
|
file_messages_proto_msgTypes[24].OneofWrappers = []any{}
|
||||||
file_messages_proto_msgTypes[26].OneofWrappers = []any{
|
file_messages_proto_msgTypes[26].OneofWrappers = []any{}
|
||||||
|
file_messages_proto_msgTypes[29].OneofWrappers = []any{
|
||||||
(*Mutation_ClearCart)(nil),
|
(*Mutation_ClearCart)(nil),
|
||||||
(*Mutation_AddItem)(nil),
|
(*Mutation_AddItem)(nil),
|
||||||
(*Mutation_RemoveItem)(nil),
|
(*Mutation_RemoveItem)(nil),
|
||||||
@@ -2594,6 +2966,9 @@ func file_messages_proto_init() {
|
|||||||
(*Mutation_PreConditionFailed)(nil),
|
(*Mutation_PreConditionFailed)(nil),
|
||||||
(*Mutation_AddGiftcard)(nil),
|
(*Mutation_AddGiftcard)(nil),
|
||||||
(*Mutation_RemoveGiftcard)(nil),
|
(*Mutation_RemoveGiftcard)(nil),
|
||||||
|
(*Mutation_PaymentStarted)(nil),
|
||||||
|
(*Mutation_PaymentCompleted)(nil),
|
||||||
|
(*Mutation_PaymentEvent)(nil),
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@@ -2601,7 +2976,7 @@ func file_messages_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 27,
|
NumMessages: 30,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ package messages;
|
|||||||
|
|
||||||
option go_package = "git.k6n.net/go-cart-actor/proto;messages";
|
option go_package = "git.k6n.net/go-cart-actor/proto;messages";
|
||||||
|
|
||||||
import "messages.proto";
|
|
||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -94,13 +94,39 @@ message SubscriptionAdded {
|
|||||||
string orderReference = 4;
|
string orderReference = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message PaymentStarted {
|
||||||
|
string paymentId = 1;
|
||||||
|
uint32 version = 2;
|
||||||
|
int64 amount = 3;
|
||||||
|
string currency = 4;
|
||||||
|
string provider = 5;
|
||||||
|
optional string method = 6;
|
||||||
|
optional google.protobuf.Timestamp startedAt = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PaymentCompleted {
|
||||||
|
string paymentId = 1;
|
||||||
|
string status = 2;
|
||||||
|
int64 amount = 3;
|
||||||
|
string currency = 4;
|
||||||
|
optional string processorReference = 5;
|
||||||
|
optional google.protobuf.Timestamp completedAt = 6;
|
||||||
|
}
|
||||||
|
|
||||||
message PaymentDeclined {
|
message PaymentDeclined {
|
||||||
string message = 1;
|
string paymentId = 1;
|
||||||
optional string code = 2;
|
string message = 2;
|
||||||
|
optional string code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PaymentEvent {
|
||||||
|
string paymentId = 1;
|
||||||
|
string name = 2;
|
||||||
|
google.protobuf.Any data = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ConfirmationViewed {
|
message ConfirmationViewed {
|
||||||
|
google.protobuf.Timestamp viewedAt = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateCheckoutOrder {
|
message CreateCheckoutOrder {
|
||||||
@@ -198,5 +224,8 @@ message Mutation {
|
|||||||
PreConditionFailed pre_condition_failed = 22;
|
PreConditionFailed pre_condition_failed = 22;
|
||||||
AddGiftcard add_giftcard = 23;
|
AddGiftcard add_giftcard = 23;
|
||||||
RemoveGiftcard remove_giftcard = 24;
|
RemoveGiftcard remove_giftcard = 24;
|
||||||
|
PaymentStarted payment_started = 25;
|
||||||
|
PaymentCompleted payment_completed = 26;
|
||||||
|
PaymentEvent payment_event = 27;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user