{"id":22903930,"url":"https://github.com/tracktor/zoho-crm","last_synced_at":"2025-07-08T08:34:51.577Z","repository":{"id":193002218,"uuid":"185399800","full_name":"Tracktor/zoho-crm","owner":"Tracktor","description":"🗂 A gem to make working with Zoho CRM less painful","archived":false,"fork":false,"pushed_at":"2024-02-29T03:32:43.000Z","size":256,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-07T04:42:02.432Z","etag":null,"topics":["ruby","ruby-gem","zoho-crm"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Tracktor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-05-07T12:42:49.000Z","updated_at":"2023-09-06T07:54:20.000Z","dependencies_parsed_at":"2025-02-07T04:34:03.869Z","dependency_job_id":"dd87d3e6-f356-450c-ae13-da7daba81607","html_url":"https://github.com/Tracktor/zoho-crm","commit_stats":null,"previous_names":["tracktor/zoho-crm"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Fzoho-crm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Fzoho-crm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Fzoho-crm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Fzoho-crm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tracktor","download_url":"https://codeload.github.com/Tracktor/zoho-crm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604621,"owners_count":20804100,"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","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":["ruby","ruby-gem","zoho-crm"],"created_at":"2024-12-14T02:39:28.142Z","updated_at":"2025-04-01T07:56:49.274Z","avatar_url":"https://github.com/Tracktor.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"zoho-crm\n========\n\nA gem to make working with Zoho CRM less painful.\n\nRequirements\n------------\n\nThis gem requires Ruby version 2.6 or greater.\n\nInstallation\n------------\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"zoho-crm\"\n```\n\nAnd then execute:\n\n```console\n$ bundle install\n```\n\nUsage\n-----\n\n### Quickstart\n\n#### `ZohoCRM::Model`\n\n```ruby\nrequire \"zoho_crm\"\n\nclass ZohoUser \u003c ZohoCRM::Model\n  zoho_module \"Contact\"\n  zoho_field :email, as: \"Email_Address\"\n  zoho_field :full_name do |user|\n    \"#{user.first_name} #{user.last_name}\"\n  end\nend\n\nuser = User.new(email: \"john.smith@example.com\", first_name: \"John\", last_name: \"Smith\")\nzoho_user = ZohoUser.new(user)\njson = zoho_user.as_json\n```\n\n---\n\n#### `ZohoCRM::API`\n\n```ruby\nrequire \"zoho_crm\"\n\nZohoCRM::API.configure do |config|\n  config.region = \"eu\"\n  config.sandbox = true\n\n  config.client_id = ENV[\"ZOHO_CRM_API_CLIENT_ID\"]\n  config.client_secret = ENV[\"ZOHO_CRM_API_CLIENT_SECRET\"]\n  config.redirect_url = ENV[\"ZOHO_CRM_REDIRECT_URI\"]\n  config.scopes = %w[\n    ZohoCRM.modules.all\n  ]\nend\n\noauth_client = ZohoCRM::API::OAuth::Client.new\napi_client = ZohoCRM::API::Client.new(oauth_client)\n\n# OAuth authorization flow... (see the example app)\n\n# Get a record\napi_client.show(\"12345\", module_name: \"Contacts\")\n\n# Create a new record\ncontact_attributes = {\n  \"Email\" =\u003e \"hello.world@example.com\",\n  \"First_Name\" =\u003e \"Mister\",\n  \"Last_Name\" =\u003e \"World\",\n  \"Phone\" =\u003e \"+33 6 12 34 56 78\",\n}\napi_client.create(contact_attributes, module_name: \"Contacts\")\n\n# Update a record\napi_client.update(\"12345\", {\"First_name\" =\u003e \"John\"}, module_name: \"Contacts\")\n\n# Insert or Update a record (Upsert)\ncontact_attributes = {\n  \"Email\" =\u003e \"hello.world@example.com\",\n  \"First_Name\" =\u003e \"Mister\",\n  \"Last_Name\" =\u003e \"World\",\n  \"Phone\" =\u003e \"+33 6 12 34 56 78\",\n}\napi_client.upsert(contact_attributes, module_name: \"Contacts\", duplicate_check_fields: [\"Email\"])\n\n# Delete a record\napi_client.destroy(\"12345\", module_name: \"Contacts\")\n```\n\nFor a more complete example, look at the [example application](./example).\n\nDevelopment\n-----------\n\nAfter checking out the repo, run [`bin/setup`](./bin/setup) to install dependencies. Then, run `rake spec` to run the tests. You can also run [`bin/console`](./bin/console) for an interactive prompt that will allow you to experiment.\n\nThe default Rake task is setup to run the test suite then lint the code:\n\n```console\n$ rake\n```\n\n### Dependencies\n\nDevelopment dependencies are in the gem specification — see the [`zoho-crm.gemspec`](./zoho-crm.gemspec) file. If you need to add a dependency, add it to that file. **Do not add any gem to the Gemfile**.\n\n```ruby\nspec.add_development_dependency \"faker\", \"~\u003e 1.9\"\n```\n\n### Code style\n\nThe [standard][] gem is used to enforce coding style. A Rake task is available to check the code style:\n\n```console\n$ rake standard\n```\n\nThere is also a Rake task to fix code style offenses:\n\n```console\n$ rake standard:fix\n```\n\n[standard]: https://github.com/testdouble/standard\n\n### Tests\n\nTests are written using [RSpec][]. You can run the test suite using the dedicated Rake task:\n\n```console\n$ rake spec\n```\n\n[RSpec]: https://rspec.info/\n\n### Documentation\n\nThe API documentation is generated using [YARD][]:\n\n```console\n$ rake yard\n```\n\nThe documentation files will be generated under the `doc/` directory. You can browse the documentation by opening `doc/index.html` in a browser.\n\n[YARD]: https://yardoc.org/\n\n### Releasing a new version\n\nTo release a new version of the gem, follow these steps:\n\n1. Bump the version number in [`lib/zoho_crm/version.rb`](./lib/zoho_crm/version.rb)\n2. Update the [Changelog](./CHANGELOG.md). Make sure the link to the release on GitHub contains the correct version even though it doesn't exist yet.\n3. Commit the changes with the following commit template:\n   ```\n   Release version x.x.x\n   ```\n4. Push the new commit on GitHub\n5. Create [a new release](https://github.com/Tracktor/zoho-crm/releases/new) on Github:\n   1. The name of the new tag should have the following format: `vx.x.x`\n   2. The name of the release should be the same as the tag\n   3. The description of the release should be the content of the last section of the [Changelog](./CHANGELOG.md).\n\nContributing\n------------\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Tracktor/zoho-crm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftracktor%2Fzoho-crm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftracktor%2Fzoho-crm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftracktor%2Fzoho-crm/lists"}