Click or drag to resize
Infosoft Logo

InfoWebXMLWebServiceCalculatePrice Method

Calculates the price based on product, term, currency, discount, number of copies and zip code. The price value is to be found in the Price property of the InfoWebPrice object which is returned. It is important that the product term matches the offer term, for this method to return a price.

Namespace: Infosoft.Webservices
Assembly: Infosoft.Webservices (in Infosoft.Webservices.dll) Version: 4.00.0.0
Syntax
public InfoWebPrice CalculatePrice(
	string titleCode,
	string productCode,
	string termCode,
	string zipCode,
	string currencyCode,
	int numberOfCopies
)

Parameters

titleCode  String
The code for the subscription title
productCode  String
Product code
termCode  String
Term code
zipCode  String
Zip code
currencyCode  String
Currency code
numberOfCopies  Int32
Number of copies

Return Value

InfoWebPrice
InfoWebPrice object with status code StatusCodes.OK if the price was calculated successfully. For other possible status codes, see the remarks section
Remarks

Possible status codes:

    string titleCode = "VIN";
    string productCode = "V6";
    string termCode = "12";
    string zipCode = "0178";
    string currencyCode = "NOK";
    int numberOfCopies = 1;
    
    InfoWebPrice priceObject = CalculatePrice(titleCode, productCode, termCode, zipCode, currencyCode, numberOfCopies);
    if (priceObject.StatusCode == StatusCodes.OK)
    {
        decimal price = priceObject.Price;
    }
    else
    {
        // Show an error message based on another status code
    }
See Also