Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions parcel.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ type ParcelParams struct {
ExternalID string
ToServicePointID int64
Weight string
Length string
Width string
Height string
OrderNumber string
SenderID int64
Items []CreateParcelItemRequest
Expand Down Expand Up @@ -123,6 +126,9 @@ type ParcelRequest struct {
CountryState string `json:"country_state"`
Country string `json:"country"`
Weight string `json:"weight,omitempty"`
Length string `json:"length,omitempty"`
Width string `json:"width,omitempty"`
Height string `json:"height,omitempty"`
Telephone string `json:"telephone"`
Email string `json:"email"`
RequestLabel bool `json:"request_label"`
Expand Down Expand Up @@ -257,6 +263,15 @@ func (p *ParcelParams) GetPayload() interface{} {
if p.Weight != "" {
parcel.Weight = p.Weight
}
if p.Length != "" {
parcel.Length = p.Length
}
if p.Width != "" {
parcel.Width = p.Width
}
if p.Height != "" {
parcel.Height = p.Height
}

ar := ParcelRequestContainer{Parcel: parcel}
return ar
Expand Down
Loading