REST API client update
This commit is contained in:
@@ -3,7 +3,7 @@ package api
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
def "git.pbiernat.io/egommerce/api-entities/http"
|
||||
pricing "git.ego.freeddns.org/egommerce/api-entities/pricing/dto"
|
||||
)
|
||||
|
||||
func NewPricingAPI() *PricingAPI {
|
||||
@@ -14,9 +14,9 @@ type PricingAPI struct {
|
||||
httpClient *HttpClient
|
||||
}
|
||||
|
||||
func (a *PricingAPI) GetProductPrice(productID int) (*def.ProductPriceResponse, error) {
|
||||
func (a *PricingAPI) GetProductPrice(productID int) (*pricing.ProductPriceResponseDTO, error) {
|
||||
url := fmt.Sprintf("/api/v1/product/%d", productID)
|
||||
res := new(def.ProductPriceResponse)
|
||||
res := new(pricing.ProductPriceResponseDTO)
|
||||
if err := a.httpClient.SendGet("pricing-svc", url, nil, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user