models

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPullStatusEnum added in v0.2.13

type DataPullStatusEnum string
const (
	// PulledInfoAndValuationStatus means we pulled vin, edmunds, build and valuations
	PulledInfoAndValuationStatus DataPullStatusEnum = "PulledAll"
	// PulledValuationDrivlyStatus means we only pulled offers and pricing
	PulledValuationDrivlyStatus   DataPullStatusEnum = "PulledValuations"
	PulledValuationVincarioStatus DataPullStatusEnum = "PulledValuationVincario"
	SkippedDataPullStatus         DataPullStatusEnum = "Skipped"
	ErrorDataPullStatus           DataPullStatusEnum = "Error"
)

type DeviceOffer added in v0.2.0

type DeviceOffer struct {
	// Contains a list of offer sets, one for each source
	OfferSets []OfferSet `json:"offerSets"`
}

type DeviceValuation added in v0.2.0

type DeviceValuation struct {
	// Contains a list of valuation sets, one for each vendor
	ValuationSets []ValuationSet `json:"valuationSets"`
}

type OdometerMeasurementEnum added in v0.3.9

type OdometerMeasurementEnum string

OdometerMeasurementEnum is a custom type for representing different types of odometer measurements.

const (
	// Real indicates the odometer measurement is actual.
	Real OdometerMeasurementEnum = "Real"

	// Estimated indicates the odometer measurement is an estimate.
	Estimated OdometerMeasurementEnum = "Estimated"

	// Market indicates the odometer measurement is based on market trends.
	Market OdometerMeasurementEnum = "Market"
)

func (OdometerMeasurementEnum) String added in v0.3.9

func (ome OdometerMeasurementEnum) String() string

String returns the string representation of the OdometerMeasurementEnum.

type Offer added in v0.2.0

type Offer struct {
	// The vendor of the offer (eg. "carmax", "carvana", etc.)
	Vendor string `json:"vendor"`
	// The offer price from the vendor
	Price int `json:"price,omitempty"`
	// The offer URL from the vendor
	URL string `json:"url,omitempty"`
	// An error from the vendor (eg. when the VIN is invalid)
	Error string `json:"error,omitempty"`
	// The grade of the offer from the vendor (eg. "RETAIL")
	Grade string `json:"grade,omitempty"`
	// The reason the offer was declined from the vendor
	DeclineReason string `json:"declineReason,omitempty"`
}

type OfferRequest added in v0.2.3

type OfferRequest struct {
	UserDeviceID string `json:"user_device_id"`
}

type OfferSet added in v0.2.0

type OfferSet struct {
	// The source of the offers (eg. "drivly")
	Source string `json:"source"`
	// The time the offers were pulled
	Updated string `json:"updated,omitempty"`
	// The mileage used for the offers
	Mileage int `json:"mileage,omitempty"`
	// Whether estimated, real, or from the market (eg. vincario). Market, Estimated, Real
	OdometerMeasurementType OdometerMeasurementEnum `json:"odometerMeasurementType"`
	// This will be the zip code used (if any) for the offers request regardless if the source uses it
	ZipCode string `json:"zipCode,omitempty"`
	// Contains a list of offers from the source
	Offers []Offer `json:"offers"`
}

func DecodeOfferFromJSON added in v0.2.3

func DecodeOfferFromJSON(drivlyJSON []byte) OfferSet

type PowertrainType

type PowertrainType string
const (
	ICE  PowertrainType = "ICE"
	HEV  PowertrainType = "HEV"
	PHEV PowertrainType = "PHEV"
	BEV  PowertrainType = "BEV"
	FCEV PowertrainType = "FCEV"
)

func (PowertrainType) String

func (p PowertrainType) String() string

func (*PowertrainType) UnmarshalJSON

func (p *PowertrainType) UnmarshalJSON(b []byte) error

type UserDeviceMetadata

type UserDeviceMetadata struct {
	PowertrainType          *PowertrainType `json:"powertrainType,omitempty"`
	ElasticDefinitionSynced bool            `json:"elasticDefinitionSynced,omitempty"`
	ElasticRegionSynced     bool            `json:"elasticRegionSynced,omitempty"`
	PostalCode              *string         `json:"postal_code"`
	GeoDecodedCountry       *string         `json:"geoDecodedCountry"`
	GeoDecodedStateProv     *string         `json:"geoDecodedStateProv"`
	// CANProtocol is the protocol that was detected by edge-network from the autopi.
	CANProtocol *string `json:"canProtocol,omitempty"`
}

type ValuationSet added in v0.2.0

type ValuationSet struct {
	// The source of the valuation (eg. "drivly" or "blackbook")
	Vendor string `json:"vendor"`
	// The time the valuation was pulled or in the case of blackbook, this may be the event time of the device odometer which was used for the valuation
	Updated string `json:"updated,omitempty"`
	// The mileage used for the valuation
	Mileage int `json:"mileage,omitempty"`
	// This will be the zip code used (if any) for the valuation request regardless if the vendor uses it
	ZipCode string `json:"zipCode,omitempty"`
	// Useful when Drivly returns multiple vendors and we've selected one (eg. "drivly:blackbook")
	TradeInSource string `json:"tradeInSource,omitempty"`
	// tradeIn is equal to tradeInAverage when available
	TradeIn int `json:"tradeIn,omitempty"`
	// tradeInClean, tradeInAverage, and tradeInRough my not always be available
	TradeInClean   int `json:"tradeInClean,omitempty"`
	TradeInAverage int `json:"tradeInAverage,omitempty"`
	TradeInRough   int `json:"tradeInRough,omitempty"`
	// Useful when Drivly returns multiple vendors and we've selected one (eg. "drivly:blackbook")
	RetailSource string `json:"retailSource,omitempty"`
	// retail is equal to retailAverage when available
	Retail int `json:"retail,omitempty"`
	// retailClean, retailAverage, and retailRough my not always be available
	RetailClean   int    `json:"retailClean,omitempty"`
	RetailAverage int    `json:"retailAverage,omitempty"`
	RetailRough   int    `json:"retailRough,omitempty"`
	OdometerUnit  string `json:"odometerUnit"`
	// Odometer used for calculating values
	Odometer int `json:"odometer"`
	// whether estimated, real, or from the market (eg. vincario). Market, Estimated, Real
	OdometerMeasurementType OdometerMeasurementEnum `json:"odometerMeasurementType"`
	// UserDisplayPrice the top level value to show to users in mobile app
	UserDisplayPrice int `json:"userDisplayPrice"`
	// eg. USD or EUR
	Currency string `json:"currency"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL