Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
markciecior committed Oct 19, 2020
2 parents 0922bce + 3b33445 commit ae28c77
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ their appropriate sections. Import the API class(es) you want to leverage and th
>>> from connectpyse.procurement import purchase_order_line_item_api
>>> lineItems = purchase_order_line_item_api.PurchaseOrderLineItemAPI(url=URL,auth=AUTH,parent=1919)
>>> myItems = lineItems.get_purchase_order_line_items()


### For example to update a ticket note:

>>> from connectpyse.service import ticket_notes_api, ticket_note
>>> ticket_notes = ticket_notes_api.TicketNotesAPI(url=URL, auth=AUTH, ticket_id=TICKET_ID)
>>> note = ticket_note.TicketNote({"text":"testing ticket note update.. ", "detailDescriptionFlag": True})
>>> ticket_notes.create_ticket_note(note)
33 changes: 33 additions & 0 deletions finance/agreement_additions_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from ..cw_controller import CWController
# Class for /finance/agreementadditions
from . import agreement_addition


class AgreementAdditionsAPI(CWController):

def __init__(self, parent, **kwargs):
self.module_url = 'finance'
self.module = 'agreements/{}/additions'.format(parent)
self._class = agreement_addition.AgreementAddition
super().__init__(**kwargs) # instance gets passed to parent object

def get_agreement_additions(self):
return super()._get()

def create_agreement_addition(self, a_agreement_addition):
return super()._create(a_agreement_addition)

def get_agreement_additions_count(self):
return super()._get_count()

def get_agreement_addition_by_id(self, agreement_addition_id):
return super()._get_by_id(agreement_addition_id)

def delete_agreement_addition_by_id(self, agreement_addition_id):
super()._delete_by_id(agreement_addition_id)

def replace_agreement_addition(self, agreement_addition_id):
pass

def update_agreement_addition(self, agreement_addition_id, key, value):
return super()._update(agreement_addition_id, key, value)

0 comments on commit ae28c77

Please sign in to comment.