public IParseble Parse(JSONNode rootNode) { _couponCode = rootNode["coupon_code"]; _operationId = rootNode["operation_id"].AsInt; JSONNode node = rootNode["errors"].AsArray[0]; _error = node["message"]; _api = new XsollaApi().Parse(rootNode[XsollaApiConst.R_API]) as XsollaApi; return this; }
public IParseble Parse(JSONNode utilsNode) { accessToken = utilsNode [XsollaApiConst.ACCESS_TOKEN].Value; user = new XsollaUser ().Parse (utilsNode [XsollaApiConst.R_USER]) as XsollaUser; project = new XsollaProject ().Parse (utilsNode [XsollaApiConst.R_PROJECT]) as XsollaProject; purchase = new XsollaPurchase ().Parse (utilsNode [XsollaApiConst.R_PURCHASE]) as XsollaPurchase; settings = new XsollaSettings ().Parse (utilsNode [XsollaApiConst.R_SETTINGS]) as XsollaSettings; translations = new XsollaTranslations ().Parse (utilsNode [XsollaApiConst.R_TRANSLATIONS]) as XsollaTranslations; api = new XsollaApi ().Parse (utilsNode [XsollaApiConst.R_API]) as XsollaApi; return this; }