class EtFakeCcd::Service::ApiGatewayWebApp
Private Instance Methods
case_hash(ctid, id, jid)
click to toggle source
# File lib/et_fake_ccd/service/api_gateway_web_app.rb, line 54 def case_hash(ctid, id, jid) { "id": id, "jurisdiction": jid, "state": "1_Submitted", "case_type_id": ctid, "created_date": "2019-07-01T09:37:37.936", "last_modified": "2019-07-01T09:37:37.936", "security_classification": "PUBLIC", "case_fields": ::EtFakeCcd::DataStoreService.find_case_data_by_id(id, jid: jid, ctid: ctid)['data'], "data_classification": {}, "after_submit_callback_response": nil, "callback_response_status_code": nil, "callback_response_status": nil, "delete_draft_response_status_code": nil, "delete_draft_response_status": nil, "security_classifications": {} } end
cases_response(list, uid, jid, ctid)
click to toggle source
# File lib/et_fake_ccd/service/api_gateway_web_app.rb, line 45 def cases_response(list, uid, jid, ctid) j = { results: list.keys.map do |id| case_hash(ctid, id, jid) end } JSON.generate(j) end
config()
click to toggle source
# File lib/et_fake_ccd/service/api_gateway_web_app.rb, line 41 def config EtFakeCcd.config end
profile_response()
click to toggle source
# File lib/et_fake_ccd/service/api_gateway_web_app.rb, line 74 def profile_response j = { "user": { "idam": { "id": "22", "email": "m@m.com", "forename": "Buzz", "surname": "Lightyear", "roles": [ "caseworker", "caseworker-employment-tribunal-manchester-caseofficer", "caseworker-employment-tribunal-manchester-casesupervisor", "caseworker-employment", "caseworker-employment-tribunal-manchester", "caseworker-employment-tribunal-glasgow-caseofficer", "caseworker-employment-tribunal-glasgow-casesupervisor", "caseworker-employment-tribunal-glasgow", "caseworker", "caseworker-loa1", "caseworker-employment-tribunal-manchester-caseofficer-loa1", "caseworker-employment-tribunal-manchester-casesupervisor-loa1", "caseworker-employment-loa1", "caseworker-employment-tribunal-manchester-loa1", "caseworker-employment-tribunal-glasgow-caseofficer-loa1", "caseworker-employment-tribunal-glasgow-casesupervisor-loa1", "caseworker-employment-tribunal-glasgow-loa1", "caseworker-loa1" ], "defaultService": "CCD" } }, "channels": nil, "jurisdictions": [], "default": {}, "_links": {} } JSON.generate j end