entity

package
v0.0.0-...-4ce1ff4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	Id       int       `json:"id"`
	Name     string    `json:"name"`
	Lat      float64   `json:"lat"`
	Lng      float64   `json:"lng"`
	Postcode string    `json:"postcode"`
	Suburb   *Suburb   `json:"suburb,omitempty"`
	City     *City     `json:"city,omitempty"`
	Province *Province `json:"province,omitempty"`
	Country  *Country  `json:"country,omitempty"`
}

type City

type City struct {
	Id       int       `json:"id"`
	Name     string    `json:"name"`
	Lat      float64   `json:"lat"`
	Lng      float64   `json:"lng"`
	Province *Province `json:"province,omitempty"`
	Country  *Country  `json:"country,omitempty"`
}

type Consignee

type Consignee struct {
	Name        string `json:"name" validate:"required"`
	PhoneNumber string `json:"phone_number" validate:"required"`
}

type Consigner

type Consigner struct {
	Name        string `json:"name" validate:"required"`
	PhoneNumber string `json:"phone_number" validate:"required"`
}

type Country

type Country struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	Code string `json:"code"`
}

type Courier

type Courier struct {
	COD          bool `json:"cod"`
	RateId       int  `json:"rate_id" validate:"required"`
	UseInsurance bool `json:"use_insurance"`
}

type Destination

type Destination struct {
	Address string `json:"address" validate:"required"`
	AreaId  int    `json:"area_id" validate:"required"`
	Lat     string `json:"lat" validate:"required"`
	Lng     string `json:"lng" validate:"required"`
}

type InternalExternal

type InternalExternal struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Item

type Item struct {
	Name  string `json:"name" validate:"required"`
	Price int    `json:"price" validate:"required"`
	Qty   int    `json:"qty" validate:"required"`
}

type Label

type Label struct {
	TotalPage int
	Url       string
	Type      string
}

type Location

type Location struct {
	AreaId       int     `json:"area_id"`
	AreaName     string  `json:"area_name"`
	SuburbId     int     `json:"suburb_id"`
	SuburbName   string  `json:"suburb_name"`
	CityId       int     `json:"city_id"`
	CityName     string  `json:"city_name"`
	ProvinceId   int     `json:"province_id"`
	ProvinceName string  `json:"province_name"`
	CountryId    int     `json:"country_id"`
	CountryName  string  `json:"country_name"`
	Lat          float64 `json:"lat"`
	Lng          float64 `json:"lng"`
}

type Logistic

type Logistic struct {
	Id           int    `json:"id"`
	Name         string `json:"name"`
	LogoURL      string `json:"logo_url"`
	Code         string `json:"code"`
	CompanyName  string `json:"company_name"`
	CodFee       int    `json:"cod_fee"`
	CodMinAmount int    `json:"cod_min_amount"`
	CodMaxAmount int    `json:"cod_max_amount"`
}

type OrderActivation

type OrderActivation struct {
	OrderId []string `json:"order_id"`
}

type OrderStatus

type OrderStatus string
const (
	PENDING_PAYMENT   OrderStatus = "PENDING_PAYMENT"
	IN_PROGRESS       OrderStatus = "IN_PROGRESS"
	COMPLETED         OrderStatus = "COMPLETED"
	CANCELLED         OrderStatus = "CANCELLED"
	FAILED            OrderStatus = "FAILED"
	REFUND_PROCESSING OrderStatus = "REFUND_PROCESSING"
	REFUND_COMPLETED  OrderStatus = "REFUND_COMPLETED"
	RETURN_PROCESSING OrderStatus = "RETURN_PROCESSING"
	RETURN_COMPLETED  OrderStatus = "RETURN_COMPLETED"
	LOST_OR_DAMAGED   OrderStatus = "LOST_OR_DAMAGED"
)

type Origin

type Origin struct {
	Address string `json:"address" validate:"required"`
	AreaId  int    `json:"area_id" validate:"required"`
	Lat     string `json:"lat" validate:"required"`
	Lng     string `json:"lng" validate:"required"`
}

type Package

type Package struct {
	Height      int     `json:"height" validate:"required"`
	Items       []Item  `json:"items" validate:"required,dive"`
	Length      int     `json:"length" validate:"required"`
	PackageType int     `json:"package_type" validate:"required"`
	Price       int     `json:"price" validate:"required"`
	Weight      float32 `json:"weight" validate:"required"`
	Width       int     `json:"width" validate:"required"`
}

type Pagination

type Pagination struct {
	CurrentPage   int `json:"current_page"`
	TotalPages    int `json:"total_pages"`
	TotalElements int `json:"total_elements"`
}

type Pickup

type Pickup struct {
	Data PickupData `json:"data"`
}

type PickupData

type PickupData struct {
	OrderActivation OrderActivation `json:"order_activation"`
}

type Pricing

type Pricing struct {
	Origin      Location `json:"origin"`
	Destination Location `json:"destination"`
	Pricings    []struct {
		Logistic                       Logistic `json:"logistic"`
		Rate                           Rate     `json:"rate"`
		Weight                         float32  `json:"weight"`
		Volume                         int      `json:"volume"`
		VolumeWeight                   float32  `json:"volume_weight"`
		FinalWeight                    int      `json:"final_weight"`
		MinDay                         int      `json:"min_day"`
		MaxDay                         int      `json:"max_day"`
		UnitPrice                      int      `json:"unit_price"`
		TotalPrice                     int      `json:"total_price"`
		Discount                       float32  `json:"discount"`
		DiscountValue                  int      `json:"discount_value"`
		DiscountedPrice                int      `json:"discounted_price"`
		InsuranceFee                   int      `json:"insurance_fee"`
		MustUseInsurance               bool     `json:"must_use_insurance"`
		LiabilityValue                 int      `json:"liability_value"`
		FinalPrice                     int      `json:"final_price"`
		Currency                       string   `json:"currency"`
		InsuranceApplied               bool     `json:"insurance_applied"`
		BasePrice                      int      `json:"base_price"`
		SurchargeFee                   int      `json:"surcharge_fee"`
		HeavyDutySurchargeFee          int      `json:"heavy_duty_surcharge_fee"`
		FuelSurchargeFee               int      `json:"fuel_surcharge_fee"`
		EmergencySituationSurchargeFee int      `json:"emergency_situation_surcharge_fee"`
		CodFeeAmount                   int      `json:"cod_fee_amount"`
		PlatformFee                    int      `json:"platform_fee"`
		PlatformFeeAmount              int      `json:"platform_fee_amount"`
	}
}

type Province

type Province struct {
	Id      int      `json:"id"`
	Name    string   `json:"name"`
	Lat     float64  `json:"lat"`
	Lng     float64  `json:"lng"`
	Country *Country `json:"country,omitempty"`
}

type Rate

type Rate struct {
	Id              int    `json:"id"`
	Name            string `json:"name"`
	Type            string `json:"type"`
	Description     string `json:"description"`
	FullDescription string `json:"full_description"`
	IsHubless       bool   `json:"is_hubless"`
	IsDropOff       bool   `json:"is_drop_off"`
	IsMultikoli     bool   `json:"is_multikoli"`
}

type Shipper

type Shipper struct {
	Auth            string           `json:"auth"`
	ShippingId      string           `json:"order_id"` // order_id ini berisi shipping_id dari aplikasi ini
	TrackingId      string           `json:"tracking_id"`
	OrderTrackingId string           `json:"order_tracking_id"`
	OrderId         string           `json:"external_id"` // external_id ini berisi order_id dari aplikasi ini
	StatusDate      time.Time        `json:"status_date"`
	Internal        InternalExternal `json:"internal"`
	External        InternalExternal `json:"external"`
	InternalStatus  Status           `json:"internal_status"`
	ExternalStatus  Status           `json:"external_status"`
	AWB             string           `json:"awb"`
}

type ShippingOrder

type ShippingOrder struct {
	Consignee   Consignee   `json:"consignee" validate:"required"`
	Consigner   Consigner   `json:"consigner" validate:"required"`
	Courier     Courier     `json:"courier" validate:"required"`
	Coverage    string      `json:"coverage" validate:"required"`
	Destination Destination `json:"destination" validate:"required"`
	ExternalId  string      `json:"external_id" validate:"required"`
	Origin      Origin      `json:"origin" validate:"required"`
	Package     Package     `json:"package" validate:"required"`
	PaymentType string      `json:"payment_type" validate:"required"`
}

type Status

type Status struct {
	Code        int    `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Suburb

type Suburb struct {
	Id       int       `json:"id"`
	Name     string    `json:"name"`
	Lat      float64   `json:"lat"`
	Lng      float64   `json:"lng"`
	City     *City     `json:"city,omitempty"`
	Province *Province `json:"province,omitempty"`
	Country  *Country  `json:"country,omitempty"`
}

type Tracking

type Tracking struct {
	Trackings []*TrackingData `json:"trackings"`
}

type TrackingData

type TrackingData struct {
	ShipperStatus  Status    `json:"shipper_status"`
	LogisticStatus Status    `json:"logistic_status"`
	CreatedDate    time.Time `json:"created_date"`
}

Jump to

Keyboard shortcuts

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