// InsertingShipments is to insert a shipment into an api integration
InsertingShipments is to insert a shipment into an api integration
// InsertingShipments is to insert a shipment into an api integration
func InsertingShipments(id int, body []InsertingShipmentsBody, r Request) ([]InsertingShipmentsReturn, error) {
	convert, err := json.Marshal(body)
	if err != nil {
		return nil, err
	}
	c := Config{
		Path:   fmt.Sprintf("/integrations/%d/shipments", id),
		Method: "POST",
		Body:   convert,
	}
	response, err := c.Send(r)
	if err != nil {
		return nil, err
	}
	defer response.Body.Close()
	var decode []InsertingShipmentsReturn
	err = json.NewDecoder(response.Body).Decode(&decode)
	if err != nil {
		return nil, err
	}
	return decode, err
}
func InsertingShipments ( id int , body [ ] InsertingShipmentsBody , r Request ) ( [ ] InsertingShipmentsReturn , error ) { convert , err := json . Marshal ( body ) if err != nil { return nil , err } c := Config { Path : fmt . Sprintf ( " " , id ) , Method : " " , Body : convert , } response , err := c . Send ( r ) if err != nil { return nil , err } defer response . Body . Close ( ) var decode [ ] InsertingShipmentsReturn err = json . NewDecoder ( response . Body ) . Decode ( & decode ) if err != nil { return nil , err } return decode , err }
InsertingShipments is to insert a shipment into an api integration
InsertingShipments is to insert a shipment into an api integration
// Convert body data // Set config for new request // Send request // Close request // Decode data // Return data