Description
Hello,
in DhlApiRetoure the ReturnAddress is prepared, just missing in DhlRetoureService. Could you please expand it.
Thank you.
Steps to Reproduce
ValitaionResult will show the requested missing address:
ServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddDhl(options =>
{
options.ApiKey = "XXX";
options.ApiSecret = "XXX";
options.Username = "user-valid";
options.Password = "SandboxPasswort2023!";
options.UseSandbox = true;
})
.AddDhlShipping();
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();
IDhlShippingClient dhlShippingClient = serviceProvider.GetRequiredService();
bool ReturnLabel = true;
var dhlShipmentRequest = new DhlShipmentRequest
{
Profile = "STANDARD_GRUPPENPROFIL",
BillingNumber = "33333333330101",
Product = DhlProduct.V01PAK,
Shipper = new Address
{
Name = "Max Mustermann",
Street = "Wolfener Str.",
HouseNumber = "32",
PostalCode = "12681",
City = "Berlin",
CountryCode = "DEU"
},
Consignee = new Address
{
Name = "Erika Musterfrau",
Street = "Berliner Straße",
HouseNumber = "42",
PostalCode = "10117",
City = "Berlin",
CountryCode = "DEU"
},
Packages =
[
new Package
{
Weight = 2.5,
Dimensions = new Dimensions { Length = 35, Width = 25, Height = 10 }
}
],
ValueAddedServices = !ReturnLabel ? null : new DhlValueAddedServices
{
DhlRetoure = new DhlRetoureService
{
BillingNumber = "33333333330101",
},
},
Reference = "ORDER-12345",
ShipDate = DateOnly.FromDateTime(DateTime.Today.AddDays(1))
};
Parcel.NET.Dhl.Shipping.Models.ValidationResult validationResult = await dhlShippingClient.ValidateShipmentAsync(dhlShipmentRequest);
if (validationResult.Valid)
{
string sDebug = "sasa";
}
else
{
string sDebug = "sasa";
}
Expected Behavior
XXX
Actual Behavior
XXX
Package
Parcel.NET.Dhl.Shipping
Carrier
DHL
.NET Version
.NET 9
Package Version
1.0.1
Additional Context
No response
Description
Hello,
in DhlApiRetoure the ReturnAddress is prepared, just missing in DhlRetoureService. Could you please expand it.
Thank you.
Steps to Reproduce
ValitaionResult will show the requested missing address:
ServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddDhl(options =>
{
options.ApiKey = "XXX";
options.ApiSecret = "XXX";
})
.AddDhlShipping();
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();
IDhlShippingClient dhlShippingClient = serviceProvider.GetRequiredService();
bool ReturnLabel = true;
var dhlShipmentRequest = new DhlShipmentRequest
{
Profile = "STANDARD_GRUPPENPROFIL",
BillingNumber = "33333333330101",
Product = DhlProduct.V01PAK,
Shipper = new Address
{
Name = "Max Mustermann",
Street = "Wolfener Str.",
HouseNumber = "32",
PostalCode = "12681",
City = "Berlin",
CountryCode = "DEU"
},
Consignee = new Address
{
Name = "Erika Musterfrau",
Street = "Berliner Straße",
HouseNumber = "42",
PostalCode = "10117",
City = "Berlin",
CountryCode = "DEU"
},
Packages =
[
new Package
{
Weight = 2.5,
Dimensions = new Dimensions { Length = 35, Width = 25, Height = 10 }
}
],
ValueAddedServices = !ReturnLabel ? null : new DhlValueAddedServices
{
DhlRetoure = new DhlRetoureService
{
BillingNumber = "33333333330101",
},
},
Reference = "ORDER-12345",
ShipDate = DateOnly.FromDateTime(DateTime.Today.AddDays(1))
};
Parcel.NET.Dhl.Shipping.Models.ValidationResult validationResult = await dhlShippingClient.ValidateShipmentAsync(dhlShipmentRequest);
if (validationResult.Valid)
{
string sDebug = "sasa";
}
else
{
string sDebug = "sasa";
}
Expected Behavior
XXX
Actual Behavior
XXX
Package
Parcel.NET.Dhl.Shipping
Carrier
DHL
.NET Version
.NET 9
Package Version
1.0.1
Additional Context
No response