/// <summary> /// Perform a new RecurringBilling. /// /// <param name="recurringBill"> /// RecurringBill object. /// </param> /// <returns> /// RecurringBillingInformation object. /// </returns> /// <seealso cref="PayHubWS.com.payhub.ws.api.RecurringBillingInformation"/> /// </summary> public RecurringBillInformation doRecurringBill(RecurringBill recurringBill) { recurringBill.Merchant = _merchant; recurringBill._url = _url; var request = setHeadersPost(recurringBill._url, this._oauthToken); string json = JsonConvert.SerializeObject(recurringBill, Formatting.None, new JsonSerializerSettings { DefaultValueHandling = DefaultValueHandling.Ignore }); RecurringBillInformation response = recurringBill.PerformRecurringBill(json, request); response.transactionManager = this; return(response); }
/// <summary> /// Perform a new query that retrieves you the Recurring Bill Information from a Customer Id. /// /// <param name="recurringBillId"> /// String recurringBillId: the ID of a particular Recurring Bill Transaction. /// </param> /// <returns> /// a RecurringBillingInformation object. /// </returns> /// <seealso cref="PayHubWS.com.payhub.ws.api.RecurringBillInformation"/> /// </summary> public RecurringBillInformation findRecurringBillInformationByCustomer(string customerId) { if (customerId.Equals("") || customerId == null) { return(null); } RecurringBillInformation response = new RecurringBillInformation(); var url = _url + "recurring-bill/search/findByCustomerRef?customerId=" + customerId; var request = setHeadersGet(url, this._oauthToken); string result = doGet(request); response = JsonConvert.DeserializeObject <RecurringBillInformation>(result); response.rowData = result; response.transactionManager = this; return(response); }
/// <summary> /// Perform a new query that retrieves you the Recurring Bill Information for a particular Recurring Bill transaction. /// /// <param name="recurringBillId"> /// String recurringBillId: the ID of a particular Recurring Bill Transaction. /// </param> /// <returns> /// a RecurringBillingInformation object. /// </returns> /// <seealso cref="PayHubWS.com.payhub.ws.api.RecurringBillingInformation"/> /// </summary> public RecurringBillInformation getRecurringBillInformation(string refundId) { if (refundId == null || refundId.Equals("")) { return(null); } RecurringBillInformation response = new RecurringBillInformation(); var url = _url + RecurringBill.RECURRENT_BILL_ID_LINK + refundId; var request = setHeadersGet(url, this._oauthToken); string result = doGet(request); if (result == null || result.Equals("")) { return(null); } response = JsonConvert.DeserializeObject <RecurringBillInformation>(result); response.rowData = result; response.transactionManager = this; return(response); }
/// <summary> /// Perform a new query that retrieves you the Recurring Bill Information for a particular Recurring Bill transaction. /// /// <param name="recurringBillId"> /// String recurringBillId: the ID of a particular Recurring Bill Transaction. /// </param> /// <returns> /// a RecurringBillingInformation object. /// </returns> /// <seealso cref="PayHubWS.com.payhub.ws.api.RecurringBillingInformation"/> /// </summary> public RecurringBillInformation getRecurringBillInformation(string refundId) { if (refundId == null || refundId.Equals("")) return null; RecurringBillInformation response = new RecurringBillInformation(); var url = _url + RecurringBill.RECURRENT_BILL_ID_LINK + refundId; var request = setHeadersGet(url, this._oauthToken); string result = doGet(request); if (result == null || result.Equals("")) return null; response = JsonConvert.DeserializeObject<RecurringBillInformation>(result); response.rowData = result; response.transactionManager = this; return response; }
/// <summary> /// Perform a new query that retrieves you the Recurring Bill Information from a Merchant Id. /// /// <param name="recurringBillId"> /// String recurringBillId: the ID of a particular Recurring Bill Transaction. /// </param> /// <returns> /// a RecurringBillingInformation object. /// </returns> /// <seealso cref="PayHubWS.com.payhub.ws.api.RecurringBillInformation"/> /// </summary> public RecurringBillInformation findRecurringBillInformationByMerchantOrganization(string merchantId) { if (merchantId.Equals("") || merchantId == null) { return null; } RecurringBillInformation response = new RecurringBillInformation(); var url = _url + "recurring-bill/search/findByMerchantOrganizationId?organizationId=" + merchantId; var request = setHeadersGet(url, this._oauthToken); string result = doGet(request); response = JsonConvert.DeserializeObject<RecurringBillInformation>(result); response.rowData = result; response.transactionManager = this; return response; }
public RecurringBillInformation PerformRecurringBill(string json, System.Net.HttpWebRequest request) { RecurringBillInformation responseObject = new RecurringBillInformation(); using (var streamWriter = new StreamWriter(request.GetRequestStream())) { streamWriter.Write(json); streamWriter.Flush(); streamWriter.Close(); } var result = doPost(request, _url); responseObject = JsonConvert.DeserializeObject<RecurringBillInformation>(result); responseObject.rowData = result; return responseObject; }