Skip to content

Commit

Permalink
Merge branch 'a147507835786744_claims'
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Jul 25, 2016
2 parents 312ee5b + 7b627e5 commit 6d8c129
Show file tree
Hide file tree
Showing 29 changed files with 876 additions and 234 deletions.
50 changes: 50 additions & 0 deletions docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,56 @@ def test_award_complaints(self):
complaint5_token = response.json['access']['token']
complaint5_id = response.json['data']['id']

claim = {'data': complaint['data'].copy()}
claim['data']['status'] = 'claim'
with open('docs/source/tutorial/award-complaint-submission-claim.http', 'w') as self.app.file_obj:
response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(self.tender_id, award_id, bid_token), claim)
self.assertEqual(response.status, '201 Created')

complaint6_token = response.json['access']['token']
complaint6_id = response.json['data']['id']

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

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

response = self.app.post_json('/tenders/{}/awards/{}/complaints?acc_token={}'.format(self.tender_id, award_id, bid_token), claim)
self.assertEqual(response.status, '201 Created')
complaint7_token = response.json['access']['token']
complaint7_id = response.json['data']['id']

response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(self.tender_id, award_id, complaint7_id, owner_token), {"data": {
"status": "answered",
"resolutionType": "invalid",
"resolution": "Вимога не відповідає предмету закупівлі"
}})
self.assertEqual(response.status, '200 OK')

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

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

with open('docs/source/tutorial/award-complaint-claim.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}?acc_token={}'.format(self.tender_id, award_id, response.json['data']['id'], response.json['access']['token']), {"data": {
"status": "claim"
}})
self.assertEqual(response.status, '200 OK')

self.app.authorization = ('Basic', ('reviewer', ''))
with open('docs/source/tutorial/award-complaint-reject.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/awards/{}/complaints/{}'.format(self.tender_id, award_id, complaint2_id), {"data": {
Expand Down
67 changes: 63 additions & 4 deletions docs/source/complaints-award.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. Kicking page rebuild 2014-10-30 17:00:08
Complaint Retrieval
Claim/Complaint Retrieval
=========================

Tender Award Complaint Retrieval
-------------------------------------------
Tender Award Claim/Complaint Retrieval
--------------------------------------

You can list all Tender Award Complaints:
You can list all Tender Award Claims/Complaints:

.. include:: tutorial/award-complaints-list.http
:code:
Expand All @@ -16,6 +16,38 @@ And check individual complaint:
.. include:: tutorial/award-complaint.http
:code:

Claim Submission
================

If tender award is favoriting certain supplier, or in any other viable case, participants can submit Tender Award Claim.

Tender Award Claim Submission (with documents)
----------------------------------------------

At first create a claim. Send POST request with bidder's access token.

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

Then upload necessary documents:

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

Submit tender award claim:

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

Tender Award Claim Submission (without documents)
-------------------------------------------------

You can submit claim that does not need additional documents:

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


Complaint Submission
====================

Expand Down Expand Up @@ -47,6 +79,33 @@ You can submit complaint that does not need additional documents:
.. include:: tutorial/award-complaint-submission-complaint.http
:code:

Claim's Answer
==============

Answer to resolved claim
------------------------

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


Satisfied Claim
===============

Satisfying resolution
---------------------

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


Unsatisfying resolution
-----------------------

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


Complaint Resolution
====================

Expand Down
9 changes: 7 additions & 2 deletions docs/source/complaints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,15 @@ Tender Award Complaints
label = "complaint";
pending; accepted; stopping; satisfied;
}
subgraph cluster_claim {
label = "claim";
claim; answered;
}
claim -> answered;
satisfied -> resolved;
edge[style=dashed];
draft -> pending;
draft -> cancelled;
draft -> {claim,pending};
{draft,claim,answered} -> cancelled;
pending -> stopping;
accepted -> stopping;
edge[style=bold];
Expand Down
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.3/tenders/0ce93a11f6b14fdca10cf8cd620c0590/awards/2e1bea72fbdf4d7e95b7dfe9d2b3ec62/complaints/10efe858183443a8af16f184288e11d2 HTTP/1.0
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/4d91e591bf9046eb999fa12c9c0e9248 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.3/tenders/0ce93a11f6b14fdca10cf8cd620c0590/awards/2e1bea72fbdf4d7e95b7dfe9d2b3ec62/complaints/10efe858183443a8af16f184288e11d2/documents/74f77864a60e45efa174d287b86b9f1e?download=74fe6fc867d54affa21b98071f4ae800",
"url": "http://api-sandbox.openprocurement.org/api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/4d91e591bf9046eb999fa12c9c0e9248/documents/bfe9a28b58974a49a01e9f8c5bc201a4?download=1e6fe41a721040a7b79d697a5d0a2b1f",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2016-06-10T15:46:23.344709+03:00",
"id": "74f77864a60e45efa174d287b86b9f1e",
"dateModified": "2016-06-10T15:46:23.344742+03:00"
"datePublished": "2016-07-25T16:58:07.589512+03:00",
"id": "bfe9a28b58974a49a01e9f8c5bc201a4",
"dateModified": "2016-07-25T16:58:07.589547+03:00"
}
],
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
Expand All @@ -50,13 +50,13 @@ Content-Type: application/json; charset=UTF-8
"locality": "м. Вінниця"
}
},
"dateAccepted": "2016-06-10T15:46:24.660040+03:00",
"dateSubmitted": "2016-06-10T15:46:23.504231+03:00",
"complaintID": "UA-2016-06-10-000002.1",
"date": "2016-06-10T15:46:23.040718+03:00",
"dateAccepted": "2016-07-25T16:58:10.861954+03:00",
"dateSubmitted": "2016-07-25T16:58:07.762167+03:00",
"complaintID": "UA-2016-07-25-000001.1",
"date": "2016-07-25T16:58:10.873060+03:00",
"acceptance": true,
"type": "complaint",
"id": "10efe858183443a8af16f184288e11d2"
"id": "4d91e591bf9046eb999fa12c9c0e9248"
}
}

16 changes: 8 additions & 8 deletions docs/source/tutorial/award-complaint-accepted-stopped.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/0ce93a11f6b14fdca10cf8cd620c0590/awards/2e1bea72fbdf4d7e95b7dfe9d2b3ec62/complaints/cdb0daf55a064cef921875d95d19a0a6 HTTP/1.0
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/634e05bafeab4423b2bcb66e3ee40218 HTTP/1.0
Authorization: Basic cmV2aWV3ZXI6
Content-Length: 217
Content-Type: application/json
Expand All @@ -16,13 +16,13 @@ Content-Type: application/json; charset=UTF-8
{
"data": {
"status": "stopped",
"dateDecision": "2016-06-10T15:46:26.246702+03:00",
"dateDecision": "2016-07-25T16:58:12.775860+03:00",
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
"title": "Недостатньо інформації",
"decision": "Тендер скасовується замовником",
"acceptance": true,
"dateCanceled": "2016-06-10T15:46:26.246731+03:00",
"dateAccepted": "2016-06-10T15:46:25.300396+03:00",
"dateCanceled": "2016-07-25T16:58:12.775885+03:00",
"dateAccepted": "2016-07-25T16:58:11.695567+03:00",
"author": {
"contactPoint": {
"email": "soleksuk@gmail.com",
Expand All @@ -44,11 +44,11 @@ Content-Type: application/json; charset=UTF-8
"locality": "м. Вінниця"
}
},
"dateSubmitted": "2016-06-10T15:46:24.217569+03:00",
"complaintID": "UA-2016-06-10-000002.5",
"date": "2016-06-10T15:46:24.215895+03:00",
"dateSubmitted": "2016-07-25T16:58:08.510097+03:00",
"complaintID": "UA-2016-07-25-000001.5",
"date": "2016-07-25T16:58:12.787525+03:00",
"type": "complaint",
"id": "cdb0daf55a064cef921875d95d19a0a6"
"id": "634e05bafeab4423b2bcb66e3ee40218"
}
}

14 changes: 7 additions & 7 deletions docs/source/tutorial/award-complaint-accepted-stopping.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/0ce93a11f6b14fdca10cf8cd620c0590/awards/2e1bea72fbdf4d7e95b7dfe9d2b3ec62/complaints/0c874592e4394ce3a12508ca080e991c?acc_token=8761022ea86e47a1bee93e69514f2e9a HTTP/1.0
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/fe1a325a84a948aa892ad2fdc8b5fe24?acc_token=364725f3ffb548aeb0b4743a85b5d853 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 228
Content-Type: application/json
Expand Down Expand Up @@ -40,14 +40,14 @@ Content-Type: application/json; charset=UTF-8
},
"acceptance": true,
"cancellationReason": "Тендер скасовується замовником",
"dateCanceled": "2016-06-10T15:46:27.272792+03:00",
"dateAccepted": "2016-06-10T15:46:25.096081+03:00",
"dateSubmitted": "2016-06-10T15:46:24.008701+03:00",
"complaintID": "UA-2016-06-10-000002.4",
"date": "2016-06-10T15:46:24.006995+03:00",
"dateCanceled": "2016-07-25T16:58:13.906257+03:00",
"dateAccepted": "2016-07-25T16:58:11.383436+03:00",
"dateSubmitted": "2016-07-25T16:58:08.317404+03:00",
"complaintID": "UA-2016-07-25-000001.4",
"date": "2016-07-25T16:58:13.918111+03:00",
"title": "Недостатньо інформації",
"type": "complaint",
"id": "0c874592e4394ce3a12508ca080e991c"
"id": "fe1a325a84a948aa892ad2fdc8b5fe24"
}
}

53 changes: 53 additions & 0 deletions docs/source/tutorial/award-complaint-answer.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/dcd76363828c4201a9d4790e6e515edd?acc_token=eaf0c7c748c248eea138bf5563d5355e HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 387
Content-Type: application/json
Host: api-sandbox.openprocurement.org
DATA:
{
"data": {
"status": "answered",
"resolutionType": "resolved",
"resolution": "Умови виправлено, вибір переможня буде розгянуто повторно"
}
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"status": "answered",
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
"author": {
"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": "м. Вінниця"
}
},
"resolutionType": "resolved",
"type": "claim",
"title": "Недостатньо інформації",
"dateAnswered": "2016-07-25T16:58:08.949948+03:00",
"dateSubmitted": "2016-07-25T16:58:08.716222+03:00",
"complaintID": "UA-2016-07-25-000001.6",
"date": "2016-07-25T16:58:08.962111+03:00",
"resolution": "Умови виправлено, вибір переможня буде розгянуто повторно",
"id": "dcd76363828c4201a9d4790e6e515edd"
}
}

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.3/tenders/0ce93a11f6b14fdca10cf8cd620c0590/awards/a2386e41cf4146e199354e6d86249f2b/complaints/688e1f10c788447aae25c8d8cc47de90?acc_token=c888d767f2604299b3d95429fd24db95 HTTP/1.0
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/50972776ae7a422ab4594abc79f8dc10/complaints/677947a51bd841538e6efee2ae2548c2?acc_token=b18000816b0247f5986c8570b5fbcd45 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 150
Content-Type: application/json
Expand Down Expand Up @@ -40,11 +40,11 @@ Content-Type: application/json; charset=UTF-8
},
"title": "Недостатньо інформації",
"cancellationReason": "Умови виправлено",
"dateCanceled": "2016-06-10T15:46:28.347598+03:00",
"complaintID": "UA-2016-06-10-000002.6",
"date": "2016-06-10T15:46:28.038789+03:00",
"type": "complaint",
"id": "688e1f10c788447aae25c8d8cc47de90"
"dateCanceled": "2016-07-25T16:58:15.110810+03:00",
"complaintID": "UA-2016-07-25-000001.9",
"date": "2016-07-25T16:58:15.127263+03:00",
"type": "claim",
"id": "677947a51bd841538e6efee2ae2548c2"
}
}

48 changes: 48 additions & 0 deletions docs/source/tutorial/award-complaint-claim.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PATCH /api/2.3/tenders/fcc7868335f744eb82e1870d6ed5f9e4/awards/0d1b966adfc64b679846d7a835008770/complaints/37fec44d11594d31ad0517a6d29b62db?acc_token=26419de98194488fbccc8595527be717 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 29
Content-Type: application/json
Host: api-sandbox.openprocurement.org
DATA:
{
"data": {
"status": "claim"
}
}

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"status": "claim",
"description": "Умови виставлені замовником не містять достатньо інформації, щоб заявка мала сенс.",
"author": {
"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": "м. Вінниця"
}
},
"title": "Недостатньо інформації",
"dateSubmitted": "2016-07-25T16:58:10.359982+03:00",
"complaintID": "UA-2016-07-25-000001.8",
"date": "2016-07-25T16:58:10.370897+03:00",
"type": "claim",
"id": "37fec44d11594d31ad0517a6d29b62db"
}
}

0 comments on commit 6d8c129

Please sign in to comment.