shippingservice: money proto migration

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-27 12:40:09 -07:00
parent 8a07a97872
commit c2b08f0793
3 changed files with 169 additions and 202 deletions

View file

@ -34,10 +34,10 @@ func (s *server) GetQuote(ctx context.Context, in *pb.GetQuoteRequest) (*pb.GetQ
// 3. Generate a response.
return &pb.GetQuoteResponse{
CostUsd: &pb.MoneyAmount{
Decimal: quote.Dollars,
Fractional: quote.Cents,
},
CostUsd: &pb.Money{
CurrencyCode: "USD",
Units: int64(quote.Dollars),
Nanos: int32(quote.Cents * 10000000)},
}, nil
}