コード例 #1
0
        /// <summary>
        /// Gets refund of a particular credit note.
        /// </summary>
        /// <param name="creditnote_id">The creditnote_id is the identifier of the crditnote.</param>
        /// <param name="creditnote_refund_id">The creditnote_refund_id is the identifier of the refund.</param>
        /// <returns>Creditnote.</returns>
        public CreditNote GetCreditnoteRefund(string creditnote_id, string creditnote_refund_id)
        {
            string url      = baseAddress + "/" + creditnote_id + "/refunds" + creditnote_refund_id;
            var    responce = ZohoHttpClient.get(url, getQueryParameters());

            return(CreditNoteParser.getCreditnoteRefund(responce));
        }
コード例 #2
0
        /// <summary>
        /// Updates the refunded transaction.
        /// </summary>
        /// <param name="creditnote_id">The creditnote_id is the identifier of the crditnote.</param>
        /// <param name="creditnote_refund_id">The creditnote_refund_id is the identifier of the refund.</param>
        /// <param name="update_info">The update_info is the Creditnote object which is having the updation details.</param>
        /// <returns>Creditnote object.</returns>
        public CreditNote UpdateRefund(string creditnote_id, string creditnote_refund_id, CreditNote update_info)
        {
            string url        = baseAddress + "/" + creditnote_id + "/refunds/" + creditnote_refund_id;
            var    json       = JsonConvert.SerializeObject(update_info);
            var    jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.put(url, getQueryParameters(jsonstring));

            return(CreditNoteParser.getCreditnoteRefund(responce));
        }
コード例 #3
0
        /// <summary>
        ///     Refund credit note amount.
        /// </summary>
        /// <param name="creditnote_id">The creditnote_id is the identifier of the crditnote.</param>
        /// <param name="refund_details">
        ///     The refund_details is the Creditnote object which is having the refund details with date
        ///     and amount parameters as mandatory.
        /// </param>
        /// <returns>Creditnote object.</returns>
        public CreditNote AddRefund(string creditnote_id, CreditNote refund_details)
        {
            var url        = baseAddress + creditnote_id + "/refunds";
            var json       = JsonConvert.SerializeObject(refund_details);
            var jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring));

            return(CreditNoteParser.getCreditnoteRefund(responce));
        }