{"id":19806724,"url":"https://github.com/timnew/checkout-test","last_synced_at":"2026-06-16T09:31:48.875Z","repository":{"id":145702481,"uuid":"152871259","full_name":"timnew/checkout-test","owner":"timnew","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-13T12:52:29.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T18:04:32.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/timnew.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-13T12:47:09.000Z","updated_at":"2018-10-13T12:52:30.000Z","dependencies_parsed_at":"2023-08-25T07:49:33.023Z","dependency_job_id":null,"html_url":"https://github.com/timnew/checkout-test","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.06896551724137934,"last_synced_commit":"54a6ba4ba85780e6f0b455cb5b0f67e1778d9531"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timnew/checkout-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fcheckout-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fcheckout-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fcheckout-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fcheckout-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timnew","download_url":"https://codeload.github.com/timnew/checkout-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fcheckout-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34400451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":"2024-11-12T09:08:21.447Z","updated_at":"2026-06-16T09:31:48.864Z","avatar_url":"https://github.com/timnew.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coding Excise\n\nWe are interested in seeing your coding, problem solving and collaboration style. We would like you to build the following system. When you come to meet us for your programming interview, bring along your laptop or files, as you will be pairing with a employee who will work with you on your solution to complete a stretch goal.\n\nFor the purpose of this exercise, company is in the process of rewriting its job ads checkout system.\nWe want to offer different products to recruiters:\n\n| Name   | Description  | Retail |\n|--------|--------------|--------|\n| Classic Ad | Offers the most basic level of advertisement | $269.99 |\n| Stand out Ad | Allows advertisers to use a company logo and use a longer presentation text | $322.99 |\n| Premium Ad   | Same benefits as Standout Ad, but also puts the advertisement at the top of the results, allowing higher visibility | $394.99 |\n\nWe have established a number of special pricing rules for a small number of privileged customers:\n\n1. SecondBite\n\t- Gets a **3 for 2** deal on **Classic Ads**\n2. Axil Coffee Roasters\n\t- Gets a discount on **Stand out Ads** where the price drops to **$299.99** per ad\n3. MYER\n\t- Gets a **5 for 4** deal on **Stand out Ads**\n\t- Gets a discount on **Premium Ads** where the price drops to **$389.99** per ad\n\nThese details are regularly renegotiated, so we need the pricing rules to be as flexible as possible as they can **change** in the future with little notice.\n\nThe interface to our checkout looks like this pseudocode:\n\n```\nCheckout co = Checkout.new(pricingRules)\nco.add(item1)\nco.add(item2)\nco.total()\n```\n\n## Example scenarios\n\n```\nCustomer: default\nItems: `classic`, `standout`, `premium`\nTotal: $987.97\n\nCustomer: SecondBite\nItems: `classic`, `classic`, `classic`, `premium`\nTotal: $934.97\n\nCustomer: Axil Coffee Roasters\nItems: `standout`, `standout`, `standout`, `premium`\nTotal: $1294.96\n```\n## Tips\nWe value work-life balance and do not want you to lose a weekend trying to solve this problem. Only spend enough time required to produce an appropriate, clean, testable and maintainable solution to the stated\nproblem. You should focus on delivering a back-end implementation only. Keep it simple.\n\nPlease bring your laptop to the interview, or let us know beforehand if you would like us to provide one.\n\nGood luck, have fun with it, and we look forward to meeting you soon!\n\n\n## Additional Requirements\n1. High priority pricing rule\n2. List all items' price after discount\n3. Can get 1 Jora membership for free when purchased every another 10 items.\n4. List which discount rule applied to each item\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fcheckout-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimnew%2Fcheckout-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fcheckout-test/lists"}