design – To return or not – redundant data from method arguments


Which code should I prefere and why? Is there some general rule?

Code 1:

var apiLicenseInfo = GetLicenseFromApi(string userId, string deviceId);
var localLicenseInfo = MapToLocalLicense(apiLicense);

Code 2:

var apiLicenseInfo = GetLicenseFromApi(string userId, string deviceId);
var localLicenseInfo = MapToLocalLicense(apiLicense, userId, deviceId);

In Code 1 arguments (userId and deviceId) passed to method GetLicenseFromApi are returned in result of method. Then the result is translated to another object using only the result of previous method.

In Code 2 arguments (userId and deviceId) are not returned in result of GetLicenseFromApi method and must be passed to second method.

In my opinion the Code 1 is more consistent, but sends unnecessary data.