Added methods for working with external courier services
From V7 in delivery IDeliveryOrder
a new field appears IDeliveryOrder.ExternalCourierServiceData
, as well as methods for assigning an external courier service PluginContext.Operations.ChangeDeliveryExternalCourierService
and external courier PluginContext.Operations.ChangeDeliveryExternalCourier
.
Usage example
private void EcsExample()
{
var delivery = ...;
var credentials = PluginContext.Operations.AuthenticateByPin(pin);
// ID received from external system
Guid ecsId = ...;
// System name
string ecsName = "Service Name";
PluginContext.Operations.ChangeDeliveryExternalCourierService(ecsId, ecsName, delivery, credentials);
delivery = PluginContext.Operations.GetDeliveryOrderById(delivery.Id);
string courierName = "John Johnson";
string courierPhone = "+380971111011"; // courier phone number, in international format
string courierComment = "Cash payment";
PluginContext.Operations.ChangeDeliveryExternalCourier(courierName, courierPhone, courierComment, delivery, credentials)
}