19 lines
326 B
Go
19 lines
326 B
Go
package sresponse
|
|
|
|
import moneyv1 "github.com/tech/sendico/pkg/proto/common/money/v1"
|
|
|
|
type Money struct {
|
|
Amount string `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
}
|
|
|
|
func toMoney(m *moneyv1.Money) *Money {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
return &Money{
|
|
Amount: m.GetAmount(),
|
|
Currency: m.GetCurrency(),
|
|
}
|
|
}
|