public IActionResult GetSubscription() { AllSubscriptionModel subscription = epayco.getAllSubscription(); return(Ok(subscription)); }
public AllSubscriptionModel getAllSubscription() { ENDPOINT = body.getQueryFindAllSubscription(_PUBLIC_KEY); string content = _request.Execute( ENDPOINT, "GET", _auxiliars.ConvertToBase64(_PUBLIC_KEY), PARAMETER); SubscriptionStatus status = JsonConvert.DeserializeObject <SubscriptionStatus>(content); AllSubscriptionModel subscription = new AllSubscriptionModel(); if (status.status) { subscription = JsonConvert.DeserializeObject <AllSubscriptionModel>(content); } else { subscription.status = false; subscription.message = status.message; } return(subscription); }