{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/ram7912/343-accounting/1.0.0"}],"info":{"description":"API for other departments to interact with accounting.","version":"1.0.0","title":"Accounting API","contact":{"email":"ram7912@rit.edu"}},"tags":[{"name":"all departments","description":"Operations available to all departments"}],"paths":{"/register":{"post":{"tags":["all departments"],"summary":"attempts to register for a heartbeat for timekeeping purposes","operationId":"heartbeat","description":"By passing the correct parameters, a department is able to sign up (or, register) for a heartbeat sent to them via POST request when a simulated hour has passed.","parameters":[{"in":"query","name":"department","description":"The department requesting the heartbeat. can be one of the following values: [accounting, human resources, manufacturing, inventory, sales]","required":true,"schema":{"type":"string"}},{"in":"query","name":"url","description":"The URL that our server will ping every time interval.\n\n\n    We will send a POST request to this endpoint with no parameters.","required":true,"schema":{"type":"string"}},{"in":"query","name":"modifier","description":"A modifier to speed up our heartbeat *FOR TESTING PURPOSES ONLY*. Divide the normal time interval by this integer to get your actual heartbeat rate.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"request was registered","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/registerResponse"}}}}}}},"/request":{"post":{"tags":["all departments"],"summary":"attempts to request money from accounting","operationId":"request","description":"By passing the correct parameters, a department is able to request money from accounting.\n","parameters":[{"in":"query","name":"amount","description":"amount of money you are requesting to withdraw","required":true,"schema":{"type":"string"}},{"in":"query","name":"department","description":"the department requesting to withdraw. can be one of the following values: [accounting, human resources, manufacturing, inventory, sales]","required":true,"schema":{"type":"string"}},{"in":"query","name":"reason","required":true,"description":"reason you need to request money. can be one of the following: [payroll, commission, budget]","schema":{"type":"string"}}],"responses":{"200":{"description":"request was received correctly","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/requestResponse"}}}}}}},"/deposit":{"post":{"tags":["all departments"],"summary":"attempts to deposit money to accounting","operationId":"deposit","description":"By passing the correct parameters, a department is able to deposit money to accounting.\n","parameters":[{"in":"query","name":"amount","description":"amount of money you are attempting to deposit","required":true,"schema":{"type":"string"}},{"in":"query","name":"department","description":"the department requesting to withdraw. can be one of the following values: [accounting, human resources, manufacturing, inventory, sales]","required":true,"schema":{"type":"string"}},{"in":"query","name":"reason","required":true,"description":"reason you need to deposit money. can be one of the following: [payroll, commission, budget]","schema":{"type":"string"}}],"responses":{"200":{"description":"deposit was received correctly","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/depositResponse"}}}}}}}},"components":{"schemas":{"registerResponse":{"type":"object","required":["code"],"properties":{"error":{"type":"string","example":"Please include all fields: department, url. modifier field is optional."}}},"requestResponse":{"type":"object","required":["code"],"properties":{"success":{"type":"boolean","example":true},"error":{"type":"string","example":""}}},"depositResponse":{"type":"object","required":["code"],"properties":{"success":{"type":"boolean","example":true},"error":{"type":"string","example":""}}}}}}