#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ExpensesParser import ExpensesParser
from os.path import basename
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'expenses/'
parser = ExpensesParser()
zoho_http_client = ZohoHttpClient()

class ExpensesApi:
    """Expenses Api is used to:
    
    1.List expenses with pagination.
    2.Get the details of an expense.
    3.Create a billable or non-billable expense.
    4.Update an existing expense.
    5.Delete an expense.
    6.Get history and comments of an expense.
    7.Returns the receipt attached to an expense.
    8.Attach a receipt to an expense.
    9.Delete the receipt attached to the expense.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize Expenses Api using user's authtoken and organization 
            id.
 
        Args: 
Exemple #2
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.VendorPaymentsParser import VendorPaymentsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'vendorpayments/'
parser = VendorPaymentsParser()
zoho_http_client = ZohoHttpClient()


class VendorPaymentsApi:
    """Vendor Payaments Api is used to

    1.List all the paymnets made to your vendor.
    2.Get the details of a vendor payment.
    3.Create a payment made to the vendor.
    4.Update an existing vendor payment.
    5.Delete an existing vendor payment.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize Vendor payments api using user's authtoken and 
            organization id.

        Args: 
            authtoken(str): User's authtoken.
            organization_id(str): User's organization id.

        """
Exemple #3
0
#$Id$#

from os.path import basename
from json import dumps
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.InvoicesParser import InvoicesParser
from books.api.Api import Api

base_url = Api().base_url + 'invoices/'
parser = InvoicesParser()
zoho_http_client = ZohoHttpClient()


class InvoicesApi:
    """Invoice Api class is used to:
    
    1.List all invoices with pagination.
    2.Get the details of an invoice.
    3.Create an invoice.
    4.Update an existing invoice.
    5.Delete an existing invoice.
    6.Mark a draft invoice as sent.
    7.Mark an invoice status as void.
    8.Mark a voided invoice as draft.
    9.Email an invoice to the customer.
    10.Send invoices to your customer by email.
    11.Get the email content of an email.
    12.Remind the customer about an unpaid invoice by email.
    13.Remind the customer abount unpaid invoices by email.
    14.Get the mail content of the payment reminder.
    15.Export maximum of 25 invoices as pdf.
Exemple #4
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BankTransactionsParser import BankTransactionsParser
from books.api.Api import Api
from os.path import basename
from json import dumps

base_url = Api().base_url + 'banktransactions/'
zoho_http_client = ZohoHttpClient()
parser = BankTransactionsParser()


class BankTransactionsApi:
    """Bank Transactions Api class is used to 

    1.Get all the transaction details involved in an account.
    2.Get the details of a transaction.
    3.Create a bank transaction based on allowed transaction types.
    4.Update an existing bank transaction.
    5.Delete a transaction from an account.
    6.Get matching transactions.
    7.Match an uncategorized transaction with an existing transaction in the 
      account.
    8.Unmatch a transaction that was previously matched and make it 
      uncategorized.
    9.Get a list of all the associated that were matched or categorized to the 
      given imported transaction.
    10.Exclude a transaction from your bank or credit card account.
    11.Restore an excluded transaction in your account.
    12.Categorize an uncategorized transaction by creating a new transaction.
Exemple #5
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BankRulesParser import BankRulesParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'bankaccounts/rules/'
zoho_http_client = ZohoHttpClient()
parser = BankRulesParser()


class BankRulesApi:
    """This class is used to 

    1.Fetch all the rules created for a specified bank or credit card account.
    2.Get details of a specific rule.
    3.Create a rule.
    4.Update an existing rule.
    5.Delete a rule.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize Bank rules Api using user's authtoken and organization 
            id.

        Args: 
            authotoken(str): User's Authtoken.
            organization id(str): User's Organization id.

        """
Exemple #6
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BillsParser import BillsParser
from books.api.Api import Api
from os.path import basename
from json import dumps

base_url = Api().base_url + 'bills/'
zoho_http_client = ZohoHttpClient()
parser = BillsParser()

class BillsApi:
    """Bills Api is used to

    1.List all bills with pagination
    2.Get the details of a bill.
    3.Create a bill received from a vendor.
    4.Update an existing bill.
    5.delete an existing bill.
    6.Mark a bill status as void.
    7.Mark a void bill as open.
    8.Update the billing address.
    9.Get the list of payments made for the bill.
    10.Apply the vendor credits from excess vendor payments to a bill. 
    11.Delete a payment made to a bill.
    12.Returns a file attached to the bill.
    13.Attach a file to a bill.
    14.Delete the file attached to a bill.
    15.Get the cmplete history and comments of a bill.
    16.Add a comment for a bill.
Exemple #7
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.CreditNotesParser import CreditNotesParser
from os.path import basename
from json import dumps
from books.api.Api import Api

base_url = Api().base_url + 'creditnotes/'
parser = CreditNotesParser()
zoho_http_client = ZohoHttpClient()


class CreditNotesApi:
    """Creditnotes api class is used to 

    1.List Credits notes with pagination.
    2.Get details of a credit note.
    3.Create a credit note for a custoomer.
    4.Update an existing creditnote.
    5.Delete an existing creditnote.
    6.Change an existing creditnote status to open.
    7.Mark an existing creditnote as void.
    8.Email a creditnote to a customer.
    9.Get email history of a credit note.
    10.Get email content of a credit note.
    11.Update the billing address of an existing credit note.
    12.Update the shipping address of an existing credit note.
    13.Get all credit note pdf templates.
    14.Update the pdf template associated with the creditnote.
    15.List invooices to which the credit note is applied.
Exemple #8
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.RecurringInvoiceParser import RecurringInvoiceParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'recurringinvoices/'
parser = RecurringInvoiceParser()
zoho_http_client = ZohoHttpClient()


class RecurringInvoicesApi:
    """Recurring invoice api class is used:
    
    1.To list all the recurring invoices with pagination.
    2.To get details of a recurring invoice.
    3.To create a recurring invoice.
    4.To update an existing recurring invoice.
    5.To delete an existing recurring invoice.
    6.To stop an active recurring invoice.
    7.To resume a stopped recurring invoice.
    8.To update the pdf template associated with the recurring invoice.
    9.To get the complete history and comments of a recurring invoice.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize Contacts Api using user's authtoken and organization id.

        Args:
            authtoken(str): User's authtoken.
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'organizations/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()


class OrganizationsApi:
    """Organization api is used to

    1.List organizations.
    2.Get the details of an organization.
    3.Create an organization.
    4.Update an organization.
    
    """
    def __init__(self, authtoken, organization_id):
        """Initialize Settings Api using authtoken and organization id.

        Args:
            authtoken(str): User's Authtoken.
            organization_id(str): User's Organization id.

        """
        self.details = {
            'authtoken': authtoken,
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ChartOfAccountsParser import ChartOfAccountsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'chartofaccounts/'
parser = ChartOfAccountsParser()
zoho_http_client = ZohoHttpClient()


class ChartOfAccountsApi:
    """Chart of Accounts Api is used to:
     
    1.List chart of Accounts.
    2.Get the details of an account.
    3.Creates an account with the given account type.
    4.Updates an existing account.
    5.Delete an existing account.
    6.Update the account status as active.
    7.Update the account status as inactive.
    8.List all invoices transactions for the given account.
    9.Deletes the transaction.

    """
    def __init__(self, authtoken, organization_id):
        """Initilaize Chart of accounts api using user's authtoken and 
            organization id.

        Args: 
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ProjectsParser import ProjectsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'projects/'
zoho_http_client = ZohoHttpClient()
parser = ProjectsParser()


class ProjectsApi:
    """This class is used to 
 
    1. List all projects with pagination.
    2.Get details of a project.
    3.Create a new project.
    4.Update an existing project.
    5.Delete an existing project.
    6.Mark a project as active.
    7.Mark a project as inactive.
    8.Clone a project.
    9.Get list of tasks added to a project.
    10.Get details of a task.
    11.Add task to a project.
    12.Update details of a task.
    13.Delete a task added to a project.
    14.Get list of users associated with a project.
    15.Get details of a user in a project.
    16.Assign users to a project.
Exemple #12
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ContactParser import ContactParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'contacts/'
parser = ContactParser()
zoho_http_client = zoho_http_client = ZohoHttpClient()

class ContactPersonsApi:
    """ContactPersonsApi class is used to:

    1.To get the list of contact persons of a contact with pagination.
    2.To get the details of a contact person.
    3.To create a contact person for a contact.
    4.To update an existing contact person.
    5.To delete a contact person.
    6.To mark a contact person as primary for the contact.

    """
 
    def __init__(self, authtoken, organization_id):
        """Initialize ContactPersons Api using user's authtoken and 
            organization id.

        Args:
            authtoken(str): User's authtoken.
            organization_id(str): User's organization id.
Exemple #13
0
#$Id$#

from os.path import basename
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.EstimatesParser import EstimatesParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'estimates/'
parser = EstimatesParser()
zoho_http_client = ZohoHttpClient()

class EstimatesApi:
    """Estimates Api class is used to:
   
    1.List all estimates with pagination.
    2.Get the details of an estimate.
    3.Create an estimate.
    4.Update an existing estimate.
    5.Delete an existing estimate.
    6.Mark a draft estimate as sent.
    7.Mark a sent estimate as accepted.
    8.Mark a sent estimate as declined.
    9.Email an estimate to the customer.
    10.Send estimates to your customer by email.
    11.Get the email content of an estimate.
    12.Export maximum of 25 pdfs as single pdf.
    13.Export estimates as pdf and print them.
    14.Update the billing address for the estimate.
    15.Update the shipping address for the estimate.
    16.Get all estimate pdf templates.
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'settings/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()


class SettingsApi:
    """This class is used to 
 
    1.List preferences that are configured.
    2.Update the preferences that has been configured.
    3.Create a unit that can be associated to a line item.
    4.Delete a unit that has been associated to a line item.
    5.Get the details of invoice settings.
    6.Update the settings information of invoice.
    7.Get the details of notes and terms.
    8.Update invoice notes and terms.
    9.Get estimate settings.
    10.Update estimate settings.
    11.Get estimate notes and terms.
    12.Update estimate notes and terms.
    13.List creditnotes settings.
    14.Update creditnotes settings.
    15.Get creditnote notes and term
    16.Update creditnote notes and terms.
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'items/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()


class ItemsApi:
    """Items Api class is used to 

    1.List items.
    2.Get an item.
    3.Create an item.
    4.Update an item.
    5.Delete an item.
    6.Mark item as active.
    7.Mark item as inactive.
     
    """
    def __init__(self, authtoken, organization_id):
        """Initialize Settings Api using authtoken and organization id.

        Args:
            authtoken(str): User's Authtoken.
            organization_id(str): User's Organization id.
Exemple #16
0
# -*- coding: utf-8
from __future__ import unicode_literals

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.JournalsParser import JournalsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'journals/'
zoho_http_client = ZohoHttpClient()
parser = JournalsParser()


class JournalsApi:
    """Journals Api class is used to:
     
    1.Get journals list.
    2.Get the details of the journal.
    3.Create a journal.
    4.Updates the journal with given information.
    5.Deletes the given journal.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize parameters for Journals Api.

        Args:
            authtoken(str): User's authtoken.
            organization_id(str): User's organization id.

        """
Exemple #17
0
#$Id$#

import json

from os.path import basename
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ContactParser import ContactParser
from books.api.Api import Api

api = Api()
base_url = api.base_url + 'contacts'
parser = ContactParser()
zoho_http_client = ZohoHttpClient()


class ContactsApi:
    """ContactsApi class is used:

    1.To get the list of contacts for a particular organization.
    2.To get details of particular contact.
    3.To create a new contact for an organization.
    4.To update a contact.
    5.To delete a contact.
    6.To mark a contact as active.
    7.To mark a contact as inactive.
    8.To enable payment reminders for a contact
    9.To disable payment reminders for a contact.
    10.To send email statement to a contact.
    11.To get the statement mail content
    12.To send email to a contact.
    13.To list recent activities of a contact.
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.RecurringExpensesParser import RecurringExpensesParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'recurringexpenses/'
parser = RecurringExpensesParser()
zoho_http_client = ZohoHttpClient()


class RecurringExpensesApi:
    """Recurring Expenses Api is used to 

    1.List recurring expenses with pagination .
    2.Get the details of a recurring expense.
    3.Create a recurring expense.
    4.Update an existing recurring expense.
    5.Delete an existing recurring expense.
    6.Stop an active recurring expense.
    7.Resume a stopped recurring expense.
    8.List child expenses created from recurring expense.
    9.Get history and comments of a recurring expense.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize Recurring Expenses Api using user's authtoken and 
            organization id. 
     
        Args:
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'users/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()


class UsersApi:
    """Uses Api class is used to 
 
    1.List of all users in an organization.
    2.10.Get the details of an user.
    3.Get the details of the current user.
    4.Create an user for an organization.
    5.Update the details of an existing user.
    6.Delete an existing user.
    7.Send invitation email to a user.
    8.Mark an inactive user as active.
    9.Mark an active user as inactive.
    
    """
    def __init__(self, authtoken, organization_id):
        """Initialize Settings Api using authtoken and organization id.

        Args:
            authtoken(str): User's Authtoken.
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.CustomerPaymentsParser import CustomerPaymentsParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'customerpayments/'
parser = CustomerPaymentsParser()
zoho_http_client = ZohoHttpClient()

class CustomerPaymentsApi:
    """CustomerPaymentsApi class is used:
     
    1.To list all the payments made by the customer.
    2.To get the details of the customer payment.
    3.To create a payment made by the customer.
    4.To update a payment made by the customer.
    5.To delete an existing customer payment.

    """

    def __init__(self, authtoken, organization_id):
        """Initialize Customer payment's api using user's authtoken 
               and organization id.
        
        Args: 
            authtoken(str): User's authtoken.
            organization_id(str): User's organization id.

        """
Exemple #21
0
#$Id$#

from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BaseCurrencyAdjustmentParser import BaseCurrencyAdjustmentParser
from books.api.Api import Api
from json import dumps

base_url = Api().base_url + 'basecurrencyadjustment/'
zoho_http_client = ZohoHttpClient()
parser = BaseCurrencyAdjustmentParser()


class BaseCurrencyAdjustmentApi:
    """Base Currency Adjsutment Api is used to:
    
    1.List base currency adjustment.
    2.Get base currency adjustment details.
    3.List account details for base currency adjustment.
    4.Creates a base currency adjustment.
    5.Deletes a base currency adjustment.

    """
    def __init__(self, authtoken, organization_id):
        """Initialize parameters for Base currency adjustment api.

        Args: 
            authotoken(str): User's Authtoken.
            organization id(str): User's Organization id.

        """
        self.details = {