Skip to content

Commit

Permalink
fix: adding currency property
Browse files Browse the repository at this point in the history
  • Loading branch information
izaaz committed Feb 26, 2025
1 parent 48ab76e commit d5fed40
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions amplitude/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (c *client) Revenue(revenue Revenue, eventOptions EventOptions) {
constants.RevenueType: revenue.RevenueType,
constants.RevenueReceipt: revenue.Receipt,
constants.RevenueReceiptSig: revenue.ReceiptSig,
constants.Currency: revenue.Currency,
constants.DefaultRevenue: revenue.Revenue,
},
}
Expand Down
1 change: 1 addition & 0 deletions amplitude/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
RevenueQuantity = "$quantity"
RevenuePrice = "$price"
RevenueType = "$revenueType"
Currency = "$currency"
RevenueReceipt = "$receipt"
RevenueReceiptSig = "$receiptSig"
DefaultRevenue = "$revenue"
Expand Down
1 change: 1 addition & 0 deletions amplitude/types/event_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type EventOptions struct {
Price float64 `json:"price,omitempty"`
Quantity int `json:"quantity,omitempty"`
Revenue float64 `json:"revenue,omitempty"`
Currency string `json:"currency,omitempty"`
ProductID string `json:"productId,omitempty"`
RevenueType string `json:"revenueType,omitempty"`
EventID int `json:"event_id,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions amplitude/types/revenue.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type Revenue struct {
Quantity int
ProductID string
RevenueType string
Currency string
Receipt string
ReceiptSig string
Properties map[string]interface{}
Expand Down

0 comments on commit d5fed40

Please sign in to comment.