diff --git a/api/api.go b/api/api.go index c332b77..44d6dcd 100644 --- a/api/api.go +++ b/api/api.go @@ -16,8 +16,7 @@ type IApi interface { } func NewApi(credentials client.Credentials) IApi { - client := client.NewClient(credentials) return &Api{ - Client: client, + Client: client.NewClient(credentials), } } diff --git a/model/product.go b/model/product.go index c607944..66fcbe3 100644 --- a/model/product.go +++ b/model/product.go @@ -1,18 +1,5 @@ package model -type VideosType string -type WarehouseDataIncomingType string - -const ( - VideoTypeFile VideosType = "file" - VideoTypeUrl VideosType = "url" -) - -const ( - WarehouseDataIncomingTypeShipping WarehouseDataIncomingType = "shipping" - WarehouseDataIncomingTypeProduction WarehouseDataIncomingType = "production" -) - type ( ImageVariant struct { Url string `json:"url"` @@ -42,10 +29,10 @@ type ( } Video struct { - Name string `json:"name"` - Description string `json:"description"` - Url string `json:"url"` - Type VideosType `json:"type"` + Name string `json:"name"` + Description string `json:"description"` + Url string `json:"url"` + Type string `json:"type"` } Software struct { @@ -72,10 +59,10 @@ type ( WarehouseName string `json:"warehouseName"` AvailableAmount int `json:"availableAmount"` Incoming []struct { - DateBegan string `json:"dateBegan"` - DateEnd string `json:"dateEnd"` - Amount int `json:"amount"` - Type WarehouseDataIncomingType `json:"type"` + DateBegan string `json:"dateBegan"` + DateEnd string `json:"dateEnd"` + Amount int `json:"amount"` + Type string `json:"type"` } }