REST API client update

This commit is contained in:
PB
2025-11-15 20:24:16 +01:00
parent ba94a1d17f
commit 4fbc0a35a7
6 changed files with 36 additions and 952 deletions

View File

@@ -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
}