Skip to content

Commit

Permalink
feat: Add AR Invoice Items support (#103)
Browse files Browse the repository at this point in the history
* add invoice items support

* fix consts

* fmt

* bump ver

* update contract lines schema
  • Loading branch information
rome-777 authored Dec 13, 2024
1 parent 9574ac7 commit 0cdfde4
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sageintacctsdk/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .items import Items
from .ap_payments import APPayments
from .ar_invoices import ARInvoices
from .ar_invoice_items import ARInvoiceItems
from .ar_payments import ARPayments
from .reimbursements import Reimbursements
from .checking_accounts import CheckingAccounts
Expand Down Expand Up @@ -63,6 +64,7 @@
'APPayments',
'AllocationEntry',
'ARInvoices',
'ARInvoiceItems',
'ARPayments',
'Reimbursements',
'CheckingAccounts',
Expand Down
11 changes: 11 additions & 0 deletions sageintacctsdk/apis/ar_invoice_items.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Sage Intacct AR Invoice Items
"""

from .api_base import ApiBase


class ARInvoiceItems(ApiBase):
"""Class for AR Invoice Items APIs."""
def __init__(self):
ApiBase.__init__(self, dimension='ARINVOICEITEM')
113 changes: 113 additions & 0 deletions sageintacctsdk/apis/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"DEPARTMENTID",
"TASKID",
"VENDORID",
"WHENMODIFIED",
],
"DEPARTMENT": [
"RECORDNO",
Expand Down Expand Up @@ -574,6 +575,118 @@
"MEGAENTITYID",
"MEGAENTITYNAME",
],
"ARINVOICEITEM": [
"RECORDNO",
"RECORDKEY",
"ACCOUNTKEY",
"ACCOUNTNO",
"OFFSETACCOUNTKEY",
"OFFSETGLACCOUNTNO",
"OFFSETGLACCOUNTTITLE",
"ACCOUNTTITLE",
"ACCOUNTLABELKEY",
"ACCOUNTLABEL",
"ENTRY_DATE",
"AMOUNT",
"TRX_AMOUNT",
"DEPARTMENTID",
"DEPARTMENTNAME",
"LOCATIONID",
"LOCATIONNAME",
"ENTRYDESCRIPTION",
"EXCH_RATE_DATE",
"EXCH_RATE_TYPE_ID",
"EXCHANGE_RATE",
"ALLOCATIONKEY",
"ALLOCATION",
"LINEITEM",
"LINE_NO",
"CURRENCY",
"BASECURR",
"TOTALPAID",
"TRX_TOTALPAID",
"TRX_DISCOUNTAPPLIED",
"TOTALSELECTED",
"TRX_TOTALSELECTED",
"SUBTOTAL",
"PARENTENTRY",
"PAYMENTTAXCAPTURE",
"DEFERREVENUE",
"REVRECTEMPLATEKEY",
"REVRECTEMPLATE",
"DEFERREDREVACCTKEY",
"DEFERREDREVACCTNO",
"DEFERREDREVACCTTITLE",
"REVRECSTARTDATE",
"REVRECENDDATE",
"BASELOCATION",
"STATE",
"RECORDTYPE",
"BILLABLECONTRACTSCHENTRYKEY",
"BILLABLECONTRACTUSAGEBILLINGID",
"DETAILKEY",
"WHENCREATED",
"WHENMODIFIED",
"CREATEDBY",
"MODIFIEDBY",
"RETAINAGEPERCENTAGE",
"TRX_AMOUNTRETAINED",
"AMOUNTRETAINED",
"TRX_AMOUNTRELEASED",
"RETAINAGE_OFFSETGLACCOUNTNO",
"PROJECTCONTRACTID",
"PROJECTCONTRACTKEY",
"PROJECTCONTRACTLINEID",
"PROJECTCONTRACTLINEKEY",
"PROJECTCONTRACTNAME",
"PROJECTCONTRACTLINENAME",
"ISRETAINAGERELEASE",
"ISSUMMARIZED",
"AMORTIZATIONTEMPLATEKEY",
"AMORTIZATIONTEMPLATEID",
"AMORTIZATIONSTARTDATE",
"AMORTIZATIONENDDATE",
"ORIGDOCKEY",
"ORIGDOCLINEKEY",
"ORIGDOCID",
"ORIGDOCLINEID",
"GLDIMPROGRAM",
"CLASSDIMKEY",
"CLASSID",
"CLASSNAME",
"CUSTOMERDIMKEY",
"CUSTOMERID",
"CUSTOMERNAME",
"VENDORDIMKEY",
"VENDORID",
"VENDORNAME",
"EMPLOYEEDIMKEY",
"EMPLOYEEID",
"EMPLOYEENAME",
"ITEMDIMKEY",
"ITEMID",
"ITEMNAME",
"PROJECTDIMKEY",
"PROJECTID",
"PROJECTNAME",
"WAREHOUSEDIMKEY",
"WAREHOUSEID",
"WAREHOUSENAME",
"TASKDIMKEY",
"TASKID",
"TASKNAME",
"CONTRACTDIMKEY",
"CONTRACTID",
"CONTRACTNAME",
"RGLDIM101000035663_10074",
"GLACCOUNTNO",
"GLACCOUNTTITLE",
"ENTRYEXCHRATEDATE",
"ENTRYEXCHRATETYPE",
"ENTRYEXCHRATE",
"ENTRYCURRENCY",
"ENTRYBASECURRENCY",
],
"ARPYMT": [
"RECORDNO",
"PRBATCHKEY",
Expand Down
7 changes: 6 additions & 1 deletion sageintacctsdk/sageintacctsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .apis import ApiBase, Contacts, Contracts, ContractLines, Locations, Employees, Accounts, ExpenseTypes, Attachments, ExpenseReports,\
Vendors, Bills, Projects, Departments, ChargeCardAccounts, ChargeCardTransactions, Customers, Items,\
APPayments, Reimbursements, CheckingAccounts, SavingsAccounts, Tasks, ExpensePaymentTypes, Dimensions,\
DimensionValues, LocationEntities, ARInvoices, ARPayments, TaxDetails, GLDetail, Classes, JournalEntries,\
DimensionValues, LocationEntities, ARInvoices, ARInvoiceItems, ARPayments, TaxDetails, GLDetail, Classes, JournalEntries,\
RevRecSchedules, RevRecScheduleEntries, CostTypes, OrderEntryTransactions, Allocations, AllocationEntry


Expand Down Expand Up @@ -55,6 +55,7 @@ def __init__(self, sender_id: str, sender_password: str, user_id: str,
self.ap_payments = APPayments()
self.allocation_entry = AllocationEntry()
self.ar_invoices = ARInvoices()
self.ar_invoice_items = ARInvoiceItems()
self.ar_payments = ARPayments()
self.reimbursements = Reimbursements()
self.checking_accounts = CheckingAccounts()
Expand Down Expand Up @@ -102,6 +103,7 @@ def update_sender_id(self):
self.items.set_sender_id(self.__sender_id)
self.ap_payments.set_sender_id(self.__sender_id)
self.ar_invoices.set_sender_id(self.__sender_id)
self.ar_invoice_items.set_sender_id(self.__sender_id)
self.ar_payments.set_sender_id(self.__sender_id)
self.reimbursements.set_sender_id(self.__sender_id)
self.checking_accounts.set_sender_id(self.__sender_id)
Expand Down Expand Up @@ -146,6 +148,7 @@ def update_sender_password(self):
self.items.set_sender_password(self.__sender_password)
self.ap_payments.set_sender_password(self.__sender_password)
self.ar_invoices.set_sender_password(self.__sender_password)
self.ar_invoice_items.set_sender_password(self.__sender_password)
self.ar_payments.set_sender_password(self.__sender_password)
self.reimbursements.set_sender_password(self.__sender_password)
self.checking_accounts.set_sender_password(self.__sender_password)
Expand Down Expand Up @@ -192,6 +195,7 @@ def update_session_id(self):
self.items.set_session_id(self.__session_id)
self.ap_payments.set_session_id(self.__session_id)
self.ar_invoices.set_session_id(self.__session_id)
self.ar_invoice_items.set_session_id(self.__session_id)
self.ar_payments.set_session_id(self.__session_id)
self.reimbursements.set_session_id(self.__session_id)
self.checking_accounts.set_session_id(self.__session_id)
Expand Down Expand Up @@ -236,6 +240,7 @@ def update_show_private(self):
self.items.set_show_private(self.__show_private)
self.ap_payments.set_show_private(self.__show_private)
self.ar_invoices.set_show_private(self.__show_private)
self.ar_invoice_items.set_show_private(self.__show_private)
self.ar_payments.set_show_private(self.__show_private)
self.reimbursements.set_show_private(self.__show_private)
self.checking_accounts.set_show_private(self.__show_private)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name='sageintacctsdk',
version='1.24.0',
version='1.25.0',
author='Ashwin T',
author_email='[email protected]',
description='Python SDK for accessing Sage Intacct APIs',
Expand Down

0 comments on commit 0cdfde4

Please sign in to comment.