Skip to content

Commit

Permalink
Merge pull request #13 from ProzorroUKR/24_hours
Browse files Browse the repository at this point in the history
24 hours
  • Loading branch information
alexdiatlov authored May 5, 2020
2 parents 7ba0bc7 + da11a71 commit 5a1fc58
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions openprocurement_client/resources/tenders.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from openprocurement_client.constants import (AUCTIONS, AWARDS, BIDS, CANCELLATIONS,
COMPLAINTS, CONTRACTS, DOCUMENTS, ITEMS,
LOTS, PROLONGATIONS, QUALIFICATIONS, QUESTIONS,
TENDERS, AGREEMENTS, PLANS, PUSH)
TENDERS, AGREEMENTS, PLANS, PUSH, MILESTONES)


LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -119,6 +119,18 @@ def create_prolongation(self, tender_id, contract_id, prolongation_data, access_
tender_id, prolongation_data, PROLONGATIONS, depth_path=depth_path, access_token=access_token
)

def create_award_milestone(self, tender_id, milestone, award_id, access_token=None):
depth_path = '{}/{}'.format(AWARDS, award_id)
return self.create_resource_item_subitem(
tender_id, milestone, MILESTONES, depth_path=depth_path, access_token=access_token
)

def create_qualification_milestone(self, tender_id, milestone, qualification_id, access_token=None):
depth_path = '{}/{}'.format(QUALIFICATIONS, qualification_id)
return self.create_resource_item_subitem(
tender_id, milestone, MILESTONES, depth_path=depth_path, access_token=access_token
)

###########################################################################
# GET ITEMS LIST API METHODS
###########################################################################
Expand Down Expand Up @@ -276,20 +288,6 @@ def patch_award_complaint(self, tender_id, complaint, award_id, complaint_id='',
access_token=access_token
)

def patch_cancellation_complaint(self, tender_id, complaint, cancellation_id, complaint_id='', access_token=None):
return self.patch_resource_item_subitem(
tender_id, complaint, COMPLAINTS, subitem_id=complaint_id,
depth_path='{}/{}'.format(CANCELLATIONS, cancellation_id),
access_token=access_token
)

def patch_qualification_complaint(self, tender_id, complaint, qualification_id, complaint_id='', access_token=None):
return self.patch_resource_item_subitem(
tender_id, complaint, COMPLAINTS, subitem_id=complaint_id,
depth_path='{}/{}'.format(QUALIFICATIONS, qualification_id),
access_token=access_token
)

def patch_lot(self, tender_id, lot, lot_id='', access_token=None):
return self.patch_resource_item_subitem(
tender_id, lot, LOTS, subitem_id=lot_id, access_token=access_token
Expand Down

0 comments on commit 5a1fc58

Please sign in to comment.