mirror of
https://github.com/foomo/sesamy-go.git
synced 2025-10-16 12:35:43 +00:00
refactor: change I
This commit is contained in:
parent
d18231b3b2
commit
a0b7aabcfa
@ -5,10 +5,10 @@ import (
|
||||
)
|
||||
|
||||
// AddPaymentInfo https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events
|
||||
type AddPaymentInfo[Item any] struct {
|
||||
type AddPaymentInfo[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
PaymentType string `json:"payment_type,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,10 +5,10 @@ import (
|
||||
)
|
||||
|
||||
// AddShippingInfo https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_shipping_info
|
||||
type AddShippingInfo[Item any] struct {
|
||||
type AddShippingInfo[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
ShippingTier string `json:"shipping_tier,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
// AddToCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_to_cart
|
||||
type AddToCart[Item any] struct {
|
||||
type AddToCart[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
// AddToWishlist https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_to_wishlist
|
||||
type AddToWishlist[Item any] struct {
|
||||
type AddToWishlist[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,9 +5,9 @@ import (
|
||||
)
|
||||
|
||||
// BeginCheckout https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#begin_checkout
|
||||
type BeginCheckout[Item any] struct {
|
||||
type BeginCheckout[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,12 +5,12 @@ import (
|
||||
)
|
||||
|
||||
// Purchase https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#purchase
|
||||
type Purchase[Item any] struct {
|
||||
type Purchase[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
TransactionID string `json:"transaction_id,omitempty"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
Shipping float64 `json:"shipping,omitempty"`
|
||||
Tax float64 `json:"tax,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,12 +5,12 @@ import (
|
||||
)
|
||||
|
||||
// Refund https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#refund
|
||||
type Refund[Item any] struct {
|
||||
type Refund[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
TransactionID string `json:"transaction_id,omitempty"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
Shipping float64 `json:"shipping,omitempty"`
|
||||
Tax float64 `json:"tax,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
// RemoveFromCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#remove_from_cart
|
||||
type RemoveFromCart[Item any] struct {
|
||||
type RemoveFromCart[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package params
|
||||
|
||||
// SelectItem https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#select_item
|
||||
type SelectItem[Item any] struct {
|
||||
type SelectItem[I any] struct {
|
||||
ItemListID string `json:"item_list_id,omitempty" tagging:"item_list_id"`
|
||||
ItemListName string `json:"item_list_name,omitempty" tagging:"item_list_name"`
|
||||
Items []Item `json:"items,omitempty" tagging:"pr"`
|
||||
Items []I `json:"items,omitempty" tagging:"pr"`
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package params
|
||||
|
||||
// SelectPromotion https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#select_promotion
|
||||
type SelectPromotion[Item any] struct {
|
||||
type SelectPromotion[I any] struct {
|
||||
CreativeName string `json:"creative_name,omitempty"`
|
||||
CreativeSlot string `json:"creative_slot,omitempty"`
|
||||
PromotionID string `json:"promotion_id,omitempty"`
|
||||
PromotionName string `json:"promotion_name,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
// ViewCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_cart
|
||||
type ViewCart[Item any] struct {
|
||||
type ViewCart[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
// ViewItem https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_item
|
||||
type ViewItem[Item any] struct {
|
||||
type ViewItem[I any] struct {
|
||||
Currency iso4217.Currency `json:"currency,omitempty"`
|
||||
Value float64 `json:"value,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package params
|
||||
|
||||
// ViewItemList https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_item_list
|
||||
type ViewItemList[Item any] struct {
|
||||
type ViewItemList[I any] struct {
|
||||
ItemListID string `json:"item_list_id,omitempty"`
|
||||
ItemListName string `json:"item_list_name,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package params
|
||||
|
||||
// ViewPromotion https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_promotion
|
||||
type ViewPromotion[Item any] struct {
|
||||
type ViewPromotion[I any] struct {
|
||||
CreativeName string `json:"creative_name,omitempty"`
|
||||
CreativeSlot string `json:"creative_slot,omitempty"`
|
||||
PromotionID string `json:"promotion_id,omitempty"`
|
||||
PromotionName string `json:"promotion_name,omitempty"`
|
||||
Items []Item `json:"items,omitempty"`
|
||||
Items []I `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user