Exemplo n.º 1
0
        /// <summary>
        /// Refund the excess amount paid to the vendor.
        /// </summary>
        /// <param name="id">The id of the vendor payment to refund.</param>
        /// <param name="item">The vendor payment refund data to process.</param>
        /// <returns>A response with the refund data.</returns>
        public async Task <VendorPaymentRefund> RefundAnExcessVendorPaymentAsync(string id, VendorPaymentRefund item)
        {
            var response = await PostDataAsync <VendorPaymentRefund, ZohoBooksResponse <VendorPaymentRefund> >
                               (string.Format("{0}/refunds", id), item, OrganizationIdFilter);

            return(response.Resource);
        }
Exemplo n.º 2
0
        // TODO: After creating vendor credit refunds, vendor credit refunds, customer payment refunds api, a categorization methods for it here.

        /// <summary>
        /// Categorize an Uncategorized transaction as vendor payment refund.
        /// </summary>
        /// <param name="transactionId">The id of the transaction.</param>
        /// <param name="vendorPaymentRefund">The vendor payment refund data to use.</param>
        /// <returns>A response indicating whether the request was successful.</returns>
        public async Task <bool> CategorizeAsVendorCreditRefund(string transactionId, VendorPaymentRefund vendorPaymentRefund)
        {
            var response = await PostDataAsync <VendorPaymentRefund, ZohoBooksMessage>
                               (string.Format("uncategorized/{0}/categorize/vendorpaymentrefunds", transactionId), vendorPaymentRefund, OrganizationIdFilter);

            return(response.Code == 0);
        }