// CreateAParcel is to create a new parcel
CreateAParcel is to create a new parcel
// CreateAParcel is to create a new parcel
func CreateAParcel(body CreateAParcelBody, r Request) (CreateAParcelReturn, error) {
	convert, err := json.Marshal(body)
	if err != nil {
		return CreateAParcelReturn{}, err
	}
	c := Config{
		Path:   "/parcels",
		Method: "POST",
		Body:   convert,
	}
	response, err := c.Send(r)
	if err != nil {
		return CreateAParcelReturn{}, err
	}
	defer response.Body.Close()
	var decode CreateAParcelReturn
	err = json.NewDecoder(response.Body).Decode(&decode)
	if err != nil {
		return CreateAParcelReturn{}, err
	}
	return decode, err
}
func CreateAParcel ( body CreateAParcelBody , r Request ) ( CreateAParcelReturn , error ) { convert , err := json . Marshal ( body ) if err != nil { return CreateAParcelReturn { } , err } c := Config { Path : " " , Method : " " , Body : convert , } response , err := c . Send ( r ) if err != nil { return CreateAParcelReturn { } , err } defer response . Body . Close ( ) var decode CreateAParcelReturn err = json . NewDecoder ( response . Body ) . Decode ( & decode ) if err != nil { return CreateAParcelReturn { } , err } return decode , err }
CreateAParcel is to create a new parcel
CreateAParcel is to create a new parcel
// Convert body data // Set config for new request // Send request // Close request // Decode data // Return data