{"id":24548195,"url":"https://github.com/flanker/etude1","last_synced_at":"2026-01-03T15:03:19.797Z","repository":{"id":20270260,"uuid":"23543345","full_name":"flanker/Etude1","owner":"flanker","description":"练习曲1","archived":false,"fork":false,"pushed_at":"2014-09-01T14:35:43.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T11:21:23.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flanker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-01T13:25:29.000Z","updated_at":"2014-09-01T14:31:06.000Z","dependencies_parsed_at":"2022-08-30T23:31:04.188Z","dependency_job_id":null,"html_url":"https://github.com/flanker/Etude1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flanker/Etude1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flanker%2FEtude1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flanker%2FEtude1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flanker%2FEtude1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flanker%2FEtude1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flanker","download_url":"https://codeload.github.com/flanker/Etude1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flanker%2FEtude1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28190761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-03T02:00:06.471Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T23:16:22.276Z","updated_at":"2026-01-03T15:03:19.760Z","avatar_url":"https://github.com/flanker.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Etude1 - Automobile Price Calculator\n====================================\n\nAn service provides total price calculation for automobile purchase.\n\nTechnical Requirement\n---------------------\n\n* Ruby Rack based micro-service\n* Support HTTP endpoint Api.\n* TDD/spec tests\n\nCalculation\n-----------\n\n### Total price\n\nTotal price = MSRP + Purchase Tax + Vehicel Tax + Compulsory Liability Insurance + Commercial Insurance\n\n* **MSRP** (Manufacturer's suggested retail price)\n* **Purchase Tax** (Vehicle purchase tax)\n\n        Purchase Tax = MSRP / (1 + 17%) * 10%\n\n* **Vehicle Tax** (Vehicle and vessel tax)\n\n        x \u003c=1.0L     ￥300\n        1.0L \u003c x \u003c= 1.6L    ￥420\n        1.6L \u003c x \u003c= 2.0L    ￥480\n        2.0L \u003c x \u003c= 2.5L    ￥900\n        2.5L \u003c x \u003c= 3.0L    ￥1920\n        3.0L \u003c x \u003c= 4.0L    ￥3480\n        4.0L \u003c x    ￥5280\n        \n* **Compulsory Liability Insurance**\n\n        Number of seats \u003c 6    ￥950\n        Number of seats \u003e= 6   ￥1100 \n        \n* **Commercial Insurance** (All items are optional)\n\n    - Third Party Liability Insurance\n            \n            Up to 50,000    ￥516\n            Up to 100,0000  ￥746\n            Up to 200,0000  ￥924\n            Up to 500,0000  ￥1252\n            Up to 1,000,000 ￥1630\n            \n    - Vehicle Damage Insurance\n    \n            ￥458 + MSRP * 1.088%\n    \n    - Glass Insurance\n    \n            MSRP * 0.2%\n            \n    - Passanger Insurance\n    \n            ￥50 * Number of seats\n\nExample Interaction\n-------------------\n\n### Request\n\n    POST /price HTTP/1.1\n    Host: www.test-host.com\n    Accept: application/json\n    Content-Type: application/json\n    \n    {\n      \"car\": {\n        \"Content-Type\": \"BMW\",\n        \"model\": \"BMW 328i\",\n        \"engine\": {\n          \"displacement\": 2.0,\n          \"power\": 180\n        },\n        \"body\": {\n          \"seat_number\": 5\n        }\n      },\n      \"prices\": {\n        \"total\": 0,\n        \"msrp\": 0,\n        \"purchase_tax\": 0,\n        \"vehicle_tax\": 0,\n        \"compulsory_insurance\": 0,\n        \"commercial_insurance\": {\n          \"third_party\": {\n            \"up_to\": 500000,\n            \"price\": 0\n          },\n          \"damage\": {\n            \"selected\": true,\n            \"price\": 0\n          },\n          \"glass\": {\n            \"selected\": true,\n            \"price\": 0\n          },\n          \"passanger\": {\n            \"selected\": true,\n            \"price\": 0\n          }\n        }\n      }\n    }\n\n### Response\n\n    HTTP/1.1 200 OK\n    Content-Type: application/json\n    \n    {\n      \"car\": {\n        \"Content-Type\": \"BMW\",\n        \"model\": \"BMW 328i\",\n        \"engine\": {\n          \"displacement\": 2.0,\n          \"power\": 180\n        },\n        \"body\": {\n          \"seat_number\": 5\n        }\n      },\n      \"prices\": {\n        \"total\": 437830,\n        \"msrp\": 396000,\n        \"purchase_tax\": 33846,\n        \"vehicle_tax\": 480,\n        \"compulsory_insurance\": 950,\n        \"commercial_insurance\": {\n          \"third_party\": {\n            \"up_to\": 500000,\n            \"price\": 746\n          },\n          \"damage\": {\n            \"selected\": true,\n            \"price\": 4766\n          },\n          \"glass\": {\n            \"selected\": true,\n            \"price\": 792\n          },\n          \"passanger\": {\n            \"selected\": true,\n            \"price\": 250\n          }\n        }\n      }\n    }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflanker%2Fetude1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflanker%2Fetude1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflanker%2Fetude1/lists"}