{"id":21179559,"url":"https://github.com/klahap/mccgen","last_synced_at":"2025-10-18T03:07:55.356Z","repository":{"id":245801014,"uuid":"819269762","full_name":"klahap/mccgen","owner":"klahap","description":"A Gradle plugin that generates Kotlin code for Merchant Category Codes (MCC)","archived":false,"fork":false,"pushed_at":"2024-06-24T12:12:43.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T18:49:38.447Z","etag":null,"topics":["gradle-plugin","kotlin","mcc"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klahap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-24T07:14:17.000Z","updated_at":"2024-06-24T12:12:46.000Z","dependencies_parsed_at":"2024-06-24T08:43:31.200Z","dependency_job_id":"06b4c93b-6b55-4ea6-a7fb-773c777a14a3","html_url":"https://github.com/klahap/mccgen","commit_stats":null,"previous_names":["klahap/mccgen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/klahap/mccgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klahap%2Fmccgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klahap%2Fmccgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klahap%2Fmccgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klahap%2Fmccgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klahap","download_url":"https://codeload.github.com/klahap/mccgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klahap%2Fmccgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267639569,"owners_count":24119780,"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":"2025-07-29T02:00:12.549Z","response_time":2574,"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":["gradle-plugin","kotlin","mcc"],"created_at":"2024-11-20T17:32:19.666Z","updated_at":"2025-10-18T03:07:50.315Z","avatar_url":"https://github.com/klahap.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mccgen\n\nWelcome to `mccgen`, a Gradle plugin designed to generate Merchant Category Codes (MCC) for your Kotlin projects. This plugin retrieves MCC codes from the Stripe documentation and generates corresponding Kotlin code, simplifying the integration of these codes into your project.\n\n## Features\n\n- Fetches MCC codes from Stripe documentation.\n- Generates Kotlin code for easy usage in your projects.\n- Customizable package name and output directory.\n\n## Getting Started\n\n### Installation\n\nAdd the `mccgen` plugin to your `build.gradle.kts` file:\n\n```kotlin\nplugins {\n    id(\"io.github.klahap.mccgen\") version \"1.0.0\"\n}\n```\n\nConfigure the plugin in your `build.gradle.kts` file:\n\n```kotlin\nmccCodeGenerator {\n    source = MccSource.STRIPE\n    packageName = \"io.my.package.mcc\"\n    output = \"$buildDir/generated/mcc\"\n}\n```\n\n### Usage\n\nRun the following Gradle task to generate MCC codes:\n\n```sh\n./gradlew generateMccCodes\n```\n\nThis will generate the MCC codes and place them in the specified output directory.\n\n```kotlin\nenum class MccCategory(val label: String) {\n  AgriculturalServices(\"Agricultural services\"),\n  ContractedServices(\"Contracted services\"),\n  TransportationServices(\"Transportation services\"),\n  UtilityServices(\"Utility services\"),\n  RetailOutletServices(\"Retail outlet services\"),\n  ClothingShops(\"Clothing shops\"),\n  MiscellaneousShops(\"Miscellaneous shops\"),\n  BusinessServices(\"Business services\"),\n  ProfessionalServicesAndMembershipOrganisations(\"Professional services and membership organisations\"),\n  GovernmentServices(\"Government services\"),\n}\n\nenum class Mcc(\n    val value: String,\n    val label: String,\n    val code: Int,\n    val category: MccCategory,\n) {\n    AcRefrigerationRepair(\n        value = \"ac_refrigeration_repair\",\n        label = \"A/C, Refrigeration Repair\",\n        code = 7623,\n        category = MccCategory.BusinessServices,\n    ),\n    AccountingBookkeepingServices(\n        value = \"accounting_bookkeeping_services\",\n        label = \"Accounting/Bookkeeping Services\",\n        code = 8931,\n        category = MccCategory.ProfessionalServicesAndMembershipOrganisations\n    ),\n    // ...\n}\n```\n\n## Contributing\n\nWe welcome contributions to the `mccgen` project. If you have any ideas, suggestions, or issues, please feel free to open an issue or a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklahap%2Fmccgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklahap%2Fmccgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklahap%2Fmccgen/lists"}