Added methods for working with external courier services
Tags:
Starting from V7, the delivery IDeliveryOrder introduces a new field IDeliveryOrder.ExternalCourierServiceData, as well as methods for assigning an external courier service PluginContext.Operations.ChangeDeliveryExternalCourierService and an external courier PluginContext.Operations.ChangeDeliveryExternalCourier.
Example usage
private void EcsExample()
{
var delivery = ...;
var credentials = PluginContext.Operations.AuthenticateByPin(pin);
// Identifier obtained from the external system
Guid ecsId = ...;
// Name of the system
string ecsName = "Service Name";
PluginContext.Operations.ChangeDeliveryExternalCourierService(ecsId, ecsName, delivery, credentials);
delivery = PluginContext.Operations.GetDeliveryOrderById(delivery.Id);
string courierName = "John Doe";
string courierPhone = "+999 555 123 4567"; // courier's phone, in international format
string courierComment = "Cash payment";
PluginContext.Operations.ChangeDeliveryExternalCourier(courierName, courierPhone, courierComment, delivery, credentials)
}