namespace Cute;

public class PaymentCancelTask : NetworkTask
{
	private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentCancel;

	public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";

	public void SetParameter(PaymentSkuInfo skuInfo, string errorMessage)
	{
		PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams();
		paymentStartCancelParams.payment.product_id = skuInfo.productId;
		paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode;
		paymentStartCancelParams.payment.price = skuInfo.price;
		paymentStartCancelParams.error.message = errorMessage;
		base.Params = paymentStartCancelParams;
	}

	protected override int Parse()
	{
		return base.Parse();
	}
}
