Skip to content

Commit

Permalink
Merge pull request #34 from VolVoz/master
Browse files Browse the repository at this point in the history
award cancel example for limited
  • Loading branch information
vmaksymiv committed Mar 29, 2016
2 parents 1e718a5 + d0870da commit dbe7de0
Show file tree
Hide file tree
Showing 52 changed files with 783 additions and 437 deletions.
43 changes: 32 additions & 11 deletions docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,14 +608,45 @@ def test_award_complaints(self):
}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaints-list.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/awards/{}/complaints'.format(self.tender_id, award_id))
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaint.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/awards/{}/complaints/{}'.format(self.tender_id, award_id, complaint1_id))
self.assertEqual(response.status, '200 OK')

self.app.authorization = ('Basic', ('broker', ''))

with open('docs/source/tutorial/award-complaint-satisfied-resolving.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(self.tender_id, award_id, owner_token), {"data": {
"status": "cancelled"}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaint-newaward.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards?acc_token={}'.format(self.tender_id, owner_token), supplier)
self.assertEqual(response.status, '201 Created')
new_award_id = response.json['data']['id']

with open('docs/source/tutorial/award-complaint-resolved.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(self.tender_id, award_id, complaint1_id, owner_token), {"data": {
"tendererAction": "Умови виправлено",
"tendererAction": "Умови виправлено, вибір переможня буде розгянуто повторно",
"status": "resolved"
}})
self.assertEqual(response.status, '200 OK')

award_id = new_award_id

self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(self.tender_id, award_id, owner_token), {"data": {
"status": "active"}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaint-submit.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints'.format(self.tender_id, award_id), complaint_data)
self.assertEqual(response.status, '201 Created')

response = self.app.post_json('/tenders/{}/awards/{}/complaints'.format(self.tender_id, award_id), complaint_data)
self.assertEqual(response.status, '201 Created')

Expand All @@ -625,13 +656,3 @@ def test_award_complaints(self):
"status": "cancelled"
}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaints-list.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/awards/{}/complaints'.format(self.tender_id, award_id))
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/award-complaint.http', 'w') as self.app.file_obj:
self.app.authorization = None
response = self.app.get('/tenders/{}/awards/{}/complaints/{}'.format(self.tender_id, award_id, complaint1_id))
self.assertEqual(response.status, '200 OK')
28 changes: 26 additions & 2 deletions docs/source/complaints-award.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ At first create a complaint. Send POST request with bidder's access token.
:code:

Then upload necessary documents:

.. include:: tutorial/award-complaint-submission-upload.http
:code:

Submit tender award complaint:

.. include:: tutorial/award-complaint-complaint.http
:code:

Expand Down Expand Up @@ -82,12 +82,36 @@ Or declines it:
.. include:: tutorial/award-complaint-decline.http
:code:

Correcting problems
-------------------

If tender award complaint was satisfied by the Complaint Review Body, then procuring entity has to correct problems.

One of the possible solution is award cancellation:

.. include:: tutorial/award-complaint-satisfied-resolving.http
:code:

Creating new award:

.. include:: tutorial/award-complaint-newaward.http

:code:

Submitting Resolution Confirmation
----------------------------------

When complaint has been successfully resolved, procuring entity submits resolution confirmation.

.. include:: tutorial/award-complaint-resolved.http
:code:

Submit complaint to new award
-----------------------------

.. include:: tutorial/award-complaint-submit.http
:code:

Cancelling Tender Award Complaint
=================================

Expand Down
22 changes: 11 additions & 11 deletions docs/source/tutorial/active-cancellation.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.1/tenders/7f9dc0bae5644166a4197fd104c5537a/cancellations/9e47b8281e5447718633dc2cd35f81c0?acc_token=620b93c6fc8149da9a1e17bbc2654519 HTTP/1.0
PATCH /api/2.1/tenders/9d8028bfafde454ba40131c6974de5f4/cancellations/c43fee8c9d94491aa974a7846a85e3c0?acc_token=117bc31601454af1bdee99a9064b78a3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Expand All @@ -19,29 +19,29 @@ Content-Type: application/json; charset=UTF-8
{
"description": "Changed description",
"title": "Notice.pdf",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/7f9dc0bae5644166a4197fd104c5537a/cancellations/9e47b8281e5447718633dc2cd35f81c0/documents/836ef1b5d97a4fe4a972321dc43b34c8?download=b20c8032dcb949ed8885d0c6e72657d2",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/9d8028bfafde454ba40131c6974de5f4/cancellations/c43fee8c9d94491aa974a7846a85e3c0/documents/6edd483a8ac14e709447ee6b4c687b05?download=4b5f0218447041fab80fc1c68bf4a648",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2016-03-24T13:56:55.677842+02:00",
"id": "836ef1b5d97a4fe4a972321dc43b34c8",
"dateModified": "2016-03-24T13:56:55.677884+02:00"
"datePublished": "2016-03-28T18:03:38.978231+03:00",
"id": "6edd483a8ac14e709447ee6b4c687b05",
"dateModified": "2016-03-28T18:03:38.978272+03:00"
},
{
"description": "Changed description",
"title": "Notice-2.pdf",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/7f9dc0bae5644166a4197fd104c5537a/cancellations/9e47b8281e5447718633dc2cd35f81c0/documents/836ef1b5d97a4fe4a972321dc43b34c8?download=76b87ef82939454ca32c5ac2a94e8e37",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/9d8028bfafde454ba40131c6974de5f4/cancellations/c43fee8c9d94491aa974a7846a85e3c0/documents/6edd483a8ac14e709447ee6b4c687b05?download=c83dce2170914f86ae1bcfc8a672b841",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2016-03-24T13:56:55.677842+02:00",
"id": "836ef1b5d97a4fe4a972321dc43b34c8",
"dateModified": "2016-03-24T13:56:56.134982+02:00"
"datePublished": "2016-03-28T18:03:38.978231+03:00",
"id": "6edd483a8ac14e709447ee6b4c687b05",
"dateModified": "2016-03-28T18:03:39.376995+03:00"
}
],
"reason": "cancellation reason",
"reasonType": "unsuccessful",
"date": "2016-03-24T13:56:55.265674+02:00",
"date": "2016-03-28T18:03:38.538963+03:00",
"cancellationOf": "tender",
"id": "9e47b8281e5447718633dc2cd35f81c0"
"id": "c43fee8c9d94491aa974a7846a85e3c0"
}
}

20 changes: 10 additions & 10 deletions docs/source/tutorial/award-complaint-accept.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/c75fe191826246b18374e85e602fb8bf HTTP/1.0
PATCH /api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/bd45d36812214ae4913d64ed5dac10da/complaints/e1bed7add57c4be99f2f2352fec37b96 HTTP/1.0
Authorization: Basic cmV2aWV3ZXI6
Content-Length: 32
Content-Type: application/json
Expand All @@ -19,12 +19,12 @@ Content-Type: application/json; charset=UTF-8
{
"author": "complaint_owner",
"title": "Complaint_Attachement.pdf",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/c75fe191826246b18374e85e602fb8bf/documents/e255b448519f489698d916ef751c24e3?download=1ae44ee025c34b6894cdbcbe7f74d761",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/bd45d36812214ae4913d64ed5dac10da/complaints/e1bed7add57c4be99f2f2352fec37b96/documents/b226f4c726864731b68d79f75cec7244?download=8c5020c7295849cc943f3fcc83946927",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2016-03-24T13:57:03.256145+02:00",
"id": "e255b448519f489698d916ef751c24e3",
"dateModified": "2016-03-24T13:57:03.256187+02:00"
"datePublished": "2016-03-28T18:03:46.452855+03:00",
"id": "b226f4c726864731b68d79f75cec7244",
"dateModified": "2016-03-28T18:03:46.452897+03:00"
}
],
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
Expand All @@ -50,13 +50,13 @@ Content-Type: application/json; charset=UTF-8
"locality": "м. Вінниця"
}
},
"dateAccepted": "2016-03-24T13:57:04.458950+02:00",
"dateSubmitted": "2016-03-24T13:57:03.511392+02:00",
"complaintID": "UA-2016-03-24-000001.1",
"date": "2016-03-24T13:57:03.038605+02:00",
"dateAccepted": "2016-03-28T18:03:47.564202+03:00",
"dateSubmitted": "2016-03-28T18:03:46.686700+03:00",
"complaintID": "UA-2016-03-28-000001.1",
"date": "2016-03-28T18:03:46.247132+03:00",
"acceptance": true,
"type": "complaint",
"id": "c75fe191826246b18374e85e602fb8bf"
"id": "e1bed7add57c4be99f2f2352fec37b96"
}
}

12 changes: 6 additions & 6 deletions docs/source/tutorial/award-complaint-cancel.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/32938f23739d43adb083347b7868f725?acc_token=a53b02b8f2974abfa9863fb55f60f7a9 HTTP/1.0
PATCH /api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/9f5f919b51c645e5ade6da27ae35d328/complaints/19407981757a465882bcbc3fc89bacc1?acc_token=fdcf9ff208ef4d1bb2b4f47fdbf12f5b HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 150
Content-Type: application/json
Expand Down Expand Up @@ -40,12 +40,12 @@ Content-Type: application/json; charset=UTF-8
},
"title": "Недостатньо інформації",
"cancellationReason": "Умови виправлено",
"dateCanceled": "2016-03-24T13:57:06.101068+02:00",
"dateSubmitted": "2016-03-24T13:57:05.866131+02:00",
"complaintID": "UA-2016-03-24-000001.4",
"date": "2016-03-24T13:57:05.864736+02:00",
"dateCanceled": "2016-03-28T18:03:50.495712+03:00",
"dateSubmitted": "2016-03-28T18:03:50.223536+03:00",
"complaintID": "UA-2016-03-28-000001.5",
"date": "2016-03-28T18:03:50.222072+03:00",
"type": "complaint",
"id": "32938f23739d43adb083347b7868f725"
"id": "19407981757a465882bcbc3fc89bacc1"
}
}

18 changes: 9 additions & 9 deletions docs/source/tutorial/award-complaint-complaint.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/c75fe191826246b18374e85e602fb8bf?acc_token=8645d823ddf6451a9b21aa78f030a033 HTTP/1.0
PATCH /api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/bd45d36812214ae4913d64ed5dac10da/complaints/e1bed7add57c4be99f2f2352fec37b96?acc_token=a3056e23411440aaa919a407e75f0aa2 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 31
Content-Type: application/json
Expand All @@ -19,12 +19,12 @@ Content-Type: application/json; charset=UTF-8
{
"author": "complaint_owner",
"title": "Complaint_Attachement.pdf",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/c75fe191826246b18374e85e602fb8bf/documents/e255b448519f489698d916ef751c24e3?download=1ae44ee025c34b6894cdbcbe7f74d761",
"url": "http://api-sandbox.openprocurement.org/api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/bd45d36812214ae4913d64ed5dac10da/complaints/e1bed7add57c4be99f2f2352fec37b96/documents/b226f4c726864731b68d79f75cec7244?download=8c5020c7295849cc943f3fcc83946927",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2016-03-24T13:57:03.256145+02:00",
"id": "e255b448519f489698d916ef751c24e3",
"dateModified": "2016-03-24T13:57:03.256187+02:00"
"datePublished": "2016-03-28T18:03:46.452855+03:00",
"id": "b226f4c726864731b68d79f75cec7244",
"dateModified": "2016-03-28T18:03:46.452897+03:00"
}
],
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
Expand All @@ -50,11 +50,11 @@ Content-Type: application/json; charset=UTF-8
"locality": "м. Вінниця"
}
},
"dateSubmitted": "2016-03-24T13:57:03.511392+02:00",
"complaintID": "UA-2016-03-24-000001.1",
"date": "2016-03-24T13:57:03.038605+02:00",
"dateSubmitted": "2016-03-28T18:03:46.686700+03:00",
"complaintID": "UA-2016-03-28-000001.1",
"date": "2016-03-28T18:03:46.247132+03:00",
"type": "complaint",
"id": "c75fe191826246b18374e85e602fb8bf"
"id": "e1bed7add57c4be99f2f2352fec37b96"
}
}

14 changes: 7 additions & 7 deletions docs/source/tutorial/award-complaint-decline.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.1/tenders/ec698b5d583a42d0881a2f005e1005fe/awards/9d974d46d72b4a5c939da22c590c3dfb/complaints/5fc026bbc884451c835a001b0c8d4558 HTTP/1.0
PATCH /api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/bd45d36812214ae4913d64ed5dac10da/complaints/0d65b91af1f246968ca14f2a0b5091b5 HTTP/1.0
Authorization: Basic cmV2aWV3ZXI6
Content-Length: 32
Content-Type: application/json
Expand All @@ -15,7 +15,7 @@ Content-Type: application/json; charset=UTF-8
{
"data": {
"status": "declined",
"dateDecision": "2016-03-24T13:57:05.387087+02:00",
"dateDecision": "2016-03-28T18:03:48.474093+03:00",
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
"author": {
"contactPoint": {
Expand All @@ -39,13 +39,13 @@ Content-Type: application/json; charset=UTF-8
}
},
"acceptance": true,
"dateAccepted": "2016-03-24T13:57:04.686877+02:00",
"dateSubmitted": "2016-03-24T13:57:04.003268+02:00",
"complaintID": "UA-2016-03-24-000001.3",
"date": "2016-03-24T13:57:04.001849+02:00",
"dateAccepted": "2016-03-28T18:03:47.797224+03:00",
"dateSubmitted": "2016-03-28T18:03:47.142806+03:00",
"complaintID": "UA-2016-03-28-000001.3",
"date": "2016-03-28T18:03:47.141362+03:00",
"title": "Недостатньо інформації",
"type": "complaint",
"id": "5fc026bbc884451c835a001b0c8d4558"
"id": "0d65b91af1f246968ca14f2a0b5091b5"
}
}

84 changes: 84 additions & 0 deletions docs/source/tutorial/award-complaint-newaward.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
POST /api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards?acc_token=9e41e01773c848deaaf6ffc06b0d7f32 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 1284
Content-Type: application/json
Host: api-sandbox.openprocurement.org

{
"data": {
"date": "2016-01-14T18:07:00.628073+02:00",
"status": "pending",
"suppliers": [
{
"contactPoint": {
"telephone": "+380 (432) 21-69-30",
"name": "Сергій Олексюк",
"email": "soleksuk@gmail.com"
},
"identifier": {
"scheme": "UA-EDR",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"id": "13313462",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»",
"address": {
"countryName": "Україна",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33",
"locality": "м. Вінниця"
}
}
],
"id": "d373338bc3324f14b8b3d4af68922773",
"value": {
"currency": "UAH",
"amount": 475000,
"valueAddedTaxIncluded": "true"
}
}
}

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.openprocurement.org/api/2.1/tenders/638b8c94e5c14786a948e4efed6f812e/awards/9f5f919b51c645e5ade6da27ae35d328
{
"data": {
"status": "pending",
"complaintPeriod": {
"startDate": "2016-03-28T18:03:49.231023+03:00"
},
"suppliers": [
{
"contactPoint": {
"email": "soleksuk@gmail.com",
"telephone": "+380 (432) 21-69-30",
"name": "Сергій Олексюк"
},
"identifier": {
"scheme": "UA-EDR",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"id": "13313462",
"uri": "http://sch10.edu.vn.ua/"
},
"name": "ДКП «Школяр»",
"address": {
"postalCode": "21100",
"countryName": "Україна",
"streetAddress": "вул. Островського, 33",
"region": "м. Вінниця",
"locality": "м. Вінниця"
}
}
],
"value": {
"currency": "UAH",
"amount": 475000.0,
"valueAddedTaxIncluded": true
},
"date": "2016-03-28T18:03:49.229549+03:00",
"id": "9f5f919b51c645e5ade6da27ae35d328"
}
}

0 comments on commit dbe7de0

Please sign in to comment.