Documentation ¶
Index ¶
- type Area
- type City
- type Consignee
- type Consigner
- type Country
- type Courier
- type Destination
- type InternalExternal
- type Item
- type Label
- type Location
- type Logistic
- type OrderActivation
- type OrderStatus
- type Origin
- type Package
- type Pagination
- type Pickup
- type PickupData
- type Pricing
- type Province
- type Rate
- type Shipper
- type ShippingOrder
- type Status
- type Suburb
- type Tracking
- type TrackingData
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 Destination ¶
type InternalExternal ¶
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 OrderActivation ¶
type OrderActivation struct {
OrderId []string `json:"order_id"`
}
type OrderStatus ¶
type OrderStatus string
const ( PENDING_PAYMENT OrderStatus = "PENDING_PAYMENT" PAID OrderStatus = "PAID" 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 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 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 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 Tracking ¶
type Tracking struct {
Trackings []*TrackingData `json:"trackings"`
}
Click to show internal directories.
Click to hide internal directories.