GitXplorerGitXplorer
R

seguradora

public
0 stars
0 forks
1 issues

Commits

List of commits on branch main.
Verified
abecd4ee608dedbe2147a2fa888f1fe98ccf81c7

Merge pull request #2 from TopRoupi/risk-profile-refactor

RRoupiye committed 9 months ago
Unverified
0e40a7c9ea92a8bfe1d462d5b7b5dafa464f22e7

refactor set_eligible_lines

RRoupiye committed 9 months ago
Unverified
8d000c9acb6d11025472760754f4f848446919da

refactor riskprofile model

RRoupiye committed 9 months ago
Unverified
5a9af73174f7bab9940c45ccac654b76d102b8a2

refactor riskprofile controller

RRoupiye committed 9 months ago
Verified
22a80cd215c28df41a20d681b29708657a03b709

Update README.md

RRoupiye committed 9 months ago
Unverified
1feb010f9814be7008b230c589388d0d2f21bdc6

configs for deployment

RRoupiye committed 9 months ago

README

The README file for this repository.

implementation for a job application challenge: https://github.com/segdev-tecnologia/vagas/tree/main/backend/desafio2

dependencies

ruby 3.2.2
postgres

Configuration

make sure the postgress username and password is both set to "postgres" or make the necessary changes to database.yml

Test

example requests can be found in the Insomnia export json in the root folder of this repo.

there is also a hosted instance of this application running on https://seguradora-api.cap.greyrepo.xyz/

curl command to test the application:

curl --request POST \
  --url https://seguradora-api.cap.greyrepo.xyz/risk_profile/plan_suggestion \
  --header 'Content-Type: application/json' \
  --data '{
	"insured": {
		"age": 53,
		"dependents": 6,
		"house": {},
		"income": 10000,
		"marital_status": "married",
		"risk_questions": [1, 1, 1],
		"vehicle": {}
	}
}'
curl --request POST \
  --url https://seguradora-api.cap.greyrepo.xyz/risk_profile/plan_suggestion \
  --header 'Content-Type: application/json' \
  --data '{
	"insured": {
		"age": 53,
		"dependents": 6,
		"house": {"ownership_status": "rented"},
		"income": 10000,
		"marital_status": "married",
		"risk_questions": [1, 1, 1],
		"vehicle": {"year": 2022}
	}
}'